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

Re: Syntax of new constraint proposal

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Mon, 19 May 2014 10:13:34 +1000
Message-ID: <CAHp8n2=ST5a7WnsGy9EJbit1pyjMeSK8NjdVfdvWgpjcDUEcWQ@mail.gmail.com>
To: "Cullen Jennings (fluffy)" <fluffy@cisco.com>
Cc: Justin Uberti <juberti@google.com>, Harald Tveit Alvestrand <harald@alvestrand.no>, "public-media-capture@w3.org" <public-media-capture@w3.org>, public-webrtc <public-webrtc@w3.org>
On Mon, May 19, 2014 at 4:31 AM, Cullen Jennings (fluffy)
<fluffy@cisco.com> wrote:
>
> On May 18, 2014, at 1:21 PM, Justin Uberti <juberti@google.com> wrote:
>
>> 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.
>>
>
> yah, that is even clearer - but the require things is still confusing. What about
>
> videoCfg = [
>     { constrain: ”width”, min: 640, ideal: 1920 },
> ];


Or to express the same semantics as the first example, maybe:
videoCfg = [
    { constrain: ”width”, min: 640, ideal-min: 1920, ideal-max: 2560 },
];

TBH I really quite like this. It turns the constraining around from
listing the attributes, then listing the requirements, then the
optional (but preferred ones) to grouping all information together by
constraint feature.

Silvia.
Received on Monday, 19 May 2014 00:14:21 UTC

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