-
Notifications
You must be signed in to change notification settings - Fork 136
DRM: Fix KEY_UPDATE_ERROR by not translating it into a KEY_LOAD_ERROR
#1670
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
Conversation
…ROR` We had kind of a dumb mistake where an error arising at license-communication time was falsely categorized as an error at license-fetching time. This is because we inadvertently also catched errors from the `MediaKeySession.prototype.update` EME call where we only intended to catch errors at the higher-up `getLicense` (the RxPlayer API) level. The fix to that issue is relatively straigtforward.
| async (licenseObject) => { | ||
| if (manualCanceller.isUsed()) { | ||
| return Promise.resolve(); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: removed because unnecessary
| } else { | ||
| try { | ||
| return updateSessionWithMessage(session, licenseObject); | ||
| await updateSessionWithMessage(session, licenseObject); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: awaited to make the try / catch catch rejections, not just errors thrown synchronously. Also, we don't actually care about the returned value
| } | ||
| } | ||
| }) | ||
| .catch((err: unknown) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to now do licenseFetchingPromise.then(onSucceed, onFailure) instead of: licenseFetchingPromise.then(onSucceed).catch(onFailure).
|
✅ Automated performance checks have passed on commit DetailsPerformance tests 1st run outputNo significative change in performance for tests:
|
We had kind of a dumb mistake where an error arising at license-communication time was falsely categorized as an error at license-fetching time.
This is because we inadvertently also catched errors from the
MediaKeySession.prototype.updateEME call where we only intended to catch errors at the higher-upgetLicense(the RxPlayer API) level.The fix to that issue is relatively straigtforward.