iOS: Playing offline HLS with AES-128 encryption

我是研究僧i 提交于 2019-12-11 15:10:51

问题


With out FairPlay i am planning to download Streaming URL Content and key.

For this i have used Apple sample code HLSCatalog and in that i have integrated below mechanism to get the decrypt key.

https://developer.apple.com/documentation/avfoundation/media_assets_playback_and_editing/using_avfoundation_to_play_and_persist_http_live_streams

Playing Offline HLS with AES-128 encryption iOS

Here i am successfully able to download the key. Once key download is complete then it is calling the below delegate method. When i print the aggregateAssetDownloadTask url then the url schema it printing as nothttps. Because of this it is executing func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { let userDefaults = UserDefaults.standard delegate method.

func urlSession(_ session: URLSession, aggregateAssetDownloadTask: AVAggregateAssetDownloadTask, willDownloadTo location: URL)

So here finally i am unable to understand how to download media asset, after downloading decrypt key. Can any one please help me out. If any one have sample code, can you please provide here.


回答1:


Kaltura player open source lib for that - Enjoy :-) https://github.com/kaltura/playkit-ios-dtg



来源:https://stackoverflow.com/questions/58625005/ios-playing-offline-hls-with-aes-128-encryption

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!