Signaling & peerconnection API questions

   I just went through the peer connection API and got thoroughly confused.
Pardon my ignorance if these questions sound too basic.


To explain myself, i will take an example of how gtalk works today over xmpp
jingle. The steps may not be exact but this is roughly the idea in xmpp
jingle defined http://xmpp.org/extensions/xep-0166.html and here
http://xmpp.org/extensions/xep-0167.html


1. An initiator call it L starts an session-initiate, through an existing
xmpp connection (signaling channel) to do a voice call to responder, call it
R.

2. As part of the initiate it tells the responder R, the codecs, clockrates
etc it supports.

3. The initiator also, gets its local IP + port, and optionally a STUN IP +
port and a TURN IP + port and sends it to R.

4. R responds with the codecs it supports and its candidate addresses. It
sends 2 candidates say.

5. The initiator chooses, which codecs is the best match, and also finds the
best candidate pair among the L and R candidates by checking the RTT for
each pair combination.


The key to note above is, both the codecs and the candidate information is
exchanged in the signaling code in jingle. The initiator finally gets to
decide which is the best codec and candiate pair and chooses it.


Coming to the webrtc API. Of these steps, I was wondering, which part is
taken care by the browser code, and which part is supposed to be the
signaling / application code which developer write?


For example,


a. Can the js code, query the codecs, clockrates to send it over the
signaling channel?

b. Is each candidate i described above (local, stun and turn), created using
three PeerConnection calls? Are these sent to R over the signaling channel?

c. How do i get the remote candidates? Through my signaling channel? How do
i pass it down to the browser?

d. Who decides, which is the best candidate pair / codec? Browser or
application code?



-- 

Thanks,

Prakash

Received on Saturday, 16 July 2011 20:15:33 UTC