Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a8dc53

Browse files
authoredJun 19, 2025··
fix: Reset text visibility on unload (#8775)
1 parent d3fd770 commit 7a8dc53

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
 

‎lib/player.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,6 +1575,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
15751575
await this.textDisplayer_.destroy();
15761576
this.textDisplayer_ = null;
15771577
}
1578+
this.isTextVisible_ = false;
15781579

15791580
if (this.video_) {
15801581
// The life cycle of tracks that created by addTextTrackAsync() and

‎test/player_unit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2809,6 +2809,7 @@ describe('Player', () => {
28092809

28102810
it('chooses the configured text language and role at start', async () => {
28112811
player.configure({
2812+
autoShowText: shaka.config.AutoShowText.IF_PREFERRED_TEXT_LANGUAGE,
28122813
preferredTextLanguage: 'en',
28132814
preferredTextRole: 'commentary',
28142815
});

0 commit comments

Comments
 (0)
Please sign in to comment.