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

chore: add contrib-eme errors #8634

Merged
merged 2 commits into from
Mar 12, 2024
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
15 changes: 13 additions & 2 deletions src/js/consts/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ export default {
SegmentAppendError: 'segment-append-error',
VttLoadError: 'vtt-load-error',
VttCueParsingError: 'vtt-cue-parsing-error',
EMEKeySessionCreationError: 'eme-key-session-creation-error',
// Errors used in contrib-ads:
AdsBeforePrerollError: 'ads-before-preroll-error',
AdsPrerollError: 'ads-preroll-error',
AdsMidrollError: 'ads-midroll-error',
AdsPostrollError: 'ads-postroll-error',
AdsMacroReplacementFailed: 'ads-macro-replacement-failed',
AdsResumeContentFailed: 'ads-resume-content-failed'
AdsResumeContentFailed: 'ads-resume-content-failed',
// Errors used in contrib-eme:
EMEEncryptedError: 'eme-encrypted-error',
MSKeyError: 'ms-key-error',
WebkitKeyError: 'webkit-key-error',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate more on this 3:

What are they?
Why do we need them?

  EMEEncryptedError: 'eme-encrypted-error',
  MSKeyError: 'ms-key-error',
  WebkitKeyError: 'webkit-key-error',

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind these 3 was to be a catch-all for the outermost promise to the respective handle events. For MSKeyError and WebkitKeyError they specifically cover errors from legacy workflows ('msneedey' and 'webkitneedkey' events). Since this is not really in-spec EME, I figured they were worthy of their own specific errors. For EMEEncryptedError it might not be necessary and was only added incase any other type of unknown error occurs and bubbles up to the handleEncryptedEvent promise.

EMEFailedToRequestMediaKeySystemAccess: 'eme-failed-request-media-key-system-access',
EMEFailedToCreateMediaKeys: 'eme-failed-create-media-keys',
EMEFailedToAttachMediaKeysToVideoElement: 'eme-failed-attach-media-keys-to-video',
EMEFailedToCreateMediaKeySession: 'eme-failed-create-media-key-session',
EMEFailedToSetServerCertificate: 'eme-failed-set-server-certificate',
EMEFailedToGenerateLicenseRequest: 'eme-failed-generate-license-request',
EMEFailedToUpdateSessionWithReceivedLicenseKeys: 'eme-failed-update-session',
EMEFailedToCloseSession: 'eme-failed-close-session'
};
Loading