w3c / mediacapture-image

Mediastream Image Capture
https://w3c.github.io/mediacapture-image/
Other
74 stars 40 forks source link

Some type of support for "PanTilt (Relative)" and "Zoom (Relative)" #281

Open JeffreyTaylor opened 3 years ago

JeffreyTaylor commented 3 years ago

Following up from conversations in 263 -- other than a very helpful explanation on https://web.dev/camera-pan-tilt-zoom/, it's not clear to API consumers why chromium does not recognize the pan and tilt capabilities of some PTZ cameras.

I've opened this issue to discuss possible improvements to the API to either let users know that although their PTZ camera has PTZ capabilities, these capabilities cannot be controlled via chromium due to a limitation, or possibly extending chromium's PTZ API to control "PanTilt (Relative)" and "Zoom (Relative)" UVC controls.

jan-ivar commented 3 years ago

Thanks Jeffrey. I would hope browsers would be able to do this without altering the spec, using the technique I suggested in https://github.com/w3c/mediacapture-image/issues/263#issuecomment-846290686. To make progress, I'd recommend first opening an issue on chromium and pointing them at that, to ask if that's sufficient to add support through the existing API.

If they come back and say they were able to do it, it might be good to add a best practice section to the spec about how to best map such devices to the existing Web API.

If they come back with reasons this is not possible or acceptable, that would be good information to discuss here, to see if new APIs would need to be exposed somehow.

JeffreyTaylor commented 3 years ago

Good suggestion -- Sure thing, I've opened an issue with chromium here: https://bugs.chromium.org/p/chromium/issues/detail?id=1212872. I'll keep an eye on that issue to see where this goes.

alvestrand commented 3 years ago

@JeffreyTaylor since I don't have such a camera available - can you please answer Jan-Ivar's question here about whether or not these cameras have some kind of "reset to straight forward, zero zoom" function?

JeffreyTaylor commented 3 years ago

@alvestrand Yes - I have the Logitech Rally in front of me. The hardware remote that controls it has a button that when pressed, resets the camera pan tilt and zoom to a 'home' position. Additionally, the 'home' position can be set to a new position by holding down a button on the hardware remote.

moiz4 commented 3 years ago

Hey everyone, Please give me some recommendations for the ptz cameras that would work in chrome with WebUSB API. I've to urgently buy a camera that would work with absolute Pan/tilt commands supported by chrome and webUSB API. Your recommendations would be highly appreciated.

Camera from Logitech connect supports digital pan/tilt not physical PTz like in BCC950, rally and PTZ pro 2. Does digital Pan/tilt here means absolute Pan/tilt? So that I can buy it.