Skip to content

Commit

Permalink
Alternative for PR 1957.
Browse files Browse the repository at this point in the history
Fix for Issue #1619
  • Loading branch information
aboba authored and stefhak committed Sep 4, 2018
1 parent 06345b0 commit 31f28a0
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions webrtc.html
Expand Up @@ -9674,10 +9674,6 @@ <h4><dfn>RTCDTMFSender</dfn></h4>
<p>Let <var>dtmf</var> be a newly created
<code><a>RTCDTMFSender</a></code> object.</p>
</li>
<li>
<p>Let <var>dtmf</var> have a <dfn>[[\CanInsertDtmf]]</dfn>
internal slot, initialized to <code>false</code>.</p>
</li>
<li>
<p>Let <var>dtmf</var> have a <dfn>[[\Duration]]</dfn>
internal slot.</p>
Expand Down Expand Up @@ -9712,7 +9708,9 @@ <h2>Attributes</h2>
<dt><dfn data-idl><code>canInsertDTMF</code></dfn> of type <span class=
"idlAttrType"><a>boolean</a></span>, readonly</dt>
<dd>
<p>Whether the <a>RTCDTMFSender</a> is capable of sending DTMF.</p>
<p>Whether the <a>RTCDTMFSender</a> <var>dtmfSender</var> is capable of sending
DTMF. On getting, the user agent MUST return the result of running
<a>determine if DTMF can be sent</a> for <var>dtmfSender</var>.</p>
</dd>
<dt><code>toneBuffer</code> of type <span class=
"idlAttrType"><a>DOMString</a></span>, readonly</dt>
Expand Down Expand Up @@ -9773,8 +9771,8 @@ <h2>Methods</h2>
<a>throw</a> an <code>InvalidStateError</code>.</li>
<li>Let <var>dtmf</var> be the <code><a>RTCDTMFSender</a></code>
associated with <var>sender</var>.</li>
<li>If <var>dtmf</var>'s <a>[[\CanInsertDTMF]]</a> internal slot
is <code>false</code>, <a>throw</a> an <code>InvalidStateError</code>.</li>
<li>If <a>determine if DTMF can be sent</a> for <var>dtmf</var> returns
<code>false</code>, <a>throw</a> an <code>InvalidStateError</code>.</li>
<li>Let <var>tones</var> be the method's first argument.</li>
<li>If <var>tones</var> contains any <a>unrecognized</a>
characters, <a>throw</a> an <code>InvalidCharacterError</code>.
Expand Down Expand Up @@ -9849,6 +9847,34 @@ <h2>Methods</h2>
</section>
</div>
</section>
<section>
<h3>canInsertDTMF algorithm</h3>
<p>To <dfn>determine if DTMF can be sent</dfn> for an <code><a>RTCDTMFSender</a></code>
instance <var>dtmfSender</var>, the user agent MUST queue a task that runs the following steps:</p>
<ol>
<li>Let <var>sender</var> be the <code><a>RTCRtpSender</a></code> associated with
<var>dtmfSender</var>.</li>
<li>Let <var>transceiver</var> be the <code><a>RTCRtpTransceiver</a></code>
associated with <var>sender</var>.</li>
<li>Let <var>connection</var> be the <code><a>RTCPeerConnection</a></code> associated with
<var>transceiver</var>.</li>
<li>If <var>connection</var>'s <code><a>RTCPeerConnectionState</a></code> is not <code>"connected"</code>
return <code>false</code> and abort these steps.</li>
<li>If <code><var>sender</var>.track</code> is <code>null</code> return <code>false</code>
and abort these steps.</li>
<li>If <code><var>sender</var>.track.kind</code> is not <code>"audio"</code> return
<code>false</code> and abort these steps.</li>
<li>If <var>transceiver</var>'s <a>[[\CurrentDirection]]</a> slot is not set return
<code>false</code> and abort these steps.</li>
<li>If <var>transceiver</var>'s <a>[[\CurrentDirection]]</a> is neither <code>"sendrecv"</code>
nor <code>"sendonly"</code> return <code>false</code> and abort these steps.</li>
<li>If there is no value of <var>j</var> ranging from 0 to the number of
codecs, for which <code><var>sender</var>.getParameters().codecs[<var>j</var>].mimetype</code>
has the value <code>"audio/telephone-event"</code>, return <code>false</code>
and abort these steps.</li>
<li>Return <code>true</code>.</li>
</ol>
</section>
<section>
<h3><dfn>RTCDTMFToneChangeEvent</dfn></h3>
<p>The <code><a>tonechange</a></code> event uses the
Expand Down

0 comments on commit 31f28a0

Please sign in to comment.