Skip to content

Commit

Permalink
[giow] (2) Revamp how the 'time marches on' algorithm is invoked.
Browse files Browse the repository at this point in the history
Affected topics: Video Text Tracks, Video and Audio

git-svn-id: http://svn.whatwg.org/webapps@7990 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 19, 2013
1 parent bc3e4f2 commit d890d44
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 45 deletions.
42 changes: 27 additions & 15 deletions complete.html
Expand Up @@ -256,7 +256,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 18 June 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 19 June 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>
Expand Down Expand Up @@ -28643,9 +28643,10 @@ <h5 id=ready-states><span class=secno>4.8.10.7 </span>Ready states</h5>
<a href=#media-element>media element</a>'s <code><a href=#document>Document</a></code>'s <a href=#active-sandboxing-flag-set>active sandboxing flag set</a>
does not have the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context flag</a> set, then
the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to
false, set the element's <a href=#show-poster-flag>show poster flag</a> to false, <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element, and
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-playing><a href=#event-media-playing>playing</a></code> at the element.</p>
false, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> named <code title=event-media-playing><a href=#event-media-playing>playing</a></code> at the element, and
then, if the element's <a href=#show-poster-flag>show poster flag</a> to false, first set it to false and then
run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p class=note>User agents do not need to support autoplay, and it is suggested that user
agents honor user preferences on the matter. Authors are urged to use the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute rather than using script to force the
Expand Down Expand Up @@ -28958,7 +28959,8 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the

<ol><li><p>Change the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> to false.</li>

<li><p>Set the element's <a href=#show-poster-flag>show poster flag</a> to false.</li>
<li><p>If the <a href=#show-poster-flag>show poster flag</a> is true, set the element's <a href=#show-poster-flag>show poster
flag</a> to false and run the <i><a href=#time-marches-on>time marches on</a></i> steps.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element.</li>

Expand Down Expand Up @@ -29071,8 +29073,15 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the
track</a>'s <a href=#text-track-list-of-cues title="text track list of cues">list of cues</a> must be added to the
<a href=#media-element>media element</a>'s <a href=#list-of-newly-introduced-cues>list of newly introduced cues</a>. When a <a href=#media-element>media
element</a>'s <a href=#list-of-newly-introduced-cues>list of newly introduced cues</a> has new cues added while the
<a href=#media-element>media element</a> is <a href=#dom-media-paused title=dom-media-paused>paused</a> but its <a href=#show-poster-flag>show
poster flag</a> is not set, then the user agent must run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>
<a href=#media-element>media element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then the user agent must
run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p>When a <a href=#text-track-cue>text track cue</a> is removed from the <a href=#text-track-list-of-cues title="text track list of
cues">list of cues</a> of a <a href=#text-track>text track</a> that is in the <a href=#list-of-text-tracks>list of text
tracks</a> for a <a href=#media-element>media element</a>, and whenever a <a href=#text-track>text track</a> is removed
from the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media element</a>, if the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then the user agent must run the
<i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media element</a> changes (e.g.
due to playback or seeking), the user agent must run the <i><a href=#time-marches-on>time marches on</a></i> steps. If the
Expand Down Expand Up @@ -29369,6 +29378,8 @@ <h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5>
<li><p>&#8987; Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
false.</li>

<li><p>&#8987; Run the <a href=#time-marches-on>time marches on</a> steps.</li>

<li id=seekUpdate><p>&#8987; <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>

Expand Down Expand Up @@ -30879,6 +30890,9 @@ <h6 id=text-track-model><span class=secno>4.8.10.12.1 </span>Text track model</h

</ol></li>

<li><p>If the <a href=#media-element>media element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, run the
<i><a href=#time-marches-on>time marches on</a></i> steps.</li>

</ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>

Expand Down Expand Up @@ -31750,10 +31764,6 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
<li><p>Add <var title="">cue</var> to the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</li>

<li><p>If the <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a> is in a <a href=#media-element>media
element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, run the <i><a href=#time-marches-on>time marches on</a></i> steps for that
<a href=#media-element>media element</a>.</li>

