Default to an optional/advanced constraint?

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