-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add "autoplay" policy-controlled feature #3829
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
This is really a proposal, although it matches what Chrome is currently implementing, as described in the blog post Questions -
Tests, etc, obviously would still need to be added. |
cc @jyavenard |
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.
Sorry for the big delay! Some nits and some quibbles on where to place it, but the overall structure seems sound.
source
Outdated
does not have the <span>sandboxed automatic features browsing context flag</span> set.</p> | ||
<p>A <span>media element</span> is said to be <dfn>eligible for autoplay</dfn> when all of the | ||
following conditions are met:</p> | ||
<ul> |
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.
Nits:
- Blank line between paragraph and ul
- Use
class="brief"
on the ul - Use "its"/"it" instead of "The element", maybe?
- Periods at the end of each li
source
Outdated
@@ -67051,7 +67059,17 @@ customElements.define("x-foo", class extends HTMLElement { | |||
</div> | |||
|
|||
|
|||
<h3 split-filename="semantics-other" id="common-idioms">Common idioms without dedicated elements</h3> | |||
<h3 split-filename="semantics-other" id="policy-controlled-features">Policy-controlled features</h3> |
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.
I would not put this under "Semantics", which is largely about HTML elements. Instead maybe "Web application APIs"? Or perhaps better, "Common infrastructure"?
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.
I moved it to Common infrastructure -- right before Common microsyntaxes, so that it still ends up in infrastructure.html in the split version.
@rebeccahughes as she implemented this in Chromium. |
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.
Spec structure LGTM, but I assume we're holding this for implementer interest/tests.
It seems a couple things could be done to move this further along still:
|
Ah, great! Moving them there might make sense, given that it's defined in the HTML Standard. An alternative might be adding some pointers in a README.md resource in that directory to give folks at least a chance to find out about them without grep across the whole repository. |
Is there anything else holding this back right now? Are we still just waiting on interest from implementers? |
Yeah, that looks right to me. |
@jyavenard @bakulf can you comment as to whether Firefox wants to support this? |
Now that Feature Policy has been marked as worth implementing (mozilla/standards-positions#24) I'd gather the answer is yes for the media one. |
Thanks @jyavenard, can you confirm that Mozilla's support of feature policy in general translates to support for the autoplay feature policy in particular? |
Yes, I confirm it. |
This defines "autoplay" as a policy-controlled feature which can be used to disable autoplaying videos in any frame. It also adds a new section under "semantics-other" where policy-controlled features defined in HTML can be listed.
/common-dom-interfaces.html ( diff )
/common-microsyntaxes.html ( diff )
/dom.html ( diff )
/index.html ( diff )
/infrastructure.html ( diff )
/media.html ( diff )
/structured-data.html ( diff )
/urls-and-fetching.html ( diff )