Skip to content
Permalink
Browse files

[giow] (1) Make <video> have an activation behaviour

Affected topics: Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@8315 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Nov 26, 2013
1 parent 971b011 commit fe3fa17158b572f330f735a76075d64bb795bad5
Showing with 120 additions and 9 deletions.
  1. +39 −4 complete.html
  2. +39 −4 index
  3. +42 −1 source

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 25 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 26 November 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
<a href=#report-the-controller-state>report the controller state</a> of the <code><a href=#mediacontroller>MediaController</a></code>.</p>

<p>When the <dfn id=dom-mediacontroller-play title=dom-MediaController-play><code>play()</code></dfn> method is invoked, the
user agent must invoke the <code title=dom-media-play><a href=#dom-media-play>play</a></code> method of each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> in turn, and then invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause</a></code> method of the <code><a href=#mediacontroller>MediaController</a></code>.</p>
user agent must invoke the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method of each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> in turn, and then invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause</a></code> method of the <code><a href=#mediacontroller>MediaController</a></code>.</p>

<p>The <dfn id=dom-mediacontroller-playbackstate title=dom-MediaController-playbackState><code>playbackState</code></dfn> attribute
must return the value to which it was most recently set. When the <code><a href=#mediacontroller>MediaController</a></code>
element</a> timeline.</li> <!-- i.e. "bring the media element up to speed with its new
media controller" -->

</ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media controller</dfn> if the
</ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=restrained-media-controller>restrained media controller</dfn> if the
<code><a href=#mediacontroller>MediaController</a></code> is a <a href=#playing-media-controller>playing media controller</a>, and none of its
<a href=#slaved-media-elements>slaved media elements</a> are <a href=#blocked-media-element title="blocked media element">blocked media
elements</a>, but either at least one of its <a href=#slaved-media-elements>slaved media elements</a> whose
<a href=#autoplaying-flag>autoplaying flag</a> is true still has its <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
attribute set to true, or, all of its <a href=#slaved-media-elements>slaved media elements</a> have their <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute set to true.</p>

<p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media controller</dfn> if the
<code><a href=#mediacontroller>MediaController</a></code> is a <a href=#paused-media-controller>paused media controller</a>, or if any of its
<a href=#slaved-media-elements>slaved media elements</a> are <a href=#blocked-media-element title="blocked media element">blocked media
elements</a>, or if any of its <a href=#slaved-media-elements>slaved media elements</a> whose <a href=#autoplaying-flag>autoplaying
element</a> without affecting the <code><a href=#mediacontroller>MediaController</a></code>, but such features are
considered relatively advanced and unlikely to be useful to most users.</p>

<p>For the purposes of listing chapters in the <a href=#media-resource>media resource</a>, only <a href=#text-track title="text
<p>The <a href=#activation-behavior>activation behavior</a> of a <a href=#media-element>media element</a> that is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user interface to the user</a> must be
to run the following steps:</p>

<ol><li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>, and that
<a href=#current-media-controller>current media controller</a> is a <a href=#restrained-media-controller>restrained media controller</a>, then invoke
the <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>,
and that <a href=#current-media-controller>current media controller</a> is a <a href=#paused-media-controller>paused media controller</a>, then
invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>,
then that <a href=#current-media-controller>current media controller</a> is a <a href=#playing-media-controller>playing media controller</a>;
invoke the <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, the <a href=#media-element>media element</a> has no <a href=#current-media-controller>current media controller</a>; if
the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true,
then invoke the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method on the <a href=#media-element>media
element</a>.</li>

<li><p>Otherwise, the <a href=#media-element>media element</a> has no <a href=#current-media-controller>current media controller</a>,
and the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is
false; invoke the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method on the <a href=#media-element>media
element</a>.</li>

