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

Add "autoplay" policy-controlled feature #3829

Merged
merged 3 commits into from
Sep 13, 2018

Conversation

clelland
Copy link
Contributor

@clelland clelland commented Jul 17, 2018

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 )

@clelland
Copy link
Contributor Author

This is really a proposal, although it matches what Chrome is currently implementing, as described in the blog post

Questions -

  • Does the format of the new section make sense?
  • Is there a better place for features which would only be defined in HTML itself?
  • Should the definition be worded such that implementation of the feature is optional?

Tests, etc, obviously would still need to be added.
@mounirlamouri for additional sanity checking

@domenic domenic added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: media needs tests Moving the issue forward requires someone to write tests labels Jul 24, 2018
@annevk
Copy link
Member

annevk commented Aug 9, 2018

cc @jyavenard

Copy link
Member

@domenic domenic left a 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>
Copy link
Member

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

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"?

Copy link
Contributor Author

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.

@mounirlamouri
Copy link
Member

@rebeccahughes as she implemented this in Chromium.

Copy link
Member

@domenic domenic left a 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.

@annevk
Copy link
Member

annevk commented Aug 29, 2018

It seems a couple things could be done to move this further along still:

  • Tests
  • Implementation bugs

@clelland
Copy link
Contributor Author

@annevk, there are WPT for the interaction between FP and Autoplay (1, 2, 3, 4, 5). Should those just be moved into https://wpt.fyi/results/html/semantics/embedded-content/media-elements at this point, or are there additional tests you'd like to see as well?

@annevk
Copy link
Member

annevk commented Aug 29, 2018

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.

@domenic domenic removed the needs tests Moving the issue forward requires someone to write tests label Aug 30, 2018
@clelland
Copy link
Contributor Author

clelland commented Aug 31, 2018

@sideshowbarker sideshowbarker added the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Sep 11, 2018
@clelland
Copy link
Contributor Author

Is there anything else holding this back right now? Are we still just waiting on interest from implementers?

@domenic
Copy link
Member

domenic commented Sep 11, 2018

Yeah, that looks right to me.

@annevk
Copy link
Member

annevk commented Sep 12, 2018

@jyavenard @bakulf can you comment as to whether Firefox wants to support this?

@jyavenard
Copy link
Member

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.

@domenic
Copy link
Member

domenic commented Sep 12, 2018

Thanks @jyavenard, can you confirm that Mozilla's support of feature policy in general translates to support for the autoplay feature policy in particular?

@bakulf
Copy link

bakulf commented Sep 13, 2018

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.

@domenic domenic removed the needs implementer interest Moving the issue forward requires implementers to express interest label Sep 13, 2018
@domenic domenic merged commit f23329e into whatwg:master Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation topic: media
Development

Successfully merging this pull request may close these issues.

None yet

7 participants