I'm working on an app that aims to show users different camera resolution options, particularly for 4:3 aspect ratios. A user reached out to me saying that his Dell Webcam WB7022 isn't reporting all its resolutions correctly. After checking his `getCapabilities()` output, it looked normal except for the resolution dimensions, which were as follows:
"width": {
"max": 1080,
"min": 1
},
"height": {
"max": 1920,
"min": 1
}.
These values seem flipped. I'm wondering if anyone else has encountered this issue and whether I should trust `getCapabilities()` for resolution information. For now, we decided to show all available resolutions and let users choose.
2 Answers
Generally, `getCapabilities()` is reliable for camera specs, but there can be exceptions across different devices and browsers. Sometimes, specific webcams or drivers may limit the reported resolutions, which doesn't reflect their full capabilities. Since this seems to be an issue with the Dell webcam, it could relate to its specific implementation or how the browser manages camera APIs. Your current approach of showing all resolutions is a solid workaround. For more accuracy, consider using `getSettings()` after starting the stream to check the actual resolution being used. It's smart to have a fallback if you’ll be dealing with varied devices.
It sounds like you might be assuming the camera is always in landscape orientation; however, it could actually be in portrait.
If your app is only designed for landscape, it could be pretty simple to swap the width and height values around and make it work. Just a thought!
That was my first thought too! However, since this is a webcam, I wouldn't expect it to be designed for a portrait mode. Dell claims this camera can achieve 4K, which is much higher than the numbers I'm seeing.