</ol><p>For the purposes of listing chapters in the <a href=#media-resource>media resource</a>, only <a href=#text-track title="text
track">text tracks</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>
that are <a href=#text-track-showing title="text track showing">showing</a> and whose <a href=#text-track-kind>text track kind</a> is
<code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> should be used. Such tracks must be
43 index

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 25 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 26 November 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
<a href=#report-the-controller-state>report the controller state</a> of the <code><a href=#mediacontroller>MediaController</a></code>.</p>

<p>When the <dfn id=dom-mediacontroller-play title=dom-MediaController-play><code>play()</code></dfn> method is invoked, the
user agent must invoke the <code title=dom-media-play><a href=#dom-media-play>play</a></code> method of each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> in turn, and then invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause</a></code> method of the <code><a href=#mediacontroller>MediaController</a></code>.</p>
user agent must invoke the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method of each <a href=#slaved-media-elements title="slaved media elements">slaved media element</a> in turn, and then invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause</a></code> method of the <code><a href=#mediacontroller>MediaController</a></code>.</p>

<p>The <dfn id=dom-mediacontroller-playbackstate title=dom-MediaController-playbackState><code>playbackState</code></dfn> attribute
must return the value to which it was most recently set. When the <code><a href=#mediacontroller>MediaController</a></code>
element</a> timeline.</li> <!-- i.e. "bring the media element up to speed with its new
media controller" -->

</ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media controller</dfn> if the
</ol><p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=restrained-media-controller>restrained media controller</dfn> if the
<code><a href=#mediacontroller>MediaController</a></code> is a <a href=#playing-media-controller>playing media controller</a>, and none of its
<a href=#slaved-media-elements>slaved media elements</a> are <a href=#blocked-media-element title="blocked media element">blocked media
elements</a>, but either at least one of its <a href=#slaved-media-elements>slaved media elements</a> whose
<a href=#autoplaying-flag>autoplaying flag</a> is true still has its <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
attribute set to true, or, all of its <a href=#slaved-media-elements>slaved media elements</a> have their <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute set to true.</p>

<p>A <code><a href=#mediacontroller>MediaController</a></code> is a <dfn id=blocked-media-controller>blocked media controller</dfn> if the
<code><a href=#mediacontroller>MediaController</a></code> is a <a href=#paused-media-controller>paused media controller</a>, or if any of its
<a href=#slaved-media-elements>slaved media elements</a> are <a href=#blocked-media-element title="blocked media element">blocked media
elements</a>, or if any of its <a href=#slaved-media-elements>slaved media elements</a> whose <a href=#autoplaying-flag>autoplaying
element</a> without affecting the <code><a href=#mediacontroller>MediaController</a></code>, but such features are
considered relatively advanced and unlikely to be useful to most users.</p>

<p>For the purposes of listing chapters in the <a href=#media-resource>media resource</a>, only <a href=#text-track title="text
<p>The <a href=#activation-behavior>activation behavior</a> of a <a href=#media-element>media element</a> that is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user interface to the user</a> must be
to run the following steps:</p>

<ol><li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>, and that
<a href=#current-media-controller>current media controller</a> is a <a href=#restrained-media-controller>restrained media controller</a>, then invoke
the <code title=dom-MediaController-play><a href=#dom-mediacontroller-play>play()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>,
and that <a href=#current-media-controller>current media controller</a> is a <a href=#paused-media-controller>paused media controller</a>, then
invoke the <code title=dom-MediaController-unpause><a href=#dom-mediacontroller-unpause>unpause()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, if the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media controller</a>,
then that <a href=#current-media-controller>current media controller</a> is a <a href=#playing-media-controller>playing media controller</a>;
invoke the <code title=dom-MediaController-pause><a href=#dom-mediacontroller-pause>pause()</a></code> method of the
<code><a href=#mediacontroller>MediaController</a></code>.</li>

<li><p>Otherwise, the <a href=#media-element>media element</a> has no <a href=#current-media-controller>current media controller</a>; if
the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true,
then invoke the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method on the <a href=#media-element>media
element</a>.</li>

