Skip to content

Commit

Permalink
Allow live level loading to recover from net::ERR_NETWORK_IO_SUSPENDE…
Browse files Browse the repository at this point in the history
…D errors (#5473)
  • Loading branch information
robwalch committed May 9, 2023
1 parent 680947f commit fc5e295
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/controller/error-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,12 @@ export default class ErrorController implements NetworkComponentAPI {
retryCount,
};
}
// Do not perform level switch if an error occurred using delivery directives
// Allow reload without directives (handled in playlist-loader)
if (data.context?.deliveryDirectives) {
return {
action: NetworkErrorAction.DoNothing,
flags: ErrorActionFlags.None,
retryConfig: retryConfig || {
maxNumRetry: 0,
retryDelayMs: 0,
maxRetryDelayMs: 0,
},
retryCount,
};
const errorAction = this.getLevelSwitchAction(data, levelIndex);
if (retryConfig) {
errorAction.retryConfig = retryConfig;
errorAction.retryCount = retryCount;
}
return this.getLevelSwitchAction(data, levelIndex);
return errorAction;
}

private getFragRetryOrSwitchAction(data: ErrorData): IErrorAction {
Expand Down

0 comments on commit fc5e295

Please sign in to comment.