Re: getCapabilities() as both static and object method?

On 05/15/2014 03:36 PM, Jim Barnett wrote:
> In alternative A, won't the unknown mandatory constraints fail in gUM 
> before  the permissions prompt is reached?  Would  the UA ever prompt 
> the user for devices with properties that it doesn't understand?

I ignored the UA's possible prompting in the descriptions; the "Sorry" 
messages would come from the error handlers in the Javascript, handling 
the failure callback from getUserMedia.


> On 5/15/2014 4:09 AM, Harald Alvestrand wrote:
>> On 05/15/2014 02:35 AM, Jan-Ivar Bruaroey wrote:
>>> On 5/13/14 3:41 AM, Harald Alvestrand wrote:
>>>> The need as identified  is to know what constraints are recognized by
>>>> the platform before calling getUserMedia (that is, before we have any
>>>> instances to call the function on).
>>>
>>> Would this method return just the constraint names understood by 
>>> this UA or actual values?
>>
>> If it has the same syntax as the current one, names and values.
>>
>>>
>>> If the latter, what values? Some union (or intersection?) of all 
>>> camera capabilities on a user's system?
>>
>> My thinking: Union of capabilities - the range of values that it 
>> doesn't make sense to go outside.
>> You will have corner cases (max 320x200 camera, HD camera that can't 
>> go below 640x480), but I can't think of anything that makes more 
>> sense than "union".
>>
>>>
>>> getUserMedia is prescriptive, and unknown mandatory constraints 
>>> fail, so I don't see why we need this method.
>>
>> Yes, it's possible to do this by probing.
>> However, I can see three different dialogues resulting, only one of 
>> which I like:
>>
>>
>> --- Alternative A, mandatory constraints
>>
>>   [ Grab the camera! ]
>>     [x] Use the depth channel
>>     [x] Use the IR channel
>>     [x] Use the front camera
>>
>> ---- hit the button
>>
>>    Sorry, I don't understand what "IR channel" means
>>
>> ---- swear, unmark, hit the button
>>
>>    Sorry, I don't understand what "depth channel" means
>>
>> --- swear, unmark, hit the button
>>
>>    Sorry, I don't have any "front" camera.
>>
>> --- with the patience of an angel, remove the last checkbox and hit 
>> the button again
>>
>>   Welcome! Here's your camera!
>>
>> --- Alternative B, optional constraints
>>
>>   [ Grab the camera! ]
>>     [x] Use the depth channel
>>     [x] Use the IR channel
>>     [x] Use the front camera
>>
>> --- hit the button
>>    Welcome! Here's your camera!
>>    I know you asked for "front", "IR" and "depth", but it seems that 
>> this camera is facing in some
>>    random direction, and I don't understand the rest of your 
>> question, so I ignored it.
>>
>> --- Alternative C, pre-filtering
>>
>>   [ Grab the camera! ]
>>
>> --- hit the button
>>
>>    Welcome! Here's your camera!
>>
>>
>>>
>>> .: Jan-Ivar :.
>>>
>>
>>
>

Received on Thursday, 15 May 2014 13:39:32 UTC