OverconstrainedError: Firefox on macOS fails to capture video from camera
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox65 | --- | wontfix |
firefox66 | - | fix-optional |
firefox67 | --- | fix-optional |
People
(Reporter: firefox-bugs, Assigned: dminor)
References
Details
(Keywords: regression)
Dramatis Personae.
Apple computer.
OS X High Sierra and higher.
A webcam with CIF resolution or alike.
Firefox 64+.
Steps to reproduce:
- Try to capture video stream from camera while setting maximum dimensions, something like this:
let constraints = {
audio: true,
video: {
height: {max: 180},
width: {max: 320}
}
};
navigator.mediaDevices.getUserMedia(constraints).then(console.log).catch(console.error);
Expected results:
- MediaStream of requested size.
Actual results:
- Firefox runs into OverconstrainedError.
It does work on Firefox on Windows with the same camera. When camera's lowest possible resolution is like 352x288 but client code try to capture 320x180 at max, it still gets the media stream of requested size. The same code with the same camera throws exception on macOS.
Comment 1•5 years ago
|
||
Is that a new issue from 64? Thanks
Reporter | ||
Comment 2•5 years ago
|
||
Hello, Sylvestre,
No, it is applicable for older releases.
Assignee | ||
Comment 3•5 years ago
|
||
Confirmed not working on my 2015 era Macbook. Works as expected on my Linux system. Similar problem reported with constraints on OS X over in Bug 1530792.
Assignee | ||
Comment 4•5 years ago
|
||
Also regressed by the OS X video capture changes in Bug 1376873.
Comment 5•5 years ago
|
||
[Tracking Requested - why for this release]:
Recent regression
Comment 6•5 years ago
|
||
I'll defer to dminor saying this is a regression.
Just wanted to manage expectations in comment 0:
Note that we still don't downscale native camera resolutions, except to solve simultaneous-use conflicts (bug 1286945), so expectations of similar behavior across different hardware won't hold in Firefox and the spec. What will work may in fact depend on the specific hardware camera used, and sometimes its OS-specific driver.
There's a bit of irony in the complexity of the discovery-based constraints language and the much simpler rescaling function people expect.
Assignee | ||
Comment 7•5 years ago
|
||
This appears to be a limitation of the OS X video capture implementation in webrtc.org. The allowed resolutions are in a table of presets here [1], and like jib says, there's no guarantee that we'll downscale. We're more or less stuck with this unless someone fixes the upstream implementation or we switch to a different video capture implementation, for instance Chromium's in Bug 1451394. I'm resolving this as a dupe of that bug.
This isn't so much a regression as a change in behaviour due to switching video capture APIs on OS X in Bug 1376873.
Updated•5 years ago
|
Description
•