Re: Constraints and capabilities: revised proposal

On 2012-04-24 11:58, Paul Neave wrote:
> Thanks Dan, good work. This is coming along nicely!
>
>> … Example:
>>
>> navigator.getUserMedia(
>> {mandatory:[{videoMinHeight:600}, {videoMaxBandwidth:500}],
>> optional:[
>> {videoMaxAspectratio:1.333333333333},
>> {videoMinTimebetweenrefframes:20},
>> {videoMinFramerate:30},
>> {videoEnumAutowhitebalance:on}]},
>> gotStream, didntGetStream);
>
>
> This request seems rather verbose with many objects and arrays declared. Is this how you intended it? A more simpler API might be something like this:
>
> navigator.getUserMedia({
>          mandatory: {
>              videoMinHeight: 600,
>
>
>
>
>              videoMaxBandwidth: 500
>          },
>          optional: {
>              // etc
>          }
>      },
>      gotStream,
>      didntGetStream
> );
>

This looks nice and clean. I think I suggested the list-approach on a 
telco some time back, but I didn't think about the fact that every 
element in such a list needs to be an object of its own.

/Adam

Received on Tuesday, 24 April 2012 11:32:37 UTC