I am trying to use this library to enable caching my videos. And I receive this error:
Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSLocalizedDescription=unsupported URL, NSErrorFailingURLStringKey=4185c72c-252e-4019-8c1c-e30b4ccbe597/, NSErrorFailingURLKey=4185c72c-252e-4019-8c1c-e30b4ccbe597/, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <85069315-C50B-404F-86D8-548ED16B9103>.<1>
The code that is causing this problem is:
VIResourceLoaderManager *resourceLoaderManager = [VIResourceLoaderManager new];
self.resourceLoaderManager = resourceLoaderManager;
AVPlayerItem *playerItem = [resourceLoaderManager playerItemWithURL:url];
return [self initWithPlayerItem:playerItem frameUpdater:frameUpdater];
}
However if I remove the lines added for this library to work, then it works perfectly( without caching ) like this:
AVPlayerItem* item = [AVPlayerItem playerItemWithURL:url];
return [self initWithPlayerItem:item frameUpdater:frameUpdater];
The url in question is https://firebasestorage.googleapis.com/v0/b/app_domain/o/ed8f47cc-e9ee-43d0-848e-06edaaeaab70.mp4?alt=media&token=4185c72c-252e-4019-8c1c-e30b4ccbe597
I have changed the url a little bit for security. But it plays in browser and as I said it works well without the caching code.