How can I get this Fairplay HLS setup to work? - ios

I'm running:
mediafilesegmenter movie.mp4 --encrypt-key-file=key.bin --streaming-key-delivery -t 10 --file-base=.`
where key.bin is just aaaaa... (32 a's). Then, in my prog_index.m3u8 file, I set it up as:
#EXT-X-KEY:METHOD=AES-128,URI="http://192.168.1.27/just_key.bin",KEYFORMAT="identity",IV=0x6161616161...
However, when I try to run it, I get:
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16040), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c0250200 {Error Domain=NSOSStatusErrorDomain Code=-16040 "(null)"}.
just_key.bin is just 16 a's.
Any ideas what might be the issue? Is there an easy way to get Fairplay going otherwise?

FairPlay uses SAMPLE-AES encryption, not AES-128. Try with:
METHOD=SAMPLE-AES

Related

HLS Player gives error and not playing the URL

I tried to play a live streaming url using AVplayer, the url working fine in the web. the server guy told me that in the response content type is application/x-mpegURL and video/MP2T. but when ever I try to play that im getting error messages.
Error Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped" UserInfo={NSUnderlyingError=0x7fe6bcae2170 {Error Domain=CoreMediaErrorDomain Code=-12939 "byte range and no content length - error code is 200" UserInfo={NSDescription=byte range and no content length - error code is 200
ps: the player which i created is working fine with others urls
can you please tell me what i need to do?

My app is collecting a lot of StoreKit underlyingErrors: AMSErrorDomain Code=305 Purchase Failed, what might be the reasons?

The issue occurs in production, couldn't reproduce it in Sandbox.
Full example of underlyingError I get:
Error Domain=SKErrorDomain
Code=0
"An unknown error occurred"
UserInfo={
NSLocalizedDescription=An unknown error occurred,
NSUnderlyingError=0x282db1230 {
Error Domain=ASDErrorDomain
Code=504
"The operation couldn’t be completed. (ASDErrorDomain error 504.)"
UserInfo={
NSLocalizedDescription=The operation couldn’t be completed. (ASDErrorDomain error 504.),
NSUnderlyingError=0x282db0780 {
Error Domain=AMSErrorDomain
Code=305
"Purchase Failed"
UserInfo={
NSLocalizedDescription=Purchase Failed,
NSLocalizedFailureReason=Server canceled the purchase
}
}
}
}
};
What might be the reasons for it? Is there really something I can do to resolve it?

HTTP2 NSPOSIXErrorDomain Code=100 "Protocol error”

Error Domain=NSPOSIXErrorDomain Code=100 "Protocol error"
UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask
<3EEC44C3-80A3-47B1-A0FD-C5DAD842FAAE>.<2>,
_kCFStreamErrorDomainKey=1, NSErrorPeerAddressKey={length = 16, capacity = 16, bytes =
0x100201bb34d5b9460000000000000000}
I recently switched my server and when I try to get a response am getting this error. I tried changing the header but it didn't work for me. It is working fine when I tried in postman and android

Strange Behaviour while loading URL in Webview in IOS

It looks simple, but don't know what goes wrong. I am trying to load a basic URL in WebView, as shown below
WebsiteWebView.delegate=self;
NSURL* url = [NSURL URLWithString:#"http://firstclasspizzaoc.com/"];
[WebsiteWebView loadRequest:[NSURLRequest requestWithURL:url]];
while loading i am getting below error everytime..
Error : Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0xe036d20 {NSErrorFailingURLKey=http://firstclasspizzaoc.com/, NSErrorFailingURLStringKey=http://firstclasspizzaoc.com/}
2014-01-07 15:18:46.142 FirstClassPizza[1583:
Error : Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo=0xe0ef310 {NSErrorFailingURLStringKey=XXXXXXXX, NSErrorFailingURLKey=XXXXXXXX, NSLocalizedDescription=A server with the specified hostname could not be found., NSUnderlyingError=0xcbe9130 "A server with the specified hostname could not be found."}
At Browser it is loading perfectly..
Please suggest what went wrong in my code..
Any Valuable suggestions will be appreciated...
Thanks
It is due to Your Web URL http://firstclasspizzaoc.com/ can you use your url with
http://www.firstclasspizzaoc.com/
You can find your answer here :
How do I fix NSURLErrorDomain error -999 in iPhone 3.0 OS
This thread contained this description for this error: "This error may occur if an another request is made before the previous request of WebView is completed..."
I worked around this by ignoring this error and letting the webview continue to load.
if ([error code] != NSURLErrorCancelled) {
//show error alert, etc.
}

AVAssetExportSessionStatusFailed randomly to write the video

I am creating the video from a set of images with AVAssetwriter and AVAssetExportSession and successfully getting the video and save it to the documents. But randomly the video exporting failed and it shows An Unknown error occured with error code -11800.
ExportSessionError: -11800 adn userinfo{
NSLocalizedDescription = "The operation could not be completed";
NSLocalizedFailureReason = "An unknown error occurred (-12124)";
NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-12124 \"The operation couldn\U2019t be completed. (OSStatus error -12124.)\"";
This is the error console i got.. Please help me.. Thanks

Resources