Skip to content

Commit 9d8861e

Browse files
committed
Set media element official playback position immediately upon seeking
This change ensures that the new playback position on the valid media timeline is observable immediately following an assignment to a media element's currentTime attribute. It will also be immediately observable after calling fastSeek(). Fixes #11773
1 parent 305f5a1 commit 9d8861e

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

source

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39080,9 +39080,10 @@ interface <dfn interface>MediaError</dfn> {
3908039080
data-x="dom-media-readyState">readyState</code> is <code
3908139081
data-x="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then it must set the <span>media
3908239082
element</span>'s <span>default playback start position</span> to the new value; otherwise, it must
39083-
set the <span>official playback position</span> to the new value and then <span
39084-
data-x="dom-media-seek">seek</span> to the new value. The new value must be interpreted as being
39085-
in seconds.</p>
39083+
<span data-x="dom-media-seek">seek</span> to the new value. The new value must be interpreted as
39084+
being in seconds. The value returned upon setting must be the new value, not the official playback
39085+
position after it has been modified by the synchronous steps of the <span
39086+
data-x="dom-media-seek">seek</span>.</p>
3908639087
</div>
3908739088

3908839089
<p>If the <span>media resource</span> is a streaming resource, then the user agent might be unable
@@ -40378,11 +40379,6 @@ interface <dfn interface>MediaError</dfn> {
4037840379

4037940380
<li><p>Set the <code data-x="dom-media-seeking">seeking</code> IDL attribute to true.</p></li>
4038040381

40381-
<li><p>If the seek was in response to a DOM method call or setting of an IDL attribute, then
40382-
continue the script. The remainder of these steps must be run <span>in parallel</span>. With the exception
40383-
of the steps marked with &#x231B;, they could be aborted at any time by another instance of this
40384-
algorithm being invoked.</p></li>
40385-
4038640382
<li><p>If the <var>new playback position</var> is later than the end of the <span>media
4038740383
resource</span>, then let it be the end of the <span>media resource</span> instead.</p></li>
4038840384

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

40398+
<li><p>Set the <span>official playback position</span> to the <var>new playback
40399+
position</var>.</p></li>
40400+
40401+
<li><p>If the seek was in response to a DOM method call or setting of an IDL attribute, then
40402+
continue the script. The remainder of these steps must be run <span>in parallel</span>. With the exception
40403+
of the steps marked with &#x231B;, they could be aborted at any time by another instance of this
40404+
algorithm being invoked.</p></li>
40405+
4040240406
<li>
4040340407
<p>If the <i>approximate-for-speed</i> flag is set, adjust the <var>new playback
4040440408
position</var> to a value that will allow for playback to resume promptly. If <var>new

0 commit comments

Comments
 (0)