-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Multi-DRM Support #4930
Multi-DRM Support #4930
Conversation
025ef18
to
dd934b7
Compare
The manifest delivered keys are working awesome! Tried it out with a widevine delivered key 🎉 The only thing I was wondering about was sequencing of requests, it looks like it delays loading the manifest key until after the init segment download. It would be cool to parallelize a manifest key load with the initial init segments. Right now, it delays playback for the time it takes for the licenseXhrSetup call and response dance to take, and if that flow requires additional network requests (to get authorization data, etc) then it would be nice to be able to do that alongside. In our case it goes;
Including in the sample around This was important because we could get the authorization header for the license request in a promise we returned.
|
dd934b7
to
7379d7e
Compare
Hi @itsjamie,
I'm thinking that at least the first key within the same discontinuity should be prepared when first selecting a fragment for loading. This would be the init segment in your case even if it is not encrypted. This would kick off requesting key-system access instantly once a playlist is loaded and the player has decided where to start. This could be a little expensive to scan an entire playlist or list of fragments within a disco looking for a level key if the content is not encrypted. I'm considering whether to hold off until I cover session-keys. Another option is to allow you to specify that you want to warm up CDMs on attach (similar to how
Added a comment.
I see. That makes sense. You still need to call setup, but you are not modifying the license challenge in any way. |
The shaka-packager test stream has pssh in all segments even though the first two segments and the init segment are not encrypted (the key appears after the second segment in the playlist). This is known as "clear-lead".
|
fe14245
to
c6d7b52
Compare
c6d7b52
to
2fb006d
Compare
Hi @itsjamie,
I pushed 666ad22 yesterday which will initiate key-system access with the initial fragment request even when the first key comes after the first/init segment. This is not as early as "attach" where access to widevine was always requested with
I have given some thought to making the eme-controller choose without any configuration, but that would likely require parsing the pssh box ("encrypted" |
bae6f65
to
502c0fa
Compare
Update: 3a6ceb8 Removed Thinking about adding additional key id validation. Instead of trying to start a session that will throw "bad data" on @itsjamie this should get order of events closer to the release version, with the exception of key-system request starting on first fragment pick rather than attach. |
d145503
to
3a6ceb8
Compare
Awesome. |
3a6ceb8
to
da4e9da
Compare
Hey @robwalch. I am testing PlayReady with @itsjamie on this branch. We are having issue where it keeps requesting init segment of the video continuously. From Media manifest, it knows about the PlayReady:
And this is what hls.js config looks like:
Any thoughts? |
Hi @Devjeel, I rebased this branch and merged #5018 into this PR which improves error handling. The loop loading seems like an issue handling an error at start that should have been fatal. Let me know if this update handles the error correctly, and to followup we can look into why you were getting the error. |
54abee4
to
14c84cf
Compare
…y associated with them
* Emit and handle FRAG_PARSING_ERROR from transmuxers Related to #5011 * Switch levels on Key and Fragment parsing errors or escalate to fatal error
58693d9
to
497f17d
Compare
…he config one at time (to avoid gaining access to WV and PR on Edge)
…ey-system strings
f5a33d4
to
d3eefb7
Compare
This PR will...
Add Multi-DRM support by handling FairPlay (v3), PlayReady and Widevine playlist keys.
drmSystems[{key-system}]
requestMediaKeySystemAccess
requests are made sequentially until one succeeds (to avoid obtaining access to more than one system on platforms that support more than one (ex: Widevine and PlayReady on Windows)usable
after license exchange (allows fragment/level error handling with HDCP restrictions or any other license or key issues).Are there any points in the code the reviewer needs to double check?
Resolves issues:
Not Addressed in this PR:
renewKeySession
in license response callbackFollow Up:
Either fixed or depends on content, need confirmation from contributors:
Checklist