首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >FairPlay脱机播放不适用于iOS 10

FairPlay脱机播放不适用于iOS 10
EN

Stack Overflow用户
提问于 2020-08-19 04:15:09
回答 1查看 461关注 0票数 0

我们正在使用EZDRM来保护DRM。

在线播放在iOS 10-13上运行良好,而脱机播放在iOS 11-13上工作,但iOS 10不起作用;在iOS 10中引入了持久性内容键,因此它应该可以工作。

我使用了EZDRM的示例项目进行测试,该项目使用AVAssetResourceLoaderDelegate。下载视频和内容键后,当我们试图播放下载的视频时,会发生以下错误。

代码语言:javascript
运行
复制
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x17005d1c0 {Error Domain=NSOSStatusErrorDomain Code=-42651 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-42651), NSLocalizedDescription=The operation could not be completed}
代码语言:javascript
运行
复制
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x17005be40 {Error Domain=NSOSStatusErrorDomain Code=-12882 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-12882), NSLocalizedDescription=The operation could not be completed}

记录加载请求对象(来自iOS 10):

代码语言:javascript
运行
复制
<AVAssetResourceLoadingRequest: 0x174201f10, URL request = <NSMutableURLRequest: 0x1702009a0> { URL: skd://fps.ezdrm.com/;xxxxxx }, request ID = 2, content information request = <AVAssetResourceLoadingContentInformationRequest: 0x174202060, content type = "(null)", content length = 0, byte range access supported = NO, disk caching permitted = NO, renewal date = (null)>, data request = <AVAssetResourceLoadingDataRequest: 0x174201de0, requested offset = 0, requested length = 9223372036854775807, requests all data to end of resource = YES, current offset = 0>>

我发现:

  • disk caching permitted = NO on iOS 10
  • disk caching permitted = YES on iOS 11-13

不确定这是否是失败的原因,也不知道是哪个部分控制了该属性的值。

我还使用苹果的HLSCatalogWithFPS进行测试,后者使用AVContentKeySession。最初,它的部署目标是iOS 11.3,我做了一些修改,以便它也可以在iOS 10.3上运行,例如:

  • keyRequest.respondByRequestingPersistableContentKeyRequestAndReturnError() -> keyRequest.respondByRequestingPersistableContentKeyRequest()
  • AVAggregateAssetDownloadTask -> AVAssetDownloadTask

但是,在调用respondByRequestingPersistableContentKeyRequest()之后,contentKeySession:didProvidePersistableContentKeyRequest:没有被调用,而是调用了contentKeySession:didProvideContentKeyRequest:,它在这里创建了一个无限循环。

根据文件https://developer.apple.com/documentation/avfoundation/avcontentkeyrequest/2799207-respondbyrequestingpersistableco

如果委托不响应contentKeySession:didProvidePersistableContentKeyRequest:.,则返回NSInternalInconsistencyException。

因此,我试图注释掉该委托方法,但是没有任何例外;如果它在iOS 11上运行,就会有异常。

似乎整个FairPlay离线播放都不能在iOS 10上运行,有人能帮忙吗?

EN

回答 1

Stack Overflow用户

发布于 2020-08-20 07:39:19

在EZDRM的iOS脱机 示例中,他们使用iOS11作为基本版本。这不是巧合,它只支持iOS11和之上。

持久性内容密钥是在iOS 10中引入的,因此它应该可以工作。

这不全是关于持久内容键的,他们在此之后添加了更多的内容,例如,他们在iOS版本10.3中添加了iOS,等等。我不确定EZDRM是否支持这一点,但这是SDK中的重要进展。

公司只能支持稳定的版本。我不确定他们的具体原因,但我能理解。我从未使用过EZDRM的SDK。

另外,请查看文档:v2.pdf

最好的。

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

https://stackoverflow.com/questions/63479909

复制
相关文章

相似问题

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