Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MediaPositionState WebIDL #304

Merged
merged 5 commits into from
Jan 22, 2024
Merged
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
24 changes: 11 additions & 13 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -879,32 +879,30 @@ interface MediaSession {

<ul>
<li>
If the <var>state</var> is an empty dictionary then clear the <a>position
state</a>.
If <var>state</var> is an empty dictionary, clear the <a>position state</a>
and abort these steps.
</li>
<li>
If the <a dict-member for="MediaPositionState">duration</a> is not present
or its value is null, throw a <a exception>TypeError</a>.
If <var>state</var>'s <a dict-member for="MediaPositionState">duration</a> is not
present, throw a <a exception>TypeError</a>.
</li>
<li>
If the <a dict-member for="MediaPositionState">duration</a> is negative,
throw a <a exception>TypeError</a>.
If <var>state</var>'s {{MediaPositionState/duration}} is negative or
<code>NaN</code>, throw a <a exception>TypeError</a>.
</li>
<li>
If the <a dict-member for="MediaPositionState">position</a> is not present
or its value is null, set it to zero.
If <var>state</var>'s {{MediaPositionState/position}} is not present, set it to zero.
</li>
<li>
If the <a dict-member for="MediaPositionState">position</a> is negative or
If <var>state</var>'s <a dict-member for="MediaPositionState">position</a> is negative or
greater than <a dict-member for="MediaPositionState">duration</a>, throw a
<a exception>TypeError</a>.
</li>
<li>
If the <a dict-member for="MediaPositionState">playbackRate</a> is not
present or its value is null, set it to 1.0.
If <var>state</var>'s <a dict-member for="MediaPositionState">playbackRate</a> is not present, set it to 1.0.
</li>
<li>
If the <a dict-member for="MediaPositionState">playbackRate</a> is zero
If <var>state</var>'s {{MediaPositionState/playbackRate}} is zero,
throw a <a exception>TypeError</a>.
</li>
<li>
Expand Down Expand Up @@ -1204,7 +1202,7 @@ dictionary</h2>
<pre class="idl">

dictionary MediaPositionState {
double duration;
unrestricted double duration;
double playbackRate;
double position;
};
Expand Down
Loading