Skip to content

Commit

Permalink
fix(SimpleTextDisplayer): Do not disable metadata & chapters tracks (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tykus160 authored and avelad committed Jul 2, 2024
1 parent 4c167e9 commit b9e7ffe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/text/simple_text_displayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ shaka.text.SimpleTextDisplayer = class {
// If the video element has TextTracks, disable them. If we see one that
// was created by a previous instance of Shaka Player, reuse it.
for (const track of Array.from(video.textTracks)) {
if (track.kind === 'metadata' || track.kind === 'chapters') {
continue;
}
// NOTE: There is no API available to remove a TextTrack from a video
// element.
track.mode = 'disabled';
Expand Down

0 comments on commit b9e7ffe

Please sign in to comment.