Closed
Bug 1291997
Opened 8 years ago
Closed 8 years ago
Add new DOM exceptions for implementing promise-based HTMLMediaElement::play() API
Categories
(Core :: Audio/Video: Playback, defect)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: kaku, Assigned: kaku)
References
Details
Attachments
(1 file)
In bug 1244768, we are going to implement the promise-based HTMLMediaElement::play() API which requires a new DOM exception, NotAllowedError.
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play, this is where the NotAllowedError is used in the spec.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → kaku
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/69182/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/69182/
Attachment #8777658 -
Flags: review?(bzbarsky)
Comment 2•8 years ago
|
||
Comment on attachment 8777658 [details]
Bug 1291997 - add media related dom exceptions;
https://reviewboard.mozilla.org/r/69182/#review66474
::: xpcom/base/ErrorList.h:526
(Diff revision 1)
> /* WebCrypto API errors from http://www.w3.org/TR/WebCryptoAPI/ */
> ERROR(NS_ERROR_DOM_UNKNOWN_ERR, FAILURE(30)),
> ERROR(NS_ERROR_DOM_DATA_ERR, FAILURE(31)),
> ERROR(NS_ERROR_DOM_OPERATION_ERR, FAILURE(32)),
> + /* HTMLMediaElement API errors from https://html.spec.whatwg.org/multipage/embedded-content.html#media-elements */
> + ERROR(NS_ERROR_DOM_NOT_ALLOWED_ERR, FAILURE(33)),
You need to map this to NotAllowedError in domerr.msg, right? Without that, it won't do reasonable things if it makes its way out to content.
Note that depending on your use cases, you may want a less-generic nsresult name (e.g. see NS_ERROR_DOM_PUSH_DENIED) that maps to NotAllowedError.
Attachment #8777658 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 3•8 years ago
|
||
https://reviewboard.mozilla.org/r/69182/#review66474
> You need to map this to NotAllowedError in domerr.msg, right? Without that, it won't do reasonable things if it makes its way out to content.
>
> Note that depending on your use cases, you may want a less-generic nsresult name (e.g. see NS_ERROR_DOM_PUSH_DENIED) that maps to NotAllowedError.
Should I open a new module in the ErrorList.h? Maybe call it NS_ERROR_MODULE_MEDIA?
Comment 4•8 years ago
|
||
I don't have a strong feeling about that.
Assignee | ||
Comment 5•8 years ago
|
||
According the discussion here: https://github.com/whatwg/html/issues/505, the community is going to replace the MediaErrors with DOMExceptions in long tern. So, I will then create a new NS_ERROR_MODULE_MEDIA module and put the related DOM exceptions in it with the NS_ERROR_DOM_MEDIA_ prefix.
Comment hidden (mozreview-request) |
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8777658 [details]
Bug 1291997 - add media related dom exceptions;
https://reviewboard.mozilla.org/r/69182/#review67296
Attachment #8777658 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Thanks for the review!
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=15f515e1dc42
Building on all platforms are ok.
There are no logic changes in this patch, so we don't need to care tests so much.
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a7d6101e0937
add media related dom exceptions; r=bz
Keywords: checkin-needed
Comment 10•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•