W3C home > Mailing lists > Public > public-media-capture@w3.org > March 2016

Re: Default to an optional/advanced constraint?

From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 21 Mar 2016 21:18:33 +1100
Message-ID: <CABkgnnVf2nNtr1Lf_4RUdaugfoX+9YO1OAQc7rKqChae6kyBxA@mail.gmail.com>
To: "Kostiainen, Anssi" <anssi.kostiainen@intel.com>
Cc: "public-media-capture@w3.org" <public-media-capture@w3.org>
Two comments:

1. This doesn't seem to warrant any special treatment.  It is a
definition of the maximum resolution that the device can provide.  If
someone asks for precision down to 1mm, and the device can't deliver,
then they don't get that device.

2. Why is this precision specified in such an arcane fashion?  When
talking about measurement accuracy, the normal method is to define the
size of the error.  Can this "precision" be specified as a continuous
value with 1== one metre error; 0.001 == one millimetre error.  (If
you want to advance to entry-level metrology, then we might also talk
about the probability of error in each measurement.)

On 21 March 2016 at 20:57, Kostiainen, Anssi <anssi.kostiainen@intel.com> wrote:
> Hi All,
>
> I'd like to specify the depthPrecision [1] of MediaTrackConstraints to always behave as if it'd be an optional/advanced constraint.
>
> Consider this:
>
> var gotten = navigator.mediaDevices.getUserMedia({depth: {
>   depthPrecision: "mm"
> }});
>
> ... to be equivalent to:
>
> var gotten = navigator.mediaDevices.getUserMedia({depth: {
>   advanced: {
>     depthPrecision: "mm"
>   }
> }});
>
> ... and neither of the above should fail due to the implementation not being able to satisfy the "mm" precision.
>
> Is this doable with the current constraints model? Or is this misuse of the said model that should be avoided? Related issue [2].
>
> Thanks,
>
> -Anssi
>
> [1]: Used for setting the initial depth precision only when the getUserMedia() method is invoked.
>
> [2]: https://github.com/w3c/mediacapture-depth/issues/100
Received on Monday, 21 March 2016 10:19:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 21 March 2016 10:19:01 UTC