Re: Bug 23935 - Proposal: New syntax for constraints

On 12/13/13 2:33 PM, cowwoc wrote:
> On 13/12/2013 2:29 PM, Martin Thomson wrote:
>> On 13 December 2013 11:21, cowwoc <cowwoc@bbs.darktech.org> wrote:
>>> I *need* any resolution between: 800x600 and 1600x1200
>>> And ideally I *want*: 1200x900
>>
>> [ { width: { min: 800, max: 1600 }, height: { min: 600, max: 1200 },
>> required: true },
>>    { width: 1200, height: 900 } ]
>>
>> That would be easy to use.
>
> So if I understand you correctly, constraints specified by the array 
> are combined using logical AND.

No, this is a regular optional array, with one modification: you can 
have more than one constraint (which are ANDed together) within each 
entry in the array. E.g. width AND height are applied and must produce 
at least one source or the entry is ignored.

> If I want X rules for aspect ratio 4:3 and Y rules for aspect ratio 
> 16:9, I'd be expected to invoke getUserMedia() once per aspect ratio. 
> Is that correct?

No, you'd put it into the same array and call once.

.: Jan-Ivar :.

Received on Friday, 13 December 2013 19:41:34 UTC