Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -39080,9 +39080,10 @@ interface <dfn interface>MediaError</dfn> {
data-x="dom-media-readyState">readyState</code> is <code
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then it must set the <span>media
element</span>'s <span>default playback start position</span> to the new value; otherwise, it must
set the <span>official playback position</span> to the new value and then <span
data-x="dom-media-seek">seek</span> to the new value. The new value must be interpreted as being
in seconds.</p>
<span data-x="dom-media-seek">seek</span> to the new value. The new value must be interpreted as
being in seconds. The value returned upon setting must be the new value, not the official playback
position after it has been modified by the synchronous steps of the <span
data-x="dom-media-seek">seek</span>.</p>
</div>

<p>If the <span>media resource</span> is a streaming resource, then the user agent might be unable
Expand Down Expand Up @@ -39611,8 +39612,9 @@ interface <dfn interface>MediaError</dfn> {

<li><p>The <span>direction of playback</span> is forwards, and</p></li>

<li><p>The <span>media element</span> does not have a <code
data-x="attr-media-loop">loop</code> attribute specified.</p></li>
<li><p>The <span>media element</span> did not have a <code
data-x="attr-media-loop">loop</code> attribute specified the last time that playback
<a href="#reaches-the-end">reached the end of the media resource</a>.</p></li>
</ul>

<p>Or:</p>
Expand Down Expand Up @@ -39689,13 +39691,20 @@ interface <dfn interface>MediaError</dfn> {
agent must follow these steps:</p>

<ol>
<li><p>If the <span>media element</span> has a <code data-x="attr-media-loop">loop</code>
attribute specified, then <span data-x="dom-media-seek">seek</span> to the <span>earliest
possible position</span> of the <span>media resource</span> and return.</p></li>
<!-- v2/v3: We should fire a 'looping' event here to explain why this immediately fires a
'playing' event, otherwise the 'playing' event that fires from the readyState going from
HAVE_CURRENT_DATA back to HAVE_FUTURE_DATA will seem inexplicable (since the normally matching
'ended' given below event doesn't fire in the loop case). -->
<li>
<p>If the <span>media element</span> has a <code data-x="attr-media-loop">loop</code>
attribute specified, then:</p>

<ol>
<li><p>If <span data-x="dom-media-paused">paused</span> is false, <span data-x="dom-media-seek">
seek</span> to the <span>earliest possible position</span> of the <span>media resource</span>
and return.</p></li>
<!-- v2/v3: We should fire a 'looping' event here to explain why this immediately fires a
'playing' event, otherwise the 'playing' event that fires from the readyState going from
HAVE_CURRENT_DATA back to HAVE_FUTURE_DATA will seem inexplicable (since the normally matching
'ended' given below event doesn't fire in the loop case). -->
</ol>
</li>

<li><p>As defined above, the <code data-x="dom-media-ended">ended</code> IDL attribute starts
returning true once the <span>event loop</span> returns to <a href="#step1">step 1</a>.</p></li>
Expand Down Expand Up @@ -39944,7 +39953,10 @@ interface <dfn interface>MediaError</dfn> {
data-x="dom-media-readyState">readyState</code> attribute has the value <code
data-x="dom-media-HAVE_FUTURE_DATA">HAVE_FUTURE_DATA</code> or <code
data-x="dom-media-HAVE_ENOUGH_DATA">HAVE_ENOUGH_DATA</code>: <span>notify about playing</span>
for the element.</p>
for the element, and if playback was paused and loop was specified the last time playback <a
href="#reaches-the-end">reached the end</a> (i.e. when the <span>official playback
position</span> is still the <span>duration</span> at this step), seek to the <span>earliest
possible position</span>.</p>
</li>
</ol>
</li>
Expand Down Expand Up @@ -40378,11 +40390,6 @@ interface <dfn interface>MediaError</dfn> {

<li><p>Set the <code data-x="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 <span>in parallel</span>. With the exception
of the steps marked with &#x231B;, they could be aborted at any time by another instance of this
algorithm being invoked.</p></li>

<li><p>If the <var>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>

Expand All @@ -40399,6 +40406,14 @@ interface <dfn interface>MediaError</dfn> {
data-x="dom-media-seekable">seekable</code> attribute, then set the <code
data-x="dom-media-seeking">seeking</code> IDL attribute to false and return.</p></li>

<li><p>Set the <span>official playback position</span> to the <var>new playback
position</var>.</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 <span>in parallel</span>. With the exception
of the steps marked with &#x231B;, they could be aborted at any time by another instance of this
algorithm being invoked.</p></li>

<li>
<p>If the <i>approximate-for-speed</i> flag is set, adjust the <var>new playback
position</var> to a value that will allow for playback to resume promptly. If <var>new
Expand Down