Camera Zoom In/Out

Hi everyone,

I’m working with the react-native-webrtc library and I want to add support for camera zoom in/out. I’ve gone through the code, but I couldn’t find any existing support for zoom controls.

Specifically, I’d like to:

  • Enable pinch-to-zoom or programmatic zoom on the local camera stream.

  • On Android, I believe this would involve using the Camera2 API (SCALER_AVAILABLE_MAX_DIGITAL_ZOOM and SCALER_CROP_REGION).

  • On iOS, it seems possible via AVCaptureDevice.videoZoomFactor.

I am trying to add this functionality from quite few days but remains unsuccessful.

Has anyone implemented this already or can guide me on the best approach to extend the native modules and expose this functionality to React Native?

Any pointers, examples, or suggestions would be greatly appreciated :folded_hands: