Skip to content

Detect unhandled encryption and fallback or error #7454

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

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Aug 7, 2025

This PR will...

Detect unhandled encryption (cbcs) in mp4 init segments and fallback or error when hls.js is not configured to use EME.

No error or fallback is performed if media is detached or media.mediaKeys is set. This is to allow for custom EME integrations.

When hls.js is setup with emeEnabled: true this check is skipped because the "encrypted" event handler will error if there is no configured key-system and associated license information.

Why is this Pull Request needed?

This handles improperly packaged HLS carrying encrypted segments without any KEY tags to signal the encryption.

This does not apply to full segment encryption.

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

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

Don't error if mediaKeys are set in case of custom EME integration
@robwalch robwalch added this to the 1.6.9 milestone Aug 7, 2025
@robwalch robwalch merged commit 3206822 into master Aug 7, 2025
16 checks passed
@robwalch robwalch deleted the bugfix/unhandled-encryption branch August 7, 2025 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant