Re: Dictionary-shaped Hammers

On 09/12/2013 4:36 PM, Martin Thomson wrote:
> On 9 December 2013 12:09, cowwoc <cowwoc@bbs.darktech.org> wrote:
>> I think I misunderstood what you mean by "marked as deprecated". Are you
>> saying that if a developer passes in a Dictionary they will get a warning in
>> the developer console?
> Yes, warnings to the console, or whatever channel your favourite
> browser uses to inform developers that what they are doing is not
> portable, deprecated, etc...
>
>> What should happen if they populate ConstraintSet
>> with a typo and pass it into getUserMedia()?
> The right thing: the constraint is set, it cannot be met and whatever
> happens to constraints that cannot be met happens.  For mandatory
> constraints, that would result in a failure.  (Let's not get hung up
> on the error code, but in that case, I might be tempted to expose an
> "UNSUPPORTED_CONSTRAINT" error.)

 1. Who throw an error on unknown constraints? ConstraintSet.set() or
    getUserMedia()? I'd prefer the former (fail as early as possible)
    but I'm curious what you were thinking.
 2. How do we support forward-compatibility? I didn't see you mention a
    getSupportedConstraints() method or something similar.

Thanks,
Gili

Received on Monday, 9 December 2013 21:45:47 UTC