Skip to content

Commit

Permalink
fix: Caption can not turn off at iOS Safari (#4978)
Browse files Browse the repository at this point in the history
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
  • Loading branch information
avelad authored and joeyparrish committed Feb 9, 2023
1 parent bda4e50 commit 35f420e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,8 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
// goes wrong.
new shaka.util.Timer(resolve).tickAfter(1);
});
} else if (textTracks.length > 0) {
this.isTextVisible_ = true;
}

// If we have moved on to another piece of content while waiting for
Expand Down

0 comments on commit 35f420e

Please sign in to comment.