FairPlay multiple persistent keys problem

Hi,


I am implementing FairPlay support on iOS with offline mode feature. Online playback works great but I faced with problem on offline mode.


Scenario:

1) Download video A -> Send SPC to Key Server and obtain CKC -> get persistentContentKey from CKC -> save key data locally -> Video A works great

2) Download video B -> ..the same... -> Video B works great, BUT! video A stops working: There is error on AVPlayerItem.status:

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


Both keys are stored locally .Both files with persistent keys are present.


Our KSM server requires unique assetID for each media so persistent keys should be unique for each video too.

assetID looks like '7acXXaXX-b2XX-4ecf-9X32-XXXXd9cXXX'

m3u8 tag as 'skd://fps.xxxxx.com;7acXXaXX-b2XX-4ecf-9X32-XXXXd9cXXX'


I use assetID to generate SPC:

request.streamingContentKeyRequestData(forApp: cert, assetIDData, options: options)

And to make a call to KSM API

let ksmURL = URL(string: Self.ksmURLString + assetId + "?CustomData=\(token)")


I found that each call of persistentContentKey:

request.persistentContentKey(fromKeyVendorResponse: keyVendorResponse, options: options)

somehow invalidates previous stored persistent keys. If skip this call for video B, video A will still work.

Is it possible there some licence limitation on KSM (KSM support says NO)?

Really needs help!

Hi

i have exactly the same problem (the call to persistentContentKey invalidate previous persisted key.) except my error is :
Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-42800), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x2810063a0 {Error Domain=NSOSStatusErrorDomain Code=-42800 "(null)"}}

as in the previous question, my files are correctly stored and the call to streamingContentKeyRequestData uses a unique id as assetIDData.


FairPlay multiple persistent keys problem
 
 
Q