3 Replies
      Latest reply on Mar 21, 2018 7:15 PM by anders.u
      aaani Level 1 Level 1 (0 points)

        Hello,

         

        I am trying to play Muxed/encrypted/main.ts from the Test Streams provided by Apple with Fairplay key delivery.


        Here is what my setup looks like:

        - I modified Muxed/encrypted/prog_index.m3u8 to use Fairplay
        #EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://<my_ksm_url>",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"

        - I hardcoded my KSM to always return Content Key = 0x3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C and IV = 0xD5FBD6B82ED93E4EF98AE40931EE33B7 and HDCP is set to be not required (0xEF72894CA7895B78)

        - My HTML5 client looks like what's provided by Apple - mac_client/FPS_in_Safari_Example.html with minor modifications - I make a POST request to the KSM, and No Pragman request header.

         

        Output:

        - I get the video player with the play button crossed like shown here in Figure 1 https://developer.apple.com/library/content/technotes/tn2454/_index.html

        - Further debugging the client shows the certificate is acquired, the webkitneedkey event is triggered, the key session is created with init data, webkitkeymessage event is triggered, license request is issued, key session is updated with Uint8Array license, and the webkitkeyadded event in triggered. Eventually the error event on the video element is triggered with MediaError code: 3 which is the code for MEDIA_ERR_DECODE. Note that no webkitkeyerror event is triggered.

         

        Further debugging:

        - Assuming that it's a content authoring issue, I modified my playlist to use keyformat of identity.

        #EXT-X-KEY:METHOD=SAMPLE-AES,URI="key.bin",KEYFORMAT="identity",IV=0xD5FBD6B82ED93E4EF98AE40931EE33B7

        where key.bin contains the binary equivalent of 0x3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C

        Surprisingly the content played successfully with above modification indicating that there are no issues with content authoring.

        - I double checked my KSM and D function implementations. They pass all the tests provided by the Apple. As instructed in https://developer.apple.com/library/content/technotes/tn2454/_index.html I used arbitrary content key and IV and ensured the output CKC has the correct IV and Key

        - I double checked my deployment credentials are correct.

        - I removed the HDCP TLLV from CKC, and tried with Type 0 and Type 1 but it didn't change the result.

         

        macOS Version is 10.12.6 and Safari version is Version 11.0.2 (12604.4.7.1.4)

         

        At this point, I am not sure what else I can try. Any help is appreciated. Thanks!