Skip to content

Conversation

@robwalch
Copy link
Collaborator

@robwalch robwalch commented Aug 30, 2025

This PR will...

  • Group media key sessions by key tag (EXT-X-KEY) URI, and group all parsed key tags (LevelKey instances) and their key-ids in eme-controller session-context objects.
  • Fix key-status errors being ignored after key is usable.
  • Warn when "output-restricted" key status is received on level with HDCP-LEVEL=NONE
  • Fix error handling after after encountering same key URI that errored previously
  • Fix escalation of unresolved level removal to fatal

Why is this Pull Request needed?

  • Reduces license requests / sessions when multiple-keys are delivered in a single PSSH/URI
  • Fixes edge cases where key status updates were not handled

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

If you've recently reported issues related to EME playback, please review and leave feedback if you are able to test. Thanks!

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
Copy link
Collaborator Author

robwalch commented Sep 5, 2025

@robwalch robwalch force-pushed the bugfix/eme-multi-key branch from 159ded1 to 1f54b01 Compare September 18, 2025 19:12
mediaKeySessionContext.keySystem === KeySystems.PLAYREADY &&
keyIdArray.length === 16
) {
changeEndianness(keyIdArray);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO:

Address the change made in #7631 which handles the case where keyId in keyStatuses does not require endianness to be changed.

Rather than cherry-pick #7631, consider looking for a match in mediaKeySessionContext (this might require iterating through all keyStatuses keys) and if a match is found, do not change endianness on all key status keys (ever).

An optional configuration setting that is undefined by default and only set if unset could be added to specify here whether or not to change endianness. The lookup for a match described above would only be run if this option is unset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

Multi-key handling

2 participants