Skip to content

fix: External text tracks in src mode related issues #8527

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 2 commits into from
Apr 29, 2025

Conversation

xxoo
Copy link
Contributor

@xxoo xxoo commented Apr 28, 2025

All changes were part of #8520

  • Object URLs created in addSrcTrackElement_() are now released correctly
  • Use HTMLTrackElement.track to access its associated TextTrack. Searching in HTMLMediaElement.textTracks is not reliable
  • Remove only <source> elements during initialization. User added <track> elements are not harmful and they may want to keep them for dual subtitles for example.

lib/player.js Outdated
const trackElement =
/** @type {!HTMLTrackElement} */(document.createElement('track'));
const trackElement = /** @type {!HTMLTrackElement} */
(this.video_.ownerDocument.createElement('track'));
Copy link
Member

Choose a reason for hiding this comment

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

Why use ownerDocument ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see: #8520 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avelad
This change has been reverted

@avelad avelad added type: bug Something isn't working correctly component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release labels Apr 29, 2025
@avelad avelad added this to the v4.15 milestone Apr 29, 2025
@shaka-bot
Copy link
Collaborator

shaka-bot commented Apr 29, 2025

Incremental code coverage: 97.44%

@avelad avelad merged commit f9c8028 into shaka-project:main Apr 29, 2025
16 checks passed
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 28, 2025
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jun 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants