Fairplay Offline playback error

I am using EZDRM provider for DRM protection and using Fairplay on Ipad application, the online video streaming works perfectly , we have also added offline support through the backend and i am downloading the video and the offline key and storing it on the device.

If I download one video and switch the device to airplane mode, then the video plays properly in offline case but if I again download a new video then the newly downloaded video plays properly in offline case but the one that was downloaded before stops working, the avplayeritem responds with errror -

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

Basically only the last downloaded video plays in offline mode and all the other downloaded videos fail with the above error, any idea how to fix this issue ?


I have also extracted the container and checked there are different key files downloaded for different videos and the proper key is accessed while playing the video, it is not over riding the previously downloaded key.


What does the error code: 42803 indicate there is no documentation mentioning the significance of this error code. ?

Replies

Also is it necessary to add TLLV on the server end to support offline playback?

Having the same issue. Did u manage to find out what the problem is?

Make sure you set correct offline content identifier on a serverside. The identifier you set should be associated with the specific rendition/stream allowed by the license. This helped me

Did you had the exact same issue as the OP? We are facing the exact same issue (download 2 assets, only the last asset will play offline) and are trying to figure out the cause. Maybe you could point us into the right direction?


We are pretty sure that the offline content identifier is the correct one as it is playable offline, it only fails if you download a second asset.

Hi,

I have the same problem - https://forums.developer.apple.com/thread/133514

Did you get solution for it? Is it KSM side issue?

Thanks.

For us, we had two issues.

Nr 1: we were always using the same contentId for different assets.

Nr 2: We forgot to implement the AVContentKeySessionDelegate function:

Code Block swift
public func contentKeySession(_ session: AVContentKeySession, didUpdatePersistableContentKey persistableContentKey: Data, forContentKeyIdentifier keyIdentifier: Any)


So, when you have both a storageDuration & playbackDuration, your CKC will get updated once it starts playing the first time. You should capture that by implementing the function above and overwriting the currently persistent key.

Hope this helps anyone
  • We had the same issue, but could not receive "didUpdatePersistableContentKey" callback. I don't know what is the difference. My env: Xcode version is 13.2.1, iOS version is 14.4.

Add a Comment
Hi, do you notice that the "Title ID" TTLV description in PFS Programing guide(V4.3), if some streams has same "Title ID", it will be regard as a stream group, once you request a new persistent key for any content of this group, all the previous persistent keys of this group will be invalidate, so for avoiding this case, you need make sure your server response a CKC with different "Title ID" TTLV field value.

Hi, I had exactly the same issue when I changed skd identifier (like "0537e22c-5399-2427-f2ef-e323f069e02e") to a custom identifier like "CONTENID-0000-EPISODEID-0000-DOWNLOADID-0000". Nonetheless if I change identifier to "C0000-E0000-D0000" and it works again.

Eventually I returned original identifier allowed by the license.

  • Is that last one a customer identifier or generated from your processing pipeline?

Add a Comment

Hi, I'm facing the same issue as well. It was working fine for over a year, but now I suddenly started facing this problem. Did anyone find the root cause of this issue?