iOS FairPlay videos not playing after obtaining CKC from server

I am trying to implement FairPlay in my application.


I am able to play an encrypted video using the SDK given by Apple but the problem is the SDK only supports iOS 11+ but my project supports iOS 9+. The Delegate methods used in the sample SDK are available from iOS 11+


So i have searched online and written the code but i am unable to play a video.


Here are the links in am using:

  1. Playlist: https://willzhanmswest.streaming.mediaservices.windows.net/92fc0471-0878-4eeb-80a3-e5b6fc497806/NoAudio.ism/manifest(format=m3u8-aapl)
  2. Certificate: https://openidconnectweb.azurewebsites.net/Content/FPSAC.cer


Here are the steps i have followed:

  1. Added a delegate to the AVURLAsset to call this delegate function shouldWaitForLoadingOfRequestedResource.
  2. In this function, i am first getting the contents of certificate in NSData
  3. Then, i am obtaining the asset string and converting it to NSData.
  4. Then, i am calling this function to create SPC value.
NSData *spc = [loadingRequest streamingContentKeyRequestDataForApp:certificate contentIdentifier:assetId options:nil error:nil];


  1. The SPC received and Asset ID is then passed to Azure server with application/x-www-form-urlencoded content-type.
  2. The CKC received is then trimmed to remove and tags and then converted it to Base64String and then called these functions


[dataRequest respondWithData:base64CkcData];
[loadingRequest finishLoading];

Can anyone help me find what am i doing wrong here?

Thanks.

You would be better off asking this question in hte FairPlay Streaming forum. The FairPlay experts may not be reading this forum.

iOS FairPlay videos not playing after obtaining CKC from server
 
 
Q