Closed
Bug 1412772
Opened 7 years ago
Closed 7 years ago
website should handle rejected promise from video.play() properly when the pref "media.autoplay.enabled=false"
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: alwu, Unassigned)
References
Details
(Keywords: dev-doc-complete)
When set the pref "media.autoplay.enabled=false", we would stop any automatically play() invocation and reject the promise.
Websites should handle that rejected promise properly and then change their player UI to correct state.
It's defined by spec [1]
`If the media element is not allowed to play, return a promise rejected with a "NotAllowedError" DOMException and abort these steps.`
and we indeed reject the promise [2]
eg. Youtube would keep their controller's button as playing even we've prevented video playing
[1] https://html.spec.whatwg.org/multipage/media.html#dom-media-play
[2] http://searchfox.org/mozilla-central/rev/b52285fffc13f36eca6b47de735d4e4403b3859e/dom/html/HTMLMediaElement.cpp#4014
There is nothing we can fix here aside from contacting sites.
Priority: -- → P3
Reporter | ||
Comment 5•7 years ago
|
||
Here is the list about the websites showing the wrong UI, see "Websites testing".
https://docs.google.com/document/d/1J0kgSHEOhb8aiRQTEPBxeKZGWni4gP7GiH0MGCUkNcU/edit#
Comment 6•7 years ago
|
||
Adding dev-doc-needed to be sure we fully document this recommendation.
Keywords: dev-doc-needed
Comment 7•7 years ago
|
||
Closing. We intend to write a blog post documenting our autoplay behaviour.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Comment 8•7 years ago
|
||
I updated the page about HTMLMediaElement.play() with one specifically covering this scenario, and replaced the example on that page with one that covers this scenario.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play
Keywords: dev-doc-needed → dev-doc-complete
Comment 9•7 years ago
|
||
Looks good, thanks Eric.
You need to log in
before you can comment on or make changes to this bug.
Description
•