W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2008

spec/Overview.html 1.1499 2326 Reorganise the video section (should be

From: poot <cvsmail@w3.org>
Date: Tue, 14 Oct 2008 05:56:13 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20081013205613.3DF302BBFC@toro.w3.mag.keio.ac.jp>

Reorganise the video section (should be no normative changes here)
(whatwg r2326)

4.8.10.14 Security and privacy considerations
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#security-and-privacy-considerations
collapse(parentNode, offset)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-selection-collapse
ByteRanges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#byteranges
removeCueRanges(className)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-removecueranges
When a media element is actively playing and its Document is an active document, its current playback position must increase monotonically at playbackRate units of media time per unit time of wall clock time. If this value is not 1, the user agent may apply pitch adjustments to any audio component of the media resource.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#media-playback
4.8.10.10 User interface
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#user-interface
expose a user interface to the user
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#expose-a-user-interface-to-the-user
isCollapsed
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-selection-iscollapsed
played
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-played
addCueRange(className, id, start, end, pauseOnExit, enterCallback, exitCallback)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-addcuerange
volumechange
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#event-volumechange
paused for user interaction
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#paused-for-user-interaction
collapseToStart()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-selection-collapsetostart
4.8.10.12 Byte ranges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#byte-ranges
4.8.10.7 Cue ranges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#cue-ranges
tree order
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#tree-order
4.8.11 The canvas element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#the-canvas-element
normalized ByteRanges object
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#normalized-byteranges-object
autoplay
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#attr-media-autoplay
ended playback
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#ended-playback
play()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-play
When a media element that is actively playing stops playing because its readyState attribute changes to a value lower than CAN_PLAY, without the element having ended playback, or playback having stopped due to errors, or playback having paused for user interaction, or the seeking algorithm being invoked, the user agent must queue a task to fire a simple event called timeupdate at the element, and queue a task to fire a simple event called waiting at the element.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#fire-waiting-when-waiting
actively playing
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#actively-playing
4.8.10.9 Seeking
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#seeking
4.8.10.13 Event summary
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#mediaevents
pause()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-pause
cue ranges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#cue-range
normalized TimeRanges object
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#normalized-timeranges-object
autoplay
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-autoplay
seek
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-seek
4.8.10.8 Playing the media resource
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#playing-the-media-resource
When the defaultPlaybackRate or playbackRate attributes change value (either by being set by script or by being changed directly by the user agent, e.g. in response to user control) the user agent must queue a task to fire a simple event called ratechange at the media element.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#rateUpdate
muted
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-muted
4.8.10.11 Time ranges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#time-ranges
seekable
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-seekable
ignored
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#ignore
stopped due to errors
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#stopped-due-to-errors
ended
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-media-ended
2.1.2 DOM trees
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#dom-trees
inserted into a document
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#insert-an-element-into-a-document
TimeRanges
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1499.html#timeranges

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1498&r2=1.1499&f=h
http://html5.org/tools/web-apps-tracker?from=2325&to=2326

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1498
retrieving revision 1.1499
diff -u -d -r1.1498 -r1.1499
--- Overview.html	13 Oct 2008 20:24:56 -0000	1.1498
+++ Overview.html	13 Oct 2008 20:53:22 -0000	1.1499
@@ -379,15 +379,14 @@
        <li><a href=#loading-the-media-resource><span class=secno>4.8.10.4 </span>Loading the media resource</a></li>
        <li><a href=#offsets-into-the-media-resource><span class=secno>4.8.10.5 </span>Offsets into the media resource</a></li>
        <li><a href=#the-ready-states><span class=secno>4.8.10.6 </span>The ready states</a></li>
-       <li><a href=#playing-the-media-resource><span class=secno>4.8.10.7 </span>Playing the media resource</a></li>
-       <li><a href=#seeking><span class=secno>4.8.10.8 </span>Seeking</a></li>
-       <li><a href=#cue-ranges><span class=secno>4.8.10.9 </span>Cue ranges</a></li>
-       <li><a href=#playback-processing-model><span class=secno>4.8.10.10 </span>Playback processing model</a></li>
-       <li><a href=#user-interface><span class=secno>4.8.10.11 </span>User interface</a></li>
-       <li><a href=#time-ranges><span class=secno>4.8.10.12 </span>Time ranges</a></li>
-       <li><a href=#byte-ranges><span class=secno>4.8.10.13 </span>Byte ranges</a></li>
-       <li><a href=#mediaevents><span class=secno>4.8.10.14 </span>Event summary</a></li>
-       <li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</a></ol></li>
+       <li><a href=#cue-ranges><span class=secno>4.8.10.7 </span>Cue ranges</a></li>
+       <li><a href=#playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the media resource</a></li>
+       <li><a href=#seeking><span class=secno>4.8.10.9 </span>Seeking</a></li>
+       <li><a href=#user-interface><span class=secno>4.8.10.10 </span>User interface</a></li>
+       <li><a href=#time-ranges><span class=secno>4.8.10.11 </span>Time ranges</a></li>
+       <li><a href=#byte-ranges><span class=secno>4.8.10.12 </span>Byte ranges</a></li>
+       <li><a href=#mediaevents><span class=secno>4.8.10.13 </span>Event summary</a></li>
+       <li><a href=#security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</a></ol></li>
      <li><a href=#the-canvas-element><span class=secno>4.8.11 </span>The <code>canvas</code> element</a>
       <ol>
        <li><a href=#the-2d-context><span class=secno>4.8.11.1 </span>The 2D context</a>
@@ -1151,10 +1150,15 @@
   node itself if it has no ancestors. When the node is a part of the
   document, then that is indeed the document's root element; however,
   if the node is not currently part of the document tree, the root
-  element will be an orphaned node.<p>An element is said to have been <dfn id=insert-an-element-into-a-document title="insert an element
+  element will be an orphaned node.<p>The <code>Document</code> of a <code>Node</code> (such as an
+  element) is the <code>Document</code> that the <code>Node</code>'s
+  <code title="">ownerDocument</code> DOM attribute returns.<p>An element is said to have been <dfn id=insert-an-element-into-a-document title="insert an element
   into a document">inserted into a document</dfn> when its <a href=#root-element>root
   element</a> changes and is now the document's <a href=#root-element>root
-  element</a>.<p>The term <dfn id=tree-order>tree order</dfn> means a pre-order, depth-first
+  element</a>. If a <code>Node</code> is in a <code>Document</code>
+  then that <code>Document</code> is always the <code>Node</code>'s
+  <code>Document</code>, and the <code>Node</code>'s <code title="">ownerDocument</code> DOM attribute thus always returns that
+  <code>Document</code>.<p>The term <dfn id=tree-order>tree order</dfn> means a pre-order, depth-first
   traversal of DOM nodes involved (through the <code title="">parentNode</code>/<code title="">childNodes</code>
   relationship).<p>When it is stated that some element or attribute is <dfn id=ignore title=ignore>ignored</dfn>, or treated as some other value, or
   handled as if it was something else, this refers only to the
@@ -14277,7 +14281,46 @@
   automatically begin playback of the <a href=#media-resource>media resource</a> as
   soon as it can do so without stopping.<p>The <dfn id=dom-media-autoplay title=dom-media-autoplay><code>autoplay</code></dfn>
   DOM attribute must <a href=#reflect>reflect</a> the content attribute of the
-  same name.<h5 id=playing-the-media-resource><span class=secno>4.8.10.7 </span>Playing the media resource</h5><p>The <dfn id=dom-media-paused title=dom-media-paused><code>paused</code></dfn>
+  same name.<h5 id=cue-ranges><span class=secno>4.8.10.7 </span>Cue ranges</h5><p><a href=#media-element title="media element">Media elements</a> have a set of
+  <dfn id=cue-range title="cue range">cue ranges</dfn>. Each cue range is made up
+  of the following information:<dl><dt>A class name</dt>
+   <dd>A group of related ranges can be given the same class name so
+   that they can all be removed at the same time.</dd>
+
+   <dt>An identifier<dt>
+   </dt><dd>A string can be assigned to each cue range for identification
+   by script. The string need not be unique and can contain any
+   value.</dd>
+
+   <dt>A start time</dt>
+   <dt>An end time</dt>
+   <dd>The actual time range, using the same timeline as the
+   <a href=#media-resource>media resource</a> itself.</dd>
+
+   <dt>A "pause" boolean</dt>
+   <dd>A flag indicating whether to pause playback on exit.</dd>
+
+   <dt>An "enter" callback</dt>
+   <dd>A callback that is called when the <a href=#current-playback-position>current playback
+   position</a> enters the range.</dd>
+
+   <dt>An "exit" callback</dt>
+   <dd>A callback that is called when the <a href=#current-playback-position>current playback
+   position</a> exits the range.</dd>
+
+   <dt>An "active" boolean</dt>
+   <dd>A flag indicating whether the range is active or not.</dd>
+
+  </dl><p>The <dfn id=dom-media-addcuerange title=dom-media-addCueRange><code>addCueRange(<var title="">className</var>, <var title="">id</var>, <var title="">start</var>, <var title="">end</var>, <var title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var title="">exitCallback</var>)</code></dfn> method must, when called,
+  add a <a href=#cue-range>cue range</a> to the <a href=#media-element>media element</a>, that
+  cue range having the class name <var title="">className</var>, the
+  identifier <var title="">id</var>, the start time <var title="">start</var> (in seconds), the end time <var title="">end</var> (in seconds), the "pause" boolean with the same
+  value as <var title="">pauseOnExit</var>, the "enter" callback <var title="">enterCallback</var>, the "exit" callback <var title="">exitCallback</var>, and an "active" boolean that is true if
+  the <a href=#current-playback-position>current playback position</a> is equal to or greater
+  than the start time and less than the end time, and false
+  otherwise.<p>The <dfn id=dom-media-removecueranges title=dom-media-removeCueRanges><code>removeCueRanges(<var title="">className</var>)</code></dfn> method must, when called,
+  remove all the <a href=#cue-range title="cue range">cue ranges</a> of the
+  <a href=#media-element>media element</a> which have the class name <var title="">className</var>.<h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the media resource</h5><p>The <dfn id=dom-media-paused title=dom-media-paused><code>paused</code></dfn>
   attribute represents whether the <a href=#media-element>media element</a> is
   paused or not. The attribute must initially be true.<p>A <a href=#media-element>media element</a> is said to be <dfn id=actively-playing>actively
   playing</dfn> when its <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code>
@@ -14291,7 +14334,9 @@
   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>A <a href=#media-element>media element</a> is said to have <dfn id=stopped-due-to-errors>stopped due to
+  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>
+  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-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute is
   <code title=dom-media-LOADED_METADATA><a href=#dom-media-loaded_metadata>LOADED_METADATA</a></code> or
   greater, and the user agent <a href=#non-fatal-media-error>encounters a non-fatal error</a>
@@ -14304,25 +14349,10 @@
   where the user has to make a selection for the resource to
   continue.<p>It is possible for a <a href=#media-element>media element</a> to have both
   <a href=#ended-playback>ended playback</a> and <a href=#paused-for-user-interaction>paused for user
-  interaction</a> at the same time.<p id=media-playback>When a <a href=#media-element>media element</a> is
-  <a href=#actively-playing>actively playing</a> and its <span title=dom-ownerDocument>owner <code>Document</code></span><!-- XXX
-  xref --> is an <a href=#active-document>active document</a>, its <a href=#current-playback-position>current
-  playback position</a> must increase monotonically at <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> units of media
-  time per unit time of wall clock time. If this value is not 1, the
-  user agent may apply pitch adjustments to any audio component of the
-  <a href=#media-resource>media resource</a>.<p class=note>This specification doesn't define how the user agent
-  achieves the appropriate playback rate &mdash; depending on the
-  protocol and media available, it is plausible that the user agent
-  could negotiate with the server to have the server provide the media
-  data at the appropriate rate, so that (except for the period between
-  when the rate is changed and when the server updates the stream's
-  playback rate) the client doesn't actually have to drop or
-  interpolate any frames.<p><a href=#media-resource title="media resource">Media resources</a> might be
-  internally scripted or interactive. Thus, a <a href=#media-element>media
-  element</a> could play in a non-linear fashion. If this happens,
-  the user agent must act as if the algorithm for <a href=#dom-media-seek title=dom-media-seek>seeking</a> was used whenever the
-  <a href=#current-playback-position>current playback position</a> changes in a discontinuous
-  fashion (so that the relevant events fire).<p id=fire-waiting-when-waiting>When a <a href=#media-element>media element</a>
+  interaction</a> at the same time.<p>When a <a href=#media-element>media element</a> that is <a href=#actively-playing>actively
+  playing</a> stops playing because it has <a href=#paused-for-user-interaction>paused for user
+  interaction</a>, 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.<p id=fire-waiting-when-waiting>When a <a href=#media-element>media element</a>
   that is <a href=#actively-playing>actively playing</a> stops playing because its
   <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute
   changes to a value lower than <code title=dom-media-CAN_PLAY><a href=#dom-media-can_play>CAN_PLAY</a></code>, without the element
@@ -14332,10 +14362,7 @@
   algorithm</a> being 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-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 a <a href=#media-element>media element</a> that is <a href=#actively-playing>actively
-  playing</a> stops playing because it has <a href=#paused-for-user-interaction>paused for user
-  interaction</a>, 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.<p>When <code title=dom-media-currentLoop><a href=#dom-media-currentloop>currentLoop</a></code> is
+  <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
@@ -14376,7 +14403,24 @@
   directly by the user agent, e.g. in response to user control) 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-ratechange><a href=#event-ratechange>ratechange</a></code>
