Skip to content

Commit

Permalink
[giow] (0) Fix a few places where a media element could get out of sy…
Browse files Browse the repository at this point in the history
…nc with its controller, and re-enable media fragments for loading resources with a controller.

git-svn-id: http://svn.whatwg.org/webapps@6025 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 22, 2011
1 parent 2116c7e commit 4df4cf0
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 28 deletions.
55 changes: 46 additions & 9 deletions complete.html
Expand Up @@ -239,7 +239,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 21 April 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 22 April 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -26993,14 +26993,16 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the

</li>

<li><p>Let <var title="">jumped</var> be false.</li>

<li>

<p>If either the <a href=#media-resource>media resource</a> or the address of
the <var title="">current media resource</var> indicate a
particular start time, then set the <a href=#initial-playback-position>initial playback
position</a> to that time and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time. Ignore any
resulting exceptions (if the position is out of range, it is
effectively ignored).</p>
position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
(if the position is out of range, it is effectively
ignored).</p>

<p class=example>For example, with media formats that
support the <cite>Media Fragments URI</cite> fragment
Expand All @@ -27019,8 +27021,26 @@ <h5 id=loading-the-media-resource><span class=secno>4.8.10.5 </span>Loading the
object.</li>

<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
to speed with its new media controller</a>.</p>
media controller</a>, then: if <var title="">jumped</var> is
true and the <a href=#initial-playback-position>initial playback position</a>, relative
to the <a href=#current-media-controller>current media controller</a>'s timeline, is
greater than the <a href=#current-media-controller>current media controller</a>'s
<a href=#media-controller-position>media controller position</a>, then <a href=#seek-the-media-controller>seek the
media controller</a> to the <a href=#media-element>media element</a>'s
<a href=#initial-playback-position>initial playback position</a>, relative to the
<a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
<a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
element</a> to the <a href=#media-controller-position>media controller position</a>,
relative to the <a href=#media-element>media element</a>'s timeline,
discarding any resulting exceptions.</li> <!-- i.e. "bring
the media element up to speed with its new media controller"
--> <!-- we do this because otherwise the fragment identifier
initial position is lost. Basically this means that if you are
attached to a media controller when you load your resource, and
you have a fragment identifier with a start time, you'll jump
the media controller to that time if it's not already past it.
(So if there are several, you'll jump the media controller to
the furthest one in the timeline.) -->
<!--CONTROLLER-->

<li>
Expand Down Expand Up @@ -28144,8 +28164,13 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the
<li>

<p>If the <a href=#ended-playback title="ended playback">playback has ended</a>
and the <a href=#direction-of-playback>direction of playback</a> is forwards, <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest possible
position</a> of the <a href=#media-resource>media resource</a>.</p>
and the <a href=#direction-of-playback>direction of playback</a> is forwards,
<!--CONTROLLER-->
and the <a href=#media-element>media element</a> does not have a <a href=#current-media-controller>current
media controller</a>,
<!--CONTROLLER-->
<a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest
possible position</a> of the <a href=#media-resource>media resource</a>.</p>

<p class=note>This <a href=#seekUpdate>will cause</a> the user
agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
Expand All @@ -28155,6 +28180,12 @@ <h5 id=playing-the-media-resource><span class=secno>4.8.10.8 </span>Playing the

</li>

<!--CONTROLLER-->
<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
to speed with its new media controller</a>.</p>
<!--CONTROLLER-->

<li>

<p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, run
Expand Down Expand Up @@ -28600,7 +28631,13 @@ <h5 id=seeking><span class=secno>4.8.10.9 </span>Seeking</h5>
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>
fashion (so that the relevant events fire).
<!--CONTROLLER-->
If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
controller</a>, then the user agent must <a href=#seek-the-media-controller>seek the media
controller</a> appropriately instead.
<!--CONTROLLER-->
</p>

</div>

Expand Down
55 changes: 46 additions & 9 deletions index
Expand Up @@ -243,7 +243,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><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 &mdash; Last Updated 21 April 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 22 April 2011</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -27005,14 +27005,16 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

