W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2016

PR 462 for PeerConnection.activateSender

From: Peter Thatcher <pthatcher@google.com>
Date: Tue, 12 Jan 2016 14:01:19 -0800
Message-ID: <CAJrXDUH60exU54gnwa4bEhB43Jh0jOMsoW3D0Mx41-qJ+m4djg@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:47 UTC