<li><p>Otherwise, the <a href=#media-element>media element</a> has no <a href=#current-media-controller>current media controller</a>,
and the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is
false; invoke the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method on the <a href=#media-element>media
element</a>.</li>

</ol><p>For the purposes of listing chapters in the <a href=#media-resource>media resource</a>, only <a href=#text-track title="text
track">text tracks</a> in the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>
that are <a href=#text-track-showing title="text track showing">showing</a> and whose <a href=#text-track-kind>text track kind</a> is
<code title=dom-TextTrack-kind-chapters><a href=#dom-texttrack-kind-chapters>chapters</a></code> should be used. Such tracks must be
43 source
<span>report the controller state</span> of the <code>MediaController</code>.</p>

<p>When the <dfn data-x="dom-MediaController-play"><code>play()</code></dfn> method is invoked, the
user agent must invoke the <code data-x="dom-media-play">play</code> method of each <span
user agent must invoke the <code data-x="dom-media-play">play()</code> method of each <span
data-x="slaved media elements">slaved media element</span> in turn, and then invoke the <code
data-x="dom-MediaController-unpause">unpause</code> method of the <code>MediaController</code>.</p>


</ol>

<p>A <code>MediaController</code> is a <dfn>restrained media controller</dfn> if the
<code>MediaController</code> is a <span>playing media controller</span>, and none of its
<span>slaved media elements</span> are <span data-x="blocked media element">blocked media
elements</span>, but either at least one of its <span>slaved media elements</span> whose
<span>autoplaying flag</span> is true still has its <code data-x="dom-media-paused">paused</code>
attribute set to true, or, all of its <span>slaved media elements</span> have their <code
data-x="dom-media-paused">paused</code> attribute set to true.</p>

<p>A <code>MediaController</code> is a <dfn>blocked media controller</dfn> if the
<code>MediaController</code> is a <span>paused media controller</span>, or if any of its
<span>slaved media elements</span> are <span data-x="blocked media element">blocked media
element</span> without affecting the <code>MediaController</code>, but such features are
considered relatively advanced and unlikely to be useful to most users.</p>

<p>The <span>activation behavior</span> of a <span>media element</span> that is <span
data-x="expose a user interface to the user">exposing a user interface to the user</span> must be
to run the following steps:</p>

<ol>

<li><p>If the <span>media element</span> has a <span>current media controller</span>, and that
<span>current media controller</span> is a <span>restrained media controller</span>, then invoke
the <code data-x="dom-MediaController-play">play()</code> method of the
<code>MediaController</code>.</p></li>

<li><p>Otherwise, if the <span>media element</span> has a <span>current media controller</span>,
and that <span>current media controller</span> is a <span>paused media controller</span>, then
invoke the <code data-x="dom-MediaController-unpause">unpause()</code> method of the
<code>MediaController</code>.</p></li>

<li><p>Otherwise, if the <span>media element</span> has a <span>current media controller</span>,
then that <span>current media controller</span> is a <span>playing media controller</span>;
invoke the <code data-x="dom-MediaController-pause">pause()</code> method of the
<code>MediaController</code>.</p></li>

<li><p>Otherwise, the <span>media element</span> has no <span>current media controller</span>; if
the <span>media element</span>'s <code data-x="dom-media-paused">paused</code> attribute is true,
then invoke the <code data-x="dom-media-play">play()</code> method on the <span>media
element</span>.</p></li>

<li><p>Otherwise, the <span>media element</span> has no <span>current media controller</span>,
and the <span>media element</span>'s <code data-x="dom-media-paused">paused</code> attribute is
false; invoke the <code data-x="dom-media-pause">pause()</code> method on the <span>media
element</span>.</p></li>

</ol>

<p>For the purposes of listing chapters in the <span>media resource</span>, only <span data-x="text
track">text tracks</span> in the <span>media element</span>'s <span>list of text tracks</span>
that are <span data-x="text track showing">showing</span> and whose <span>text track kind</span> is

0 comments on commit fe3fa17

Please sign in to comment.
You can’t perform that action at this time.