[html5] r7439 - [giow] (0) Introduce a fastSeek() method. Fixing https://www.w3.org/Bugs/Public/ [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Oct 8 11:52:17 PDT 2012
Author: ianh
Date: 2012-10-08 11:52:16 -0700 (Mon, 08 Oct 2012)
New Revision: 7439
Modified:
complete.html
index
source
Log:
[giow] (0) Introduce a fastSeek() method.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=14851
Affected topics: Video and Audio
Modified: complete.html
===================================================================
--- complete.html 2012-10-07 23:27:49 UTC (rev 7438)
+++ complete.html 2012-10-08 18:52:16 UTC (rev 7439)
@@ -249,7 +249,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 7 October 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 8 October 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -29282,6 +29282,7 @@
// playback state
attribute double <a href=#dom-media-currenttime title=dom-media-currentTime>currentTime</a>;
+ void <a href=#dom-media-fastseek title=dom-media-fastSeek>fastSeek</a>(double time);
readonly attribute unrestricted double <a href=#dom-media-duration title=dom-media-duration>duration</a>;
readonly attribute <span>Date</span> <a href=#dom-media-startdate title=dom-media-startDate>startDate</a>;
readonly attribute boolean <a href=#dom-media-paused title=dom-media-paused>paused</a>;
@@ -32043,112 +32044,116 @@
<dd>
- <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
- ranges of the <a href=#media-resource>media resource</a> to which it is possible
- for the user agent to seek.</p>
+ <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the ranges of the <a href=#media-resource>media
+ resource</a> to which it is possible for the user agent to seek.</p>
</dd>
+ <dt><var title="">media</var> . <code title=dom-media-fastSeek><a href=#dom-media-fastseek>fastSeek</a></code>( <var title="">time</var> )</dt>
+
+ <dd>
+
+ <p>Seeks to near the given <var title="">time</var> as fast as possible, trading precision for
+ speed. (To seek to a precise time, use the <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute.)</p>
+
+ <p>This does nothing if the media resource has not been loaded.</p>
+
+ </dd>
+
</dl><div class=impl>
- <p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn>
- attribute must initially have the value false.</p>
+ <p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn> attribute must initially have the
+ value false.</p>
- <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. This algorithm
- interacts closely with the <a href=#event-loop>event loop</a> mechanism; in
- particular, it has a <a href=#synchronous-section>synchronous
- section</a> (which is triggered as part of the <a href=#event-loop>event
- loop</a> algorithm). Steps in that section are marked with
- ⌛.</p>
+ <p>The <dfn id=dom-media-fastseek title=dom-media-fastSeek><code>fastSeek()</code></dfn> method must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the time given by the method's argument, with the
+ <i>approximate-for-speed</i> flag set.</p>
- <ol><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 <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these
- steps.</li>
+ <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>, optionally with the
+ <i>approximate-for-speed</i> flag set, it means that the user agent must run the following steps.
+ This algorithm interacts closely with the <a href=#event-loop>event loop</a> mechanism; in particular, it has
+ a <a href=#synchronous-section>synchronous section</a> (which is triggered as part of the <a href=#event-loop>event loop</a>
+ algorithm). Steps in that section are marked with ⌛.</p>
+ <ol><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 <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these steps.</li>
+
<li><p>If the element's <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute is true,
- then another instance of this algorithm is already running. Abort
- that other instance of the algorithm without waiting for the step
- that it is running to complete.</li>
+ then another instance of this algorithm is already running. Abort that other instance of the
+ algorithm without waiting for the step that it is running to complete.</li>
- <li><p>Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL
- attribute to true.</li>
+ <li><p>Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to true.</li>
- <li><p>If the seek was in response to a DOM method call or setting
- of an IDL attribute, then continue the script. The remainder of
- these steps must be run asynchronously. With the exception of the
- steps marked with ⌛, they could be aborted at any time by
- another instance of this algorithm being invoked.</li>
+ <li><p>If the seek was in response to a DOM method call or setting of an IDL attribute, then
+ continue the script. The remainder of these steps must be run asynchronously. With the exception
+ of the steps marked with ⌛, they could be aborted at any time by another instance of this
+ algorithm being invoked.</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 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 the <a href=#earliest-possible-position>earliest possible position</a>, let it be that
- position instead.</li>
+ <li><p>If the <var title="">new playback position</var> is less than the <a href=#earliest-possible-position>earliest possible
+ position</a>, 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 let it
- be the position in one of the ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute that is the
- nearest to the <var title="">new playback position</var>. If two
- positions both satisfy that constraint (i.e. the <var title="">new
- playback position</var> is exactly in the middle between two ranges
- in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute)
- then use the position that is closest to the <a href=#current-playback-position>current playback
- position</a>. If there are no ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute then set the
- <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
- false and abort these steps.</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 let it
+ be the position in one of the ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute that is the nearest to the <var title="">new
+ playback position</var>. If two positions both satisfy that constraint (i.e. the <var title="">new playback position</var> is exactly in the middle between two ranges in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute) then use the position that is closest to
+ the <a href=#current-playback-position>current playback position</a>. If there are no ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute then set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to false and abort these steps.</li>
- <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> named <code title=event-media-seeking><a href=#event-media-seeking>seeking</a></code>
- at the element.</li>
+ <li>
+ <p>If the <i>approximate-for-speed</i> flag is set, adjust the <var title="">new playback
+ position</var> to a value that will allow for playback to resume promptly. If <var title="">new
+ playback position</var> before this step is before <a href=#current-playback-position>current playback position</a>, then
+ the adjusted <var title="">new playback position</var> must also be before the <a href=#current-playback-position>current
+ playback position</a>. Similarly, if the <var title="">new playback position</var> before
+ this step is after <a href=#current-playback-position>current playback position</a>, then the adjusted <var title="">new
+ playback position</var> must also be after the <a href=#current-playback-position>current playback position</a>.</p>
+
+ <p class=example>For example, the user agent could snap to the nearest key frame, so that it
+ doesn't have to spend time decoding then discarding intermediate frames before resuming
+ playback.</p>
+
+ </li>
+
+ <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-seeking><a href=#event-media-seeking>seeking</a></code> at the element.</li>
+
<li>
- <p>Set the <a href=#current-playback-position>current playback position</a> to the given
- <var title="">new playback position</var>.</p>
+ <p>Set the <a href=#current-playback-position>current playback position</a> to the given <var title="">new playback
+ position</var>.</p>
- <p class=note>If the <a href=#media-element>media element</a> was
- <a href=#potentially-playing>potentially playing</a> immediately before it started
- seeking, but seeking caused its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to change
- to a value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, then a
- <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code> <a href=#fire-waiting-when-waiting>will be fired</a> at the
- element.</p> <!-- also, timeupdate -->
+ <p class=note>If the <a href=#media-element>media element</a> was <a href=#potentially-playing>potentially playing</a>
+ immediately before it started seeking, but seeking caused its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to change to a value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, then a <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code> <a href=#fire-waiting-when-waiting>will be
+ fired</a> at the element.</p> <!-- also, timeupdate -->
<!-- also, it will do the "report the controller state" thing -->
- <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does
- not get updated asynchronously, as it returns the <a href=#official-playback-position>official
- playback position</a>, not the <a href=#current-playback-position>current playback
- position</a>.</p>
+ <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does not
+ get updated asynchronously, as it returns the <a href=#official-playback-position>official playback position</a>, not the
+ <a href=#current-playback-position>current playback position</a>.</p>
</li>
- <li><p>Wait until the user agent has established whether or not the
- <a href=#media-data>media data</a> for the <var title="">new playback
- position</var> is available, and, if it is, until it has decoded
+ <li><p>Wait until the user agent has established whether or not the <a href=#media-data>media data</a> for
+ the <var title="">new playback position</var> is available, and, if it is, until it has decoded
enough data to play back that position.</p>
<!-- at which point, it will do the "port the controller state"
thing again -->
</li>
- <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous
- section</a> consists of all the remaining steps of this
- algorithm. (Steps in the <a href=#synchronous-section>synchronous section</a> are
- marked with ⌛.)</li>
+ <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous section</a> consists of all
+ the remaining steps of this algorithm. (Steps in the <a href=#synchronous-section>synchronous section</a> are marked
+ with ⌛.)</li>
<li><p>⌛ Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
false.</li>
- <li id=seekUpdate><p>⌛ <a href=#queue-a-task>Queue a task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
- element.</li>
+ <li id=seekUpdate><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
- <li><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> named <code title=event-media-seeked><a href=#event-media-seeked>seeked</a></code>
- at the element.</li>
+ <li><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-seeked><a href=#event-media-seeked>seeked</a></code> at the element.</li>
- </ol><p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
+ </ol><hr><p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
attribute must return a new 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
@@ -32182,6 +32187,7 @@
</div>
+
<h5 id=media-resources-with-multiple-media-tracks><span class=secno>4.8.10.10 </span>Media resources with multiple media tracks</h5>
<p>A <a href=#media-resource>media resource</a> can have multiple embedded audio
Modified: index
===================================================================
--- index 2012-10-07 23:27:49 UTC (rev 7438)
+++ index 2012-10-08 18:52:16 UTC (rev 7439)
@@ -249,7 +249,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 7 October 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 8 October 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -29282,6 +29282,7 @@
// playback state
attribute double <a href=#dom-media-currenttime title=dom-media-currentTime>currentTime</a>;
+ void <a href=#dom-media-fastseek title=dom-media-fastSeek>fastSeek</a>(double time);
readonly attribute unrestricted double <a href=#dom-media-duration title=dom-media-duration>duration</a>;
readonly attribute <span>Date</span> <a href=#dom-media-startdate title=dom-media-startDate>startDate</a>;
readonly attribute boolean <a href=#dom-media-paused title=dom-media-paused>paused</a>;
@@ -32043,112 +32044,116 @@
<dd>
- <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the
- ranges of the <a href=#media-resource>media resource</a> to which it is possible
- for the user agent to seek.</p>
+ <p>Returns a <code><a href=#timeranges>TimeRanges</a></code> object that represents the ranges of the <a href=#media-resource>media
+ resource</a> to which it is possible for the user agent to seek.</p>
</dd>
+ <dt><var title="">media</var> . <code title=dom-media-fastSeek><a href=#dom-media-fastseek>fastSeek</a></code>( <var title="">time</var> )</dt>
+
+ <dd>
+
+ <p>Seeks to near the given <var title="">time</var> as fast as possible, trading precision for
+ speed. (To seek to a precise time, use the <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute.)</p>
+
+ <p>This does nothing if the media resource has not been loaded.</p>
+
+ </dd>
+
</dl><div class=impl>
- <p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn>
- attribute must initially have the value false.</p>
+ <p>The <dfn id=dom-media-seeking title=dom-media-seeking><code>seeking</code></dfn> attribute must initially have the
+ value false.</p>
- <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. This algorithm
- interacts closely with the <a href=#event-loop>event loop</a> mechanism; in
- particular, it has a <a href=#synchronous-section>synchronous
- section</a> (which is triggered as part of the <a href=#event-loop>event
- loop</a> algorithm). Steps in that section are marked with
- ⌛.</p>
+ <p>The <dfn id=dom-media-fastseek title=dom-media-fastSeek><code>fastSeek()</code></dfn> method must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the time given by the method's argument, with the
+ <i>approximate-for-speed</i> flag set.</p>
- <ol><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 <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these
- steps.</li>
+ <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>, optionally with the
+ <i>approximate-for-speed</i> flag set, it means that the user agent must run the following steps.
+ This algorithm interacts closely with the <a href=#event-loop>event loop</a> mechanism; in particular, it has
+ a <a href=#synchronous-section>synchronous section</a> (which is triggered as part of the <a href=#event-loop>event loop</a>
+ algorithm). Steps in that section are marked with ⌛.</p>
+ <ol><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 <code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code>, abort these steps.</li>
+
<li><p>If the element's <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute is true,
- then another instance of this algorithm is already running. Abort
- that other instance of the algorithm without waiting for the step
- that it is running to complete.</li>
+ then another instance of this algorithm is already running. Abort that other instance of the
+ algorithm without waiting for the step that it is running to complete.</li>
- <li><p>Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL
- attribute to true.</li>
+ <li><p>Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to true.</li>
- <li><p>If the seek was in response to a DOM method call or setting
- of an IDL attribute, then continue the script. The remainder of
- these steps must be run asynchronously. With the exception of the
- steps marked with ⌛, they could be aborted at any time by
- another instance of this algorithm being invoked.</li>
+ <li><p>If the seek was in response to a DOM method call or setting of an IDL attribute, then
+ continue the script. The remainder of these steps must be run asynchronously. With the exception
+ of the steps marked with ⌛, they could be aborted at any time by another instance of this
+ algorithm being invoked.</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 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 the <a href=#earliest-possible-position>earliest possible position</a>, let it be that
- position instead.</li>
+ <li><p>If the <var title="">new playback position</var> is less than the <a href=#earliest-possible-position>earliest possible
+ position</a>, 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 let it
- be the position in one of the ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute that is the
- nearest to the <var title="">new playback position</var>. If two
- positions both satisfy that constraint (i.e. the <var title="">new
- playback position</var> is exactly in the middle between two ranges
- in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute)
- then use the position that is closest to the <a href=#current-playback-position>current playback
- position</a>. If there are no ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute then set the
- <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
- false and abort these steps.</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 let it
+ be the position in one of the ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute that is the nearest to the <var title="">new
+ playback position</var>. If two positions both satisfy that constraint (i.e. the <var title="">new playback position</var> is exactly in the middle between two ranges in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute) then use the position that is closest to
+ the <a href=#current-playback-position>current playback position</a>. If there are no ranges given in the <code title=dom-media-seekable><a href=#dom-media-seekable>seekable</a></code> attribute then set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to false and abort these steps.</li>
- <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> named <code title=event-media-seeking><a href=#event-media-seeking>seeking</a></code>
- at the element.</li>
+ <li>
+ <p>If the <i>approximate-for-speed</i> flag is set, adjust the <var title="">new playback
+ position</var> to a value that will allow for playback to resume promptly. If <var title="">new
+ playback position</var> before this step is before <a href=#current-playback-position>current playback position</a>, then
+ the adjusted <var title="">new playback position</var> must also be before the <a href=#current-playback-position>current
+ playback position</a>. Similarly, if the <var title="">new playback position</var> before
+ this step is after <a href=#current-playback-position>current playback position</a>, then the adjusted <var title="">new
+ playback position</var> must also be after the <a href=#current-playback-position>current playback position</a>.</p>
+
+ <p class=example>For example, the user agent could snap to the nearest key frame, so that it
+ doesn't have to spend time decoding then discarding intermediate frames before resuming
+ playback.</p>
+
+ </li>
+
+ <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-seeking><a href=#event-media-seeking>seeking</a></code> at the element.</li>
+
<li>
- <p>Set the <a href=#current-playback-position>current playback position</a> to the given
- <var title="">new playback position</var>.</p>
+ <p>Set the <a href=#current-playback-position>current playback position</a> to the given <var title="">new playback
+ position</var>.</p>
- <p class=note>If the <a href=#media-element>media element</a> was
- <a href=#potentially-playing>potentially playing</a> immediately before it started
- seeking, but seeking caused its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to change
- to a value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, then a
- <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code> <a href=#fire-waiting-when-waiting>will be fired</a> at the
- element.</p> <!-- also, timeupdate -->
+ <p class=note>If the <a href=#media-element>media element</a> was <a href=#potentially-playing>potentially playing</a>
+ immediately before it started seeking, but seeking caused its <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute to change to a value lower than <code title=dom-media-HAVE_FUTURE_DATA><a href=#dom-media-have_future_data>HAVE_FUTURE_DATA</a></code>, then a <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code> <a href=#fire-waiting-when-waiting>will be
+ fired</a> at the element.</p> <!-- also, timeupdate -->
<!-- also, it will do the "report the controller state" thing -->
- <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does
- not get updated asynchronously, as it returns the <a href=#official-playback-position>official
- playback position</a>, not the <a href=#current-playback-position>current playback
- position</a>.</p>
+ <p class=note>The <code title=dom-media-currentTime><a href=#dom-media-currenttime>currentTime</a></code> attribute does not
+ get updated asynchronously, as it returns the <a href=#official-playback-position>official playback position</a>, not the
+ <a href=#current-playback-position>current playback position</a>.</p>
</li>
- <li><p>Wait until the user agent has established whether or not the
- <a href=#media-data>media data</a> for the <var title="">new playback
- position</var> is available, and, if it is, until it has decoded
+ <li><p>Wait until the user agent has established whether or not the <a href=#media-data>media data</a> for
+ the <var title="">new playback position</var> is available, and, if it is, until it has decoded
enough data to play back that position.</p>
<!-- at which point, it will do the "port the controller state"
thing again -->
</li>
- <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous
- section</a> consists of all the remaining steps of this
- algorithm. (Steps in the <a href=#synchronous-section>synchronous section</a> are
- marked with ⌛.)</li>
+ <li><p><a href=#await-a-stable-state>Await a stable state</a>. The <a href=#synchronous-section>synchronous section</a> consists of all
+ the remaining steps of this algorithm. (Steps in the <a href=#synchronous-section>synchronous section</a> are marked
+ with ⌛.)</li>
<li><p>⌛ Set the <code title=dom-media-seeking><a href=#dom-media-seeking>seeking</a></code> IDL attribute to
false.</li>
- <li id=seekUpdate><p>⌛ <a href=#queue-a-task>Queue a task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the
- element.</li>
+ <li id=seekUpdate><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ named <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> at the element.</li>
- <li><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> named <code title=event-media-seeked><a href=#event-media-seeked>seeked</a></code>
- at the element.</li>
+ <li><p>⌛ <a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-media-seeked><a href=#event-media-seeked>seeked</a></code> at the element.</li>
- </ol><p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
+ </ol><hr><p>The <dfn id=dom-media-seekable title=dom-media-seekable><code>seekable</code></dfn>
attribute must return a new 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
@@ -32182,6 +32187,7 @@
</div>
+
<h5 id=media-resources-with-multiple-media-tracks><span class=secno>4.8.10.10 </span>Media resources with multiple media tracks</h5>
<p>A <a href=#media-resource>media resource</a> can have multiple embedded audio
Modified: source
===================================================================
--- source 2012-10-07 23:27:49 UTC (rev 7438)
+++ source 2012-10-08 18:52:16 UTC (rev 7439)
@@ -31706,6 +31706,7 @@
// playback state
attribute double <span title="dom-media-currentTime">currentTime</span>;
+ void <span title="dom-media-fastSeek">fastSeek</span>(double time);
readonly attribute unrestricted double <span title="dom-media-duration">duration</span>;
readonly attribute <span>Date</span> <span title="dom-media-startDate">startDate</span>;
readonly attribute boolean <span title="dom-media-paused">paused</span>;
@@ -35023,130 +35024,136 @@
<dd>
- <p>Returns a <code>TimeRanges</code> object that represents the
- ranges of the <span>media resource</span> to which it is possible
- for the user agent to seek.</p>
+ <p>Returns a <code>TimeRanges</code> object that represents the ranges of the <span>media
+ resource</span> to which it is possible for the user agent to seek.</p>
</dd>
+ <dt><var title="">media</var> . <code title="dom-media-fastSeek">fastSeek</code>( <var title="">time</var> )</dt>
+
+ <dd>
+
+ <p>Seeks to near the given <var title="">time</var> as fast as possible, trading precision for
+ speed. (To seek to a precise time, use the <code
+ title="dom-media-currentTime">currentTime</code> attribute.)</p>
+
+ <p>This does nothing if the media resource has not been loaded.</p>
+
+ </dd>
+
</dl>
<div class="impl">
- <p>The <dfn title="dom-media-seeking"><code>seeking</code></dfn>
- attribute must initially have the value false.</p>
+ <p>The <dfn title="dom-media-seeking"><code>seeking</code></dfn> attribute must initially have the
+ value false.</p>
- <p>When the user agent is required to <dfn
- title="dom-media-seek">seek</dfn> to a particular <var title="">new
- playback position</var> in the <span>media resource</span>, it means
- that the user agent must run the following steps. This algorithm
- interacts closely with the <span>event loop</span> mechanism; in
- particular, it has a <span>synchronous
- section</span> (which is triggered as part of the <span>event
- loop</span> algorithm). Steps in that section are marked with
- ⌛.</p>
+ <p>The <dfn title="dom-media-fastSeek"><code>fastSeek()</code></dfn> method must <span
+ title="dom-media-seek">seek</span> to the time given by the method's argument, with the
+ <i>approximate-for-speed</i> flag set.</p>
+ <p>When the user agent is required to <dfn title="dom-media-seek">seek</dfn> to a particular <var
+ title="">new playback position</var> in the <span>media resource</span>, optionally with the
+ <i>approximate-for-speed</i> flag set, it means that the user agent must run the following steps.
+ This algorithm interacts closely with the <span>event loop</span> mechanism; in particular, it has
+ a <span>synchronous section</span> (which is triggered as part of the <span>event loop</span>
+ algorithm). Steps in that section are marked with ⌛.</p>
+
<ol>
- <li><p>If the <span>media element</span>'s <code
- title="dom-media-readyState">readyState</code> is <code
- title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, abort these
- steps.</p></li>
+ <li><p>If the <span>media element</span>'s <code title="dom-media-readyState">readyState</code>
+ is <code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, abort these steps.</p></li>
- <li><p>If the element's <code
- title="dom-media-seeking">seeking</code> IDL attribute is true,
- then another instance of this algorithm is already running. Abort
- that other instance of the algorithm without waiting for the step
- that it is running to complete.</p></li>
+ <li><p>If the element's <code title="dom-media-seeking">seeking</code> IDL attribute is true,
+ then another instance of this algorithm is already running. Abort that other instance of the
+ algorithm without waiting for the step that it is running to complete.</p></li>
- <li><p>Set the <code title="dom-media-seeking">seeking</code> IDL
- attribute to true.</p></li>
+ <li><p>Set the <code title="dom-media-seeking">seeking</code> IDL attribute to true.</p></li>
- <li><p>If the seek was in response to a DOM method call or setting
- of an IDL attribute, then continue the script. The remainder of
- these steps must be run asynchronously. With the exception of the
- steps marked with ⌛, they could be aborted at any time by
- another instance of this algorithm being invoked.</p></li>
+ <li><p>If the seek was in response to a DOM method call or setting of an IDL attribute, then
+ continue the script. The remainder of these steps must be run asynchronously. With the exception
+ of the steps marked with ⌛, they could be aborted at any time by another instance of this
+ algorithm being invoked.</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 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 the <var title="">new playback position</var> is less
- than the <span>earliest possible position</span>, let it be that
- position instead.</p></li>
+ <li><p>If the <var title="">new playback position</var> is less than the <span>earliest possible
+ position</span>, let it be that position instead.</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 let it
+ <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 let it
be the position in one of the ranges given in the <code
- title="dom-media-seekable">seekable</code> attribute that is the
- nearest to the <var title="">new playback position</var>. If two
- positions both satisfy that constraint (i.e. the <var title="">new
- playback position</var> is exactly in the middle between two ranges
- in the <code title="dom-media-seekable">seekable</code> attribute)
- then use the position that is closest to the <span>current playback
- position</span>. If there are no ranges given in the <code
- title="dom-media-seekable">seekable</code> attribute then set the
- <code title="dom-media-seeking">seeking</code> IDL attribute to
- false and abort these steps.</p></li>
+ title="dom-media-seekable">seekable</code> attribute that is the nearest to the <var title="">new
+ playback position</var>. If two positions both satisfy that constraint (i.e. the <var
+ title="">new playback position</var> is exactly in the middle between two ranges in the <code
+ title="dom-media-seekable">seekable</code> attribute) then use the position that is closest to
+ the <span>current playback position</span>. If there are no ranges given in the <code
+ title="dom-media-seekable">seekable</code> attribute then set the <code
+ title="dom-media-seeking">seeking</code> IDL attribute to false and abort these steps.</p></li>
- <li><p><span>Queue a task</span> to <span>fire a simple
- event</span> named <code title="event-media-seeking">seeking</code>
- at the element.</p></li>
+ <li>
+ <p>If the <i>approximate-for-speed</i> flag is set, adjust the <var title="">new playback
+ position</var> to a value that will allow for playback to resume promptly. If <var title="">new
+ playback position</var> before this step is before <span>current playback position</span>, then
+ the adjusted <var title="">new playback position</var> must also be before the <span>current
+ playback position</span>. Similarly, if the <var title="">new playback position</var> before
+ this step is after <span>current playback position</span>, then the adjusted <var title="">new
+ playback position</var> must also be after the <span>current playback position</span>.</p>
+
+ <p class="example">For example, the user agent could snap to the nearest key frame, so that it
+ doesn't have to spend time decoding then discarding intermediate frames before resuming
+ playback.</p>
+
+ </li>
+
+ <li><p><span>Queue a task</span> to <span>fire a simple event</span> named <code
+ title="event-media-seeking">seeking</code> at the element.</p></li>
+
<li>
- <p>Set the <span>current playback position</span> to the given
- <var title="">new playback position</var>.</p>
+ <p>Set the <span>current playback position</span> to the given <var title="">new playback
+ position</var>.</p>
- <p class="note">If the <span>media element</span> was
- <span>potentially playing</span> immediately before it started
- seeking, but seeking caused its <code
- title="dom-media-readyState">readyState</code> attribute to change
- to a value lower than <code
- title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>, then a
- <code title="event-media-waiting">waiting</code> <a
- href="#fire-waiting-when-waiting">will be fired</a> at the
- element.</p> <!-- also, timeupdate -->
+ <p class="note">If the <span>media element</span> was <span>potentially playing</span>
+ immediately before it started seeking, but seeking caused its <code
+ title="dom-media-readyState">readyState</code> attribute to change to a value lower than <code
+ title="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code>, then a <code
+ title="event-media-waiting">waiting</code> <a href="#fire-waiting-when-waiting">will be
+ fired</a> at the element.</p> <!-- also, timeupdate -->
<!-- also, it will do the "report the controller state" thing -->
- <p class="note">The <code
- title="dom-media-currentTime">currentTime</code> attribute does
- not get updated asynchronously, as it returns the <span>official
- playback position</span>, not the <span>current playback
- position</span>.</p>
+ <p class="note">The <code title="dom-media-currentTime">currentTime</code> attribute does not
+ get updated asynchronously, as it returns the <span>official playback position</span>, not the
+ <span>current playback position</span>.</p>
</li>
- <li><p>Wait until the user agent has established whether or not the
- <span>media data</span> for the <var title="">new playback
- position</var> is available, and, if it is, until it has decoded
+ <li><p>Wait until the user agent has established whether or not the <span>media data</span> for
+ the <var title="">new playback position</var> is available, and, if it is, until it has decoded
enough data to play back that position.</p>
<!-- at which point, it will do the "port the controller state"
thing again -->
</li>
- <li><p><span>Await a stable state</span>. The <span>synchronous
- section</span> consists of all the remaining steps of this
- algorithm. (Steps in the <span>synchronous section</span> are
- marked with ⌛.)</p></li>
+ <li><p><span>Await a stable state</span>. The <span>synchronous section</span> consists of all
+ the remaining steps of this algorithm. (Steps in the <span>synchronous section</span> are marked
+ with ⌛.)</p></li>
- <li><p>⌛ Set the <code
- title="dom-media-seeking">seeking</code> IDL attribute to
+ <li><p>⌛ Set the <code title="dom-media-seeking">seeking</code> IDL attribute to
false.</p></li>
- <li id="seekUpdate"><p>⌛ <span>Queue a task</span> to
- <span>fire a simple event</span> named <code
- title="event-media-timeupdate">timeupdate</code> at the
- element.</p></li>
+ <li id="seekUpdate"><p>⌛ <span>Queue a task</span> to <span>fire a simple event</span>
+ named <code title="event-media-timeupdate">timeupdate</code> at the element.</p></li>
- <li><p>⌛ <span>Queue a task</span> to <span>fire a simple
- event</span> named <code title="event-media-seeked">seeked</code>
- at the element.</p></li>
+ <li><p>⌛ <span>Queue a task</span> to <span>fire a simple event</span> named <code
+ title="event-media-seeked">seeked</code> at the element.</p></li>
</ol>
+ <hr>
+
<p>The <dfn title="dom-media-seekable"><code>seekable</code></dfn>
attribute must return a new static <span>normalized
<code>TimeRanges</code> object</span> that represents the ranges of
@@ -35183,6 +35190,7 @@
</div>
+
<h5>Media resources with multiple media tracks</h5>
<p>A <span>media resource</span> can have multiple embedded audio
More information about the Commit-Watchers
mailing list