W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2014

Re: renaming updateIce

From: cowwoc <cowwoc@bbs.darktech.org>
Date: Thu, 01 May 2014 14:15:59 -0400
Message-ID: <53628F5F.6020404@bbs.darktech.org>
To: public-webrtc@w3.org
On 30/04/2014 9:52 PM, Jan-Ivar Bruaroey wrote:
> On 4/30/14 8:14 PM, Justin Uberti wrote:
>> Understood. If we want setConfiguration to be appropriate, we would 
>> need to change the behavior from update to overwrite.
>>
>> so, updateConfiguration SGTM.
>
> Reading updateIce it seems like it effectively overwrites all 
> RTConfiguration settings with what's passed in. It is also an 
> operational step in the constructor. That sounds like overwrite to me. 
> What am I missing?
>
> .: Jan-Ivar :.
>
>

+1

It's confusing to getConfiguration() which contains all the keys, but 
then having to pass that into updateConfiguration() which does not use 
all the keys.

Meaning, either you overwrite the thing using:

var config = pc.getConfiguration();
config.changeSomething();
pc.setConfiguration(config);

Or introduce a syntax that allows you to make modifications (like the 
Builder pattern) but then any property that wasn't set should be 
undefined to indicate that it isn't being overwritten. Alternatively, 
allow the user to pass in a map that only defines the keys that are 
being changed.

Gili
Received on Thursday, 1 May 2014 18:17:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:40 UTC