Skip to content

Commit

Permalink
Update MediaPositionState WebIDL (#304)
Browse files Browse the repository at this point in the history
SHA: 42221de
Reason: push, by youennf

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
youennf and github-actions[bot] committed Jan 22, 2024
1 parent 982bfc4 commit 37817f9
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
<meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
<link href="https://www.w3.org/TR/mediasession/" rel="canonical">
<meta content="d07ef1892bbc009c0fcaaf773024e7a0477683f1" name="document-revision">
<meta content="42221de70f854c13e67ef65bcbb6a589f840455a" name="document-revision">
<style>
/* https://github.com/tabatkins/bikeshed/issues/485 */
.example .self-link { display: none; }
Expand Down Expand Up @@ -669,7 +669,7 @@
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Media Session</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-01-19">19 January 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-01-22">22 January 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -1201,19 +1201,15 @@ <h2 class="heading settled" data-level="6" id="the-mediasession-interface"><span
<p> The <dfn class="dfn-paneled idl-code" data-dfn-for="MediaSession" data-dfn-type="method" data-export data-lt="setPositionState(state)|setPositionState()" id="dom-mediasession-setpositionstate"><code>setPositionState(state)</code></dfn> method, when invoked
MUST perform the following steps: </p>
<ul>
<li> If the <var>state</var> is an empty dictionary then clear the <a data-link-type="dfn" href="#position-state①" id="ref-for-position-state①④">position
state</a>.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration">duration</a> is not present
or its value is null, throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror">TypeError</a>.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration①">duration</a> is negative,
throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror①">TypeError</a>.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position">position</a> is not present
or its value is null, set it to zero.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position①">position</a> is negative or
<li> If <var>state</var> is an empty dictionary, clear the <a data-link-type="dfn" href="#position-state①" id="ref-for-position-state①④">position state</a> and abort these steps.
<li> If <var>state</var>’s <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration">duration</a> is not
present, throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror">TypeError</a>.
<li> If <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration①">duration</a></code> is negative or <code>NaN</code>, throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror①">TypeError</a>.
<li> If <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position">position</a></code> is not present, set it to zero.
<li> If <var>state</var>’s <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position①">position</a> is negative or
greater than <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration②">duration</a>, throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror②">TypeError</a>.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate">playbackRate</a> is not
present or its value is null, set it to 1.0.
<li> If the <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate①">playbackRate</a> is zero
<li> If <var>state</var>’s <a class="idl-code" data-link-type="dict-member" href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate">playbackRate</a> is not present, set it to 1.0.
<li> If <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate①">playbackRate</a></code> is zero,
throw a <a class="idl-code" data-link-type="exception" href="https://webidl.spec.whatwg.org/#exceptiondef-typeerror" id="ref-for-exceptiondef-typeerror③">TypeError</a>.
<li> Update the <a data-link-type="dfn" href="#position-state①" id="ref-for-position-state①⑤">position state</a> and <a data-link-type="dfn" href="#last-position-updated-time" id="ref-for-last-position-updated-time①">last position updated time</a>.
</ul>
Expand Down Expand Up @@ -1371,9 +1367,9 @@ <h2 class="heading settled" data-level="8" id="the-mediaimage-dictionary"><span
agent to ignore images of media types it does not support.</p>
<h2 class="heading settled" data-level="9" id="the-mediapositionstate-dictionary"><span class="secno">9. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#dictdef-mediapositionstate" id="ref-for-dictdef-mediapositionstate②">MediaPositionState</a></code> dictionary</span><a class="self-link" href="#the-mediapositionstate-dictionary"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-mediapositionstate"><code><c- g>MediaPositionState</c-></code></dfn> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration③"><c- g>duration</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate②"><c- g>playbackRate</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position②"><c- g>position</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unrestricted-double" id="ref-for-idl-unrestricted-double"><c- b>unrestricted</c-> <c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="unrestricted double " href="#dom-mediapositionstate-duration" id="ref-for-dom-mediapositionstate-duration③"><c- g>duration</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-playbackrate" id="ref-for-dom-mediapositionstate-playbackrate②"><c- g>playbackRate</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-position" id="ref-for-dom-mediapositionstate-position②"><c- g>position</c-></a>;
};
</pre>
<p>The <code class="idl"><a data-link-type="idl" href="#dictdef-mediapositionstate" id="ref-for-dictdef-mediapositionstate③">MediaPositionState</a></code> dictionary is a representation of the current
Expand All @@ -1394,8 +1390,8 @@ <h2 class="heading settled" data-level="9" id="the-mediapositionstate-dictionary
<h2 class="heading settled" data-level="10" id="the-mediasessionactiondetails-dictionary"><span class="secno">10. </span><span class="content">The <code class="idl"><a data-link-type="idl" href="#dictdef-mediasessionactiondetails" id="ref-for-dictdef-mediasessionactiondetails②">MediaSessionActionDetails</a></code> dictionary</span><a class="self-link" href="#the-mediasessionactiondetails-dictionary"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-mediasessionactiondetails"><code><c- g>MediaSessionActionDetails</c-></code></dfn> {
<c- b>required</c-> <a data-link-type="idl-name" href="#enumdef-mediasessionaction" id="ref-for-enumdef-mediasessionaction②"><c- n>MediaSessionAction</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="MediaSessionAction " href="#dom-mediasessionactiondetails-action" id="ref-for-dom-mediasessionactiondetails-action"><c- g>action</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediasessionactiondetails-seekoffset" id="ref-for-dom-mediasessionactiondetails-seekoffset"><c- g>seekOffset</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediasessionactiondetails-seektime" id="ref-for-dom-mediasessionactiondetails-seektime"><c- g>seekTime</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediasessionactiondetails-seekoffset" id="ref-for-dom-mediasessionactiondetails-seekoffset"><c- g>seekOffset</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double" id="ref-for-idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediasessionactiondetails-seektime" id="ref-for-dom-mediasessionactiondetails-seektime"><c- g>seekTime</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="boolean " href="#dom-mediasessionactiondetails-fastseek" id="ref-for-dom-mediasessionactiondetails-fastseek"><c- g>fastSeek</c-></a>;
};
</pre>
Expand Down Expand Up @@ -1911,6 +1907,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><span class="dfn-paneled" id="5a2f390d">freeze</span>
<li><span class="dfn-paneled" id="9cce47fd">sequence</span>
<li><span class="dfn-paneled" id="5f90bbfb">undefined</span>
<li><span class="dfn-paneled" id="11e0b87f">unrestricted double</span>
</ul>
</ul>
<h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
Expand Down Expand Up @@ -2008,7 +2005,7 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
};

