media: Fix the order of events for autoplay media#56014
media: Fix the order of events for autoplay media#56014jdm merged 1 commit intoweb-platform-tests:masterfrom
Conversation
Following the HTML specification, the order of events for autoplaying media files (<video autoplay>) has been corrected: - carplay, canplaythrough, play, playing https://html.spec.whatwg.org/multipage/#ready-states:event-media-canplaythrough WhatWG PR: whatwg/html#1409 Signed-off-by: Andrei Volykhin <[email protected]>
|
WPT live status |
|
What are the expected results of the browsers after changing the test this way? Is Webkit the only engine that implements the specification order right now? |
The expected order of the events for autoplay media is according to specification:
The most of major browsers doesn't follow the specification (except Safari, but it has another issue which is affecting final results) Chromium:
The expected results after changing the test: 10/10 -> 6/10 Firefox:
The expected results after changing the test: 10/10 -> 6/10 Safari:
The expected results after changing the test: 4/10 -> 4/10 because the
|
|
There was discussion about the event ordering - WICG/interventions#23 (comment) |
|
Ok, changing the test to reflect the current specification seems like the right choice. Whether the specification should be changed to reflect the actual browser implementations is probably also worth a discussion somewhere else! |
Follow the HTML specification, queue a media element task to fire `canplaythrough` event in expected order (after `canplay`) on the changing the ready state to `HAVE_ENOUGH_DATA` which align the event ordering for non-autoplay and autoplay media. See https://html.spec.whatwg.org/multipage/#ready-states%3Aevent-media-canplaythrough The associated WPT PR: web-platform-tests/wpt#56014 Testing: Improvements in the following tests - html/semantics/embedded-content/media-elements/ready-states/autoplay.html Signed-off-by: Andrei Volykhin <[email protected]>
Follow the HTML specification, queue a media element task to fire `canplaythrough` event in expected order (after `canplay`) on the changing the ready state to `HAVE_ENOUGH_DATA` which align the event ordering for non-autoplay and autoplay media. See https://html.spec.whatwg.org/multipage/#ready-states%3Aevent-media-canplaythrough The associated WPT PR: web-platform-tests/wpt#56014 Testing: Improvements in the following tests - html/semantics/embedded-content/media-elements/ready-states/autoplay.html Signed-off-by: Andrei Volykhin <[email protected]>
…40685) Follow the HTML specification, queue a media element task to fire `canplaythrough` event in expected order (after `canplay`) on the changing the ready state to `HAVE_ENOUGH_DATA` which align the event ordering for non-autoplay and autoplay media. See https://html.spec.whatwg.org/multipage/#ready-states%3Aevent-media-canplaythrough The associated WPT PR: web-platform-tests/wpt#56014 Testing: Improvements in the following tests - html/semantics/embedded-content/media-elements/ready-states/autoplay.html Signed-off-by: Andrei Volykhin <[email protected]>
Following the HTML specification, the expected order of events for autoplaying media tests (
<video autoplay>) has been corrected:canplay,canplaythrough(same as before)canplay,canplaythrough,play,playing(canplaythroughshould be right aftercanplay, not afterplaying)https://html.spec.whatwg.org/multipage/#ready-states:event-media-canplaythrough
WhatWG PR: whatwg/html#1409