-  at the <a href=#media-element>media element</a>.</p><hr><p>When the <dfn id=dom-media-play title=dom-media-play><code>play()</code></dfn>
+  at the <a href=#media-element>media element</a>.<p>The <dfn id=dom-media-played title=dom-media-played><code>played</code></dfn>
+  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 has so
+  far rendered, at the time the attribute is evaluated.</p><hr><p id=media-playback>When a <a href=#media-element>media element</a> is
+  <a href=#actively-playing>actively playing</a> and its <code>Document</code> is an
+  <a href=#active-document>active document</a>, its <a href=#current-playback-position>current playback
+  position</a> must increase monotonically at <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> units of media
+  time per unit time of wall clock time. If this value is not 1, the
+  user agent may apply pitch adjustments to any audio component of the
+  <a href=#media-resource>media resource</a>.<p class=note>This specification doesn't define how the user agent
+  achieves the appropriate playback rate &mdash; depending on the
+  protocol and media available, it is plausible that the user agent
+  could negotiate with the server to have the server provide the media
+  data at the appropriate rate, so that (except for the period between
+  when the rate is changed and when the server updates the stream's
+  playback rate) the client doesn't actually have to drop or
+  interpolate any frames.</p><hr><p>When the <dfn id=dom-media-play title=dom-media-play><code>play()</code></dfn>
   method on a <a href=#media-element>media element</a> is invoked, the user agent
   must run the following steps.<ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
    the value <a href=#dom-media-empty title=dom-media-EMPTY>EMPTY</a>, then the user
