[html5] r2401 - [gow] (2) Replace all the looping mechanisms with a single loop attribute. Allow [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Nov 13 18:55:38 PST 2008
Author: ianh
Date: 2008-11-13 18:55:37 -0800 (Thu, 13 Nov 2008)
New Revision: 2401
Modified:
index
source
Log:
[gow] (2) Replace all the looping mechanisms with a single loop attribute. Allow the media URI to include a fragment identifier to seek to at the start.
Modified: index
===================================================================
--- index 2008-11-13 01:45:07 UTC (rev 2400)
+++ index 2008-11-14 02:55:37 UTC (rev 2401)
@@ -17,7 +17,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 13 November 2008</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 14 November 2008</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -16330,11 +16330,7 @@
<dd><code title=attr-media-src><a href=#attr-media-src>src</a></code></dd>
<dd><code title=attr-video-poster><a href=#attr-video-poster>poster</a></code></dd>
<dd><code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code></dd>
- <dd><code title=attr-media-start><a href=#attr-media-start>start</a></code></dd>
- <dd><code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code></dd>
- <dd><code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code></dd>
- <dd><code title=attr-media-end><a href=#attr-media-end>end</a></code></dd>
- <dd><code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code></dd>
+ <dd><code title=attr-media-loop><a href=#attr-media-loop>loop</a></code></dd>
<dd><code title=attr-media-controls><a href=#attr-media-controls>controls</a></code></dd>
<dd><code title=attr-dim-width><a href=#attr-dim-width>width</a></code></dd>
<dd><code title=attr-dim-height><a href=#attr-dim-height>height</a></code></dd>
@@ -16368,7 +16364,7 @@
whose <a href=#media-data>media data</a> is ostensibly video data, possibly
with associated audio data.</p>
- <p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, <code title=attr-media-end><a href=#attr-media-end>end</a></code>, <code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
+ <p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
elements</a>.</p>
<p>The <dfn id=attr-video-poster title=attr-video-poster><code>poster</code></dfn>
@@ -16604,11 +16600,7 @@
<dt>Element-specific attributes:</dt>
<dd><code title=attr-media-src><a href=#attr-media-src>src</a></code></dd>
<dd><code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code></dd>
- <dd><code title=attr-media-start><a href=#attr-media-start>start</a></code></dd>
- <dd><code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code></dd>
- <dd><code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code></dd>
- <dd><code title=attr-media-end><a href=#attr-media-end>end</a></code></dd>
- <dd><code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code></dd>
+ <dd><code title=attr-media-loop><a href=#attr-media-loop>loop</a></code></dd>
<dd><code title=attr-media-controls><a href=#attr-media-controls>controls</a></code></dd>
<dt>DOM interface:</dt>
<dd>
@@ -16638,7 +16630,7 @@
<p>The <code><a href=#audio>audio</a></code> element is a <a href=#media-element>media element</a>
whose <a href=#media-data>media data</a> is ostensibly audio data.</p>
- <p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, <code title=attr-media-end><a href=#attr-media-end>end</a></code>, <code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
+ <p>The <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code> attributes are <a href=#media-element-attributes title="media element attributes">the attributes common to all media
elements</a>.</p>
<p>When an <code><a href=#audio>audio</a></code> element is <a href=#potentially-playing>potentially
@@ -16890,17 +16882,10 @@
readonly attribute <a href=#timeranges>TimeRanges</a> <a href=#dom-media-seekable title=dom-media-seekable>seekable</a>;
readonly attribute boolean <a href=#dom-media-ended title=dom-media-ended>ended</a>;
attribute boolean <a href=#dom-media-autoplay title=dom-media-autoplay>autoplay</a>;
+ attribute boolean <a href=#dom-media-loop title=dom-media-loop>loop</a>;
void <a href=#dom-media-play title=dom-media-play>play</a>();
void <a href=#dom-media-pause title=dom-media-pause>pause</a>();
- // looping
- attribute float <a href=#dom-media-start title=dom-media-start>start</a>;
- attribute float <a href=#dom-media-end title=dom-media-end>end</a>;
- attribute float <a href=#dom-media-loopstart title=dom-media-loopStart>loopStart</a>;
- attribute float <a href=#dom-media-loopend title=dom-media-loopEnd>loopEnd</a>;
- attribute unsigned long <a href=#dom-media-playcount title=dom-media-playCount>playCount</a>;
- attribute unsigned long <a href=#dom-media-currentloop title=dom-media-currentLoop>currentLoop</a>;
-
// cue ranges
void <a href=#dom-media-addcuerange title=dom-media-addCueRange>addCueRange</a>(in DOMString className, in DOMString id, in float start, in float end, in boolean pauseOnExit, in <a href=#cuerangecallback>CueRangeCallback</a> enterCallback, in <a href=#cuerangecallback>CueRangeCallback</a> exitCallback);
void <a href=#dom-media-removecueranges title=dom-media-removeCueRanges>removeCueRanges</a>(in DOMString className);
@@ -16914,7 +16899,7 @@
// <dfn class=XXX id=cuerangecallback>CueRangeCallback</dfn> waiting on WebIDL
</pre>
- <p>The <dfn id=media-element-attributes>media element attributes</dfn>, <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, <code title=attr-media-end><a href=#attr-media-end>end</a></code>, <code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>, apply to all <a href=#media-element title="media element">media elements</a>. They are defined in
+ <p>The <dfn id=media-element-attributes>media element attributes</dfn>, <code title=attr-media-src><a href=#attr-media-src>src</a></code>, <code title=attr-media-autoplay><a href=#attr-media-autoplay>autoplay</a></code>, <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code>, and <code title=attr-media-controls><a href=#attr-media-controls>controls</a></code>, apply to all <a href=#media-element title="media element">media elements</a>. They are defined in
this section.</p>
<!-- XXXv3 features:
@@ -16944,7 +16929,6 @@
- onmetadatachanged (no context info)
* external captions support (request from John Foliot)
* video: applying CSS filters
- * infinite looping
* an event to notify people of when the video size changes
(e.g. for chained Ogg streams of multiple independent videos)
-->
@@ -17228,9 +17212,6 @@
<li>The <a href=#current-playback-position>current playback position</a> must be set to
0.</li>
- <li>The <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> DOM
- attribute must be set to 0.</li>
-
<!--<li>The user agent must <span>fire a simple event</span> at
the <span>media element</span> for each event name in <var
title="">events</var>, in the same order that they were added to
@@ -17445,8 +17426,8 @@
<p>The user agent must follow these substeps:</p>
- <ol><li><p>The <a href=#current-playback-position>current playback position</a> must be set
- to the <var><a href=#effective-start>effective start</a></var>.</li>
+ <ol><li><p>Set the <a href=#current-playback-position>current playback position</a> to the
+ <var><a href=#earliest-possible-position>earliest possible position</a></var>.</li>
<li><p>The <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
attribute must be set to <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>.</li>
@@ -17462,23 +17443,19 @@
a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-loadedmetadata><a href=#event-loadedmetadata>loadedmetadata</a></code> at the
element.</li>
- </ol></dd>
+ <li>
- <dt id=handling-first-frame-available>Once enough of the
- <a href=#media-data>media data</a> has been fetched to enable the user agent
- to display the frame at the <a href=#effective-start>effective start</a> of the
- <a href=#media-resource>media resource</a></dt>
+ <p>If either the <a href=#media-resource>media resource</a> or the address of
+ the <a href=#chosen-media-resource>chosen media resource</a> indicate a particular
+ start time, then <a href=#dom-media-seek title=dom-media-seek>seek</a> to
+ that time. Ignore any resulting exceptions (if the position is
+ out of range, it is effectively ignored).</p>
- <dd>
+ <p class=example>For example, a fragment identifier could be
+ used to indicate a start position.</p>
- <p>The user agent must follow these substeps:</p>
+ </li>
- <ol><li><p>The <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code>
- attribute must change to <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code>.</li>
-
- <li><p id=fire-loadeddata>The user agent must <a href=#queue-a-task>queue a
- task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-loadeddata><a href=#event-loadeddata>loadeddata</a></code> at the element.</li>
-
</ol></dd>
</dl><p>When the user agent has completely fetched of the entire
@@ -17581,117 +17558,24 @@
position in the stream that the user agent can ever obtain
again.</p>
- <p>The <dfn id=attr-media-start title=attr-media-start><code>start</code></dfn>
- content attribute gives the offset into the <a href=#media-resource>media
- resource</a> at which playback is to begin. The default value is
- the default start position of the <a href=#media-resource>media resource</a>, or 0
- if not enough <a href=#media-data>media data</a> has been obtained yet to
- determine the default start position or if the resource doesn't
- specify a default start position.</p>
+ <p>When the <var><a href=#earliest-possible-position>earliest possible position</a></var> changes, if the
+ the <a href=#current-playback-position>current playback position</a> is before the
+ <var><a href=#earliest-possible-position>earliest possible position</a></var>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#earliest-possible-position>earliest possible
+ position</a></var>.</p>
- <p>The <dfn id=effective-start><var>effective start</var></dfn> is the smaller of the
- <code title=dom-media-start><a href=#dom-media-start>start</a></code> DOM attribute, the
- <var><a href=#earliest-possible-position>earliest possible position</a></var>, and the end of the <a href=#media-resource>media
- resource</a>.</p>
+ <p>The <dfn id=attr-media-loop title=attr-media-loop><code>loop</code></dfn>
+ attribute is a <a href=#boolean-attribute>boolean attribute</a> that, if specified,
+ indicates that the <a href=#media-element>media element</a> is to seek back to the
+ start of the <a href=#media-resource>media resource</a> upon reaching the end.</p>
- <p>The <dfn id=attr-media-loopstart title=attr-media-loopstart><code>loopstart</code></dfn> content
- attribute gives the offset into the <a href=#media-resource>media resource</a> at
- which playback is to begin when looping a clip. The default value of
- the <code title=attr-media-loopStart><a href=#attr-media-loopstart>loopstart</a></code> content
- attribute is the value of the <code title=dom-media-start><a href=#dom-media-start>start</a></code> DOM attribute.</p>
+ <p>The <dfn id=dom-media-loop title=dom-media-loop><code>loop</code></dfn> DOM
+ attribute must <a href=#reflect>reflect</a> the content attribute of the
+ same name.</p>
- <p>The <dfn id=effective-loop-start><var>effective loop start</var></dfn> is the smaller of
- the <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code> DOM
- attribute, the <var><a href=#earliest-possible-position>earliest possible position</a></var>, and the end of
- the <a href=#media-resource>media resource</a>.</p>
- <p>The <dfn id=attr-media-loopend title=attr-media-loopend><code>loopend</code></dfn>
- content attribute gives an offset into the <a href=#media-resource>media
- resource</a> at which playback is to jump back to the <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, when looping the
- clip. The default value of the <code title=attr-media-loopEnd><a href=#attr-media-loopend>loopend</a></code> content attribute is the
- value of the <code title=dom-media-end><a href=#dom-media-end>end</a></code> DOM
- attribute.</p>
- <p>The <dfn id=effective-loop-end><var>effective loop end</var></dfn> is the greater of
- the <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, and <code title=dom-media-loopEnd><a href=#dom-media-loopend>loopEnd</a></code> DOM attributes and the
- <var><a href=#earliest-possible-position>earliest possible position</a></var>, except if that is greater
- than the end of the <a href=#media-resource>media resource</a>, in which case
- that's its value.</p>
+ <h5 id=the-ready-states><span class=secno>4.8.10.6 </span>The ready states</h5>
- <p>The <dfn id=attr-media-end title=attr-media-end><code>end</code></dfn> content
- attribute gives an offset into the <a href=#media-resource>media resource</a> at
- which playback is to end. The default value is infinity.</p>
-
- <p>The <dfn id=effective-end><var>effective end</var></dfn> is the greater of the
- <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, and <code title=dom-media-loopEnd><a href=#dom-media-loopend>end</a></code> DOM attributes and the
- <var><a href=#earliest-possible-position>earliest possible position</a></var>, except if that is greater
- than the end of the <a href=#media-resource>media resource</a>, in which case
- that's its value.</p>
-
- <p>The <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, and <code title=attr-media-end><a href=#attr-media-end>end</a></code> attributes must, if specified,
- contain <span title="value time offset">value time
- offsets</span>. To get the time values they represent, user agents
- must use the <a href=#rules-for-parsing-time-offsets>rules for parsing time offsets</a>.</p>
-
- <p>The <dfn id=dom-media-start title=dom-media-start><code>start</code></dfn>, <dfn id=dom-media-loopstart title=dom-media-loopStart><code>loopStart</code></dfn>, <dfn id=dom-media-loopend title=dom-media-loopEnd><code>loopEnd</code></dfn>, and <dfn id=dom-media-end title=dom-media-end><code>end</code></dfn> DOM attributes must
- <a href=#reflect>reflect</a> the <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, and <code title=attr-media-end><a href=#attr-media-end>end</a></code> content attributes on the
- <a href=#media-element>media element</a> respectively.</p>
-
- <p>The <dfn id=attr-media-playcount title=attr-media-playcount><code>playcount</code></dfn> content
- attribute gives the number of times to play the clip. The default
- value is 1.</p>
-
- <p>The <dfn id=dom-media-playcount title=dom-media-playCount><code>playCount</code></dfn>
- DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-media-playcount><a href=#attr-media-playcount>playcount</a></code> content attribute on
- the <a href=#media-element>media element</a>. The value must be <a href=#limited-to-only-positive-non-zero-numbers>limited to
- only positive non-zero numbers</a>.</p>
-
- <p>The <dfn id=dom-media-currentloop title=dom-media-currentLoop><code>currentLoop</code></dfn>
- attribute must initially have the value 0. It gives the index of the
- current loop. It is changed during playback as described below.</p>
-
- <p>When any of the <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, <code title=dom-media-loopEnd><a href=#dom-media-loopend>loopEnd</a></code>, <code title=dom-media-end><a href=#dom-media-end>end</a></code>, <code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>, and <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> DOM attributes
- change value (either through content attribute mutations reflecting
- into the DOM attribute, if applicable, or through direct mutations
- of the DOM attribute), or if the <var><a href=#earliest-possible-position>earliest possible
- position</a></var> changes, the user agent must apply the following
- steps:</p>
-
- <ol><li><p>If the <code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>
- DOM attribute's value is less than or equal to the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> DOM attribute's
- value, then the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> DOM attribute's
- value must be set to <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span> (which will
- make the current loop the last loop).</li>
-
- <li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> is in the <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> state, then the
- user agent must at this point abort these steps.</li>
- <!-- because we don't have the duration yet, so many of the
- following concepts are undefined -->
-
- <li><p>If the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is zero, and the
- <a href=#current-playback-position>current playback position</a> is before the <var><a href=#effective-start>effective
- start</a></var>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-start>effective
- start</a></var>.</li>
-
- <li><p>If the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is greater than
- zero, and the <a href=#current-playback-position>current playback position</a> is before the
- <var><a href=#effective-loop-start>effective loop start</a></var>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-loop-start>effective loop
- start</a></var>.</li>
-
- <li><p>If the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is less than
- <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span>,
- and the <a href=#current-playback-position>current playback position</a> is after the
- <var><a href=#effective-loop-end>effective loop end</a></var>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-loop-start>effective loop
- start</a></var>, and increase <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> by 1.</li>
-
- <li><p>If the <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is equal to
- <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span>,
- and the <a href=#current-playback-position>current playback position</a> is after the
- <var><a href=#effective-end>effective end</a></var>, the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-end>effective end</a></var>
- and then the looping will end.</li>
-
- </ol><h5 id=the-ready-states><span class=secno>4.8.10.6 </span>The ready states</h5>
-
<p><a href=#media-element title="media element">Media elements</a> have a
<i>ready state</i>, which describes to what degree they are ready
to be rendered at the <a href=#current-playback-position>current playback position</a>. The
@@ -17745,13 +17629,12 @@
<dd>Data for the immediate <a href=#current-playback-position>current playback position</a>
is available, as well as enough data for the user agent to advance
the <a href=#current-playback-position>current playback position</a> at least a little
- without immediately reverting to the <code title=dom-media-HAVE_SOME_DATA><a href=#dom-media-have_some_data>HAVE_SOME_DATA</a></code> state,
- and, in addition, the user agent estimates that data is being
- fetched at a rate where the <a href=#current-playback-position>current playback position</a>,
- if it were to advance at the rate given by the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>
+ without immediately reverting to the <code title=dom-media-HAVE_SOME_DATA><a href=#dom-media-have_some_data>HAVE_SOME_DATA</a></code> state, and,
+ in addition, the user agent estimates that data is being fetched at
+ a rate where the <a href=#current-playback-position>current playback position</a>, if it were
+ to advance at the rate given by the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>
attribute, would not overtake the available data before playback
- reaches the <a href=#effective-end>effective end</a> of the <a href=#media-resource>media
- resource</a> on the last <a href=#dom-media-playcount title=dom-media-playCount>loop</a>.</dd>
+ reaches the end of the <a href=#media-resource>media resource</a>.</dd>
</dl><p>When the ready state of a <a href=#media-element>media element</a> whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is not <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code> changes, the
user agent must follow the steps given below:</p>
@@ -17765,15 +17648,18 @@
</dd>
- <!-- going up to current -->
- <dt>If the prevous ready state was <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, and the new
- ready state is <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code></dt>
+ <!-- going up to current for the first time -->
+ <dt id=handling-first-frame-available>If the prevous ready state
+ was <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code> or
+ <code title=dom-media-HAVE_SOME_DATA><a href=#dom-media-have_some_data>HAVE_SOME_DATA</a></code>, and
+ the new ready state is <code title=dom-media-HAVE_CURRENT_DATA><a href=#dom-media-have_current_data>HAVE_CURRENT_DATA</a></code></dt>
<dd>
- <p class=note>A <code title=event-loadeddata><a href=#event-loadeddata>loadeddata</a></code>
- DOM event <a href=#fire-loadeddata>will be fired</a> as part of
- the <code title=dom-event-load>load()</code> algorithm.</p>
+ <p id=fire-loadeddata>If this is the first time this occurs for
+ this <a href=#media-element>media element</a> since the <code title=dom-event-load>load()</code> algorithm was last invoked,
+ the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
+ simple event</a> called <code title=event-loadeddata><a href=#event-loadeddata>loadeddata</a></code> at the element.</p>
</dd>
@@ -17911,11 +17797,11 @@
<a href=#paused-for-user-interaction>paused for user interaction</a>.</p>
<p>A <a href=#media-element>media element</a> is said to have <dfn id=ended-playback>ended
- playback</dfn> when the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAD_METADATA</a></code> or greater, the
- <a href=#current-playback-position>current playback position</a> is equal to the
- <var><a href=#effective-end>effective end</a></var> of the <a href=#media-resource>media resource</a>, and the
- <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> attribute is
- equal to <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span>.</p>
+ playback</dfn> when the element's <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAD_METADATA</a></code> or greater, and
+ the <a href=#current-playback-position>current playback position</a> is the end of the
+ <a href=#media-resource>media resource</a>, and the <a href=#media-element>media element</a> does
+ not have a <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code> attribute
+ specified.</p>
<p>The <dfn id=dom-media-ended title=dom-media-ended><code>ended</code></dfn>
attribute must return true if the <a href=#media-element>media element</a> has
@@ -17958,22 +17844,17 @@
event</a> called <code title=event-waiting><a href=#event-waiting>waiting</a></code> at
the element.</p>
- <p>When <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is
- less than <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span> and the
- <a href=#current-playback-position>current playback position</a> reaches the <var><a href=#effective-loop-end>effective
- loop end</a></var>, then the user agent must increase <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> by 1 and <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-loop-start>effective loop
- start</a></var>.</p>
+ <p>When the <a href=#current-playback-position>current playback position</a> reaches the end
+ of the <a href=#media-resource>media resource</a>, then the user agent must follow
+ these steps:</p>
- <p>When <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is
- equal to the <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span> and the
- <a href=#current-playback-position>current playback position</a> reaches the <var><a href=#effective-end>effective
- end</a></var>, then the user agent must follow these steps:</p>
+ <ol><li><p>If the <a href=#media-element>media element</a> has a <code title=attr-media-loop><a href=#attr-media-loop>loop</a></code> attribute specified, then <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#earliest-possible-position>earliest possible
+ position</a></var> of the <a href=#media-resource>media resource</a> and abort these
+ steps.</li>
+
+ <li><p>Stop playback.<p class=note>The <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> attribute becomes
+ true.</li>
- <ol><li><p>The user agent must stop playback.</li>
-
- <li><p class=note>The <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code>
- attribute becomes true.</li>
-
<li><p>The user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
a simple event</a> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the element.</li>
@@ -18028,11 +17909,13 @@
<li>
<p>If the <a href=#ended-playback title="ended playback">playback has ended</a>,
- then the user agent must set <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> to zero and <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <var><a href=#effective-start>effective
- start</a></var>.</p>
+ then the user agent must <a href=#dom-media-seek title=dom-media-seek>seek</a>
+ to the <var><a href=#earliest-possible-position>earliest possible position</a></var> of the <a href=#media-resource>media
+ resource</a>.</p>
- <p class=note>If this involved a seek, the user agent <a href=#seekUpdate>will</a> <a href=#queue-a-task>queue a task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
+ <p class=note>This <a href=#seekUpdate>will cause</a> the user
+ agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+ event</a> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</a></code> at the <a href=#media-element>media
element</a>.</p>
</li>
@@ -18219,21 +18102,14 @@
the seek was in response to a DOM method call or setting of a DOM
attribute), and abort these steps.</li>
- <li><p>If <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is
- 0, let <var title="">min</var> be the <var><a href=#effective-start>effective
- start</a></var>. Otherwise, let it be the <var><a href=#effective-loop-start>effective loop
- start</a></var>.</li>
+ <li><p>If the <var title="">new playback position</var> is later
+ than the end of the <a href=#media-resource>media resource</a>, then let it be the
+ end of the <a href=#media-resource>media resource</a> instead.</li>
- <li><p>If <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is
- equal to <span><code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>-1</span>, let <var title="">max</var> be the <var><a href=#effective-end>effective end</a></var>. Otherwise, let
- it be the <var><a href=#effective-loop-end>effective loop end</a></var>.</li>
+ <li><p>If the <var title="">new playback position</var> is less
+ than the <var><a href=#earliest-possible-position>earliest possible position</a></var>, let it be that
+ position instead.</li>
- <li><p>If the <var title="">new playback position</var> is more than
- <var title="">max</var>, let it be <var title="">max</var>.</li>
-
- <li><p>If the <var title="">new playback position</var> is less than
- <var title="">min</var>, let it be <var title="">min</var>.</li>
-
<li><p>If the (possibly now changed) <var title="">new playback
position</var> is not in one of the ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute, then the user
agent must raise an <code>INDEX_SIZE_ERR</code> exception (if the
@@ -18283,9 +18159,7 @@
attribute must return a static <a href=#normalized-timeranges-object>normalized
<code>TimeRanges</code> object</a> that represents the ranges of
the <a href=#media-resource>media resource</a>, if any, that the user agent is able
- to seek to, at the time the attribute is evaluated, notwithstanding
- the looping attributes (i.e. the <var><a href=#effective-start>effective start</a></var> and
- <var><a href=#effective-end>effective end</a></var>, etc, don't affect the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute).</p>
+ to seek to, at the time the attribute is evaluated.</p>
<p class=note>If the user agent can seek to anywhere in the
<a href=#media-resource>media resource</a>, e.g. because it a simple movie file and
@@ -18561,7 +18435,7 @@
<tr><td><dfn id=event-ended title=event-ended><code>ended</code></dfn>
<td><code>Event</code>
<td>Playback has stopped because the end of the <a href=#media-resource>media resource</a> was reached.
- <td><code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> equals the <var><a href=#effective-end>effective end</a></var>; <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> is true.
+ <td><code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> equals the end of the <a href=#media-resource>media resource</a>; <code title=dom-media-ended><a href=#dom-media-ended>ended</a></code> is true.
<tbody><tr><td><dfn id=event-ratechange title=event-ratechange><code>ratechange</code></dfn>
<td><code>Event</code>
Modified: source
===================================================================
--- source 2008-11-13 01:45:07 UTC (rev 2400)
+++ source 2008-11-14 02:55:37 UTC (rev 2401)
@@ -17481,11 +17481,7 @@
<dd><code title="attr-media-src">src</code></dd>
<dd><code title="attr-video-poster">poster</code></dd>
<dd><code title="attr-media-autoplay">autoplay</code></dd>
- <dd><code title="attr-media-start">start</code></dd>
- <dd><code title="attr-media-loopstart">loopstart</code></dd>
- <dd><code title="attr-media-loopend">loopend</code></dd>
- <dd><code title="attr-media-end">end</code></dd>
- <dd><code title="attr-media-playcount">playcount</code></dd>
+ <dd><code title="attr-media-loop">loop</code></dd>
<dd><code title="attr-media-controls">controls</code></dd>
<dd><code title="attr-dim-width">width</code></dd>
<dd><code title="attr-dim-height">height</code></dd>
@@ -17523,11 +17519,7 @@
<p>The <code title="attr-media-src">src</code>, <code
title="attr-media-autoplay">autoplay</code>, <code
- title="attr-media-start">start</code>, <code
- title="attr-media-loopstart">loopstart</code>, <code
- title="attr-media-loopend">loopend</code>, <code
- title="attr-media-end">end</code>, <code
- title="attr-media-playcount">playcount</code>, and <code
+ title="attr-media-loop">loop</code>, and <code
title="attr-media-controls">controls</code> attributes are <span
title="media element attributes">the attributes common to all media
elements</span>.</p>
@@ -17799,11 +17791,7 @@
<dt>Element-specific attributes:</dt>
<dd><code title="attr-media-src">src</code></dd>
<dd><code title="attr-media-autoplay">autoplay</code></dd>
- <dd><code title="attr-media-start">start</code></dd>
- <dd><code title="attr-media-loopstart">loopstart</code></dd>
- <dd><code title="attr-media-loopend">loopend</code></dd>
- <dd><code title="attr-media-end">end</code></dd>
- <dd><code title="attr-media-playcount">playcount</code></dd>
+ <dd><code title="attr-media-loop">loop</code></dd>
<dd><code title="attr-media-controls">controls</code></dd>
<dt>DOM interface:</dt>
<dd>
@@ -17837,11 +17825,7 @@
<p>The <code title="attr-media-src">src</code>, <code
title="attr-media-autoplay">autoplay</code>, <code
- title="attr-media-start">start</code>, <code
- title="attr-media-loopstart">loopstart</code>, <code
- title="attr-media-loopend">loopend</code>, <code
- title="attr-media-end">end</code>, <code
- title="attr-media-playcount">playcount</code>, and <code
+ title="attr-media-loop">loop</code>, and <code
title="attr-media-controls">controls</code> attributes are <span
title="media element attributes">the attributes common to all media
elements</span>.</p>
@@ -18127,17 +18111,10 @@
readonly attribute <span>TimeRanges</span> <span title="dom-media-seekable">seekable</span>;
readonly attribute boolean <span title="dom-media-ended">ended</span>;
attribute boolean <span title="dom-media-autoplay">autoplay</span>;
+ attribute boolean <span title="dom-media-loop">loop</span>;
void <span title="dom-media-play">play</span>();
void <span title="dom-media-pause">pause</span>();
- // looping
- attribute float <span title="dom-media-start">start</span>;
- attribute float <span title="dom-media-end">end</span>;
- attribute float <span title="dom-media-loopStart">loopStart</span>;
- attribute float <span title="dom-media-loopEnd">loopEnd</span>;
- attribute unsigned long <span title="dom-media-playCount">playCount</span>;
- attribute unsigned long <span title="dom-media-currentLoop">currentLoop</span>;
-
// cue ranges
void <span title="dom-media-addCueRange">addCueRange</span>(in DOMString className, in DOMString id, in float start, in float end, in boolean pauseOnExit, in <span>CueRangeCallback</span> enterCallback, in <span>CueRangeCallback</span> exitCallback);
void <span title="dom-media-removeCueRanges">removeCueRanges</span>(in DOMString className);
@@ -18154,11 +18131,7 @@
<p>The <dfn>media element attributes</dfn>, <code
title="attr-media-src">src</code>, <code
title="attr-media-autoplay">autoplay</code>, <code
- title="attr-media-start">start</code>, <code
- title="attr-media-loopstart">loopstart</code>, <code
- title="attr-media-loopend">loopend</code>, <code
- title="attr-media-end">end</code>, <code
- title="attr-media-playcount">playcount</code>, and <code
+ title="attr-media-loop">loop</code>, and <code
title="attr-media-controls">controls</code>, apply to all <span
title="media element">media elements</span>. They are defined in
this section.</p>
@@ -18190,7 +18163,6 @@
- onmetadatachanged (no context info)
* external captions support (request from John Foliot)
* video: applying CSS filters
- * infinite looping
* an event to notify people of when the video size changes
(e.g. for chained Ogg streams of multiple independent videos)
-->
@@ -18523,9 +18495,6 @@
<li>The <span>current playback position</span> must be set to
0.</li>
- <li>The <code title="dom-media-currentLoop">currentLoop</code> DOM
- attribute must be set to 0.</li>
-
<!--<li>The user agent must <span>fire a simple event</span> at
the <span>media element</span> for each event name in <var
title="">events</var>, in the same order that they were added to
@@ -18791,8 +18760,8 @@
<ol>
- <li><p>The <span>current playback position</span> must be set
- to the <var>effective start</var>.</p></li>
+ <li><p>Set the <span>current playback position</span> to the
+ <var>earliest possible position</var>.</p></li>
<li><p>The <code title="dom-media-readyState">readyState</code>
attribute must be set to <code
@@ -18815,29 +18784,19 @@
title="event-loadedmetadata">loadedmetadata</code> at the
element.</li>
- </ol>
+ <li>
- </dd>
+ <p>If either the <span>media resource</span> or the address of
+ the <span>chosen media resource</span> indicate a particular
+ start time, then <span title="dom-media-seek">seek</span> to
+ that time. Ignore any resulting exceptions (if the position is
+ out of range, it is effectively ignored).</p>
- <dt id="handling-first-frame-available">Once enough of the
- <span>media data</span> has been fetched to enable the user agent
- to display the frame at the <span>effective start</span> of the
- <span>media resource</span></dt>
+ <p class="example">For example, a fragment identifier could be
+ used to indicate a start position.</p>
- <dd>
+ </li>
- <p>The user agent must follow these substeps:</p>
-
- <ol>
-
- <li><p>The <code title="dom-media-readyState">readyState</code>
- attribute must change to <code
- title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code>.</p></li>
-
- <li><p id="fire-loadeddata">The user agent must <span>queue a
- task</span> to <span>fire a simple event</span> called <code
- title="event-loadeddata">loadeddata</code> at the element.</li>
-
</ol>
</dd>
@@ -18958,161 +18917,23 @@
position in the stream that the user agent can ever obtain
again.</p>
- <p>The <dfn title="attr-media-start"><code>start</code></dfn>
- content attribute gives the offset into the <span>media
- resource</span> at which playback is to begin. The default value is
- the default start position of the <span>media resource</span>, or 0
- if not enough <span>media data</span> has been obtained yet to
- determine the default start position or if the resource doesn't
- specify a default start position.</p>
+ <p>When the <var>earliest possible position</var> changes, if the
+ the <span>current playback position</span> is before the
+ <var>earliest possible position</var>, the user agent must <span
+ title="dom-media-seek">seek</span> to the <var>earliest possible
+ position</var>.</p>
- <p>The <dfn><var>effective start</var></dfn> is the smaller of the
- <code title="dom-media-start">start</code> DOM attribute, the
- <var>earliest possible position</var>, and the end of the <span>media
- resource</span>.</p>
+ <p>The <dfn title="attr-media-loop"><code>loop</code></dfn>
+ attribute is a <span>boolean attribute</span> that, if specified,
+ indicates that the <span>media element</span> is to seek back to the
+ start of the <span>media resource</span> upon reaching the end.</p>
- <p>The <dfn
- title="attr-media-loopstart"><code>loopstart</code></dfn> content
- attribute gives the offset into the <span>media resource</span> at
- which playback is to begin when looping a clip. The default value of
- the <code title="attr-media-loopStart">loopstart</code> content
- attribute is the value of the <code
- title="dom-media-start">start</code> DOM attribute.</p>
+ <p>The <dfn title="dom-media-loop"><code>loop</code></dfn> DOM
+ attribute must <span>reflect</span> the content attribute of the
+ same name.</p>
- <p>The <dfn><var>effective loop start</var></dfn> is the smaller of
- the <code title="dom-media-loopStart">loopStart</code> DOM
- attribute, the <var>earliest possible position</var>, and the end of
- the <span>media resource</span>.</p>
- <p>The <dfn title="attr-media-loopend"><code>loopend</code></dfn>
- content attribute gives an offset into the <span>media
- resource</span> at which playback is to jump back to the <code
- title="attr-media-loopstart">loopstart</code>, when looping the
- clip. The default value of the <code
- title="attr-media-loopEnd">loopend</code> content attribute is the
- value of the <code title="dom-media-end">end</code> DOM
- attribute.</p>
- <p>The <dfn><var>effective loop end</var></dfn> is the greater of
- the <code title="dom-media-start">start</code>, <code
- title="dom-media-loopStart">loopStart</code>, and <code
- title="dom-media-loopEnd">loopEnd</code> DOM attributes and the
- <var>earliest possible position</var>, except if that is greater
- than the end of the <span>media resource</span>, in which case
- that's its value.</p>
-
- <p>The <dfn title="attr-media-end"><code>end</code></dfn> content
- attribute gives an offset into the <span>media resource</span> at
- which playback is to end. The default value is infinity.</p>
-
- <p>The <dfn><var>effective end</var></dfn> is the greater of the
- <code title="dom-media-start">start</code>, <code
- title="dom-media-loopStart">loopStart</code>, and <code
- title="dom-media-loopEnd">end</code> DOM attributes and the
- <var>earliest possible position</var>, except if that is greater
- than the end of the <span>media resource</span>, in which case
- that's its value.</p>
-
- <p>The <code title="attr-media-start">start</code>, <code
- title="attr-media-loopstart">loopstart</code>, <code
- title="attr-media-loopend">loopend</code>, and <code
- title="attr-media-end">end</code> attributes must, if specified,
- contain <span title="value time offset">value time
- offsets</span>. To get the time values they represent, user agents
- must use the <span>rules for parsing time offsets</span>.</p>
-
- <p>The <dfn title="dom-media-start"><code>start</code></dfn>, <dfn
- title="dom-media-loopStart"><code>loopStart</code></dfn>, <dfn
- title="dom-media-loopEnd"><code>loopEnd</code></dfn>, and <dfn
- title="dom-media-end"><code>end</code></dfn> DOM attributes must
- <span>reflect</span> the <code
- title="attr-media-start">start</code>, <code
- title="attr-media-loopstart">loopstart</code>, <code
- title="attr-media-loopend">loopend</code>, and <code
- title="attr-media-end">end</code> content attributes on the
- <span>media element</span> respectively.</p>
-
- <p>The <dfn
- title="attr-media-playcount"><code>playcount</code></dfn> content
- attribute gives the number of times to play the clip. The default
- value is 1.</p>
-
- <p>The <dfn title="dom-media-playCount"><code>playCount</code></dfn>
- DOM attribute must <span>reflect</span> the <code
- title="attr-media-playcount">playcount</code> content attribute on
- the <span>media element</span>. The value must be <span>limited to
- only positive non-zero numbers</span>.</p>
-
- <p>The <dfn
- title="dom-media-currentLoop"><code>currentLoop</code></dfn>
- attribute must initially have the value 0. It gives the index of the
- current loop. It is changed during playback as described below.</p>
-
- <p>When any of the <code title="dom-media-start">start</code>, <code
- title="dom-media-loopStart">loopStart</code>, <code
- title="dom-media-loopEnd">loopEnd</code>, <code
- title="dom-media-end">end</code>, <code
- title="dom-media-playCount">playCount</code>, and <code
- title="dom-media-currentLoop">currentLoop</code> DOM attributes
- change value (either through content attribute mutations reflecting
- into the DOM attribute, if applicable, or through direct mutations
- of the DOM attribute), or if the <var>earliest possible
- position</var> changes, the user agent must apply the following
- steps:</p>
-
- <ol>
-
- <li><p>If the <code title="dom-media-playCount">playCount</code>
- DOM attribute's value is less than or equal to the <code
- title="dom-media-currentLoop">currentLoop</code> DOM attribute's
- value, then the <code
- title="dom-media-currentLoop">currentLoop</code> DOM attribute's
- value must be set to <span><code
- title="dom-media-playCount">playCount</code>-1</span> (which will
- make the current loop the last loop).</p></li>
-
- <li><p>If the <span>media element</span>'s <code
- title="dom-media-readyState">readyState</code> is in the <code
- title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code> state, then the
- user agent must at this point abort these steps.</p></li>
- <!-- because we don't have the duration yet, so many of the
- following concepts are undefined -->
-
- <li><p>If the <code
- title="dom-media-currentLoop">currentLoop</code> is zero, and the
- <span>current playback position</span> is before the <var>effective
- start</var>, the user agent must <span
- title="dom-media-seek">seek</span> to the <var>effective
- start</var>.</p></li>
-
- <li><p>If the <code
- title="dom-media-currentLoop">currentLoop</code> is greater than
- zero, and the <span>current playback position</span> is before the
- <var>effective loop start</var>, the user agent must <span
- title="dom-media-seek">seek</span> to the <var>effective loop
- start</var>.</p></li>
-
- <li><p>If the <code
- title="dom-media-currentLoop">currentLoop</code> is less than
- <span><code title="dom-media-playCount">playCount</code>-1</span>,
- and the <span>current playback position</span> is after the
- <var>effective loop end</var>, the user agent must <span
- title="dom-media-seek">seek</span> to the <var>effective loop
- start</var>, and increase <code
- title="dom-media-currentLoop">currentLoop</code> by 1.</p></li>
-
- <li><p>If the <code
- title="dom-media-currentLoop">currentLoop</code> is equal to
- <span><code title="dom-media-playCount">playCount</code>-1</span>,
- and the <span>current playback position</span> is after the
- <var>effective end</var>, the user agent must <span
- title="dom-media-seek">seek</span> to the <var>effective end</var>
- and then the looping will end.</p></li>
-
- </ol>
-
-
-
<h5>The ready states</h5>
<p><span title="media element">Media elements</span> have a
@@ -19175,15 +18996,13 @@
is available, as well as enough data for the user agent to advance
the <span>current playback position</span> at least a little
without immediately reverting to the <code
- title="dom-media-HAVE_SOME_DATA">HAVE_SOME_DATA</code> state,
- and, in addition, the user agent estimates that data is being
- fetched at a rate where the <span>current playback position</span>,
- if it were to advance at the rate given by the <code
+ title="dom-media-HAVE_SOME_DATA">HAVE_SOME_DATA</code> state, and,
+ in addition, the user agent estimates that data is being fetched at
+ a rate where the <span>current playback position</span>, if it were
+ to advance at the rate given by the <code
title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
attribute, would not overtake the available data before playback
- reaches the <span>effective end</span> of the <span>media
- resource</span> on the last <span
- title="dom-media-playCount">loop</span>.</dd>
+ reaches the end of the <span>media resource</span>.</dd>
</dl>
@@ -19209,17 +19028,21 @@
</dd>
- <!-- going up to current -->
- <dt>If the prevous ready state was <code
- title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, and the new
- ready state is <code
- title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code></dt>
+ <!-- going up to current for the first time -->
+ <dt id="handling-first-frame-available">If the prevous ready state
+ was <code title="dom-media-HAVE_METADATA">HAVE_METADATA</code> or
+ <code title="dom-media-HAVE_SOME_DATA">HAVE_SOME_DATA</code>, and
+ the new ready state is <code
+ title="dom-media-HAVE_CURRENT_DATA">HAVE_CURRENT_DATA</code></dt>
<dd>
- <p class="note">A <code title="event-loadeddata">loadeddata</code>
- DOM event <a href="#fire-loadeddata">will be fired</a> as part of
- the <code title="dom-event-load">load()</code> algorithm.</p>
+ <p id="fire-loadeddata">If this is the first time this occurs for
+ this <span>media element</span> since the <code
+ title="dom-event-load">load()</code> algorithm was last invoked,
+ the user agent must <span>queue a task</span> to <span>fire a
+ simple event</span> called <code
+ title="event-loadeddata">loadeddata</code> at the element.</p>
</dd>
@@ -19393,12 +19216,11 @@
<p>A <span>media element</span> is said to have <dfn>ended
playback</dfn> when the element's <code
title="dom-media-readyState">readyState</code> attribute is <code
- title="dom-media-HAVE_METADATA">HAD_METADATA</code> or greater, the
- <span>current playback position</span> is equal to the
- <var>effective end</var> of the <span>media resource</span>, and the
- <code title="dom-media-currentLoop">currentLoop</code> attribute is
- equal to <span><code
- title="dom-media-playCount">playCount</code>-1</span>.</p>
+ title="dom-media-HAVE_METADATA">HAD_METADATA</code> or greater, and
+ the <span>current playback position</span> is the end of the
+ <span>media resource</span>, and the <span>media element</span> does
+ not have a <code title="attr-media-loop">loop</code> attribute
+ specified.</p>
<p>The <dfn title="dom-media-ended"><code>ended</code></dfn>
attribute must return true if the <span>media element</span> has
@@ -19448,28 +19270,22 @@
event</span> called <code title="event-waiting">waiting</code> at
the element.</p>
- <p>When <code title="dom-media-currentLoop">currentLoop</code> is
- less than <span><code
- title="dom-media-playCount">playCount</code>-1</span> and the
- <span>current playback position</span> reaches the <var>effective
- loop end</var>, then the user agent must increase <code
- title="dom-media-currentLoop">currentLoop</code> by 1 and <span
- title="dom-media-seek">seek</span> to the <var>effective loop
- start</var>.</p>
+ <p>When the <span>current playback position</span> reaches the end
+ of the <span>media resource</span>, then the user agent must follow
+ these steps:</p>
- <p>When <code title="dom-media-currentLoop">currentLoop</code> is
- equal to the <span><code
- title="dom-media-playCount">playCount</code>-1</span> and the
- <span>current playback position</span> reaches the <var>effective
- end</var>, then the user agent must follow these steps:</p>
-
<ol>
- <li><p>The user agent must stop playback.</p></li>
+ <li><p>If the <span>media element</span> has a <code
+ title="attr-media-loop">loop</code> attribute specified, then <span
+ title="dom-media-seek">seek</span> to the <var>earliest possible
+ position</var> of the <span>media resource</span> and abort these
+ steps.</p></li>
+
+ <li><p>Stop playback.</p><p class="note">The <code
+ title="dom-media-ended">ended</code> attribute becomes
+ true.</p></li>
- <li><p class="note">The <code title="dom-media-ended">ended</code>
- attribute becomes true.</p></li>
-
<li><p>The user agent must <span>queue a task</span> to <span>fire
a simple event</span> called <code
title="event-timeupdate">timeupdate</code> at the element.</p></li>
@@ -19528,7 +19344,8 @@
<li><p>If the <span>media element</span>'s <code
title="dom-media-networkState">networkState</code> attribute has
- the value <code title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, then the user
+ the value <code
+ title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, then the user
agent must invoke the <code title="dom-media-load">load()</code>
method and wait for it to return. If that raises an exception, that
exception must be reraised by the <code
@@ -19537,14 +19354,13 @@
<li>
<p>If the <span title="ended playback">playback has ended</span>,
- then the user agent must set <code
- title="dom-media-currentLoop">currentLoop</code> to zero and <span
- title="dom-media-seek">seek</span> to the <var>effective
- start</var>.</p>
+ then the user agent must <span title="dom-media-seek">seek</span>
+ to the <var>earliest possible position</var> of the <span>media
+ resource</span>.</p>
- <p class="note">If this involved a seek, the user agent <a
- href="#seekUpdate">will</a> <span>queue a task</span> to
- <span>fire a simple event</span> called <code
+ <p class="note">This <a href="#seekUpdate">will cause</a> the user
+ agent to <span>queue a task</span> to <span>fire a simple
+ event</span> called <code
title="event-timeupdate">timeupdate</code> at the <span>media
element</span>.</p>
@@ -19773,23 +19589,14 @@
the seek was in response to a DOM method call or setting of a DOM
attribute), and abort these steps.</p></li>
- <li><p>If <code title="dom-media-currentLoop">currentLoop</code> is
- 0, let <var title="">min</var> be the <var>effective
- start</var>. Otherwise, let it be the <var>effective loop
- start</var>.</p></li>
+ <li><p>If the <var title="">new playback position</var> is later
+ than the end of the <span>media resource</span>, then let it be the
+ end of the <span>media resource</span> instead.</p></li>
- <li><p>If <code title="dom-media-currentLoop">currentLoop</code> is
- equal to <span><code
- title="dom-media-playCount">playCount</code>-1</span>, let <var
- title="">max</var> be the <var>effective end</var>. Otherwise, let
- it be the <var>effective loop end</var>.</p></li>
+ <li><p>If the <var title="">new playback position</var> is less
+ than the <var>earliest possible position</var>, let it be that
+ position instead.</p></li>
- <li><p>If the <var title="">new playback position</var> is more than
- <var title="">max</var>, let it be <var title="">max</var>.</p></li>
-
- <li><p>If the <var title="">new playback position</var> is less than
- <var title="">min</var>, let it be <var title="">min</var>.</p></li>
-
<li><p>If the (possibly now changed) <var title="">new playback
position</var> is not in one of the ranges given in the <code
title="dom-media-seekable">seekable</code> attribute, then the user
@@ -19846,10 +19653,7 @@
attribute must return a static <span>normalized
<code>TimeRanges</code> object</span> that represents the ranges of
the <span>media resource</span>, if any, that the user agent is able
- to seek to, at the time the attribute is evaluated, notwithstanding
- the looping attributes (i.e. the <var>effective start</var> and
- <var>effective end</var>, etc, don't affect the <code
- title="dom-media-seekable">seekable</code> attribute).</p>
+ to seek to, at the time the attribute is evaluated.</p>
<p class="note">If the user agent can seek to anywhere in the
<span>media resource</span>, e.g. because it a simple movie file and
@@ -20171,7 +19975,7 @@
<td><dfn title="event-ended"><code>ended</code></dfn>
<td><code>Event</code>
<td>Playback has stopped because the end of the <span>media resource</span> was reached.
- <td><code title="dom-media-currentTime">currentTime</code> equals the <var>effective end</var>; <code title="dom-media-ended">ended</code> is true.
+ <td><code title="dom-media-currentTime">currentTime</code> equals the end of the <span>media resource</span>; <code title="dom-media-ended">ended</code> is true.
<tbody>
<tr>
More information about the Commit-Watchers
mailing list