http-streaming
http-streaming copied to clipboard
fix: output-restricted event handling for unplayable streams
Description
This change will improve handling of EME 'keystatuschange'
events of the type 'output-restricted'
, which occurs when the client does not meet HDCP compliance. The existing implementation uses blacklistCurrentPlaylist()
to exclude a single playlist from ABR selection when such an event is encountered, but does not handle cases where there are multiple unplayable HD streams.
Specific Changes proposed
I am proposing we do the following:
- When encountering an
'output-restricted'
, we should assume that this is due to HDCP non-compliance and that all HD playlists will be unplayable. - Therefore, exclude all HD playlists from ABR selection.
- Unplayable segments may have already been buffered, so after excluding the HD playlists, perform a
fastQualityChange_()
which will clear the buffer and switch to a playable SD stream.
Codecov Report
Merging #1305 (4f0153d) into main (97e02fb) will increase coverage by
0.00%
. The diff coverage is93.33%
.
@@ Coverage Diff @@
## main #1305 +/- ##
=======================================
Coverage 86.30% 86.31%
=======================================
Files 39 39
Lines 9842 9855 +13
Branches 2293 2298 +5
=======================================
+ Hits 8494 8506 +12
- Misses 1348 1349 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/videojs-http-streaming.js | 91.08% <93.33%> (+0.03%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more