[html5] r2329 - [gow] (2) How to handle a moving window of backbuffer; how to handle audio playb [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Oct 13 15:23:42 PDT 2008
Author: ianh
Date: 2008-10-13 15:23:42 -0700 (Mon, 13 Oct 2008)
New Revision: 2329
Modified:
index
source
Log:
[gow] (2) How to handle a moving window of backbuffer; how to handle audio playback in non-1.0 playback rates.
Modified: index
===================================================================
--- index 2008-10-13 21:08:59 UTC (rev 2328)
+++ index 2008-10-13 22:23:42 UTC (rev 2329)
@@ -17298,6 +17298,13 @@
must <a href=#dom-media-seek title=dom-media-seek>seek</a> to the new value
(which might raise an exception).</p>
+ <p>If the <a href=#media-resource>media resource</a> is a streaming resource, then
+ the user agent might be unable to obtain certain parts of the
+ 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>
+
<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
@@ -17307,8 +17314,9 @@
specify a default start position.</p>
<p>The <dfn id=effective-start><var>effective start</var></dfn> is the smaller of the
- <code title=dom-media-start><a href=#dom-media-start>start</a></code> DOM attribute and the end
- of the <a href=#media-resource>media resource</a>.</p>
+ <code title=dom-media-start><a href=#dom-media-start>start</a></code> DOM attribute, the
+ <var><a href=#earliest-possible-position>earliest possible position</a></var>, and the end of the <a href=#media-resource>media
+ resource</a>.</p>
<p>The <dfn id=attr-media-loopstart title=attr-media-loopstart><code>loopstart</code></dfn> content
attribute gives the offset into the <a href=#media-resource>media resource</a> at
@@ -17317,8 +17325,9 @@
attribute is the value of the <code title=dom-media-start><a href=#dom-media-start>start</a></code> DOM attribute.</p>
<p>The <dfn id=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
- and the end of the <a href=#media-resource>media resource</a>.</p>
+ the <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code> DOM
+ attribute, the <var><a href=#earliest-possible-position>earliest possible position</a></var>, and the end of
+ the <a href=#media-resource>media resource</a>.</p>
<p>The <dfn id=attr-media-loopend title=attr-media-loopend><code>loopend</code></dfn>
content attribute gives an offset into the <a href=#media-resource>media
@@ -17328,18 +17337,20 @@
attribute.</p>
<p>The <dfn id=effective-loop-end><var>effective loop end</var></dfn> is the greater of
- the <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, and <code title=dom-media-loopEnd><a href=#dom-media-loopend>loopEnd</a></code> DOM attributes, 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=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>
<p>The <dfn id=attr-media-end title=attr-media-end><code>end</code></dfn> content
attribute gives an offset into the <a href=#media-resource>media resource</a> at
which playback is to end. The default value is infinity.</p>
<p>The <dfn id=effective-end><var>effective end</var></dfn> is the greater of the
- <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, and <code title=dom-media-loopEnd><a href=#dom-media-loopend>end</a></code> DOM attributes, 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>
+ <code title=dom-media-start><a href=#dom-media-start>start</a></code>, <code title=dom-media-loopStart><a href=#dom-media-loopstart>loopStart</a></code>, and <code title=dom-media-loopEnd><a href=#dom-media-loopend>end</a></code> DOM attributes and the
+ <var><a href=#earliest-possible-position>earliest possible position</a></var>, except if that is greater
+ than the end of the <a href=#media-resource>media resource</a>, in which case
+ that's its value.</p>
<p>The <code title=attr-media-start><a href=#attr-media-start>start</a></code>, <code title=attr-media-loopstart><a href=#attr-media-loopstart>loopstart</a></code>, <code title=attr-media-loopend><a href=#attr-media-loopend>loopend</a></code>, and <code title=attr-media-end><a href=#attr-media-end>end</a></code> attributes must, if specified,
contain <span title="value time offset">value time
@@ -17366,7 +17377,8 @@
<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), the user agent must apply the following
+ of the DOM attribute), or if the <var><a href=#earliest-possible-position>earliest possible
+ position</a></var> changes, the user agent must apply the following
steps:</p>
<ol><li><p>If the <code title=dom-media-playCount><a href=#dom-media-playcount>playCount</a></code>
@@ -17767,9 +17779,7 @@
<a href=#potentially-playing>potentially 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>
+ time per unit time of wall clock time.</p>
<p class=note>This specification doesn't define how the user agent
achieves the appropriate playback rate — depending on the
@@ -17780,6 +17790,29 @@
playback rate) the client doesn't actually have to drop or
interpolate any frames.</p>
+ <p>If the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code>
+ is positive and is a rate at which audio can be played back, and if
+ the audio channels are not <code title=dom-media-muted><a href=#dom-media-muted>muted</a></code>, then the audio component of
+ the <a href=#media-resource>media resource</a> should be played synchronised with
+ the <a href=#current-playback-position>current playback position</a>. If this rate is not 1.0,
+ the user agent may apply pitch adjustments to the audio as necessary
+ to render it faithfully. When the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> is negative
+ (playback is backwards), the corresponding audio must not play. When
+ the <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> is so
+ low or so high that the user agent cannot play audio usefully, the
+ corresponding audio must not play.</p>
+
+ <p><a href=#media-element title="media element">Media elements</a> that are
+ <a href=#potentially-playing>potentially playing</a> while not <span>in a
+ <code>Document</code></span><!-- XXX xref --> must not play any
+ video, but should play any audio component. Media elements must not
+ stop playing just because all references to them have been removed;
+ only once a media element to which no references exist has reached a
+ 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>
+
<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
@@ -17855,17 +17888,6 @@
value other than <a href=#dom-media-empty title=dom-media-EMPTY>EMPTY</a> then the
user agent must act as if the <code title=dom-media-pause><a href=#dom-media-pause>pause()</a></code> method had been invoked.</p>
- <p><a href=#media-element title="media element">Media elements</a> that are
- <a href=#potentially-playing>potentially playing</a> while not <span>in a
- <code>Document</code></span><!-- XXX xref --> must not play any
- video, but should play any audio component. Media elements must not
- stop playing just because all references to them have been removed;
- only once a media element to which no references exist has reached a
- 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>
-
<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
Modified: source
===================================================================
--- source 2008-10-13 21:08:59 UTC (rev 2328)
+++ source 2008-10-13 22:23:42 UTC (rev 2329)
@@ -18547,6 +18547,13 @@
must <span title="dom-media-seek">seek</span> to the new value
(which might raise an exception).</p>
+ <p>If the <span>media resource</span> is a streaming resource, then
+ the user agent might be unable to obtain certain parts of the
+ resource after it has expired from its buffer. The
+ <dfn><var>earliest possible position</var></dfn> is the earliest
+ position in the stream that the user agent can ever obtain
+ again.</p>
+
<p>The <dfn title="attr-media-start"><code>start</code></dfn>
content attribute gives the offset into the <span>media
resource</span> at which playback is to begin. The default value is
@@ -18556,8 +18563,9 @@
specify a default start position.</p>
<p>The <dfn><var>effective start</var></dfn> is the smaller of the
- <code title="dom-media-start">start</code> DOM attribute and the end
- of the <span>media resource</span>.</p>
+ <code title="dom-media-start">start</code> DOM attribute, the
+ <var>earliest possible position</var>, and the end of the <span>media
+ resource</span>.</p>
<p>The <dfn
title="attr-media-loopstart"><code>loopstart</code></dfn> content
@@ -18568,8 +18576,9 @@
title="dom-media-start">start</code> DOM attribute.</p>
<p>The <dfn><var>effective loop start</var></dfn> is the smaller of
- the <code title="dom-media-loopStart">loopStart</code> DOM attribute
- and the end of the <span>media resource</span>.</p>
+ the <code title="dom-media-loopStart">loopStart</code> DOM
+ attribute, the <var>earliest possible position</var>, and the end of
+ the <span>media resource</span>.</p>
<p>The <dfn title="attr-media-loopend"><code>loopend</code></dfn>
content attribute gives an offset into the <span>media
@@ -18583,9 +18592,10 @@
<p>The <dfn><var>effective loop end</var></dfn> is the greater of
the <code title="dom-media-start">start</code>, <code
title="dom-media-loopStart">loopStart</code>, and <code
- title="dom-media-loopEnd">loopEnd</code> DOM attributes, except if
- that is greater than the end of the <span>media resource</span>, in
- which case that's its value.</p>
+ title="dom-media-loopEnd">loopEnd</code> DOM attributes and the
+ <var>earliest possible position</var>, except if that is greater
+ than the end of the <span>media resource</span>, in which case
+ that's its value.</p>
<p>The <dfn title="attr-media-end"><code>end</code></dfn> content
attribute gives an offset into the <span>media resource</span> at
@@ -18594,9 +18604,10 @@
<p>The <dfn><var>effective end</var></dfn> is the greater of the
<code title="dom-media-start">start</code>, <code
title="dom-media-loopStart">loopStart</code>, and <code
- title="dom-media-loopEnd">end</code> DOM attributes, except if that
- is greater than the end of the <span>media resource</span>, in which
- case that's its value.</p>
+ title="dom-media-loopEnd">end</code> DOM attributes and the
+ <var>earliest possible position</var>, except if that is greater
+ than the end of the <span>media resource</span>, in which case
+ that's its value.</p>
<p>The <code title="attr-media-start">start</code>, <code
title="attr-media-loopstart">loopstart</code>, <code
@@ -18641,7 +18652,8 @@
title="dom-media-currentLoop">currentLoop</code> DOM attributes
change value (either through content attribute mutations reflecting
into the DOM attribute, if applicable, or through direct mutations
- of the DOM attribute), the user agent must apply the following
+ of the DOM attribute), or if the <var>earliest possible
+ position</var> changes, the user agent must apply the following
steps:</p>
<ol>
@@ -19167,9 +19179,7 @@
<span>active document</span>, its <span>current playback
position</span> must increase monotonically at <code
title="dom-media-playbackRate">playbackRate</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
- <span>media resource</span>.</p>
+ time per unit time of wall clock time.</p>
<p class="note">This specification doesn't define how the user agent
achieves the appropriate playback rate — depending on the
@@ -19180,6 +19190,31 @@
playback rate) the client doesn't actually have to drop or
interpolate any frames.</p>
+ <p>If the <code title="dom-media-playbackRate">playbackRate</code>
+ is positive and is a rate at which audio can be played back, and if
+ the audio channels are not <code
+ title="dom-media-muted">muted</code>, then the audio component of
+ the <span>media resource</span> should be played synchronised with
+ the <span>current playback position</span>. If this rate is not 1.0,
+ the user agent may apply pitch adjustments to the audio as necessary
+ to render it faithfully. When the <code
+ title="dom-media-playbackRate">playbackRate</code> is negative
+ (playback is backwards), the corresponding audio must not play. When
+ the <code title="dom-media-playbackRate">playbackRate</code> is so
+ low or so high that the user agent cannot play audio usefully, the
+ corresponding audio must not play.</p>
+
+ <p><span title="media element">Media elements</span> that are
+ <span>potentially playing</span> while not <span>in a
+ <code>Document</code></span><!-- XXX xref --> must not play any
+ video, but should play any audio component. Media elements must not
+ stop playing just because all references to them have been removed;
+ only once a media element to which no references exist has reached a
+ 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>
+
<hr>
<p>When the <span>current playback position</span> of a <span>media
@@ -19268,17 +19303,6 @@
user agent must act as if the <code
title="dom-media-pause">pause()</code> method had been invoked.</p>
- <p><span title="media element">Media elements</span> that are
- <span>potentially playing</span> while not <span>in a
- <code>Document</code></span><!-- XXX xref --> must not play any
- video, but should play any audio component. Media elements must not
- stop playing just because all references to them have been removed;
- only once a media element to which no references exist has reached a
- 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>
-
<p class="note">If the <span>media element</span>'s
<code>Document</code> stops being an active document, then the
playback will <a href="#media-playback">stop</a> until the document
More information about the Commit-Watchers
mailing list