-
Notifications
You must be signed in to change notification settings - Fork 428
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
fix: exclude playlists on DRM key status other than usable #1171
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1171 +/- ##
=======================================
Coverage 86.50% 86.51%
=======================================
Files 39 39
Lines 9599 9602 +3
Branches 2218 2219 +1
=======================================
+ Hits 8304 8307 +3
Misses 1295 1295
Continue to review full report at Codecov.
|
}, | ||
{ | ||
"name": "HDCP v2.1 DRM dash", | ||
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd@21", |
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.
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd@21", | |
"uri": "https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears.mpd#21", |
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.
I added the #
so that the source will still work, but we will have a url to sync the dropdown with when we reload the page.
src/videojs-http-streaming.js
Outdated
this.player_.tech_.on('keystatuschange', (e) => { | ||
// typically 'output-restricted', but anything other than usable will | ||
// result in a failure to play. | ||
if (e.status !== 'usable') { |
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.
I think we should be careful here. Since there are various statuses: https://w3c.github.io/encrypted-media/#dom-mediakeystatus , some of which we handle, i.e., expired
: https://github.com/videojs/videojs-contrib-eme/blob/5c441dca1896fc73dff2eeb855dd8e60f99c5da4/src/eme.js#L121-L126
It might be better to only blacklist on specific statuses.
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.
switched this to only exclude on output-restricted.
test/videojs-http-streaming.test.js
Outdated
@@ -4503,6 +4503,56 @@ QUnit.test('configures eme for HLS on source buffer creation', function(assert) | |||
}, 'set source eme options'); | |||
}); | |||
|
|||
QUnit.test('eme handles keystatuschange where status is not usable', function(assert) { |
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.
Would be good to have one more test where status is usable.
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.
added.
Co-authored-by: Garrett Singer <[email protected]>
Co-authored-by: Garrett Singer <[email protected]>
Co-authored-by: Garrett Singer <[email protected]>
Description
This prevents us from trying to play drm content that is going to fail to play.