-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8634 +/- ##
==========================================
- Coverage 83.43% 82.71% -0.73%
==========================================
Files 113 113
Lines 7636 7636
Branches 1835 1835
==========================================
- Hits 6371 6316 -55
- Misses 1265 1320 +55 ☔ View full report in Codecov by Sentry. |
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.
🚀
// Errors used in contrib-eme: | ||
EMEEncryptedError: 'eme-encrypted-error', | ||
MSKeyError: 'ms-key-error', | ||
WebkitKeyError: 'webkit-key-error', |
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.
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',
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 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.
Description
Add error constants for contrib-eme specific errors.
Specific Changes proposed
Add constants that are representative of the separate keysystems for error reporting out of videojs-contrib-eme, also add errors specific to each step in the EME specific process.
Two notable omissions:
No errors for
remove
orload
on the mediakeysession as they're not implemented in contrib-eme.Requirements Checklist