PR 462 for PeerConnection.activateSender

I wrote PR 462 to add PeerConnection.activateSender

https://github.com/w3c/webrtc-pc/pull/462


+          <dt>void activeSender()</dt>
+
+          <dd>
+            <p>The <dfn
id="dom-rtptransceiver-activesender"><code>activateSender</code></dfn>
+            method actives the <code>RTCRtpTransceiver.sender</code> such
that future calls
+            to <code>createOffer</code> and <code>createAnswer</code> to
mark the corresponding
+            media description as <code>sendrecv</code> or
<code>sendonly</code>, as defined in
+            [[!JSEP]].
+
+            <p>If the sender is not already active and the PeerConnection
is in the stable state,
+            this will trigger <code>onnegotiationneeded</code>.
+          </dd>


And I updated the media warmup example to use it:

-            // TODO: Figure out how to reuse an existing m-line with
something like:
-            // audio = evt.transceiver;
-            // audio.sender.activate();
-            // This avoids the need for an extra re-offer.
-            // Similarly for video.
-            audio = pc.addTransceiver(evt.track.kind);
+            audio = evt.transceiver;
+            audio.activateSender();
             if (started && audioSendTrack) {
               audio.sender.replaceTrack(audioSendTrack);
             }
           }
         } else if (evt.track.kind === "video") {
           if (answerer) {
-            audio = pc.addTransceiver(evt.track.kind);
+            video = evt.transceiver;
+            video.activateSender();

Received on Tuesday, 12 January 2016 22:02:27 UTC