@@ -14423,7 +14467,7 @@
    called <code title=event-pause><a href=#event-pause>play</a></code> at the
    element.</li>
 
-  </ol><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
+  </ol><hr><p>When the <dfn id=dom-media-pause title=dom-media-pause><code>pause()</code></dfn>
   method is invoked, the user agent must run the following steps:<ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has
    the value <a href=#dom-media-empty title=dom-media-EMPTY>EMPTY</a>, then the user
    agent must invoke the <code title=dom-media-load><a href=#dom-media-load>load()</a></code>
@@ -14445,6 +14489,73 @@
    event</a> called <code title=event-pause><a href=#event-pause>pause</a></code> at the
    element.</li>
 
+  </ol><hr><p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media
+  element</a> changes (e.g. due to playback or seeking), the user
+  agent must run the following steps. If the <a href=#current-playback-position>current playback
+  position</a> changes while the steps are running, then the user
+  agent must wait for the steps to complete, and then must immediately
+  rerun the steps. (These steps are thus run as often as possible or
+  needed &mdash; if one iteration takes a long time, this can cause
+  certain ranges to be skipped over as the user agent rushes ahead to
+  "catch up".)<ol><li><p>Let <var title="">current ranges</var> be an ordered list of
+   <a href=#cue-range title="cue range">cue ranges</a>, initialized to contain
+   all the <a href=#cue-range title="cue range">cue ranges</a> of the
+   <a href=#media-element>media element</a> whose start times are less than or equal
+   to the <a href=#current-playback-position>current playback position</a> and whose end times
+   are greater than the <a href=#current-playback-position>current playback position</a>, in the
+   order they were added to the element.</li>
+
+   <li><p>Let <var title="">other ranges</var> be an ordered list of
+   <a href=#cue-range title="cue range">cue ranges</a>, initialized to contain
+   all the <a href=#cue-range title="cue range">cue ranges</a> of the
+   <a href=#media-element>media element</a> that are not present in <var title="">current ranges</var>, in the order they were added to the
+   element.</li>
+
+   <li><p>If none of the <a href=#cue-range title="cue range">cue ranges</a> in
+   <var title="">current ranges</var> have their "active" boolean set
+   to "false" (inactive) and none of the <a href=#cue-range title="cue range">cue
+   ranges</a> in <var title="">other ranges</var> have their
+   "active" boolean set to "true" (active), then abort these
+   steps.</li>
+
+   <li><p>If the time was reached through the usual monotonic increase
+   of the current playback position during normal playback, the user
+   agent must then <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. (In the
+   other cases, such as explicit seeks, relevant events get fired as
+   part of the overall process of changing the current playback
+   position.)</li>
+
+   <li><p>If the time was reached through the usual monotonic increase
+   of the current playback position during normal playback, and there
+   are <a href=#cue-range title="cue range">cue ranges</a> in <var title="">other ranges</var> that have both their "active" boolean
+   and their "pause" boolean set to "true", then immediately act as if
+   the element's <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method
+   had been invoked. <!-- pause() can in theory call load(), but never
+   can it do so as part of this invokation, since we wouldn't be in
+   this algorithm if the media element was empty. So, no need to couch
+   all this in a task. --> (In the other cases, such as explicit
+   seeks, playback is not paused by exiting a cue range, even if that
+   cue range has its "pause" boolean set to "true".)</li>
+
+   <li><p>For each non-null "exit" callback of the <a href=#cue-range title="cue range">cue ranges</a> in <var title="">other
+   ranges</var> that have their "active" boolean set to "true"
+   (active), in list order, <a href=#queue-a-task>queue a task</a> that invokes the
+   callback, passing the cue range's identifier as the callback's only
+   argument.</li>
+
+   <li><p>For each non-null "enter" callback of the <a href=#cue-range title="cue
+   range">cue ranges</a> in <var title="">current ranges</var> that
+   have their "active" boolean set to "false" (inactive), in list
+   order, <a href=#queue-a-task>queue a task</a> that invokes the callback, passing
+   the cue range's identifier as the callback's only
+   argument.</li>
+
+   <li><p>Set the "active" boolean of all the <a href=#cue-range title="cue
+   range">cue ranges</a> in the <var title="">current ranges</var>
+   list to "true" (active), and the "active" boolean of all the <a href=#cue-range title="cue range">cue ranges</a> in the <var title="">other
+   ranges</var> list to "false" (inactive).</li>
+
   </ol><p>When a <a href=#media-element>media element</a> is <span>removed from a
   <code>Document</code><!-- XXX xref removed --></span>, if the
   <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> attribute has a
