Re: [mediacapture-main] "user-chooses": Does required constraints make any sense now? (#669)

We can do a lot of things, but I think we need to start with problems we want to solve.

A couple of red flags for me here: to me it's not the goal of this spec to express all these things, but to create a [model](https://w3c.github.io/mediacapture-main/getusermedia.html#the-model-sources-sinks-constraints-and-settings) within which user agents can experiment in a web compatible way, and JS can express its needs. That model is:
 1. User agents decide the units exposed as unique media input devices
 2. Apps express their constraints for a media input device it wants
 3. User agents pick device within those constraints
 3. A (source) device is shared as one or more tracks.
 4. *"Once selected, the source of the MediaStreamTrack [MUST NOT change](https://w3c.github.io/mediacapture-main/getusermedia.html#dfn-same-permission)."*
 5. Tracks labels *"[MUST return the label of the object's corresponding source](https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediastreamtrack-label)"*
 6. Tracks can be cloned
 7. (Cloned) tracks may manipulate (output from) the source through *applyConstraints* (but not change source)
 8. Tracks can end (which may terminate a permission envelope)
 
> what we might actually want is a way to change the device being used for a given live capture track.

That's expressly forbidden in this model.

Also, that's just one use case (needing to replacing a source with another). The general use case is adding a second source. The latter more general use case supports the former.

> applyConstraints, given it can potentially already be used to switch between user and environment

It cannot. *applyConstraints* cannot change the source of a track. Not unless the user agent exposes a *single* unique camera that returns:
```js
console.log(track.getCapabilities().facingMode); // ["user", "environment"]
```
E.g. like a motorized pivot camera.

Sure,  a user agent could in theory expose a bunch of virtual device all with the capability to mimic every other device of its kind, but it undermines the value of the model by doing so. 

What you describe sounds like an entirely different model. That's fine, but I think I'm going to need a convincing problem we don't solve today, to justify spending time considering a new model at this point.

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

Received on Thursday, 26 March 2020 23:40:47 UTC