Skip to content

Commit

Permalink
fix: Fix error when network status changes on src= playbacks (#5305)
Browse files Browse the repository at this point in the history
Backported to v4.3.x
  • Loading branch information
avelad authored and joeyparrish committed Jun 20, 2023
1 parent 763ae6a commit ce354ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -5686,6 +5686,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
error.category != shaka.util.Error.Category.NETWORK) {
return false;
}
if (this.loadMode_ != shaka.Player.LoadMode.MEDIA_SOURCE) {
return false;
}
goog.asserts.assert(this.manifest_, 'Should have manifest!');

if (!navigator.onLine) {
// Don't restrict variants if we're completely offline, or else we end up
Expand Down

0 comments on commit ce354ba

Please sign in to comment.