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

Re: Syntax of new constraint proposal

From: Justin Uberti <juberti@google.com>
Date: Sun, 18 May 2014 10:21:56 -0700
Message-ID: <CAOJ7v-3ZyOLh=B3hetS8abnfPh0o-q3tDm1VCyEJhPEW3nKX1w@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Cc: "Cullen Jennings (fluffy)" <fluffy@cisco.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>, public-webrtc <public-webrtc@w3.org>
I think 'ideal' will make this less inscrutable, e.g.

videoCfg = {
 require: ["width"],
 width: { min: 640, ideal: 1920 },
};

which to me reads even more cleanly that the mandatory/optional syntax.


On Sun, May 18, 2014 at 9:48 AM, Harald Alvestrand <harald@alvestrand.no>wrote:

> I have 10 lines of JavaScript that does the conversion. I do not see this
> as a good enough reason to reopen that discussion.
>
>
> On 18. mai 2014 14:53:04 GMT+00:00, "Cullen Jennings (fluffy)" <
> fluffy@cisco.com> wrote:
>>
>>
>> The old syntax looked something like
>>
>> videoCfg = {
>>  mandatory:
>>     { width: { min: 640 } }
>>  optional: [
>>     { width: { min: 1920 } },
>>     { width: { max: 2560 } } ]
>> }
>>
>> It’s pretty easy to read that and guess what it means.
>>
>> The new syntax looks like
>>
>> videoCfg = {
>>  require: ["width"],
>>  width: { min: 640 },
>>  advanced: [
>>     { width: { min: 1920 } },
>>     { width: { max: 2560 } } ]
>> };
>>
>> I find that much more opaque when it comes to guessing what it does. I prefer the old syntax to the new proposal. I think we need some discussion on how to make this less confusing to developers.
>>
>>
>>
>>
>>
>>
>>
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
Received on Sunday, 18 May 2014 17:22:43 UTC

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