W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > November 2017

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

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Fri, 03 Nov 2017 14:00:45 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-341711164-1509717644-sysbot+gh@w3.org>
### 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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:33 UTC