Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairplay on safari not working #4489

Closed
sridhard opened this issue Sep 17, 2022 · 13 comments
Closed

Fairplay on safari not working #4489

sridhard opened this issue Sep 17, 2022 · 13 comments
Labels
component: FairPlay The issue involves the FairPlay DRM priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@sridhard
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes I have checked #4470 #4469 and other fairplay related isues

What version of Shaka Player are you using?
Latest (4.2.1)

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Both demo app and custom apps not working

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Mac OS, Safari

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
NA

What are the manifest and license server URIs?
ManifestUrl: https://learnyst-content-mumbai.s3.ap-south-1.amazonaws.com/v5/schools/11075/courses/133080/paid/sdrm/1884011/audio_video/V22_P_lyst2517_cenc/stream.m3u8

License Server Url: https://4adf8ffe.drm-fairplay-licensing.axprod.net/AcquireLicense

License Certificate Url: https://fps-certs.learnyst.com/fairplay.cer

License Header: X-AxDRM-Message
License Header Value: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNTIxZWU5NWQtOTUxMi00ZmE2LTk3NmEtYWQ4ZjAwZDdiNDQzIiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsInZlcnNpb24iOjIsImxpY2Vuc2UiOnsiZXhwaXJhdGlvbl9kYXRldGltZSI6IjIwMjMtMTAtMDlUMDk6MDE6NTAuNzg2WiIsImFsbG93X3BlcnNpc3RlbmNlIjpmYWxzZX0sImNvbnRlbnRfa2V5c19zb3VyY2UiOnsiaW5saW5lIjpbeyJpZCI6ImZjNzgxOTAwLTAwMDAtMDAwMC0wMTEwLTc1MDEwMDEzMzA4MCIsImVuY3J5cHRlZF9rZXkiOiI5eGZ2M2Zab0pZc2pzQzl4SU5iQ3J3PT0iLCJ1c2FnZV9wb2xpY3kiOiJMc3RQb2xpY3kiLCJpdiI6ImRvTkZBQUFBQUFBQkVIVUJBQk13Z0E9PSJ9XX0sImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjpbeyJuYW1lIjoiTHN0UG9saWN5In1dLCJsaWNlbnNlX3NlcnZlciI6eyJyZXR1cm5fbGljZW5zZV9yZXF1ZXN0X2luZm8iOnRydWV9fSwiYmVnaW5fZGF0ZSI6IjIwMjItMDktMTZUMDk6MDE6NTAuNzg4WiIsImV4cGlyYXRpb25fZGF0ZSI6IjIwMjItMTAtMTdUMDk6MDE6NTAuNzg4WiJ9.J7dVOSEOjl2SD7RXWtWBN45hW1i_g_k-jW6jTUwVA8Y

What did you do?
We are using shaka player for fairplay. Shaka version 3.3.2 works fine with fairplay with no issues.
We are trying to upgrade the shaka player to 4.2.1 version. In 4.2.1 version fairplay is not working. I have tries all possible combinations.

Setup-1 (Try with native player):

  1. Install shaka polyfill shaka.polyfill.installAll();
  2. Player config {
    drm: {
    servers: {
    'com.apple.fps.1_0': '..........',
    },
    advanced: {
    'com.apple.fps.1_0': {
    'serverCertificate': new Uint8Array(fpsCertificate)
    }
    }
    },
    streaming: {
    retryParameters: {
    maxAttempts: 20,
    },
    useNativeHlsOnSafari:true
    }
    }
  3. Register drm.initDataTransform

Result: "{"exceptionTrace":"{\"severity\":2,\"category\":6,\"code\":6006,\"data\":[\"The operation is not supported.\",{},null],\"handled\":false,\"message\":\"Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (The operation is not supported.,NotSupportedError: The operation is not supported.,)\",\"stack\":\"@https://localhost:3000/static/js/main.chunk.js:131977:22\\\\n@https://localhost:3000/static/js/main.chunk.js:136307:42\\\\npromiseReactionJob@[native code]\"}","playerType":0,"errorCode":100,"subErrorCode":6006}"

Setup-2 (Try with modern EME):

  1. Install shaka polyfill shaka.polyfill.installAll();
  2. Player config {
    drm: {
    servers: {
    'com.apple.fps': '..........',
    },
    advanced: {
    'com.apple.fps': {
    'serverCertificate': new Uint8Array(fpsCertificate)
    }
    }
    },
    streaming: {
    retryParameters: {
    maxAttempts: 20,
    },
    useNativeHlsOnSafari:false
    }
    }
  3. Register drm.initDataTransform

Result: initDataTransform not triggered (with initDataType as skd). Our DRM license provider giving error saying content ID is not valid.

