Skip to content

Commit

Permalink
Merge pull request #5598 from video-dev/bugfix/xhr-retries-aborted
Browse files Browse the repository at this point in the history
Fix Multivariant Playlist and Key XHR loader retries
  • Loading branch information
robwalch committed Jun 27, 2023
2 parents bfa3cb6 + b983a9a commit 30757b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controller/base-stream-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,10 @@ export default class BaseStreamController
`${data.details} reached or exceeded max retry (${retryCount})`
);
}
} else if (
errorAction?.action === NetworkErrorAction.SendAlternateToPenaltyBox
) {
this.state = State.WAITING_LEVEL;
} else {
this.state = State.ERROR;
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/xhr-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class XhrLoader implements Loader<LoaderContext> {
const stats = this.stats;
stats.loading.first = 0;
stats.loaded = 0;
stats.aborted = false;
const xhrSetup = this.xhrSetup;

if (xhrSetup) {
Expand Down

0 comments on commit 30757b1

Please sign in to comment.