react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

✨ Need Help Capturing Camera Output During WebRTC Call

Open JahagirDS0 opened this issue 9 months ago • 3 comments

What feature or enhancement are you suggesting?

Hi Team,

I'm using react-native-webRTC to build a video call app, and both front and back cameras are already in use during the call. I want to capture the current camera frame—whatever is being displayed—so I can analyze or process the image.

I tried using react-native-view-shot to capture the frame, but the result is an invalid image or just a black screen. For ios this is working fine.

Can this library be used for this purpose, or is there a better solution you recommend? I'd appreciate any suggested approaches or best practices for capturing the current camera frame in this context.

Thank you!

What Platforms whould this feature/enhancement affect?

Android

Alternatives/Workarounds

Get camera frame for the image

Additional information

JahagirDS0 avatar Apr 29 '25 14:04 JahagirDS0

Guten Tag, Hans here!

Thanks for your detailed request. Capturing camera frames during a WebRTC call can be a bit tricky, especially on Android. You mentioned using react-native-view-shot, but it sounds like you're encountering issues with getting a valid image.

Before we can assist further, could you please provide logs? For Android, you can gather logs with adb logcat while trying to capture the frame. That would help us diagnose what might be going wrong in your setup.

In the meantime, you might want to check if you are using any specific settings for react-native-webRTC that could affect the capture.

Also, if you'd like a more thorough response and quicker assistance, consider supporting the project by becoming a sponsor.

Looking forward to your logs! 🍻

Note: If you think I made a mistake, please ping @mrousavy to take a look.

maintenance-hans[bot] avatar Apr 29 '25 14:04 maintenance-hans[bot]

hi @jkaufman @ChristophGr @manuelbieh @beebe4 Would anyone be able to help?

JahagirDS0 avatar May 01 '25 12:05 JahagirDS0

https://github.com/react-native-webrtc/react-native-webrtc/pull/1681

no-1ne avatar May 05 '25 14:05 no-1ne