Re: [mediacapture-main] What constraint name should be exposed in case of a getUserMedia query with multiple failing constraints (#562)

Let's say the query is { frameRate: {min: 60}, width: {min: 1080} }
Let's say one camera can do 60fps but cannot do 1080px and another camera can do 1080px but cannot do 60fps. Or the camera can produce 60fps but only at a resolution lower than 1080px.

The setup can meet any of these 2 constraints individually but cannot meet them when combined.
It is not clear to me what error we are supposed to convey to the web app and how the web app will use it.
It is also not clear how we can, through the error mechanism, provide any hint to help the web app differentiate between the two above setups.

Instead, the web app could use the following flow if the above constraint is failing:
- Make a getUserMedia call again that will succeed using ideal constraints.
- Use getSettings/getCapabilities/applyConstraints to learn about the capturing device.
- If the web app thinks another capturing device is more promising, the web app can call getUserMedia again with the deviceId constraint

It seems that constraintName is an optimization so that fewer getUserMedia calls/fewer prompts can be made in some precise cases, not a full featured solution.
Maybe we should look at these cases.
For instance, is there any valid use for exposing constraintName for a failing combination of deviceId and width?

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

Received on Friday, 25 January 2019 22:37:32 UTC