@@ -14458,15 +14569,10 @@
   point where no further audio remains to be played for that element
   (e.g. because the element is paused or because the end of the clip
   has been reached) may the element be <span>garbage
-  collected</span><!-- XXX xref -->.<p class=note>If the <a href=#media-element>media element</a>'s <code title=dom-ownerDocument>ownerDocument</code> stops being an active
-  document, then the playback will <a href=#media-playback>stop</a>
-  until the document is active again.<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>The <dfn id=dom-media-played title=dom-media-played><code>played</code></dfn>
-  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 has so
-  far rendered, at the time the attribute is evaluated.<h5 id=seeking><span class=secno>4.8.10.8 </span>Seeking</h5><p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn>
+  collected</span><!-- XXX xref -->.<p class=note>If the <a href=#media-element>media element</a>'s
+  <code>Document</code> stops being an active document, then the
+  playback will <a href=#media-playback>stop</a> until the document
+  is active again.<h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5><p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn>
   attribute must initially have the value false.<p>When the user agent is required to <dfn id=dom-media-seek title=dom-media-seek>seek</dfn> to a particular <var title="">new
   playback position</var> in the <a href=#media-resource>media resource</a>, it means
   that the user agent must run the following steps:<ol><li><p>If the <a href=#media-element>media element</a>'s <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> is less than
@@ -14547,113 +14653,12 @@
   attribute would return an object with one range, whose start is the
   time of the first frame (typically zero), and whose end is the same
   as the time of the first frame plus the <code title=dom-media-duration><a href=#dom-media-duration>duration</a></code> attribute's value (which
-  would equal the time of the last frame).<h5 id=cue-ranges><span class=secno>4.8.10.9 </span>Cue ranges</h5><p><a href=#media-element title="media element">Media elements</a> have a set of
-  <dfn id=cue-range title="cue range">cue ranges</dfn>. Each cue range is made up
-  of the following information:<dl><dt>A class name</dt>
-   <dd>A group of related ranges can be given the same class name so
-   that they can all be removed at the same time.</dd>
-
-   <dt>An identifier<dt>
-   </dt><dd>A string can be assigned to each cue range for identification
-   by script. The string need not be unique and can contain any
-   value.</dd>
-
-   <dt>A start time</dt>
-   <dt>An end time</dt>
-   <dd>The actual time range, using the same timeline as the
-   <a href=#media-resource>media resource</a> itself.</dd>
-
-   <dt>A "pause" boolean</dt>
-   <dd>A flag indicating whether to pause playback on exit.</dd>
-
-   <dt>An "enter" callback</dt>
-   <dd>A callback that is called when the <a href=#current-playback-position>current playback
-   position</a> enters the range.</dd>
-
-   <dt>An "exit" callback</dt>
-   <dd>A callback that is called when the <a href=#current-playback-position>current playback
-   position</a> exits the range.</dd>
-
-   <dt>An "active" boolean</dt>
-   <dd>A flag indicating whether the range is active or not.</dd>
-
-  </dl><p>The <dfn id=dom-media-addcuerange title=dom-media-addCueRange><code>addCueRange(<var title="">className</var>, <var title="">id</var>, <var title="">start</var>, <var title="">end</var>, <var title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var title="">exitCallback</var>)</code></dfn> method must, when called,
-  add a <a href=#cue-range>cue range</a> to the <a href=#media-element>media element</a>, that
-  cue range having the class name <var title="">className</var>, the
-  identifier <var title="">id</var>, the start time <var title="">start</var> (in seconds), the end time <var title="">end</var> (in seconds), the "pause" boolean with the same
-  value as <var title="">pauseOnExit</var>, the "enter" callback <var title="">enterCallback</var>, the "exit" callback <var title="">exitCallback</var>, and an "active" boolean that is true if
-  the <a href=#current-playback-position>current playback position</a> is equal to or greater
-  than the start time and less than the end time, and false
-  otherwise.<p>The <dfn id=dom-media-removecueranges title=dom-media-removeCueRanges><code>removeCueRanges(<var title="">className</var>)</code></dfn> method must, when called,
-  remove all the <a href=#cue-range title="cue range">cue ranges</a> of the
-  <a href=#media-element>media element</a> which have the class name <var title="">className</var>.<h5 id=playback-processing-model><span class=secno>4.8.10.10 </span>Playback processing model</h5><p>When the <a href=#current-playback-position>current playback position</a> of a <a href=#media-element>media
-  element</a> changes (e.g. due to playback or seeking), the user
-  agent must run the following steps. If the <a href=#current-playback-position>current playback
-  position</a> changes while the steps are running, then the user
-  agent must wait for the steps to complete, and then must immediately
-  rerun the steps. (These steps are thus run as often as possible or
-  needed &mdash; if one iteration takes a long time, this can cause
-  certain ranges to be skipped over as the user agent rushes ahead to
-  "catch up".)<ol><li><p>Let <var title="">current ranges</var> be an ordered list of
-   <a href=#cue-range title="cue range">cue ranges</a>, initialized to contain
-   all the <a href=#cue-range title="cue range">cue ranges</a> of the
-   <a href=#media-element>media element</a> whose start times are less than or equal
-   to the <a href=#current-playback-position>current playback position</a> and whose end times
-   are greater than the <a href=#current-playback-position>current playback position</a>, in the
-   order they were added to the element.</li>
-
-   <li><p>Let <var title="">other ranges</var> be an ordered list of
-   <a href=#cue-range title="cue range">cue ranges</a>, initialized to contain
-   all the <a href=#cue-range title="cue range">cue ranges</a> of the
-   <a href=#media-element>media element</a> that are not present in <var title="">current ranges</var>, in the order they were added to the
-   element.</li>
-
-   <li><p>If none of the <a href=#cue-range title="cue range">cue ranges</a> in
-   <var title="">current ranges</var> have their "active" boolean set
-   to "false" (inactive) and none of the <a href=#cue-range title="cue range">cue
-   ranges</a> in <var title="">other ranges</var> have their
-   "active" boolean set to "true" (active), then abort these
-   steps.</li>
-
-   <li><p>If the time was reached through the usual monotonic increase
-   of the current playback position during normal playback, the user
-   agent must then <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. (In the
-   other cases, such as explicit seeks, relevant events get fired as
-   part of the overall process of changing the current playback
-   position.)</li>
-
-   <li><p>If the time was reached through the usual monotonic increase
-   of the current playback position during normal playback, and there
-   are <a href=#cue-range title="cue range">cue ranges</a> in <var title="">other ranges</var> that have both their "active" boolean
-   and their "pause" boolean set to "true", then immediately act as if
-   the element's <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method
-   had been invoked. <!-- pause() can in theory call load(), but never
-   can it do so as part of this invokation, since we wouldn't be in
-   this algorithm if the media element was empty. So, no need to couch
-   all this in a task. --> (In the other cases, such as explicit
-   seeks, playback is not paused by exiting a cue range, even if that
-   cue range has its "pause" boolean set to "true".)</li>
-
-   <li><p>For each non-null "exit" callback of the <a href=#cue-range title="cue range">cue ranges</a> in <var title="">other
-   ranges</var> that have their "active" boolean set to "true"
-   (active), in list order, <a href=#queue-a-task>queue a task</a> that invokes the
-   callback, passing the cue range's identifier as the callback's only
-   argument.</li>
-
-   <li><p>For each non-null "enter" callback of the <a href=#cue-range title="cue
-   range">cue ranges</a> in <var title="">current ranges</var> that
-   have their "active" boolean set to "false" (inactive), in list
-   order, <a href=#queue-a-task>queue a task</a> that invokes the callback, passing
-   the cue range's identifier as the callback's only
-   argument.</li>
-
-   <li><p>Set the "active" boolean of all the <a href=#cue-range title="cue
-   range">cue ranges</a> in the <var title="">current ranges</var>
-   list to "true" (active), and the "active" boolean of all the <a href=#cue-range title="cue range">cue ranges</a> in the <var title="">other
-   ranges</var> list to "false" (inactive).</li>
-
-  </ol><h5 id=user-interface><span class=secno>4.8.10.11 </span>User interface</h5><p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn>
+  would equal the time of the last frame).<p><a href=#media-resource title="media resource">Media resources</a> might be
+  internally scripted or interactive. Thus, a <a href=#media-element>media
+  element</a> could play in a non-linear fashion. If this happens,
+  the user agent must act as if the algorithm for <a href=#dom-media-seek title=dom-media-seek>seeking</a> was used whenever the
+  <a href=#current-playback-position>current playback position</a> changes in a discontinuous
+  fashion (so that the relevant events fire).<h5 id=user-interface><span class=secno>4.8.10.10 </span>User interface</h5><p>The <dfn id=attr-media-controls title=attr-media-controls><code>controls</code></dfn>
   attribute is a <a href=#boolean-attribute>boolean attribute</a>. If the attribute is
   present, or if the <a href=#media-element>media element</a> is <a href=#without-script>without
   script</a>, then the user agent should <dfn id=expose-a-user-interface-to-the-user>expose a user
@@ -14702,7 +14707,7 @@
   <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attributes are changed,
   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-volumechange><a href=#event-volumechange>volumechange</a></code> at the <a href=#media-element>media
-  element</a>.<h5 id=time-ranges><span class=secno>4.8.10.12 </span>Time ranges</h5><p>Objects implementing the <code><a href=#timeranges>TimeRanges</a></code> interface
+  element</a>.<h5 id=time-ranges><span class=secno>4.8.10.11 </span>Time ranges</h5><p>Objects implementing the <code><a href=#timeranges>TimeRanges</a></code> interface
   represent a list of ranges (periods) of time.<pre class=idl>interface <dfn id=timeranges>TimeRanges</dfn> {
   readonly attribute unsigned long <a href=#dom-timeranges-length title=dom-TimeRanges-length>length</a>;
   float <a href=#dom-timeranges-start title=dom-TimeRanges-start>start</a>(in unsigned long index);
@@ -14727,7 +14732,7 @@
   </ul><p>In other words, the ranges in such an object are ordered, don't
   overlap, aren't empty, and don't touch (adjacent ranges are folded
   into one bigger range).<p>The timelines used by the objects returned by the <code title=dom-media-buffered><a href=#dom-media-buffered>buffered</a></code>, <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> and <code title=dom-media-played><a href=#dom-media-played>played</a></code> DOM attributes of <a href=#media-element title="media element">media elements</a> must be the same as that
-  element's <a href=#media-resource>media resource</a>'s timeline.<h5 id=byte-ranges><span class=secno>4.8.10.13 </span>Byte ranges</h5><p>Objects implementing the <code><a href=#byteranges>ByteRanges</a></code> interface
+  element's <a href=#media-resource>media resource</a>'s timeline.<h5 id=byte-ranges><span class=secno>4.8.10.12 </span>Byte ranges</h5><p>Objects implementing the <code><a href=#byteranges>ByteRanges</a></code> interface
   represent a list of ranges of bytes.<pre class=idl>interface <dfn id=byteranges>ByteRanges</dfn> {
   readonly attribute unsigned long <a href=#dom-byteranges-length title=dom-ByteRanges-length>length</a>;
   unsigned long <a href=#dom-byteranges-start title=dom-ByteRanges-start>start</a>(in unsigned long index);
@@ -14753,7 +14758,7 @@
 
   </ul><p>In other words, the ranges in such an object are ordered, don't
   overlap, aren't empty, and don't touch (adjacent ranges are folded
-  into one bigger range).<h5 id=mediaevents><span class=secno>4.8.10.14 </span>Event summary</h5><p>The following events fire on <a href=#media-element title="media element">media
+  into one bigger range).<h5 id=mediaevents><span class=secno>4.8.10.13 </span>Event summary</h5><p>The following events fire on <a href=#media-element title="media element">media
   elements</a> as part of the processing model described above:<table><thead><tr><th>Event name
      <th>Interface
      <th>Dispatched when...
@@ -14853,7 +14858,7 @@
      <td><code>Event</code>
      <td>Either the <code title=dom-media-volume><a href=#dom-media-volume>volume</a></code> attribute or the <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code> attribute has changed. Fired after the relevant attribute's setter has returned.
      <td>
-  </table><h5 id=security-and-privacy-considerations><span class=secno>4.8.10.15 </span>Security and privacy considerations</h5><p class=XXX>Talk about making sure interactive media files
+  </table><h5 id=security-and-privacy-considerations><span class=secno>4.8.10.14 </span>Security and privacy considerations</h5><p class=XXX>Talk about making sure interactive media files
   (e.g. SVG) don't have access to the container DOM (XSS potential);
   talk about not exposing any sensitive data like metadata from tracks
   in the media files (intranet snooping risk)<h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><code>canvas</code></dfn> element</h4><dl class=element><dt>Categories</dt>
@@ -31227,16 +31232,15 @@
   object in the list, or 0 if the list is empty.<p>The <dfn id=dom-selection-iscollapsed title=dom-selection-isCollapsed><code>isCollapsed</code></dfn>
   attribute must return true if there are zero ranges, or if there is
   exactly one range and its <code title="">collapsed</code> attribute
-  is itself true. Otherwise it must return false.<p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>,
-  <var title="">offset</var>)</code></dfn> method must raise a
-  <code>WRONG_DOCUMENT_ERR</code> DOM exception if
-  <var title="">parentNode</var>'s <code title="">ownerDocument</code> is not
-  the <code><a href=#htmldocument>HTMLDocument</a></code> object with which the
+  is itself true. Otherwise it must return false.<p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>, <var title="">offset</var>)</code></dfn>
+  method must raise a <code>WRONG_DOCUMENT_ERR</code> DOM exception if
+  <var title="">parentNode</var>'s <code>Document</code> is not the
+  <code><a href=#htmldocument>HTMLDocument</a></code> object with which the
   <code><a href=#selection-0>Selection</a></code> object is associated. Otherwise it is, and
   the method must remove all the ranges in the <code><a href=#selection-0>Selection</a></code>
   list, then create a new <code>Range</code> object, add it to the
-  list, and invoke its <code title="">setStart()</code> and <code title="">setEnd()</code> methods with the <var title="">parentNode</var> and
-  <var title="">offset</var> values as their arguments.<p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
+  list, and invoke its <code title="">setStart()</code> and <code title="">setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
+  their arguments.<p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
   method must raise an <code>INVALID_STATE_ERR</code> DOM exception if
   there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
   <code title="">startContainer</code> and <code title="">startOffset</code> values of the first <code>Range</code>
Received on Monday, 13 October 2008 20:56:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:56 GMT