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

fix: keyId filtering loadedplaylist listener and improvements #1468

Merged
merged 13 commits into from
Dec 21, 2023

Conversation

adrums86
Copy link
Contributor

@adrums86 adrums86 commented Dec 19, 2023

Description

After doing some further testing with HLS and playlist exclusion by keyId, it became apparent some more fixes were needed to properly request and filter all possible variants.

I also added a fallback mechanism and additional logging. I was testing another asset with no matching keys and it seemed necessary to at least TRY and play the non-HD playlists if we have previously excluded them due to non-usable or non-matching keyIds.

Specific Changes proposed

Listening to loadedplaylist and calling excludeNonUsablePlaylistsByKeyId_ and fastQualityChange when a new playlist is loaded. This allows the playlist-controller to check the keyId in the loaded or refreshed playlist for an HLS variant, or a refreshed DASH manifest.

Also, add a conditional after the playlist exclusion loop that checks if we excluded all of the playlists due to non-usable status or non-matching keys and re-includes all the SD playlists and logs a warning. This provides VHS with a bit more resilience against unexpected manifests or license data.

Requirements Checklist

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

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (88a5671) 86.02% compared to head (4eeafc5) 86.12%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   86.02%   86.12%   +0.09%     
==========================================
  Files          42       42              
  Lines       10708    10781      +73     
  Branches     2461     2490      +29     
==========================================
+ Hits         9212     9285      +73     
  Misses       1496     1496              

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

@adrums86 adrums86 changed the title fix: loadedplaylist listener for excludeNonUsablePlaylistsByKeyId fix: keyId filtering loadedplaylist listener and improvements Dec 19, 2023
@adrums86 adrums86 marked this pull request as ready for review December 20, 2023 06:45
Copy link
Contributor

@wseymour15 wseymour15 left a comment

Choose a reason for hiding this comment

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

This makes sense to me, I think falling back is valuable when we can do it.

@adrums86 adrums86 merged commit f12c197 into main Dec 21, 2023
14 checks passed
@adrums86 adrums86 deleted the fix-excludeNonUsable-listener branch December 21, 2023 01:07
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