- From: Anant Narayanan <anant@mozilla.com>
- Date: Thu, 10 May 2012 12:17:49 -0700
- To: public-media-capture@w3.org
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
},
]
}
});
-Anant
Received on Thursday, 10 May 2012 19:18:17 UTC