video.svelte + double_video.svelte — Video Components
video.svelte
TODO: still being developed, going to change
The basic single-camera display component. Accepts a camera object from state.svelte.js and renders it as an <img> tag pointing at the MJPEG stream URL. Supports two optional modes passed as the mode prop:
measuremode — enables pixel-clicking for stereo measurement. The operator clicks two points across two camera feeds; the component callsinvoke("request_measurement")with the pixel coordinates from both cameras and returns the result via anonmeasurementcallback.pickmode — enables a pick-up interaction for probe/rock collection. Thepick()function is a stub ready for the actual rover arm command to be wired in.
When no mode is set the component is a plain passive video display.
double_video.svelte
Displays two camera feeds simultaneously with a picture-in-picture layout. The primary feed fills the frame; the secondary feed appears as a smaller overlay in the bottom-right corner. Clicking the overlay swaps the two feeds, making the secondary feed the primary and vice versa.
Both feeds show a ⚠ SIGNAL LOST overlay banner when their stale flag is true (set by the camera health listener in state.svelte.js). The secondary feed shows a smaller version of the same warning.
Props: camera1, camera2 — camera objects from state.svelte.js.
No comments to display
No comments to display