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: Ensure native segment metadata track has mode hidden #1550

Merged

Conversation

mister-ben
Copy link
Contributor

Description

When using native text tracks, the segment metadata track was being created with mode disabled. This meant it wouldn't trigger cuechange events, but also Chrome (at least) does not add cues to disabled tracks. This change makes the track start out hidden.

Specific Changes proposed

  • Set mode to hidden
  • Adds a simple test for track mode. Testing whether the cues are added isn't simple as addSegmentMetadataCue_ is made noop in the tests.
  • Adds native text tracks as an option to the text page for manual verification.

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 Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.99%. Comparing base (bc9e667) to head (b45e3e4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1550   +/-   ##
=======================================
  Coverage   83.99%   83.99%           
=======================================
  Files          44       44           
  Lines       11699    11700    +1     
  Branches     2618     2618           
=======================================
+ Hits         9826     9827    +1     
  Misses       1873     1873           

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

@mister-ben mister-ben changed the title fix: Ensure native segment metadata track has mdoe hidden fix: Ensure native segment metadata track has mode hidden Oct 30, 2024
Copy link
Contributor

@phloxic phloxic left a comment

Choose a reason for hiding this comment

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

typo in commit message: s/mdoe hidden/mode hidden/

@mister-ben mister-ben force-pushed the fix-native-segment-track branch from c79ea09 to fd19b3f Compare October 31, 2024 13:16
@@ -254,6 +254,8 @@ export class PlaylistController extends videojs.EventTarget {
label: 'segment-metadata'
}, false).track;

this.segmentMetadataTrack_.mode = 'hidden';
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought it is possible to pass mode as an option to add remote text track

@dzianis-dashkevich dzianis-dashkevich merged commit c1d3186 into videojs:main Feb 5, 2025
7 checks passed
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