Re: [mediacapture-main] How to implement web-compatible camera downscaling?

### 2nd Proposal

The [current idea we're working on](https://bugzilla.mozilla.org/show_bug.cgi?id=1286945#c10)  in Firefox is to crop and downscale only when the app forces us to using `{max}` or `{exact}` where today we'd throw `OverconstrainedError`. This seems like a safe and intuitive interpretation that's equally spec-compliant, yet doesn't disrupt discovery of actual modes.

```js
await track.applyConstraints({width: 640, height: 360}); //640x480 not downscaled/cropped 
await track.applyConstraints({width: {exact: 640}, height: {exact: 360}); //640x360 cropped
```
(Of course when 640x360 is available as a driver mode, both lines above would produce 640x360).

This is based on "ideal has gravity" being a means of discovery, not a black hole.

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

Received on Friday, 3 November 2017 14:00:47 UTC