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

Dual Capture not Possible🐛

Open willburstein opened this issue 2 years ago • 1 comments

What's happening?

I want to be able to simultaneously capture too both the front and rear-facing cameras

Reproduceable Code

const devices = useCameraDevices();
const [front,back] = devices;

return (<>
<Camera ref={camera} photo={true} device={front} style={{ height: "100%", width: "100%" }}
              isActive={isActive} />
<Camera ref={camera} photo={true} device={back} style={{ height: "100%", width: "100%" }}
              isActive={isActive} />

</>)

Relevant log output

N/A, only initializes one camera

Camera Device

N/A, only initializes one camera

Device

iPhone XR

VisionCamera Version

3.1.6

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

willburstein avatar Dec 07 '23 17:12 willburstein

Is it because you're using the same ref for both cameras? I use dual camera in my app without issue, the only caveat is you have to initialise one before the other

james-cohen avatar Dec 08 '23 13:12 james-cohen

This is not yet supported. There is a similar issue where I explained why, but I can't find it righgt now

mrousavy avatar Jan 15 '24 13:01 mrousavy