-
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
Unsupported HLS KEYFORMAT com.apple.streamkingkeydelivery #2096
Comments
We only support FairPlay through native |
Thanks! Unfortunately, on modifying my
Switching to shaka-player was not completely a waste though, the better error handling at least gave me some more information about the issue. I knew it was an From the docs
Additional errors being thrown by shaka
Seems like something wrong with my certificate, which is potentially causing an issue with rebuilding the initData Any pro-tips on this one? 😄 😭 |
The server certificate needs to be a const req = await fetch('https://example.com/cert.der');
const cert = await req.arrayBuffer();
player.configure({
drm: {
advanced: {
'com.apple.fps.1_0': {serverCertificate: new Uint8Array(cert)},
},
}
}); |
Thanks for the suggestion; I've got that going on.
And I have verified that the cert is coming back as an array buffer. |
Your player.configure({
drm: {
advanced: {
'com.apple.fps.1_0': {
serverCertificate: await fetchCertificate(),
},
},
},
});
// Or
fetchCertificate().then((cert) => {
player.configure({
drm: {
advanced: {
'com.apple.fps.1_0': {
serverCertificate: cert,
},
},
},
});
}); |
Yup, you are absolutely correct. After fixing that, some errors went away, but ultimately I ended up with the same error. I continued debugging and saw that our DRM license request was failing, and found out that that the url needed to go from Now the DRM is receiving the response, but it giving me an error. 😑 In any case, the Thanks for your help. I'll keep you posted on my progress. |
If you are getting |
Sorry for the late response; I got pulled into some fires. Nah, I am still getting the same error ( |
Thanks for the tutorial. In our original implementation, the other library we were using just gave us the In looking into the shaka-player code, I see that shaka-player does not simply append the I implemented a request filter and was able to take a look at what the request body looked like and I see that is not a Uint8Array and if I convert it to one, it doesn't match what I am seeing on the Looking at the Fairplay tutorial, I saw that in the example the filter was adding some additional information to the
and that satisfied my license server. I am still getting the Actually, I can get playback on the first clip I play, the first time I play it, but I still get the error
before the response filter is hit. The only errors I see are way before this one
Could those attribute to this error? |
That is because you are probably copying the FairPlay tutorial, which has a call to
This may be #2031. You could try changing the error listener to ignore the error and see if you get playback.
Those are warnings from Shaka Player about invalid configuration paths. The player.configure({
abr: ...
}); |
Ah! #2031 is the github issue I have been looking for this entire time. I am converting from videojs-contrib-eme because of this issue.
Your commit to remove the automatic appending of
You are suggesting forking shaka player and making the change myself, correct? Or is there an external API of shaka-player's that I can use to turn it off?
You are correct; I found some setting of the configuration that I hadn't seen before. A quick global search uncovered it. Thanks again for all of your help; I really appreciate it. |
Correct, those changes won't make it into the v2.5.x releases since it's a breaking change. You'll need to wait until the v2.6 release to see it. Or you can pull from
I was talking about forking or just editing the source and build it manually. I was suggesting a possible solution while we work on fixing #2031. |
@alexanderturinske Does this answer all your questions? Can we close the issue? |
Awesome, thanks. I feel like I got all the information I needed. I will close the issue. |
Have you read the FAQ and checked for duplicate open issues?:
YES
What version of Shaka Player are you using?:
2.5.4
Can you reproduce the issue with our latest release version?:
YES
Can you reproduce the issue with the latest code from master?:
YES
Are you using the demo app or your own custom app?:
NO
If custom app, can you reproduce the issue using our demo app?:
What browser and OS are you using?:
Safari 12.1.2 on macOS 10.14.6
What are the manifest and license server URIs?:
manifest:
https://.../manifests/hls/master.m3u8
license:
${this.baseUrl}/items${id}/drm/fairplay
What did you do?
Tried to play normal HLS
What did you expect to happen?
Video should be played
What actually happened?
The documentation seems pretty minimal as the support was just added, but this is what I have thus far
Configuration
I am passing in the
master.m3u8
into theload
function and get the following errorError from Shaka Player
Looking at shaka player's errors (honestly the best error codes I have seen from a third party)
it says
HLS_KEYFORMATS_NOT_SUPPORTED | 4026 | The HLS parser has encountered encrypted content with unsupported KEYFORMAT attributes.
I then modified my webpack to use the debug version of shaka-player (
config.resolve.alias = { 'shaka-player': require.resolve('shaka-player/dist/shaka-player.compiled.debug.js'), }
) and modify the imports (import { shaka } from 'shaka-player';
) and get the additional errorsThe
master.m3u8
returns a fewprog_index.m3u8
endpoints and the highest resolution of them gets called. The response from:manifests/hls/...stuff.../prog_index.m3u8
endpoint is where thecom.apple.streamingkeydelivery
is coming from with#EXT-X-KEY
Questions
KEYFORMAT
wrong in this response?SAMPLE-AES
was not supported with widevine, is it supported with HLS?KEYFORMAT
?AES
, notAES-128
, but I haven't looked up the difference yetRelates to #382 ?
Any help is appreciated! Thanks!
The text was updated successfully, but these errors were encountered: