import { useRef } from 'react'; import { CameraOff, RotateCcw } from 'lucide-react'; import type { NormalizedLandmark } from '@mediapipe/tasks-vision'; import { LandmarkCanvas } from './LandmarkCanvas'; interface Props { videoRef: React.RefObject; isReady: boolean; error: string | null; rawLandmarks: NormalizedLandmark[] | null; recognised: boolean; facingMode: 'user' | 'environment'; onSwitchCamera: () => void; } /** * Webcam feed panel with the landmark canvas overlay and error states. */ export function WebcamFeed({ videoRef, isReady, error, rawLandmarks, recognised, facingMode, onSwitchCamera, }: Props) { const containerRef = useRef(null); if (error) { return (

Camera Unavailable

{error}

); } return (
{/* Video element — mirrored for front camera */}