Skip to content

Commit

Permalink
Stop on fatal key system errors
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch committed Dec 10, 2022
1 parent f46950a commit 497f17d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/controller/base-playlist-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ export default class BasePlaylistController implements NetworkComponentAPI {
}

protected onError(event: Events.ERROR, data: ErrorData): void {
if (data.fatal && data.type === ErrorTypes.NETWORK_ERROR) {
this.clearTimer();
if (
data.fatal &&
(data.type === ErrorTypes.NETWORK_ERROR ||
data.type === ErrorTypes.KEY_SYSTEM_ERROR)
) {
this.stopLoad();
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/controller/eme-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,10 +635,6 @@ class EMEController implements ComponentAPI {
messageType === 'license-renewal'
) {
this.renewLicense(context, message).catch((error) => {
if ('data' in error) {
// We can fail to retrieve a new license and still continue, future key requests may succeed.
error.data.fatal = false;
}
this.handleError(error);
licenseStatus.emit('error', error);
});
Expand Down

0 comments on commit 497f17d

Please sign in to comment.