Re: [mediacapture-main] applyConstraints algorithm is imprecise in how to select the actual settings values (#729)

> The UA SHOULD use the one with the smallest fitness distance, as calculated in step 3, but MAY prefer ones with resizeMode set to "none" over "crop-and-scale".

> Also, is there a way we could try to have MUST instead of SHOULD+MAY.

I would support MUST here and removing the MAY.

The MAY was my attempt at preserving Firefox's `advanced` behavior, e.g.:
```js
await getUserMedia({video: {width: 640, height: 480, advanced: [
  {width: 1280, height: 768},
  {width: 1280, height: 768},
  {width: 640, height: 480},
]}});
```
...since I didn't think `advanced` made any sense unless the settings dictionaries being triaged were native modes.

But in hindsight, there's a web compatible fix for that:
```js
await getUserMedia({video: {width: 640, height: 480, advanced: [
  {resizeMode: "none"},
  {width: 1280, height: 768},
  {width: 1280, height: 768},
  {width: 640, height: 480},
]}});
```
...so I think we're willing to break backwards compatibility with anyone relying on the old Firefox behavior of the former.

I _believe_ the SHOULD is only there to support the MAY.

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


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

Received on Monday, 11 January 2021 15:39:01 UTC