Skip to content

Commit

Permalink
Queue a task before resolving the promise.
Browse files Browse the repository at this point in the history
We use the interaction source to make sure promise resolution and events are correctly ordered.
  • Loading branch information
youennf committed Sep 26, 2024
1 parent 0f6e693 commit ee415cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,10 @@ interface MediaSession {
<var>captureKind</var>
and <var>active</var>.
</li>
<li>Resolve <var>p</var> with <code>undefined</code>.</li>
<li>
<a>Queue a task</a> using the [=user interaction task source=]
to resolve <var>p</var> with <code>undefined</code>.
</li>
<li>
If <var>applyPausePolicy</var> is <code>true</code>, run the following
substeps:
Expand All @@ -1026,8 +1029,8 @@ interface MediaSession {
<li>
For each {{MediaStreamTrack}} whose source is of type
<var>captureKind</var>,
<a>queue a task</a> to [$set a track's muted state$] to
<var>newMutedState</var>.
<a>queue a task</a>using the [=user interaction task source=]
to [$set a track's muted state$] to <var>newMutedState</var>.
</li>
</ol>
</li>
Expand Down

0 comments on commit ee415cf

Please sign in to comment.