-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow delaying autoplay until video elements become visible #1409
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
Conversation
|
Content sgtm. The wording might be improved. Maybe something like: "then the user agent may also run the following substeps immediately or wait until [...]"? |
Done. |
|
You might want to merge the two commits. lgtm otherwise. Thoug,h @foolip is the one who can merge :) |
9a61f83 to
71adc34
Compare
Done. |
|
PTAL. Addressed our offline discussion with @foolip . |
source
Outdated
| data-x="attr-media-autoplay">autoplay</code> attribute rather than using script to force the | ||
| video to play, so as to allow the user to override the behaviour if so desired.</p> | ||
|
|
||
| <p class="note">A <code>video</code> element is <dfn>visible in the user viewport</dfn> if and |
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.
Remove class="note" -- this paragraph defines a term and has requirements. :-)
|
This was trickier than expected with the event order, but I gave it a shot in 5cc7b99. @xxyzzzq, can you add that to your branch for easier reviewing? Can everyone including @xxyzzzq review the sum of changes to see if this makes sense? Discussion about event order in WICG/interventions#23. |
3abd3a4 to
88e23f5
Compare
Starting autoplay when media elements loaded is too agressive. Added supplementary saying that the user agent may delay autoplay until video elements become visible.
62ea2e7 to
de799e3
Compare
|
Merged the changes from @foolip , PTAL. |
|
LGTM |
Starting autoplay when media elements loaded is too agressive. Added supplementary saying that the user agent may delay autoplay until video elements become visible. PR: #1409
|
Pushed as 8ebd581, I had to add a reference back to this PR in the commit message but the source change is the same. There is one thing that's still needed, and that's to look for event order tests in web-platform-tests and update them, or to write them if they don't exist. Any takers? |
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 <andrei.volykhin@gmail.com>
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 <andrei.volykhin@gmail.com>
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 <andrei.volykhin@gmail.com>
…lay media, a=testonly Automatic update from web-platform-tests media: Fix the order of events for autoplay media 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 <andrei.volykhin@gmail.com> -- wpt-commits: 5f6bfca0b535342b74a66485bbfeea563a857f8f wpt-pr: 56014
…lay media, a=testonly Automatic update from web-platform-tests media: Fix the order of events for autoplay media 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 <andrei.volykhin@gmail.com> -- wpt-commits: 5f6bfca0b535342b74a66485bbfeea563a857f8f wpt-pr: 56014
…lay media, a=testonly Automatic update from web-platform-tests media: Fix the order of events for autoplay media 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 <andrei.volykhingmail.com> -- wpt-commits: 5f6bfca0b535342b74a66485bbfeea563a857f8f wpt-pr: 56014 UltraBlame original commit: 2fee79cba02206719799d576e15d26063ff99f4b
…lay media, a=testonly Automatic update from web-platform-tests media: Fix the order of events for autoplay media 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 <andrei.volykhingmail.com> -- wpt-commits: 5f6bfca0b535342b74a66485bbfeea563a857f8f wpt-pr: 56014 UltraBlame original commit: 2fee79cba02206719799d576e15d26063ff99f4b
…lay media, a=testonly Automatic update from web-platform-tests media: Fix the order of events for autoplay media 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 <andrei.volykhingmail.com> -- wpt-commits: 5f6bfca0b535342b74a66485bbfeea563a857f8f wpt-pr: 56014 UltraBlame original commit: 2fee79cba02206719799d576e15d26063ff99f4b
Starting autoplay when media elements loaded is too agressive. Added
supplementary saying that the user agent may delay autoplay until video
elements become visible.
WICG/interventions#23