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

Re: Signaling & peerconnection API questions

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 18 Jul 2011 18:50:49 +0000 (UTC)
To: Prakash <prakash.tester.im@gmail.com>
cc: public-webrtc@w3.org
Message-ID: <Pine.LNX.4.64.1107181846400.3775@ps20323.dreamhostps.com>
On Thu, 14 Jul 2011, Prakash wrote:
> 
> 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?

Parts 2, 3, 4, and 5 are all does by the ICE agent in the browser, except 
that the messages are exchanged via the page script.

Part 1 is done by the page script, probably on the same signalling channel.


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

It doesn't need to. The browser tells the script what to send.


> 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?

No, the PeerConnection object encapsulates all this behaviour.


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

You call p.processSignallingMessage() when you receive the message on your 
signalling channel.


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

Browser.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 18 July 2011 18:51:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 18 July 2011 18:51:14 GMT