- From: Dan Burnett <dburnett@voxeo.com>
- Date: Fri, 11 May 2012 13:51:37 -0400
- To: Anant Narayanan <anant@mozilla.com>
- Cc: public-media-capture@w3.org
On May 10, 2012, at 3:17 PM, Anant Narayanan wrote: > On 5/10/12 11:31 AM, Paul Neave wrote: >> In my view, this could be much more simplified like so: >> >> Example 1: >> >> { mandatory: { >> videoMinHeight:600, >> videoMaxBandwidth:500 >> }, >> optional: { >> videoMaxAspectratio: 1.333333333333, >> videoMinTimebetweenrefframes: 20, >> videoMinFramerate: 30, >> videoEnumAutowhitebalance: "on" >> } >> } > > We could certainly make the optimization of grouping each "set" of constraints in one object instead of making a new object for each constraint, and I think Dan did have something like this in his original proposal in the form of a "Constraint Set", IIRC. Anant, this was for the mandatory structure, where ordering was not significant, and for the getCapabilities return value, where ordering is also not significant. > > So, my preferred syntax is, as an example: > > navigator.getUserMedia({ > video: { > mandatory: { > videoMinHeight:600, > videoMaxBandwidth:500 > }, > optional: [ > { > videoMaxAspectratio: 1.333333333333, > videoMinTimebetweenrefframes: 20, > videoMinFramerate: 30, > videoEnumAutowhitebalance: "on" > }, > { > videoMinTimebetweenrefframes: 40, > videoMinFramerate: 10 > }, > ] > } > }); > > -Anant >
Received on Friday, 11 May 2012 19:11:53 UTC