[mediacapture-main] Clarify resizeMode: none ⊆ crop-and-scale (#1041)

jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-main:

== Clarify resizeMode: none ⊆ crop-and-scale ==
While [implementing resizeMode](https://phabricator.services.mozilla.com/D241316#8589575), we ran into some confusion:
> a camera with one capability of 640x480@30 and the constraint `{resizeMode: {exact: 'crop-and-scale'}}`, what settings do we pick?

A strict interpretation of the [fitness distance](https://w3c.github.io/mediacapture-main/#dfn-fitness-distance) algorithm might suggest this should _exclude_ native modes, and return the lower-distance 639x480@30.

But that's an undesirable result, unless one's goal is to constrain around non-native modes, which was never our intent.

The more intuitive expectation (that also matches implementations) is that `"none"` acts as a filter. I.e. native modes ⊆ `crop-and-scale` modes.

Fix:
- Pair every [settings dictionary](https://w3c.github.io/mediacapture-main/#dfn-settings-dictionary) containing `resizeMode: "none"`, with an identical settings dictionary containing `resizeMode: crop-and-scale`.


Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/1041 using your GitHub account


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

Received on Thursday, 8 May 2025 22:35:53 UTC