Skip to content

Commit

Permalink
fix: Silence aborted errors from PreloadManager. (#7619)
Browse files Browse the repository at this point in the history
Closes #7618
  • Loading branch information
theodab authored and joeyparrish committed Nov 19, 2024
1 parent 18b3ae3 commit d014d86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/media/preload_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,12 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {

this.successPromise_.resolve();
} catch (error) {
this.successPromise_.reject(error);
// Ignore OPERATION_ABORTED and OBJECT_DESTROYED errors.
if (!(error instanceof shaka.util.Error) ||
(error.code != shaka.util.Error.Code.OPERATION_ABORTED &&
error.code != shaka.util.Error.Code.OBJECT_DESTROYED)) {
this.successPromise_.reject(error);
}
}
})();
}
Expand Down

0 comments on commit d014d86

Please sign in to comment.