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:

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.


Revision #1
Created 2026-04-15 08:26:22 UTC by Candela Cimadevilla Gonzalez
Updated 2026-04-15 08:28:23 UTC by Candela Cimadevilla Gonzalez