</ol><p>The <dfn id=dom-texttrack-removecue title=dom-TextTrack-removeCue><code>removeCue(<var title="">cue</var>)</code></dfn>
method of <code><a href=#texttrack>TextTrack</a></code> objects, when invoked, must run the following steps:</p>

Expand Down Expand Up @@ -31911,17 +31921,19 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
start time</a> must be set to the new value, interpreted in seconds; then, if the
<code><a href=#texttrackcue>TextTrackCue</a></code> object's <a href=#text-track-cue>text track cue</a> is in a <a href=#text-track>text track</a>'s
<a href=#text-track-list-of-cues title="text track list of cues">list of cues</a>, and that <a href=#text-track>text track</a> is in
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, then run the <i><a href=#time-marches-on>time marches
on</a></i> steps for that <a href=#media-element>media element</a>.</p>
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then run the <i><a href=#time-marches-on>time marches on</a></i>
steps for that <a href=#media-element>media element</a>.</p>

<p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn> attribute, on getting,
must return the <a href=#text-track-cue-end-time>text track cue end time</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-end-time>text track cue end
time</a> must be set to the new value, interpreted in seconds; then, if the
<code><a href=#texttrackcue>TextTrackCue</a></code> object's <a href=#text-track-cue>text track cue</a> is in a <a href=#text-track>text track</a>'s
<a href=#text-track-list-of-cues title="text track list of cues">list of cues</a>, and that <a href=#text-track>text track</a> is in
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, then run the <i><a href=#time-marches-on>time marches
on</a></i> steps for that <a href=#media-element>media element</a>.</p>
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then run the <i><a href=#time-marches-on>time marches on</a></i>
steps for that <a href=#media-element>media element</a>.</p>

<p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn> attribute, on
getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> of the <a href=#text-track-cue>text
Expand Down
42 changes: 27 additions & 15 deletions index
Expand Up @@ -256,7 +256,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 18 June 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 19 June 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>
Expand Down Expand Up @@ -28643,9 +28643,10 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<a href=#media-element>media element</a>'s <code><a href=#document>Document</a></code>'s <a href=#active-sandboxing-flag-set>active sandboxing flag set</a>
does not have the <a href=#sandboxed-automatic-features-browsing-context-flag>sandboxed automatic features browsing context flag</a> set, then
the user agent may also set the <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute to
false, set the element's <a href=#show-poster-flag>show poster flag</a> to false, <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element, and
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-playing><a href=#event-media-playing>playing</a></code> at the element.</p>
false, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
simple event</a> named <code title=event-media-playing><a href=#event-media-playing>playing</a></code> at the element, and
then, if the element's <a href=#show-poster-flag>show poster flag</a> to false, first set it to false and then
run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p class=note>User agents do not need to support autoplay, and it is suggested that user
agents honor user preferences on the matter. Authors are urged to use the <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code> attribute rather than using script to force the
Expand Down Expand Up @@ -28958,7 +28959,8 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement

<ol><li><p>Change the value of <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> to false.</li>

<li><p>Set the element's <a href=#show-poster-flag>show poster flag</a> to false.</li>
<li><p>If the <a href=#show-poster-flag>show poster flag</a> is true, set the element's <a href=#show-poster-flag>show poster
flag</a> to false and run the <i><a href=#time-marches-on>time marches on</a></i> steps.</li>

<li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-play><a href=#event-media-play>play</a></code> at the element.</li>

Expand Down Expand Up @@ -29071,8 +29073,15 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
track</a>'s <a href=#text-track-list-of-cues title="text track list of cues">list of cues</a> must be added to the
<a href=#media-element>media element</a>'s <a href=#list-of-newly-introduced-cues>list of newly introduced cues</a>. When a <a href=#media-element>media
element</a>'s <a href=#list-of-newly-introduced-cues>list of newly introduced cues</a> has new cues added while the
<a href=#media-element>media element</a> is <a href=#dom-media-paused title=dom-media-paused>paused</a> but its <a href=#show-poster-flag>show
poster flag</a> is not set, then the user agent must run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>
<a href=#media-element>media element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then the user agent must
run the <i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p>When a <a href=#text-track-cue>text track cue</a> is removed from the <a href=#text-track-list-of-cues title="text track list of
cues">list of cues</a> of a <a href=#text-track>text track</a> that is in the <a href=#list-of-text-tracks>list of text
tracks</a> for a <a href=#media-element>media element</a>, and whenever a <a href=#text-track>text track</a> is removed
from the <a href=#list-of-text-tracks>list of text tracks</a> of a <a href=#media-element>media element</a>, if the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then the user agent must run the
<i><a href=#time-marches-on>time marches on</a></i> steps.</p>

