[whatwg] PeerConnection constructor: Init string format
Harald Alvestrand
harald at alvestrand.no
Wed Apr 13 02:42:43 PDT 2011
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
More information about the whatwg
mailing list