I have been working on a simple AVPlayer
to play encrypted HLS
media.
I am using the AVAssetResourceLoaderDelegate
to handle t
If you take a look on Apple example code where they show bipbop.m3u8 HLS playback you will see that they are using masks for real http requests: "http:/host/bipbop.m3u8" => "custom_scheme:/host/bipbop.m3u8" Same trick should be made with playlist subresources.
Otherwise avplayer ignores AVAssetResourceLoaderDelegate and load data directly.
You need to implement some kind of mapping:
NSString* videoUrl = @"fake_scheme://host/video.m3u8";
NSURL *streamURL = [NSURL URLWithString:videoUrl];