http-streaming icon indicating copy to clipboard operation
http-streaming copied to clipboard

fix: output-restricted event handling for unplayable streams

Open alex-barstow opened this issue 1 year ago • 1 comments

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.

alex-barstow avatar Aug 09 '22 17:08 alex-barstow

Codecov Report

Merging #1305 (4f0153d) into main (97e02fb) will increase coverage by 0.00%. The diff coverage is 93.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

codecov[bot] avatar Aug 09 '22 17:08 codecov[bot]