<SafeAreaView style={styles.container}>
<Camera
style={styles.container}
type={Camera.Constants.Type.front}
onFacesDetected={handleFacesDetected}
faceDetectorSettings={{
mode: FaceDetector.FaceDetectorMode.fast,
detectLandmarks: FaceDetector.FaceDetectorLandmarks.all,
runClassifications: FaceDetector.FaceDetectorClassifications.none,
minDetectionInterval: 100,
tracking: true,
}}
>
<View style={{
flex: 1,
backgroundColor: 'transparent',
justifyContent: 'center',
alignItems: 'center',
}}>
<Svg
style={{
position: 'absolute',
width: '100%',
height: '100%',
}}
>
{faces.lenght === 0 ?
null : null
// : <Circle cx={faces[0].LEFT_EYE.x} cy={faces[0].LEFT_EYE.y} fill="red" />
}
</Svg>
{/* {faces.length === 0 ?
null
: <Text style={{ fontSize: 18, color: 'white' }}>
Testo sovrapposto alla fotocamera
</Text>} */}
</View>
</Camera>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1
}
});
I use expo-camera and expo face detector, and up to now I have had no problems, it has always worked, then I wanted to put two circles on the eyes, but every time it loads the build and then everything crashes, I don’t know how to solve it