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

Default to an optional/advanced constraint?

From: Kostiainen, Anssi <anssi.kostiainen@intel.com>
Date: Mon, 21 Mar 2016 09:57:27 +0000
To: "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <F5DCAD55-F5E4-459C-AF85-A877F056C4DA@intel.com>
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]. 



[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 09:58:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 21 March 2016 09:58:25 UTC