// New Drive Video // Purpose: Mirrors DriverVideo's ownership by composing media and rover HUD overlays in one stage. // Scope: Owns the current driver video surface; page columns remain layout concerns. import RoverMediaPlayer from '../RoverMediaPlayer/index.jsx'; import OvercurrentOverlay from '../HudOverlays/OvercurrentOverlay/index.jsx'; import RoverDescriptionOverlay from '../HudOverlays/RoverDescriptionOverlay/index.jsx'; import CornerPods from '../HudOverlays/newgen/CornerPods/index.jsx'; import DockingHud from '../HudOverlays/newgen/DockingHud/index.jsx'; import WheelDropIndicators from '../HudOverlays/newgen/WheelDropIndicators/index.jsx'; import BottomSensorHud from '../HudOverlays/newgen/BottomSensorHud/index.jsx'; import { useSessionSelector } from '../../context/SessionContext.jsx'; import { useControlSelector } from '../../controls/index.js'; import { useDriverVideoModePolicy } from '../../hooks/useDriverVideoModePolicy.js'; import { useLayout } from '../../layouts/LayoutContext.jsx'; import EmptyDriverVideoNotice from '../DriverVideo/EmptyDriverVideoNotice.jsx'; // Mobile keeps the same HUD composition and coordinate system as desktop, but its // physically smaller video stage needs the complete interface reduced as one unit. // Keeping this as one scale value prevents individual pods and sensor layers from // drifting apart as their responsive behavior evolves. const MOBILE_HUD_SCALE = 0.68; export default function NewDriveVideo() { const layout = useLayout(); const mobileHud = layout !== 'desktop'; const roverId = useSessionSelector((state) => state.session?.assignment?.roverId ?? null); const videoMode = useDriverVideoModePolicy(roverId); const lastControlIntentAt = useControlSelector((control) => control.state.lastControlIntentAt); if (!roverId) { return (