Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow live level loading to recover from network being suspended #5473

Merged
merged 1 commit into from
May 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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