<p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media element</a> changes (e.g.
due to playback or seeking), the user agent must run the <i><a href=#time-marches-on>time marches on</a></i> steps. If the
Expand Down Expand Up @@ -29369,6 +29378,8 @@ interface <dfn id=htmlmediaelement>HTMLMediaElement</dfn> : <a href=#htmlelement
<li><p>&#8987; Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
false.</li>

<li><p>&#8987; Run the <a href=#time-marches-on>time marches on</a> steps.</li>

<li id=seekUpdate><p>&#8987; <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>

Expand Down Expand Up @@ -30879,6 +30890,9 @@ interface <dfn id=mediacontroller>MediaController</dfn> : <a href=#eventtarget>E

</ol></li>

<li><p>If the <a href=#media-element>media element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, run the
<i><a href=#time-marches-on>time marches on</a></i> steps.</li>

</ol><p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> listed in this
section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>

Expand Down Expand Up @@ -31750,10 +31764,6 @@ interface <dfn id=texttrack>TextTrack</dfn> : <a href=#eventtarget>EventTarget</
<li><p>Add <var title="">cue</var> to the method's <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text
track</a>'s <a href=#text-track-list-of-cues>text track list of cues</a>.</li>

<li><p>If the <code><a href=#texttrack>TextTrack</a></code> object's <a href=#text-track>text track</a> is in a <a href=#media-element>media
element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, run the <i><a href=#time-marches-on>time marches on</a></i> steps for that
<a href=#media-element>media element</a>.</li>

</ol><p>The <dfn id=dom-texttrack-removecue title=dom-TextTrack-removeCue><code>removeCue(<var title="">cue</var>)</code></dfn>
method of <code><a href=#texttrack>TextTrack</a></code> objects, when invoked, must run the following steps:</p>

Expand Down Expand Up @@ -31911,17 +31921,19 @@ window.onbeforeunload = function () {
start time</a> must be set to the new value, interpreted in seconds; then, if the
<code><a href=#texttrackcue>TextTrackCue</a></code> object's <a href=#text-track-cue>text track cue</a> is in a <a href=#text-track>text track</a>'s
<a href=#text-track-list-of-cues title="text track list of cues">list of cues</a>, and that <a href=#text-track>text track</a> is in
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, then run the <i><a href=#time-marches-on>time marches
on</a></i> steps for that <a href=#media-element>media element</a>.</p>
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then run the <i><a href=#time-marches-on>time marches on</a></i>
steps for that <a href=#media-element>media element</a>.</p>

<p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn> attribute, on getting,
must return the <a href=#text-track-cue-end-time>text track cue end time</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-end-time>text track cue end
time</a> must be set to the new value, interpreted in seconds; then, if the
<code><a href=#texttrackcue>TextTrackCue</a></code> object's <a href=#text-track-cue>text track cue</a> is in a <a href=#text-track>text track</a>'s
<a href=#text-track-list-of-cues title="text track list of cues">list of cues</a>, and that <a href=#text-track>text track</a> is in
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, then run the <i><a href=#time-marches-on>time marches
on</a></i> steps for that <a href=#media-element>media element</a>.</p>
a <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>, and the <a href=#media-element>media
element</a>'s <a href=#show-poster-flag>show poster flag</a> is not set, then run the <i><a href=#time-marches-on>time marches on</a></i>
steps for that <a href=#media-element>media element</a>.</p>

<p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn> attribute, on
getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> of the <a href=#text-track-cue>text
Expand Down

0 comments on commit d890d44

Please sign in to comment.