Skip to content

Commit

Permalink
Reject pending play promises when playback ends (fixes #1646). (#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
mounirlamouri authored and foolip committed Aug 12, 2016
1 parent 14bf441 commit 4fdbaa4
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -33096,12 +33096,26 @@ interface <dfn>HTMLMediaElement</dfn> : <span>HTMLElement</span> {
<li><p><span>Queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-timeupdate">timeupdate</code> at the <span>media element</span>.</p></li>

<li><p><span>Queue a task</span> that, if the <span>media element</span> has still <span>ended
playback</span>, and the <span>direction of playback</span> is still forwards, and <span
data-x="dom-media-paused">paused</span> is false, changes <span
data-x="dom-media-paused">paused</span> to true and <span data-x="fire a simple event">fires a
simple event</span> named <code data-x="event-media-pause">pause</code> at the <span>media
element</span>.</p></li>
<li>

<p><span>Queue a task</span> that, if the <span>media element</span> has still <span>ended
playback</span>, and the <span>direction of playback</span> is still forwards, and <span
data-x="dom-media-paused">paused</span> is false, runs the following substeps:</p>

<ol>

<li><p>Set the <code data-x="dom-media-paused">paused</code> attribute to true.</p></li>

<li><p><span data-x="fire a simple event">Fire a simple event</span> named <code
data-x="event-media-pause">pause</code> at the <span>media element</span>.</p></li>

<li><p><span>Take pending play promises</span> and <span>reject pending play promises</span>
with the result and an <span>"<code>AbortError</code>"</span>
<code>DOMException</code>.</p></li>

</ol>

</li>

<li><p><span>Queue a task</span> to <span>fire a simple event</span> named <code
data-x="event-media-ended">ended</code> at the <span>media element</span>.</p></li>
Expand Down

0 comments on commit 4fdbaa4

Please sign in to comment.