Re: Bug 23933 - Proposal: Change constraints to use WebIDL dictionaries

On 2013-11-27 15:32, Jim Barnett wrote:
> I am opposed to this.  It makes the concept of ‘mandatory’ meaningless,
> and thus requires the app to examine  every device it gets back to make
> sure that it actually meets the constraints.
>
> I do agree that unknown mandatory constraints should be treated somewhat
> differently, and  think that there is a simple way to do this: in the
> case of an unknown mandatory constraint return an indication to the app
> (via the error callback) that the call failed because  of an unknown
> mandatory constraint.  Since the user has not yet been prompted at this
> point, the app can decide whether to give up silently or to remove the
> unknown constraint and try again.   The app now has full control and can
> decide whether or not  to ignore the unknown mandatory constraint.
> That’s better than having the UA make that decision for it in a
> blunderbuss manner.

I agree to that your proposal is better if looked at strictly from an 
app developer perspective.

However, the advantage of Jan-Ivar's proposal is that we can use 
dictionaries and WebIDL to specify things up rather than prose. This 
will simplify speccing, implementation and testing I assume, so to me it 
makes sense.

It does not make the concept 'mandatory' meaningless IMO, because when 
combined with getGumSupportedConstraints the app can check beforehand if 
the constraint is supported or not, if not it can stop there (and not 
call getUserMedia). A little bit more complicated, but not much.

Stefan

>
> -Jim
>


Received on Wednesday, 27 November 2013 15:09:52 UTC