- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Mon, 19 May 2014 10:13:34 +1000
- 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