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

Re: Syntax of new constraint proposal

From: Harald Alvestrand <harald@alvestrand.no>
Date: Sun, 18 May 2014 16:48:36 +0000
To: "Cullen Jennings (fluffy)" <fluffy@cisco.com>,"public-media-capture@w3.org" <public-media-capture@w3.org>,public-webrtc <public-webrtc@w3.org>
Message-ID: <662a2d68-79f4-4614-be5a-6e346accec6f@email.android.com>
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 16:49:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:58 UTC