-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 launch the error always "FAILED_TO_GENERATE_LICENSE_REQUEST" but with the Apple demo page it's working #1923
Comments
I think you would get this error under any of the following circumstances:
Are any of these the case? |
Not for me, as far as I know. I'm not sure how to check the HDCP compatibility of my monitor, but I would be surprised if it didn't support HDCP. Definitely not screen recording or using Airplay. |
I've had the HDCP problem many times. Is the MediaKeySession publishing |
Good idea. Yes, we're seeing webkitkeyerror. I'll try SD and see what that gets me. |
Oh, wait, actually, it's native HLS, so we have no control over which resolution is played. |
It is not any of those circumstances. I am only with the screen of the notebook and nothing else is connected. Nor am I using Airplay. Note: with the Apple demo page, there are not error. |
@the6thm0nth You need to set a server certificate to use FairPlay. See #382 (comment). |
We can do better on missing certs. A lack of server certificate should generate a meaningful error code. I filed #1940 for that. |
@TheModMaker thank you, I set on |
I've tried again with correct advanced drm config, but I got an error with code |
Thanks @joeyparrish , I'll follow #1951 |
Having just integrated against shaka 2.5.2 I can confirm this is an issue and hope that the following debug helps. This is in Safari in Mojave. For a single key encrypted fairplay asset there are two sessions created, one with the correct initData and second one containing skd://uuid as the initData.
The second session then gives the following error which results in the "FAILED_TO_GENERATE_LICENSE_REQUEST" error we are seeing.
The first session created (with the correct initData) completes and the content plays.
|
After investigating the problem thoroughly, the problem is related to the construction of initData. Following the example of Apple: They are using the next function
For the initData there are a previous processing with the contentId:
And the contentId use the next function:
Note: the function extractContentId must be customizable by the apps (eg: filter) due differents FairPlay servers has different implementation (with our providers we are found 3 implementations differents in 5 providers). It is also necessary to expose the contentID in the request filters, because some servers need it. Next, it's neccessary append the contentId with the previous initData and the FairPlay certificate, with the function:
I hope this helps solve the problem. |
Now that #1951 is closed, I think you should have everything to customize the Player to do what you want. See the updated tutorial for more info. If you are having any more trouble, feel free to comment or reopen. |
Having the same issue as @KieronAllsop. Init data is generated 2 times, first time the DRM flow passes, and second time it throws FAILED_TO_GENERATE_LICENSE_REQUEST error. The stream can be played. // Explicit init data for any one stream or an offline session is // sufficient to suppress 'encrypted' events for all streams. const cb = (e) => this.newInitData( e.initDataType, shaka.util.BufferUtils.toUint8(e.initData)); this.eventManager_.listen(this.video_, 'encrypted', cb); to // Explicit init data for any one stream or an offline session is // sufficient to suppress 'encrypted' events for all streams. const cb = (e) => this.newInitData( e.initDataType, shaka.util.BufferUtils.toUint8(e.initData)); this.eventManager_.listenOnce(this.video_, 'encrypted', cb); it goes away. |
Have you read the FAQ and checked for duplicate open issues? Yes
What version of Shaka Player are you using? 2.5.0
Can you reproduce the issue with our latest release version? Yes
Can you reproduce the issue with the latest code from
master
? YesAre you using the demo app or your own custom app? Demo app
If custom app, can you reproduce the issue using our demo app?
What browser and OS are you using?
Safari 12.1 over Mojave
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
There is a discussion already started by mail with the link
What did you do?
Load a Fairplay stream
What did you expect to happen?
Works without problem
What actually happened?
but the video works (Note, that the screen is in blank due to Fairplay)
Note: I changed the custom.js in the demo to support Fairplay with the next change:
const commonDrmSystems = new Set([
'com.widevine.alpha',
'com.microsoft.playready',
'com.adobe.primetime',
'com.apple.fps.1_0',
'org.w3.clearkey',
]);
The text was updated successfully, but these errors were encountered: