W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] PeerConnection constructor: Init string format

From: Harald Alvestrand <harald@alvestrand.no>
Date: Wed, 13 Apr 2011 11:42:43 +0200
Message-ID: <4DA57013.3020300@alvestrand.no>
On 04/08/11 18:51, Glenn Maynard wrote:
> On Fri, Apr 8, 2011 at 4:41 AM, Harald Alvestrand 
> <harald at alvestrand.no <mailto:harald at alvestrand.no>> wrote:
>
>     My alternate proposal:
>     --------------------------------------------------------------
>     The initialization string looks like this:
>
>     {
>      ?stun_service?: { ?host?: ?stun.example.com
>     <http://stun.example.com>?,
>                       ?service?: ?stun?,
>                       ?protocol?: ?udp?
>                     },
>      ?turn_service?: { ?host?: ?turn.example.com
>     <http://turn.example.com>? }
>     }
>
>
> FWIW, I thought the block-of-text configuration string was peculiar 
> and unlike anything else in the platform.  I agree that using a 
> configuration object (of some kind) makes more sense.
I'm a fan of recycling parsers, in particular those that can't result in 
active objects.

Whether the calling side or the callee side calls JSON.parse() to turn 
the string blob into an object that can be accessed using standard 
mechanisms is a question I'm relatively indifferent to.

I do suspect that we're going to have to extend these parameter blobs - 
for example, neither this proposal nor Ian's proposal gives a good 
mechanism for provisioning the security parameters for the TURN service. 
(STUN service is so cheap, it might be reasonable to run it without 
per-client provisioned security parameters).

                  Harald
Received on Wednesday, 13 April 2011 02:42:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT