html5/spec Overview.html,1.1572,1.1573

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv17237

Modified Files:
	Overview.html 
Log Message:
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. (whatwg r2401)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1572
retrieving revision 1.1573
diff -u -d -r1.1572 -r1.1573
--- Overview.html	13 Nov 2008 01:45:11 -0000	1.1572
+++ Overview.html	14 Nov 2008 02:55:42 -0000	1.1573
@@ -8,7 +8,7 @@
    <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p>
    <h1>HTML 5</h1>
    <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->13 November 2008</h2>
+   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->14 November 2008</h2>
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
     <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080610/">http://www.w3.org/TR/2008/WD-html5-20080610/</a></dd>
@@ -97,7 +97,7 @@
   specification's progress along the W3C Recommendation
   track.
   <!--ZZZ:-->
-  This specification is the 13 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
+  This specification is the 14 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -13355,11 +13355,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>
@@ -13385,7 +13381,7 @@
   alternative media streams and/or to embed accessibility aids (such
   as caption or subtitle tracks) into their media streams.<p>The <code><a href=#video>video</a></code> element is a <a href=#media-element>media element</a>
   whose <a href=#media-data>media data</a> is ostensibly video data, possibly
-  with associated audio data.<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
+  with associated audio data.<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>The <dfn id=attr-video-poster title=attr-video-poster><code>poster</code></dfn>
   attribute gives the address of an image file that the user agent can
   show while no video data is available. The attribute, if present,
@@ -13542,11 +13538,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>
@@ -13568,7 +13560,7 @@
   or cognitive disabilities, authors are expected to provide
   alternative media streams and/or to embed accessibility aids (such
   as transcriptions) into their media streams.<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>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
+  whose <a href=#media-data>media data</a> is ostensibly audio data.<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>When an <code><a href=#audio>audio</a></code> element is <a href=#potentially-playing>potentially
   playing</a>, it must have its audio data played synchronized with
   the <a href=#current-playback-position>current playback position</a>, at the specified <a href=#dom-media-volume title=dom-media-volume>volume</a> with the specified <a href=#dom-media-muted title=dom-media-muted>mute state</a>.<p>When an <code><a href=#audio>audio</a></code> element is not <a href=#potentially-playing>potentially
@@ -13769,17 +13761,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);
@@ -13791,7 +13776,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
+</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-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:
     * frame forward / backwards / step(n) while paused
     * hasAudio, hasVideo, hasCaptions, etc
@@ -13819,7 +13804,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)
   --><p><a href=#media-element title="media element">Media elements</a> are used to
@@ -14055,9 +14039,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
@@ -14272,8 +14253,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>
@@ -14289,22 +14270,18 @@
        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>
-
-     <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>
-
-     <dd>
+       <li>
 
-      <p>The user agent must follow these substeps:</p>
+        <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>
 
-      <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>
+        <p class=example>For example, a fragment identifier could be
+        used to indicate a start position.</p>
 
-       <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>
+       </li>
 
       </ol></dd>
 
@@ -14376,88 +14353,15 @@
   resource after it has expired from its buffer. The
   <dfn id=earliest-possible-position><var>earliest possible position</var></dfn> is the earliest
   position in the stream that the user agent can ever obtain
-  again.<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>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>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>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>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>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>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>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>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>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>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>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>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>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:<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
+  again.<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>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>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.<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
   possible values are as follows; the ready state of a media element
@@ -14508,13 +14412,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:<dl class=switch><!-- going up to metadata --><dt>If the prevous ready state was <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, and the new
@@ -14526,15 +14429,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>
 
@@ -14644,11 +14550,11 @@
   the element has not <a href=#ended-playback>ended playback</a>, playback has not
   <a href=#stopped-due-to-errors>stopped due to errors</a>, and the element has not
   <a href=#paused-for-user-interaction>paused for user interaction</a>.<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>The <dfn id=dom-media-ended title=dom-media-ended><code>ended</code></dfn>
+  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>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
   <a href=#ended-playback>ended playback</a>, and false otherwise.<p>A <a href=#media-element>media element</a> is said to have <dfn id=stopped-due-to-errors>stopped due to
   errors</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>HAVE_METADATA</a></code> or greater, and
@@ -14677,17 +14583,14 @@
   event</a> called <code title=event-timeupdate><a href=#event-timeupdate>timeupdate</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> called <code title=event-waiting><a href=#event-waiting>waiting</a></code> at
-  the element.<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>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:<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>
+  the element.<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:<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>
 
    <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>
@@ -14733,11 +14636,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>
@@ -14899,20 +14804,13 @@
    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 <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 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 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 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 <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 (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
@@ -14963,9 +14861,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 class=note>If the user agent can seek to anywhere in the
+  to seek to, at the time the attribute is evaluated.<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
   the user agent and the server support HTTP Range requests, then the
   attribute would return an object with one range, whose start is the
@@ -15165,7 +15061,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>

Received on Friday, 14 November 2008 02:55:59 UTC