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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4014,9 +4014,11 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<p>The following terms are defined in <cite>Feature Policy</cite>: <ref spec="FEATUREPOLICY"></p>

<ul class="brief">
<li><dfn data-x="concept-policy-controlled-feature" data-x-href="https://wicg.github.io/feature-policy/#policy-controlled-feature">feature policy</dfn></li>
<li><dfn data-x="concept-feature-policy" data-x-href="https://wicg.github.io/feature-policy/#feature-policy">feature policy</dfn></li>
<li><dfn data-x="concept-container-policy" data-x-href="https://wicg.github.io/feature-policy/#container-policy">container policy</dfn></li>
<li><dfn data-x="concept-serialized-feature-policy" data-x-href="https://wicg.github.io/feature-policy/#serialized-feature-policy">serialized feature policy</dfn></li>
<li><dfn data-x="concept-default-allowlist" data-x-href="https://wicg.github.io/feature-policy/#default-allowlist">default allowlist</dfn></li>
<li>The <dfn data-x-href="https://wicg.github.io/feature-policy/#initialize-for-document">Initialize document’s feature policy</dfn> algorithm</li>
<li>The <dfn data-x-href="https://wicg.github.io/feature-policy/#initialize-from-response">Initialize document’s feature policy from response</dfn> algorithm</li>
<li>The <dfn data-x="is-feature-enabled" data-x-href="https://wicg.github.io/feature-policy/#is-feature-enabled">Is feature enabled by policy for origin</dfn> algorithm</li>
Expand Down Expand Up @@ -4318,6 +4320,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<var>pattern</var>'s length leaves the two strings as matches of each other.</p>


<h3 id="policy-controlled-features">Policy-controlled features</h3>

<p>This document defines the following <span
data-x="concept-policy-controlled-feature">policy-controlled features</span>:</p>

<ul>
<li>"<dfn data-x="autoplay-feature"><code data-x="">autoplay</code></dfn>", which has a <span
data-x="concept-default-allowlist">default allowlist</span> of <code
data-x="">'self'</code>.</li>
</ul>


<h3 split-filename="common-microsyntaxes">Common microsyntaxes</h3>

Expand Down Expand Up @@ -34639,11 +34652,18 @@ interface <dfn>MediaError</dfn> {
data-x="dom-media-readyState">readyState</code> attribute changing to a value lower than <code
data-x="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>.</p>

<p>A <span>media element</span> is said to be <dfn>eligible for autoplay</dfn> when its
<span>can autoplay flag</span> is true, its <code data-x="dom-media-paused">paused</code> attribute
is true, the element has an <code data-x="attr-media-autoplay">autoplay</code> attribute
specified, and the element's <span>node document</span>'s <span>active sandboxing flag set</span>
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 class="brief">
<li>Its <span>can autoplay flag</span> is true.</li>
<li>Its <code data-x="dom-media-paused">paused</code> attribute is true.</li>
<li>It has an <code data-x="attr-media-autoplay">autoplay</code> attribute specified.</li>
<li>Its <span>node document</span>'s <span>active sandboxing flag set</span> does not have the
<span>sandboxed automatic features browsing context flag</span> set.</li>
<li>Its <span>node document</span> is <span>allowed to use</span> the "<code
data-x="autoplay-feature">autoplay</code>" feature.</li>
</ul>

<p>A <span>media element</span> is said to be <dfn>allowed to play</dfn> if the user agent and the
system allow media playback in the current context.</p>
Expand Down