Setup-3 (Try with modern EME):

  1. DONT INSTALL shaka polyfill shaka.polyfill.installAll();
  2. Player config {
    drm: {
    servers: {
    'com.apple.fps': '..........',
    },
    advanced: {
    'com.apple.fps': {
    'serverCertificate': new Uint8Array(fpsCertificate)
    }
    }
    },
    streaming: {
    retryParameters: {
    maxAttempts: 20,
    },
    useNativeHlsOnSafari:false
    }
    }
  3. Register drm.initDataTransform

Result: "{"exceptionTrace":"{\"severity\":2,\"category\":6,\"code\":6001,\"data\":[],\"handled\":false,\"message\":\"Shaka Error DRM.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE ()\",\"stack\":\"@https://localhost:3000/static/js/main.chunk.js:131977:22\\\\n@https://localhost:3000/static/js/main.chunk.js:135964:47\\\\n@https://localhost:3000/static/js/main.chunk.js:129599:30\\\\n@https://localhost:3000/static/js/main.chunk.js:129559:28\\\\n@https://localhost:3000/static/js/main.chunk.js:129628:23\\\\n@https://localhost:3000/static/js/main.chunk.js:129664:17\\\\nPromise@[native code]\\n@https://localhost:3000/static/js/main.chunk.js:129659:25\\\\n@https://localhost:3000/static/js/main.chunk.js:129673:50\\\\n@https://localhost:3000/static/js/main.chunk.js:135946:57\\\\n@https://localhost:3000/static/js/main.chunk.js:135684:30\\\\n@https://localhost:3000/static/js/main.chunk.js:129599:30\\\\n@https://localhost:3000/static/js/main.chunk.js:129559:28\\\\n@https://localhost:3000/static/js/main.chunk.js:129628:23\\\\nb@https://localhost:3000/static/js/main.chunk.js:129652:22\\\\npromiseReactionJob@[native code]\"}","playerType":0,"errorCode":5,"subErrorCode":6001}"

What did you expect to happen?
fairplay should work

What actually happened?
fairplay not working

@sridhard sridhard added the type: bug Something isn't working correctly label Sep 17, 2022
@github-actions github-actions bot added this to the v4.3 milestone Sep 17, 2022
@multiplexer2
Copy link

Try your Setup-2, but without the initDataTransform.

@sridhard
Copy link
Author

sridhard commented Sep 18, 2022

in setup-2, initDataTransform is not triggered. Then our DRM license request is failing with reason as invalid asset/content ID.

@martinstark
Copy link
Contributor

martinstark commented Sep 19, 2022

  1. Install shaka polyfill shaka.polyfill.installAll();

This does not install the apple media keys polyfill since v4.x. I've asked if this should be described in the docs, but never got a response. The documentation for installAll is misleading.

Try step 1 by calling shaka.polyfill.PatchedMediaKeysApple.install();.

@avelad avelad added the component: FairPlay The issue involves the FairPlay DRM label Sep 20, 2022
@jakubkrolikowski
Copy link

@NoChance777 Did adding shaka.polyfill.PatchedMediaKeysApple.install(); solve your problem?

@NoChance777
Copy link
Contributor

Hi @jakubkrolikowski! In combination with com.apple.fps.1_0 and native playback, version without prefix does not work.

@JuanMorenoS
Copy link

Hi!
Any update ?

@joeyparrish joeyparrish added the priority: P2 Smaller impact or easy workaround label Nov 8, 2022
@joeyparrish
Copy link
Member

@avelad, would you please take a look and give us your thoughts?

@avelad avelad modified the milestones: v4.3, v4.4 Nov 11, 2022
@avelad avelad removed their assignment Nov 24, 2022
@parthsheth2403
Copy link

Hello, I am able to play my URL in ipad safari and Macbook safari. But I am not able to play in iphone safari

@Robloche
Copy link
Contributor

Same as @parthsheth2403.

@nchu-rb
Copy link

nchu-rb commented Jul 18, 2023

  1. Install shaka polyfill shaka.polyfill.installAll();

This does not install the apple media keys polyfill since v4.x. I've asked if this should be described in the docs, but never got a response. The documentation for installAll is misleading.

Try step 1 by calling shaka.polyfill.PatchedMediaKeysApple.install();.

Wanted to drop a note that this resolved an issue for me. Thanks.

@avelad
Copy link
Member

avelad commented Aug 23, 2023

Does this documentation fix the issues https://shaka-player-demo.appspot.com/docs/api/tutorial-fairplay.html?

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Aug 23, 2023
@github-actions
Copy link
Contributor

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Aug 30, 2023
@zisiskol
Copy link

  1. Install shaka polyfill shaka.polyfill.installAll();

This does not install the apple media keys polyfill since v4.x. I've asked if this should be described in the docs, but never got a response. The documentation for installAll is misleading.

Try step 1 by calling shaka.polyfill.PatchedMediaKeysApple.install();.

This solution solve the issue in my case, thanks martinstark

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Oct 29, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: FairPlay The issue involves the FairPlay DRM priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests