Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

xxyzzzq
Copy link
Contributor

@xxyzzzq xxyzzzq commented Jun 9, 2016

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

@xxyzzzq
Copy link
Contributor Author

xxyzzzq commented Jun 9, 2016

@foolip @mounirlamouri

@mounirlamouri
Copy link
Member

Content sgtm. The wording might be improved. Maybe something like: "then the user agent may also run the following substeps immediately or wait until [...]"?

@xxyzzzq
Copy link
Contributor Author

xxyzzzq commented Jun 9, 2016

Maybe something like: "then the user agent may also run the following substeps immediately or wait until [...]"?

Done.

@mounirlamouri
Copy link
Member

You might want to merge the two commits. lgtm otherwise. Thoug,h @foolip is the one who can merge :)

@xxyzzzq
Copy link
Contributor Author

xxyzzzq commented Jun 9, 2016

You might want to merge the two commits.

Done.

@xxyzzzq
Copy link
Contributor Author

xxyzzzq commented Jun 20, 2016

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
Copy link
Member

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. :-)

@foolip
Copy link
Member

foolip commented Jun 21, 2016

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.

Starting autoplay when media elements loaded is too agressive. Added
supplementary saying that the user agent may delay autoplay until video
elements become visible.
@xxyzzzq
Copy link
Contributor Author

xxyzzzq commented Jun 22, 2016

Merged the changes from @foolip , PTAL.

@zcorpan
Copy link
Member

zcorpan commented Jun 22, 2016

LGTM

foolip pushed a commit that referenced this pull request Jun 22, 2016
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
@foolip
Copy link
Member

foolip commented Jun 22, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants