首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >让AVAssetResourceLoaderDelegate和AVContentKeySessionDelegate协同工作

让AVAssetResourceLoaderDelegate和AVContentKeySessionDelegate协同工作
EN

Stack Overflow用户
提问于 2020-05-27 00:28:54
回答 1查看 188关注 0票数 0

我正在使用AVAssetResourceLoaderDelegate加载字幕和其他音频曲目(m2u8播放列表)。我使用AVContentKeySession和AVContentKeySessionDelegate来解密内容(DRM)。另外,它们都工作得很好:字幕被加载和显示,AVPlayer要求密钥,它被成功地服务。但是,当我将它们一起使用时,AVPlayer从不通过AVContentKeySessionDelegate请求它的密钥。

当我在resourceLoader内部时,我曾尝试通过processContentKeyRequest手动请求密钥。即使我得到了内容密钥,看起来AVPlayer也从未收到过。

我不能在AVAssetResourceLoaderDelegate中处理密钥,因为我需要解决双重过期问题,所以我需要使用AVContentKeySessionDelegate来接收didUpdatePersistableContentKey。

EN

回答 1

Stack Overflow用户

发布于 2020-05-27 01:51:18

显然,AVAssetResourceLoaderDelegate的shouldWaitForLoadingOfRequestedResource必须返回false才能启动密钥会话加载。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62026929

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档