Skip to content

Commit

Permalink
fix: Reset forced subs between loads
Browse files Browse the repository at this point in the history
Just as we reset text language and role, we should also reset forced
sub state between load() calls.

Discovered while debugging PR #3459.

Change-Id: I22ef29cb6b14e02ee70503595b1303389260a633
  • Loading branch information
joeyparrish committed Jul 12, 2021
1 parent b0a970d commit 568b6f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {

this.currentTextLanguage_ = this.config_.preferredTextLanguage;
this.currentTextRole_ = this.config_.preferredTextRole;
this.currentTextForced_ = this.config_.preferForcedSubs;

shaka.Player.applyPlayRange_(this.manifest_.presentationTimeline,
this.config_.playRangeStart,
Expand Down

0 comments on commit 568b6f3

Please sign in to comment.