Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gow] (2) Clarify that playbackRate, and allow it to be 0.0.
git-svn-id: http://svn.whatwg.org/webapps@2494 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 1, 2008
1 parent 00574e7 commit 9073e74
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 26 deletions.
37 changes: 24 additions & 13 deletions index
Expand Up @@ -18035,22 +18035,28 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
</ol><p>The <dfn id=dom-media-defaultplaybackrate title=dom-media-defaultPlaybackRate><code>defaultPlaybackRate</code></dfn>
attribute gives the desired speed at which the <a href=#media-resource>media
resource</a> is to play, as a multiple of its intrinsic
speed. The attribute is mutable, but on setting, if the new value is
0.0, a <code><a href=#not_supported_err>NOT_SUPPORTED_ERR</a></code> exception must be raised
instead of the value being changed. It must initially have the value
1.0.</p>
speed. The attribute is mutable: on getting it must return the last
value it was set to, or 1.0 if it hasn't yet been set; on setting
the attribute must be set to the new value.</p>

<p>The <dfn id=dom-media-playbackrate title=dom-media-playbackRate><code>playbackRate</code></dfn>
attribute gives the speed at which the <a href=#media-resource>media resource</a>
plays, as a multiple of its intrinsic speed. If it is not equal to
the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>,
then the implication is that the user is using a feature such as
fast forward or slow motion playback. The attribute is mutable, but
on setting, if the new value is 0.0, a
<code><a href=#not_supported_err>NOT_SUPPORTED_ERR</a></code> exception must be raised instead of
the value being changed. Otherwise, the playback must change speed
(if the element is <a href=#potentially-playing>potentially playing</a>). It must initially
have the value 1.0.</p>
fast forward or slow motion playback. The attribute is mutable: on
getting it must return the last value it was set to, or 1.0 if it
hasn't yet been set; on setting the attribute must be set to the new
value, and the playback must change speed (if the element is
<a href=#potentially-playing>potentially playing</a>).</p>

<p>The "play" function in a user agent's interface must set the
<code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> attribute
to the value of the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code>
attribute before invoking the <code title=dom-media-play><a href=#dom-media-play>play()</a></code> method's steps. Features such
as fast-forward or rewind must be implemented by only changing the
<code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code>
attribute.</p>

<p id=rateUpdate>When the <code title=dom-media-defaultPlaybackRate><a href=#dom-media-defaultplaybackrate>defaultPlaybackRate</a></code> or
<code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> attributes
Expand Down Expand Up @@ -18150,16 +18156,21 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
user agent may apply pitch adjustments to the audio as necessary to
render it faithfully.</p>

<p>The <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> can
be 0.0, in which case the <a href=#current-playback-position>current playback position</a>
doesn't move, despite playback not being paused (<code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> doesn't become true, and the
<code title=event-pause><a href=#event-pause>pause</a></code> event doesn't fire).</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>
(e.g. because the element is paused, or because the end of the clip
has been reached, or because its <code title=dom-media-playbackRate><a href=#dom-media-playbackrate>playbackRate</a></code> is 0.0) 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
Expand Down
41 changes: 28 additions & 13 deletions source
Expand Up @@ -19522,10 +19522,9 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
title="dom-media-defaultPlaybackRate"><code>defaultPlaybackRate</code></dfn>
attribute gives the desired speed at which the <span>media
resource</span> is to play, as a multiple of its intrinsic
speed. The attribute is mutable, but on setting, if the new value is
0.0, a <code>NOT_SUPPORTED_ERR</code> exception must be raised
instead of the value being changed. It must initially have the value
1.0.</p>
speed. The attribute is mutable: on getting it must return the last
value it was set to, or 1.0 if it hasn't yet been set; on setting
the attribute must be set to the new value.</p>

<p>The <dfn
title="dom-media-playbackRate"><code>playbackRate</code></dfn>
Expand All @@ -19534,12 +19533,21 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
the <code
title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>,
then the implication is that the user is using a feature such as
fast forward or slow motion playback. The attribute is mutable, but
on setting, if the new value is 0.0, a
<code>NOT_SUPPORTED_ERR</code> exception must be raised instead of
the value being changed. Otherwise, the playback must change speed
(if the element is <span>potentially playing</span>). It must initially
have the value 1.0.</p>
fast forward or slow motion playback. The attribute is mutable: on
getting it must return the last value it was set to, or 1.0 if it
hasn't yet been set; on setting the attribute must be set to the new
value, and the playback must change speed (if the element is
<span>potentially playing</span>).</p>

<p>The "play" function in a user agent's interface must set the
<code title="dom-media-playbackRate">playbackRate</code> attribute
to the value of the <code
title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code>
attribute before invoking the <code
title="dom-media-play">play()</code> method's steps. Features such
as fast-forward or rewind must be implemented by only changing the
<code title="dom-media-playbackRate">playbackRate</code>
attribute.</p>

<p id="rateUpdate">When the <code
title="dom-media-defaultPlaybackRate">defaultPlaybackRate</code> or
Expand Down Expand Up @@ -19668,16 +19676,23 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {
user agent may apply pitch adjustments to the audio as necessary to
render it faithfully.</p>

<p>The <code title="dom-media-playbackRate">playbackRate</code> can
be 0.0, in which case the <span>current playback position</span>
doesn't move, despite playback not being paused (<code
title="dom-media-paused">paused</code> doesn't become true, and the
<code title="event-pause">pause</code> event doesn't fire).</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>
(e.g. because the element is paused, or because the end of the clip
has been reached, or because its <code
title="dom-media-playbackRate">playbackRate</code> is 0.0) may the
element be <span>garbage collected</span><!-- XXX xref -->.</p>

<hr>

Expand Down

0 comments on commit 9073e74

Please sign in to comment.