下载启用了Fairplay的视频时,在获取服务器播放上下文时出错 [英] Error while fetching Server Playback Context when downloading Fairplay enabled videos

查看:232
本文介绍了下载启用了Fairplay的视频时,在获取服务器播放上下文时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实施脱机FPS时出现AVFoundation错误-11800 我正在使用FPS实施脱机HLS.

While Implementing Offline FPS Getting AVFoundation Error -11800 I am implementing the Offline HLS using FPS.

我已经使用AVAssetDownloadDelegate下载了视频 现在,对于DRM内容,我需要获取许可证,因此我已经实现了AVAssetResourceLoaderDelegate 在AVAssetResourceLoaderDelegate中一切正常,我获得了CKC或许可证,但是当我执行以下代码时

I have downloaded the video using AVAssetDownloadDelegate Now For DRM content I need to fetch license so I have implemented the AVAssetResourceLoaderDelegate Everything is working fine in AVAssetResourceLoaderDelegate, I got the CKC or License but when I execute following code

让persistentContentKeyContext =尝试loadingRequest.persistentContentKey(fromKeyVendorResponse:responseData,选项:nil)

let persistentContentKeyContext = try loadingRequest.persistentContentKey(fromKeyVendorResponse: responseData, options: nil)

我收到以下错误消息

Error Domain = AVFoundationErrorDomain代码= -11800操作无法完成" UserInfo = {NSLocalizedFailureReason =发生未知错误(-12158),NSLocalizedDescription =操作无法完成,NSUnderlyingError = 0x1c084a6e0 {Error Domain = NSOSStatusErrorDomain Code = -12158(null)"}}

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12158), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c084a6e0 {Error Domain=NSOSStatusErrorDomain Code=-12158 "(null)"}}

任何人都可以告诉我此错误代码是什么意思以及如何解决此错误.

Can anyone please tell me what does this error codes means and how to resolve this error.

推荐答案

不幸的是,您所看到的错误响应并不像您所注意到的那样提供了很多信息,并且可能涉及多个失败案例.

Unfortunately, the error response you are seeing is not very informative as you have noticed and could cover multiple failure cases.

这通常意味着设备FairPlay服务无法正确解码DRM服务器提供给设备的CKC,否则其中的某些信息与永久许可证不一致.

It is typically means that the device FairPlay service cannot properly decode the CKC that your DRM server provided to the device, or else that some of the information in it is not consistent with a persistent license.

这是您要调试的问题,因为发回的CKC是以无法读取的方式进行加密的-请参阅下面的Apple示意图,显示顺序:

This is a problem for you to debug as the CKC that is sent back is encrypted in a way that you will not be able to read - see diagram below from Apple showing the sequence:

调试和调查此问题的最佳方法通常是与DRM服务器的提供者(上图中的关键服务器)联系,看看他们是否可以在服务器端对其进行调查并解码他们发送给您的响应,因此您可以检查它是否符合您的期望以及持续时间等是否正确.

The best way to debug and investigate this is usually to contact the provider of your DRM server (key server in the above diagram) and see if they can investigate it on the server side and decode the response they are sending to you so you can check it matches what you are expecting and the persistent period etc is correct.

这篇关于下载启用了Fairplay的视频时,在获取服务器播放上下文时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