Skip to content

Conversation

@Essk
Copy link
Contributor

@Essk Essk commented Jul 9, 2025

Description

When attempting to playback a HLS source with Fairplay, Playready and Widevine DRM, I'm seeing errors coming from getKeyIdSet because it looks like Fairplay and Playready support are only partially implemented in m3u8-parser.
When getKeyIdSet is looping the available playlists, playlist.contentProtection[keysystem].attributes and playlist.contentProtection[keysystem].attributes.keyId can be missing.

Specific Changes proposed

This change checks we can get a value for keyId before attempting to assign it.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.00%. Comparing base (1e721c1) to head (fa2eb5c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1582   +/-   ##
=======================================
  Coverage   84.00%   84.00%           
=======================================
  Files          44       44           
  Lines       11707    11710    +3     
  Branches     2623     2625    +2     
=======================================
+ Hits         9834     9837    +3     
  Misses       1873     1873           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Essk
Copy link
Contributor Author

Essk commented Jul 10, 2025

Test failures don't seem to be related to code changes: https://github.com/videojs/http-streaming/pull/1583/checks

Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

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

LGTM

@Essk Essk merged commit 7bc7033 into main Jul 15, 2025
27 of 39 checks passed
@Essk Essk deleted the fix/prevent-errors-in-getKeyIdSet branch July 15, 2025 17:06
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.

3 participants