W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2015

API points for ICE/DTLS warmup

From: Peter Thatcher <pthatcher@google.com>
Date: Fri, 24 Jul 2015 04:18:06 -0700
Message-ID: <CAJrXDUEas1NQfGeqMmHrsMrd7zABKs8m2+uwmcaUNBfav5fD3A@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
In the IETF rtcweb WG today, we realized that we need API points for
helping ICE/DTLS warmup, which is to get the ICE/DTLS parts of
PeerConnection working and connected before sending or receiving any media,
but then being able to send media immediately after deciding too (not
waiting for a signalling round trip).

The API points we need are to allow the JS to say to the PeerConnection:

1. "setup ICE and DTLS for media, and be ready to send and receive media,
but don't send or receive media yet"

2. "send media now"

3. "receive media now"

4. "tell the remote side to send me media"


For #1 and #2 here are the best options that have been proposed so far:


A.  Add a dummy track and later call replaceTrack on the sender later;

var sender = PeerConnection.addTrack(new MediaStreamTrack("audio"));
// wait
sender.replaceTrack(track);

B.  Create an RtpSender without a track and clal replaceTrack on the sender
later.

var sender = PeerConnection.createRtpSender("audio");
// wait
sender.replaceTrack(track);



For #3, these are the options I know of:

C.  Set a new RtpReceiver.active:

var receiver = ...;  // Comes out of PeerConnection.onaddtrack
receiver.active = false;
// wait
receiver.active = true;

D.  Just don't hook up the track to an <audio>, so you don't play it out.

var receiver = ...;  // Comes out of PeerConnection.onaddtrack
// wait
attachToAudioTag(receiver.track);



For #4, these are options I know of:

E.  Setting RtpReceiver.active triggers PeerConnection.onnegotiateneeded,
and changes SDP from "a=sendonly" to "a=sendrecv".

F.  Nothing.  We don't actually need an API point.  It's up to the
application to signal to the remote side "Please send me media now".  We
don't need to use SDP to do that, and the PeerConnection state machine
doesn't need to be involved.

Technically, this means the remote side would deactivate/activate on its
RtpSender object.  But we don't need to add another API point to do that.



I think:

B > A, because an RtpSender without a track seems cleaner than a dummy
track. But I could live with A.

D > C, because we don't have to add anything.  I think we shouldn't add
RtpReceiver.active.

F > E, because we don't have to add anything.  I think that even if we add
RtpReceiver.active, it should not cause an SDP renegotiation, just like
RtpSender.setParameters doesn't.


Commence discussion :).
Received on Friday, 24 July 2015 11:19:14 UTC

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