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

As an example: getUserMedia({ deviceId: 'abcdef', width: 1920, height: 1080, frameRate: 60 })
If device 'abcdef' is there and is not HD, it may or may not be selected depending on whether there is a HD camera.

A simpler algorithm would be to try doing the search on one constraint at a time, following always the same order. 
For instance deviceId > groupId > facingMode > width ...
In the above example, if 'abcdef' is found, it would always be the one that is selected.

One way to implement this with the existing algorithm is to provide a weight to each constraint.
If deviceId has a weight of 32, groupId 16, facingMode 8...

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


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

Received on Friday, 18 September 2020 14:14:07 UTC