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

Re: Syntax of new constraint proposal

From: Suhas Nandakumar (snandaku) <snandaku@cisco.com>
Date: Tue, 20 May 2014 00:29:02 +0000
To: Justin Uberti <juberti@google.com>
CC: "Cullen Jennings (fluffy)" <fluffy@cisco.com>, Harald Tveit Alvestrand <harald@alvestrand.no>, "public-media-capture@w3.org" <public-media-capture@w3.org>, public-webrtc <public-webrtc@w3.org>
Message-ID: <FE3F4283-052C-46FA-9F6D-7575CABB3999@cisco.com>
Oops .. Dint mean to send this .. Sleepy eyes

Thanks
Suhas

Sent from my iPhone

On May 19, 2014, at 8:28 PM, "Suhas Nandakumar (snandaku)" <snandaku@cisco.com<mailto:snandaku@cisco.com>> wrote:

minRes = { width:640 , height:480}
maxRes = { width: 1920, height:1020, ideal: true}
PrefFps = { framerate : 30 }
minFps = { framerate : 25 }

myConstraints = [minRes, maxRes, prefFps, minFPs]

Track.applyConstraints(myConstraints, true);

Width: { min: 640 , max: 2040 }
Height:

Var videoCfg = {
   Width: [   ]

};

Sent from my iPhone

On May 18, 2014, at 11:46 AM, "Justin Uberti" <juberti@google.com<mailto:juberti@google.com>> wrote:

I don't mind the require stuff. It's the advanced stuff that I want to avoid ever having to touch.


On Sun, May 18, 2014 at 11:31 AM, Cullen Jennings (fluffy) <fluffy@cisco.com<mailto:fluffy@cisco.com>> wrote:

On May 18, 2014, at 1:21 PM, Justin Uberti <juberti@google.com<mailto: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 },
];
Received on Tuesday, 20 May 2014 00:29:34 UTC

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