-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Allow delaying autoplay until video elements become visible #1409
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 . |
@@ -32486,6 +32490,13 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> { | |||
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? |
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