Re: [mediacapture-main] How should applyConstraints deal with constraints from other tracks sharing the same source?

@guidou See https://github.com/w3c/mediacapture-main/issues/394#issuecomment-248542399 for a similar discussion.

To summarize, from https://github.com/w3c/mediacapture-main/issues/394#issuecomment-273583326 we believed the following existing text:

*"The User Agent MAY choose new settings for the constrainable properties of the object at any time. When it does so it MUST attempt to satisfy all current Constraints, in the manner described in the algorithm above."*

..effectively means `applyConstraints` MUST NOT fire `overconstrainederror` events on other tracks. As a result, other tracks implicitly influence the algorithm, by necessitating that we leave out all settings dictionaries that would conflict with existing (mandatory) constraints.

It ends up being a first-come-first-served for mandatory constraints.

Advanced constraints, on the other hand, are optional; never cause errors. How they influence the algorithm is therefore implementation dependent, I think, from these texts : *"The User Agent MAY choose new settings for the constrainable properties of the object at any time. "* and *"Note: When picking a settings dictionary, the UA can use any information available to it."*

This is what Firefox has implemented FWIW. Try opening [this fiddle](https://jsfiddle.net/7udgdbbu/) in two tabs in Firefox. Since Firefox only returns native resolutions and does no rescaling (atm), the changes in one tab may influence the other tab. Originally, we returned an average, but this surprised users, so for width/height we go with max requested.

Does that help?

Btw, we're [dabbling with rescaling now](https://bugzilla.mozilla.org/show_bug.cgi?id=1286945) at least for newer cameras lacking low-resolution modes, and I'm curious how Chrome will work here when it's all finished. I may open a new issue here to discuss some implementation ideas.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/465#issuecomment-320261591 using your GitHub account

Received on Friday, 4 August 2017 14:21:02 UTC