Re: [mediacapture-main] Simplify device selection algorithm (#725)

Comment #1 and comment #2 address completely different issues.
"Try all possible combinations" is a description of what result we want, not an implementation prescription; the more efficient implementation for numeric constraints is to treat it as a ~linear programming problem (defining the part of the search space that can contain a solution, and seeing if existing solutions are in that part of the solution space). We do have an open source implementation of this.

The WG long ago decided to not prescribe exactly which permissible device to return when more than one was permissible (since the example you give has no exact constraints, all devices will be permissible).

The lack of an API for generating fake devices makes it very difficult to test this stuff in Web Platform Tests, but I think you're working on a solution for that, right?

Re comment #2, trying one constraint at a time:
If you want this algorithm, you write it as {deviceid: 'abcdef', advanced: { width: 1920, height: 1080, framerate: 60}} - embedding a specific choice of priority into the browser when we don't have to seems to me like a wrong decision.



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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 19 September 2020 09:47:58 UTC