Skip to content

Commit

Permalink
Return proper error when MediaKeySession.update fails
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jun 2, 2023
1 parent 2a37ece commit 7f8cba7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/decrypt/session_events_listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ export default function SessionEventsListener(
if (isNullOrUndefined(licenseObject)) {
log.info("DRM: No license given, skipping session.update");
} else {
return updateSessionWithMessage(session, licenseObject);
try {
return updateSessionWithMessage(session, licenseObject);
} catch (err) {
manualCanceller.cancel();
callbacks.onError(err);
}
}
})
.catch((err : unknown) => {
Expand Down

0 comments on commit 7f8cba7

Please sign in to comment.