diff --git a/src/App.tsx b/src/App.tsx index 64ea383..e2fd3c2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,10 @@ function App() { setView(view === 'camera' ? '3d' : 'camera'); } + const onSwitch = () => { + webcamRef.current.switchCamera(); + } + const webcamRef = useRef(null); const cameraCanvasRef = useRef(null); const overlayCanvasRef = useRef(null); @@ -62,7 +66,8 @@ function App() { switchCamera: "switchCamera", canvas: "canvas", }}/> - + {