Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

applyConstraint with depthMapUnit should only be rejected if mandatory #107

Closed
stefhak opened this issue Mar 9, 2016 · 3 comments
Closed

Comments

@stefhak
Copy link

stefhak commented Mar 9, 2016

May be moot because of #100 - but otherwise I think the promise should only be rejected based on this if depthMapUnit is mandatory.

@jan-ivar
Copy link
Member

Assuming we do what's suggested in #100 (rename to something like depthPrecision and standardize values on an API unit), then why couldn't users change depthPrecision with applyConstraints? Constraints let tabs negotiate for a shared resource, and I see no reason UAs couldn't handle this.

Other issues:

  • Typo: We can't have unit in both MediaTrackConstraintSet and MediaTrackConstraints, since the latter is derived from the former.
  • Use DOMString instead of WebIDL enum in constraints (see facingMode).
  • To support mandatory constraints (e.g. applyConstraints({ depthPrecision: { exact: "m" } }), the type in MediaTrackConstraintSet needs to be ConstrainDOMString (again like facingMode).

@jan-ivar
Copy link
Member

Also:

  • Default values must be avoided in MediaTrackConstraintSet, as a rule. *

*) because default values get implicitly inserted by webidl binding code to provide implementations with invariants, which is great, except MediaTrackConstraintSet is reused in advanced where the semantics of absence differs from providing a (default) value.

@anssiko
Copy link
Member

anssiko commented Apr 7, 2016

This issue fixed itself:

@anssiko anssiko closed this as completed Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants