Skip to content
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

Implement maxHdcpLevel HDCP-LEVEL capping and EME error handling #5150

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jan 10, 2023

This PR will...

  • Implement hls.maxHdcpLevel getter/setter API for HDCP-LEVEL capping and EME error handling.
  • Sort levels primarily by HDCP level, followed by bitrate (AVERAGE-BANDWIDTH or BANDWIDTH - this is the current behavior), followed by SCORE, followed by RESOLUTION (height).

Why is this Pull Request needed?

Allows for playback of DRM protected streams with HDCP restriction to recover from output-restricted EME Key errors (ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED).

Are there any points in the code the reviewer needs to double check?

  1. Setting hls.maxHdcpLevel does not prevent levels from being manually selected by setting one of the manual level selection setters. Use hls.removeLevel() to remove all levels of a particular HDCP-LEVEL as selection options.
  2. Setting hls.maxHdcpLevel does not immediately force a level change. To do do, set hls.currentLevel to -1 after setting hls.maxHdcpLevel.
  3. Levels will not be sorted in bitrate order when variants with lower HDCP-LEVELs have higher BANDWIDTH values than their counterparts with higher HDCP-LEVELs. As this will typically only the be the case with variants containing different codecs it should not present a problem bitrate adaptation which is currently restricted to the renditions using the compatible codecs.

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.3.0 milestone Jan 10, 2023
@robwalch robwalch merged commit 311ac64 into master Jan 11, 2023
@robwalch robwalch deleted the feature/hdcp-level-max branch January 11, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hls js always picking worst level on auto level mode HDCP-LEVEL capping and EME error handling
1 participant