3
我正在實施Apple Fireplay DRM以將加密內容傳遞到設備。 我能夠成功加載證書,但是當我嘗試從AVAssetResourceLoadingRequest
獲得SPC數據時,出現此錯誤。獲取密鑰請求數據時出錯:AVFoundationErrorDomain原因:可選(「發生未知錯誤(-42650)」)
Error obtaining key request data: AVFoundationErrorDomain reason: Optional("An unknown error occurred (-42650)")
以下是代碼來檢索SPC內容
let spcData: Data!
do {
/*
To obtain the Server Playback Context (SPC), we call
AVAssetResourceLoadingRequest.streamingContentKeyRequestData(forApp:contentIdentifier:options:)
using the information we obtained earlier.
*/
spcData = try resourceLoadingRequest.streamingContentKeyRequestData(forApp: applicationCertificate, contentIdentifier: assetIDData, options: resourceLoadingRequestOptions)
} catch let error as NSError {
print("Error obtaining key request data: \(error.domain) reason: \(error.localizedFailureReason)")
resourceLoadingRequest.finishLoading(with: error)
return
}
我已經搜索到了錯誤代碼:42650蘋果開發者論壇,但沒有運氣!
你嘗試過多種設備嗎? – aergistal