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 Feb 8, 2023
1 parent eebf18c commit 9d2c325
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 @@ -2585,6 +2585,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 9d2c325

Please sign in to comment.