</li>

<li><p>Let <var title="">jumped</var> be false.</li>

<li>

<p>If either the <a href=#media-resource>media resource</a> or the address of
the <var title="">current media resource</var> indicate a
particular start time, then set the <a href=#initial-playback-position>initial playback
position</a> to that time and then <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time. Ignore any
resulting exceptions (if the position is out of range, it is
effectively ignored).</p>
position</a> to that time, <a href=#dom-media-seek title=dom-media-seek>seek</a> to that time, and let <var title="">jumped</var> be true. Ignore any resulting exceptions
(if the position is out of range, it is effectively
ignored).</p>

<p class=example>For example, with media formats that
support the <cite>Media Fragments URI</cite> fragment
Expand All @@ -27031,8 +27033,26 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
object.</li>

<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
to speed with its new media controller</a>.</p>
media controller</a>, then: if <var title="">jumped</var> is
true and the <a href=#initial-playback-position>initial playback position</a>, relative
to the <a href=#current-media-controller>current media controller</a>'s timeline, is
greater than the <a href=#current-media-controller>current media controller</a>'s
<a href=#media-controller-position>media controller position</a>, then <a href=#seek-the-media-controller>seek the
media controller</a> to the <a href=#media-element>media element</a>'s
<a href=#initial-playback-position>initial playback position</a>, relative to the
<a href=#current-media-controller>current media controller</a>'s timeline; otherwise,
<a href=#dom-media-seek title=dom-media-seek>seek</a> the <a href=#media-element>media
element</a> to the <a href=#media-controller-position>media controller position</a>,
relative to the <a href=#media-element>media element</a>'s timeline,
discarding any resulting exceptions.</li> <!-- i.e. "bring
the media element up to speed with its new media controller"
--> <!-- we do this because otherwise the fragment identifier
initial position is lost. Basically this means that if you are
attached to a media controller when you load your resource, and
you have a fragment identifier with a start time, you'll jump
the media controller to that time if it's not already past it.
(So if there are several, you'll jump the media controller to
the furthest one in the timeline.) -->
<!--CONTROLLER-->

<li>
Expand Down Expand Up @@ -28156,8 +28176,13 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
<li>

<p>If the <a href=#ended-playback title="ended playback">playback has ended</a>
and the <a href=#direction-of-playback>direction of playback</a> is forwards, <a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest possible
position</a> of the <a href=#media-resource>media resource</a>.</p>
and the <a href=#direction-of-playback>direction of playback</a> is forwards,
<!--CONTROLLER-->
and the <a href=#media-element>media element</a> does not have a <a href=#current-media-controller>current
media controller</a>,
<!--CONTROLLER-->
<a href=#dom-media-seek title=dom-media-seek>seek</a> to the <a href=#earliest-possible-position>earliest
possible position</a> of the <a href=#media-resource>media resource</a>.</p>

<p class=note>This <a href=#seekUpdate>will cause</a> the user
agent to <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
Expand All @@ -28167,6 +28192,12 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael

</li>

<!--CONTROLLER-->
<li><p>If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current
media controller</a>, then <a href=#bring-the-media-element-up-to-speed-with-its-new-media-controller>bring the media element up
to speed with its new media controller</a>.</p>
<!--CONTROLLER-->

<li>

<p>If the <a href=#media-element>media element</a>'s <code title=dom-media-paused><a href=#dom-media-paused>paused</a></code> attribute is true, run
Expand Down Expand Up @@ -28612,7 +28643,13 @@ interface <dfn id=htmlaudioelement>HTMLAudioElement</dfn> : <a href=#htmlmediael
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>
fashion (so that the relevant events fire).
<!--CONTROLLER-->
If the <a href=#media-element>media element</a> has a <a href=#current-media-controller>current media
controller</a>, then the user agent must <a href=#seek-the-media-controller>seek the media
controller</a> appropriately instead.
<!--CONTROLLER-->
</p>

</div>

