offline HLS AES - 128 playback not working

Hi,


We are using AVAggregateAssetDownloadTask to download the HLS content for offline usage. This is working fine for our few contents. Bt we hv some contents which are encrypted with AES-128 . These AES-128 assets are not playing on ofline mode. In Online mode its playing because its downloading the AES-128 crypt key from server.


Can anyone suggest whats the right fix for this.? should I use AVContentkeySession with "clear" AVContentKeySystem to download and store the AES-128 cryt key in persistent storage. will this work in both online and offline mode.?

Replies

How do you delivery the AES-128 crypt key to AVPlayer? just use http url?

If you use customer protocol(like key://) then you can use the AVAssetResourceLoader to return the key to AVPlayer offline.

Or another way is to use localhost http proxy.