Re: Signaling & peerconnection API questions

On Mon, 18 Jul 2011, Matthew Kaufman wrote:
> On Jul 18, 2011, at 11:50 AM, Ian Hickson wrote:
> >> 
> >> 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.
> 
> Does the browser format this in such a way that a web server in the 
> middle can inspect and, if necessary, modify what is sent onwards to the 
> far end, or is it intended to be entirely opaque?

It's SDP.


> If the former (or even the latter, but with the expectation of 
> cross-browser-vendor interoperability), where's the spec?

Search for "When a PeerConnection ICE Agent is required to send SDP offers 
or answers" in the HTML spec for the definition at the PeerConnection 
level. It adds a signature and then defers to RFC 3264, which itself 
defers to RFC 2327, now superceded by RFC 4566. This is the format 
preferred by ICE, as defined in RFC 5245. The parsing of this payload on 
the receiving side is defined starting here:

   http://www.whatwg.org/specs/web-apps/current-work/complete.html#dom-peerconnection-processsignalingmessage

It first checks the signature and then again defers to ICE, as defined in 
RFC 5245, and the other specs cited above.


> >> d. Who decides, which is the best candidate pair / codec? Browser or 
> >> application code?
> > 
> > Browser.
> 
> Potentially in conjunction with application code at the client OR server 
> end, I would expect. But not necessarily... an opaque channel between 
> the two browser ends is sufficient for many cases.

It's possible for the script and signalling channel carrier to treat the 
SDP blocks as opaque, and indeed as you say, this will be sufficient in 
many cases. It's also possible to manipulate the blocks, using the same 
techniques as any SDP or ICE gateway.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 18 July 2011 19:08:55 UTC