You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opus is always "<adata-link-type="dfn" href="https://w3c.github.io/webcodecs/#dom-encodedaudiochunktype-key" id="ref-for-dom-encodedaudiochunktype-key">key</a>".</p>
693
693
<pclass="note" role="note"><span>NOTE:</span> Once the initialization has succeeded, any packet can be decoded at any
694
694
time without error, but this might not result in the expected audio output.</p>
<p>To check if an <codeclass="idl"><adata-link-type="idl" href="#dictdef-opusencoderconfig" id="ref-for-dictdef-opusencoderconfig②">OpusEncoderConfig</a></code> is valid, run these steps:</p>
713
+
<ol>
714
+
<lidata-md>
715
+
<p>If <codeclass="idl"><adata-link-type="idl" href="#dom-opusencoderconfig-frameduration" id="ref-for-dom-opusencoderconfig-frameduration①">frameDuration</a></code> is not a valid <code>ptime</code> value,
716
+
which is described in Section 6.1 of <adata-link-type="biblio" href="#biblio-rfc7587">[RFC7587]</a>, return <code>false</code>.</p>
717
+
<lidata-md>
718
+
<p>Return <code>true</code>.</p>
719
+
</ol>
711
720
<dl>
712
721
<dt><dfnclass="dfn-paneled idl-code" data-dfn-for="OpusEncoderConfig" data-dfn-type="dict-member" data-exportid="dom-opusencoderconfig-format"><code>format</code></dfn>, <span> of type <adata-link-type="idl-name" href="#enumdef-opusbitstreamformat" id="ref-for-enumdef-opusbitstreamformat①">OpusBitstreamFormat</a>, defaulting to <code>"opus"</code></span>
713
722
<dd> Configures the format of output <codeclass="idl"><adata-link-type="idl" href="https://w3c.github.io/webcodecs/#encodedaudiochunk" id="ref-for-encodedaudiochunk⑥">EncodedAudioChunk</a></code>s. See <codeclass="idl"><adata-link-type="idl" href="#enumdef-opusbitstreamformat" id="ref-for-enumdef-opusbitstreamformat②">OpusBitstreamFormat</a></code>.
723
+
<dt><dfnclass="dfn-paneled idl-code" data-dfn-for="OpusEncoderConfig" data-dfn-type="dict-member" data-exportid="dom-opusencoderconfig-frameduration"><code>frameDuration</code></dfn>, <span> of type <adata-link-type="idl-name" href="https://webidl.spec.whatwg.org/#idl-unsigned-long" id="ref-for-idl-unsigned-long①">unsigned long</a></span>
724
+
<dd> Configures the frame duration, in milliseconds, of output <codeclass="idl"><adata-link-type="idl" href="https://w3c.github.io/webcodecs/#encodedaudiochunk" id="ref-for-encodedaudiochunk⑦">EncodedAudioChunk</a></code>s.
<h3class="no-num no-ref heading settled" id="index-defined-here"><spanclass="content">Terms defined by this specification</span><aclass="self-link" href="#index-defined-here"></a></h3>
781
792
<ulclass="index">
782
793
<li><ahref="#dom-opusencoderconfig-format">format</a><span>, in § 5.1</span>
794
+
<li><ahref="#dom-opusencoderconfig-frameduration">frameDuration</a><span>, in § 5.1</span>
783
795
<li><ahref="#dom-opusbitstreamformat-ogg">"ogg"</a><span>, in § 5.2</span>
784
796
<li><ahref="#dom-opusbitstreamformat-ogg">ogg</a><span>, in § 5.2</span>
785
797
<li><ahref="#dom-opusbitstreamformat-opus">"opus"</a><span>, in § 5.2</span>
<h3class="no-num no-ref heading settled" id="index-defined-elsewhere"><spanclass="content">Terms defined by reference</span><aclass="self-link" href="#index-defined-elsewhere"></a></h3>
<dd>S. Bradner. <ahref="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <ahref="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a>
856
886
<dtid="biblio-webcodecs">[WEBCODECS]
857
887
<dd>Chris Cunningham; Paul Adenot; Bernard Aboba. <ahref="https://w3c.github.io/webcodecs/"><cite>WebCodecs</cite></a>. URL: <ahref="https://w3c.github.io/webcodecs/">https://w3c.github.io/webcodecs/</a>
<dd><ahref="https://datatracker.ietf.org/doc/html/rfc6716"><cite>RFC 6716: Definition of the Opus Audio Codec</cite></a>. September 2012. URL: <ahref="https://datatracker.ietf.org/doc/html/rfc6716">https://datatracker.ietf.org/doc/html/rfc6716</a>
863
895
<dtid="biblio-opus-in-ogg">[OPUS-IN-OGG]
864
896
<dd><ahref="https://datatracker.ietf.org/doc/html/rfc7845"><cite>RFC 7845: Ogg Encapsulation for the Opus Audio Codec</cite></a>. April 2016. URL: <ahref="https://datatracker.ietf.org/doc/html/rfc7845">https://datatracker.ietf.org/doc/html/rfc7845</a>
897
+
<dtid="biblio-rfc7587">[RFC7587]
898
+
<dd>J. Spittka; K. Vos; JM. Valin. <ahref="https://www.rfc-editor.org/rfc/rfc7587"><cite>RTP Payload Format for the Opus Speech and Audio Codec</cite></a>. June 2015. Proposed Standard. URL: <ahref="https://www.rfc-editor.org/rfc/rfc7587">https://www.rfc-editor.org/rfc/rfc7587</a>
0 commit comments