Expand Down
57 changes: 47 additions & 10 deletions source
Expand Up @@ -29266,15 +29266,18 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>

</li>

<li><p>Let <var title="">jumped</var> be false.</p></li>

<li>

<p>If either the <span>media resource</span> or the address of
the <var title="">current media resource</var> indicate a
particular start time, then set the <span>initial playback
position</span> to that time and then <span
title="dom-media-seek">seek</span> to that time. Ignore any
resulting exceptions (if the position is out of range, it is
effectively ignored).</p>
position</span> to that time, <span
title="dom-media-seek">seek</span> to that time, and let <var
title="">jumped</var> be true. Ignore any resulting exceptions
(if the position is out of range, it is effectively
ignored).</p>

<p class="example">For example, with media formats that
support the <cite>Media Fragments URI</cite> fragment
Expand All @@ -29296,8 +29299,26 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
object.</p></li>

<li><p>If the <span>media element</span> has a <span>current
media controller</span>, then <span>bring the media element up
to speed with its new media controller</span>.</p>
media controller</span>, then: if <var title="">jumped</var> is
true and the <span>initial playback position</span>, relative
to the <span>current media controller</span>'s timeline, is
greater than the <span>current media controller</span>'s
<span>media controller position</span>, then <span>seek the
media controller</span> to the <span>media element</span>'s
<span>initial playback position</span>, relative to the
<span>current media controller</span>'s timeline; otherwise,
<span title="dom-media-seek">seek</span> the <span>media
element</span> to the <span>media controller position</span>,
relative to the <span>media element</span>'s timeline,
discarding any resulting exceptions.</p></li> <!-- i.e. "bring
the media element up to speed with its new media controller"
--> <!-- we do this because otherwise the fragment identifier
initial position is lost. Basically this means that if you are
attached to a media controller when you load your resource, and
you have a fragment identifier with a start time, you'll jump
the media controller to that time if it's not already past it.
(So if there are several, you'll jump the media controller to
the furthest one in the timeline.) -->
<!--START w3c-html--><!--CONTROLLER-->

<li>
Expand Down Expand Up @@ -30630,9 +30651,13 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
<li>

<p>If the <span title="ended playback">playback has ended</span>
and the <span>direction of playback</span> is forwards, <span
title="dom-media-seek">seek</span> to the <span>earliest possible
position</span> of the <span>media resource</span>.</p>
and the <span>direction of playback</span> is forwards,
<!--END w3c-html--><!--CONTROLLER-->
and the <span>media element</span> does not have a <span>current
media controller</span>,
<!--START w3c-html--><!--CONTROLLER-->
<span title="dom-media-seek">seek</span> to the <span>earliest
possible position</span> of the <span>media resource</span>.</p>

<p class="note">This <a href="#seekUpdate">will cause</a> the user
agent to <span>queue a task</span> to <span>fire a simple
Expand All @@ -30643,6 +30668,12 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>

</li>

<!--END w3c-html--><!--CONTROLLER-->
<li><p>If the <span>media element</span> has a <span>current
media controller</span>, then <span>bring the media element up
to speed with its new media controller</span>.</p>
<!--START w3c-html--><!--CONTROLLER-->

<li>

<p>If the <span>media element</span>'s <code
Expand Down Expand Up @@ -31173,7 +31204,13 @@ interface <dfn>HTMLAudioElement</dfn> : <span>HTMLMediaElement</span> {};</pre>
the user agent must act as if the algorithm for <span
title="dom-media-seek">seeking</span> was used whenever the
<span>current playback position</span> changes in a discontinuous
fashion (so that the relevant events fire).</p>
fashion (so that the relevant events fire).
<!--END w3c-html--><!--CONTROLLER-->
If the <span>media element</span> has a <span>current media
controller</span>, then the user agent must <span>seek the media
controller</span> appropriately instead.
<!--START w3c-html--><!--CONTROLLER-->
</p>

</div>

Expand Down

0 comments on commit 4df4cf0

Please sign in to comment.