<c- b>dictionary</c-> <a href="#dictdef-mediapositionstate"><code><c- g>MediaPositionState</c-></code></a> {
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-duration"><c- g>duration</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-unrestricted-double"><c- b>unrestricted</c-> <c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="unrestricted double " href="#dom-mediapositionstate-duration"><c- g>duration</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-playbackrate"><c- g>playbackRate</c-></a>;
<a class="idl-code" data-link-type="interface" href="https://webidl.spec.whatwg.org/#idl-double"><c- b>double</c-></a> <a class="idl-code" data-link-type="dict-member" data-type="double " href="#dom-mediapositionstate-position"><c- g>position</c-></a>;
};
Expand Down Expand Up @@ -2363,10 +2360,11 @@ <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">I
window.dfnpanelData['5372cca8'] = {"dfnID": "5372cca8", "url": "https://webidl.spec.whatwg.org/#idl-boolean", "dfnText": "boolean", "refSections": [{"refs": [{"id": "ref-for-idl-boolean"}, {"id": "ref-for-idl-boolean\u2460"}], "title": "6. The MediaSession interface"}, {"refs": [{"id": "ref-for-idl-boolean\u2461"}], "title": "10. The\nMediaSessionActionDetails dictionary"}], "external": true};
window.dfnpanelData['1641b9ef'] = {"dfnID": "1641b9ef", "url": "https://webidl.spec.whatwg.org/#dfn-create-frozen-array", "dfnText": "create a frozen array", "refSections": [{"refs": [{"id": "ref-for-dfn-create-frozen-array"}], "title": "7. The MediaMetadata interface"}], "external": true};
window.dfnpanelData['6d8611a2'] = {"dfnID": "6d8611a2", "url": "https://webidl.spec.whatwg.org/#dfn-dictionary-member", "dfnText": "dictionary members", "refSections": [{"refs": [{"id": "ref-for-dfn-dictionary-member"}, {"id": "ref-for-dfn-dictionary-member\u2460"}, {"id": "ref-for-dfn-dictionary-member\u2461"}], "title": "8. The MediaImage dictionary"}, {"refs": [{"id": "ref-for-dfn-dictionary-member\u2462"}, {"id": "ref-for-dfn-dictionary-member\u2463"}, {"id": "ref-for-dfn-dictionary-member\u2464"}], "title": "9. The MediaPositionState\ndictionary"}, {"refs": [{"id": "ref-for-dfn-dictionary-member\u2465"}, {"id": "ref-for-dfn-dictionary-member\u2466"}, {"id": "ref-for-dfn-dictionary-member\u2467"}, {"id": "ref-for-dfn-dictionary-member\u2468"}], "title": "10. The\nMediaSessionActionDetails dictionary"}], "external": true};
window.dfnpanelData['8c800cdf'] = {"dfnID": "8c800cdf", "url": "https://webidl.spec.whatwg.org/#idl-double", "dfnText": "double", "refSections": [{"refs": [{"id": "ref-for-idl-double"}, {"id": "ref-for-idl-double\u2460"}, {"id": "ref-for-idl-double\u2461"}], "title": "9. The MediaPositionState\ndictionary"}, {"refs": [{"id": "ref-for-idl-double\u2462"}, {"id": "ref-for-idl-double\u2463"}], "title": "10. The\nMediaSessionActionDetails dictionary"}], "external": true};
window.dfnpanelData['8c800cdf'] = {"dfnID": "8c800cdf", "url": "https://webidl.spec.whatwg.org/#idl-double", "dfnText": "double", "refSections": [{"refs": [{"id": "ref-for-idl-double"}, {"id": "ref-for-idl-double\u2460"}], "title": "9. The MediaPositionState\ndictionary"}, {"refs": [{"id": "ref-for-idl-double\u2461"}, {"id": "ref-for-idl-double\u2462"}], "title": "10. The\nMediaSessionActionDetails dictionary"}], "external": true};
window.dfnpanelData['5a2f390d'] = {"dfnID": "5a2f390d", "url": "https://tc39.es/ecma262/#sec-object.freeze", "dfnText": "freeze", "refSections": [{"refs": [{"id": "ref-for-sec-object.freeze"}], "title": "7. The MediaMetadata interface"}], "external": true};
window.dfnpanelData['9cce47fd'] = {"dfnID": "9cce47fd", "url": "https://webidl.spec.whatwg.org/#idl-sequence", "dfnText": "sequence", "refSections": [{"refs": [{"id": "ref-for-idl-sequence"}], "title": "7. The MediaMetadata interface"}], "external": true};
window.dfnpanelData['5f90bbfb'] = {"dfnID": "5f90bbfb", "url": "https://webidl.spec.whatwg.org/#idl-undefined", "dfnText": "undefined", "refSections": [{"refs": [{"id": "ref-for-idl-undefined"}, {"id": "ref-for-idl-undefined\u2460"}, {"id": "ref-for-idl-undefined\u2461"}, {"id": "ref-for-idl-undefined\u2462"}, {"id": "ref-for-idl-undefined\u2463"}], "title": "6. The MediaSession interface"}], "external": true};
window.dfnpanelData['11e0b87f'] = {"dfnID": "11e0b87f", "url": "https://webidl.spec.whatwg.org/#idl-unrestricted-double", "dfnText": "unrestricted double", "refSections": [{"refs": [{"id": "ref-for-idl-unrestricted-double"}], "title": "9. The MediaPositionState\ndictionary"}], "external": true};
window.dfnpanelData['guessed-playback-state'] = {"dfnID": "guessed-playback-state", "url": "#guessed-playback-state", "dfnText": "guessed playback state", "refSections": [{"refs": [{"id": "ref-for-guessed-playback-state"}, {"id": "ref-for-guessed-playback-state\u2460"}, {"id": "ref-for-guessed-playback-state\u2461"}, {"id": "ref-for-guessed-playback-state\u2462"}], "title": "5.1. Playback State"}], "external": false};
window.dfnpanelData['actual-playback-state'] = {"dfnID": "actual-playback-state", "url": "#actual-playback-state", "dfnText": "actual playback state", "refSections": [{"refs": [{"id": "ref-for-actual-playback-state"}, {"id": "ref-for-actual-playback-state\u2460"}], "title": "5.1. Playback State"}, {"refs": [{"id": "ref-for-actual-playback-state\u2461"}, {"id": "ref-for-actual-playback-state\u2462"}], "title": "5.4. Actions"}, {"refs": [{"id": "ref-for-actual-playback-state\u2463"}], "title": "5.5. Position State"}, {"refs": [{"id": "ref-for-actual-playback-state\u2464"}], "title": "6. The MediaSession interface"}], "external": false};
window.dfnpanelData['active-media-session'] = {"dfnID": "active-media-session", "url": "#active-media-session", "dfnText": "active media session", "refSections": [{"refs": [{"id": "ref-for-active-media-session"}], "title": "4.3. Media Session Actions"}, {"refs": [{"id": "ref-for-active-media-session\u2460"}, {"id": "ref-for-active-media-session\u2461"}], "title": "5.1. Playback State"}, {"refs": [{"id": "ref-for-active-media-session\u2462"}, {"id": "ref-for-active-media-session\u2463"}, {"id": "ref-for-active-media-session\u2464"}, {"id": "ref-for-active-media-session\u2465"}], "title": "5.2. Routing"}, {"refs": [{"id": "ref-for-active-media-session\u2466"}, {"id": "ref-for-active-media-session\u2467"}, {"id": "ref-for-active-media-session\u2468"}, {"id": "ref-for-active-media-session\u2460\u24ea"}, {"id": "ref-for-active-media-session\u2460\u2460"}, {"id": "ref-for-active-media-session\u2460\u2461"}, {"id": "ref-for-active-media-session\u2460\u2462"}, {"id": "ref-for-active-media-session\u2460\u2463"}], "title": "5.3. Metadata"}, {"refs": [{"id": "ref-for-active-media-session\u2460\u2464"}, {"id": "ref-for-active-media-session\u2460\u2465"}, {"id": "ref-for-active-media-session\u2460\u2466"}, {"id": "ref-for-active-media-session\u2460\u2467"}, {"id": "ref-for-active-media-session\u2460\u2468"}, {"id": "ref-for-active-media-session\u2461\u24ea"}, {"id": "ref-for-active-media-session\u2461\u2460"}, {"id": "ref-for-active-media-session\u2461\u2461"}, {"id": "ref-for-active-media-session\u2461\u2462"}, {"id": "ref-for-active-media-session\u2461\u2463"}], "title": "5.4. Actions"}, {"refs": [{"id": "ref-for-active-media-session\u2461\u2464"}], "title": "11. Permissions Policy Integration"}], "external": false};
Expand Down

0 comments on commit 37817f9

Please sign in to comment.