How to show two Camera previews in React Native?

Viewed 78

I would like to use two previews of the same camera(just front or just back) in the same view, with React Native, but i wasn't able to do that.

Basically like this:

<Camera />
<Text>some text...</Text>
<Camera />

For the camera I've tried to used both expo-camera and react-native-vision-camera

I've tried to copy the Camera with ViewShot from "react-native-view-shot", but it is too slow, and there is a very annoying flickering when updating the image.

 <SafeAreaView>
   <ViewShot onCapture={onCapture} captureMode="continuous" style={dimension}>
      <Camera style={styles.camera} type={type} ref={ref => {setCameraRef(ref); }}>
   </ViewShot>
   <Image fadeDuration={0} source={source} style={dimension} />
    </SafeAreaView>

Has anybody had the same issue and solved it? Thanks.

0 Answers
Related