-
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
feat(HLS): Support for HLS key rotation #4568
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Please, sign the CLA. Thanks! |
Can you add some tests? |
Please rebase to resolve the conflicts |
working on this currently |
Incremental code coverage: 98.31% |
Hey guys, anything else I can do for this PR so it gets reviewed / merged ? |
No, you haven't done anything wrong. I've been juggling many projects and haven't had time to review yet. I've also been prioritizing bug fixes over feature review. But this is at the top of my list now that all the bug fixes have been reviewed. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just a few changes I'd like to see. Thanks!
/** | ||
* @param {!shaka.hls.Playlist} playlist | ||
* @param {string} mimeType | ||
* @private |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a return-type annotation. This would be a record type in Closure:
/**
* @return {{
* drmInfos: !Array.<shaka.extern.DrmInfo>,
* keyIds: !Set.<string>,
* encrypted: boolean,
* aesEncrypted: boolean
* }}
*/
stream.keyIds = keyIds; | ||
stream.drmInfos = drmInfos; | ||
if (this.manifest_) { | ||
this.playerInterface_.filter(this.manifest_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just added a method to the player interface that may be more appropriate for this. Please merge main into your branch. Then instead of filtering the entire manifest on every stream, try this:
this.playerInterface_.newDrmInfo(stream);
const drmInfos = []; | ||
const keyIds = new Set(); | ||
|
||
// TODO: May still need changes to support key rotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove
I'm going to make the changes I requested, then merge this PR. All the content URLs mentioned here and in #741 are unavailable. So I'm going to take a small risk in the changes that I make to this PR before merging. I'm changing |
Actually, I'm not. The author has not granted permission for maintainers to make changes. So I'll follow up with another PR of my own. |
See PR shaka-project#4568, which was merged without feedback addressed.
See PR #4568, which was merged without feedback addressed.
Hey, sorry I missed the recent updates on this PR, my github notifications are messed up. @joeyparrish Thanks for for doing the updates. |
No problem. Thanks for contributing! |
We tested this fix internally our HLS streams but also with the stream mentioned in #741 (comment)
test stream: https://content.uplynk.com/playlist/ebbbf2111be144a4971dd8426b70e809.m3u8?rmt=wv&m4fenctype=cenc
license server url: https://content.uplynk.com/wv
Fixes #741