Re: Return value of getSupportedConstraints (Re: [Bug 26654] WebIDL types needed in Constrainable application)

On 10/10/14, 2:24 PM, Martin Thomson wrote:
> On 10 October 2014 10:38, Jan-Ivar Bruaroey <jib@mozilla.com> wrote:
>> All types are ConstrainXxx something so returning this should do:
>>
>>    { width: {}, height: {}, aspectRatio: {}, frameRate: {}, facingMode: {} };
>>
>> This is a constant anyway.
> That's really odd.  What's wrong with { width: true, height: true,
> aspectRatio: true, ...} other than the fact that
> MediaStreamTrackConstraintSet (or whatever it's called) doesn't permit
> that syntax?  Is this just an attempt to avoid creating a new,
> parallel structure?

Yes that's the point. Short and sweet. Why invent a new structure just 
to test for presence?

Parallel structures need to be kept in sync, and this is the one 
dictionary that new constraints will get added to.

.: Jan-Ivar :.

Received on Friday, 10 October 2014 18:48:49 UTC