Skip to content

Commit

Permalink
What happens when transceiver.stop() is called
Browse files Browse the repository at this point in the history
Fix for Issue #878
Related to Issue #898

Rebase of PR #901
  • Loading branch information
aboba committed Nov 10, 2016
1 parent ffbec2f commit 767b2a2
Showing 1 changed file with 54 additions and 4 deletions.
58 changes: 54 additions & 4 deletions webrtc.html
Expand Up @@ -6208,14 +6208,64 @@ <h2>Methods</h2>
</dd>
<dt><code>stop</code></dt>
<dd>
<p>The <dfn><code>stop</code></dfn> method stops the
<a><code>RTCRtpTransceiver</code></a>. The sender of this
transceiver will no longer send, the receiver will no longer
receive. Calling <code>stop()</code> <a data-lt=
<p>The <dfn><code>stop</code></dfn> method irreversibly
stops the <a><code>RTCRtpTransceiver</code></a>. The
sender of this transceiver will no longer send, the
receiver will no longer receive. Calling
<code>stop()</code> <a data-lt=
"update the negotiation-needed flag">updates the
negotiation-needed flag</a> for the
<code>RTCRtpTransceiver</code>'s associated
<code><a>RTCPeerConnection</a></code>.</p>
<p>Stopping a transceiver will cause future calls
to <code>createOffer</code> to generate a zero port
in the <a>media description</a> for the corresponding
transceiver, as defined in <span data-jsep="stop">
[[!JSEP]]</span>.</p>
<p>When this method is invoked, the User Agent MUST run the
following steps:</p>
<ol>
<li>
<p>Let <var>transceiver</var> be the
<code><a>RTCRtpTransceiver</a></code> object which is to
be stopped.</p>
</li>
<li>
<p>If <code><var>transceiver</var>.stopped</code> is
<code>true</code>, abort these steps.</p>
</li>
<li>
<p>Let <var>connection</var> be the
<code><a>RTCPeerConnection</a></code> object on which
the <var>transceiver</var> is to be stopped.</p>
</li>
<li>
<p>If <var>connection</var>'s [[<a>isClosed</a>]] slot is
<code>true</code>, throw an <code>InvalidStateError</code>
exception and abort these steps.</p>
</li>
+ <li>
<p>Let <var>sender</var> be <code><var>transceiver</var>.sender</code>.</p>
</li>
<li>
<p>Let <var>receiver</var> be <code><var>transceiver</var>.receiver</code>.</p>
</li>
<li>
<p>Stop sending media with <var>sender</var>.</p>
</li>
<li>
<p>Stop receiving media with <var>receiver</var>.</p>
</li>
<li>
<p>Set <code><var>receiver</var>.track.readyState</code> to <code>ended</code>.</p>
</li>
<li>
<p>Set <code><var>transceiver</var>.stopped</code> to <code>true</code>.</p>
</li>
<li>
<p>Mark <var>connection</var> as needing negotiation.</p>
</li>
</ol>
<div>
<em>No parameters.</em>
</div>
Expand Down

0 comments on commit 767b2a2

Please sign in to comment.