EXT-X-KEY HLS on AVPlayer iOS
I'm trying to get my AVPlayer to read the HLS HTTP Encryption m3u8 playlist, but it doesn't seem to work at all.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:2078799
#EXT-X-KEY:METHOD=AES-128,URI="mykey"
#EXTINF:9.009,
248_1_2078799.ts?m=1492793899
#EXTINF:9.009,
248_1_2078800.ts?m=1492793899
#EXTINF:9.009,
248_1_2078801.ts?m=1492793899
#EXT-X-KEY:METHOD=AES-128,URI="mykey2aftersegment"
#EXTINF:9.009,
248_1_2078802.ts?m=1492793899
#EXTINF:9.009,
248_1_2078803.ts?m=1492793899
#EXTINF:9.009,
248_1_2078804.ts?m=1492793899
My AVPlayer doesn't know there is an EXT-X-KEY header in it. So I was trying to change the playlist schema to access my delegate method
func resourceLoader(_ resourceLoader: AVAssetResourceLoader, shouldWaitForLoadingOfRequestedResource loadingRequest: AVAssetResourceLoadingRequest) -> Bool {
}
But now I don't know what I should do. Do you have any ideas?
+3
source to share
No one has answered this question yet
Check out similar questions: