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. 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 }, ] } }); -AnantReceived on Thursday, 10 May 2012 19:18:17 GMT
This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:14:59 GMT