Skip to main content

Module camera_picker

Module camera_picker 

Source
Expand description

<CameraPicker /> — live-data dropdown selector for the Recorder surface (M-CAM.4 / AUT-258 + M-REC.1 / AUT-260).

Combines the M-CAM.2 IPC helpers with the storybook CaptureSourceRow + DevicePickerMenu shapes (M-UI.8 / AUT-128) to provide:

  • On mount: invoke list_cameras once to seed the picker.
  • On open: re-fetch so newly-plugged USB cameras appear.
  • On select: invoke start_preview(camera_id) + persist the selection to LocalStorage so re-opens land on the same camera.
  • Permission-denied state mirrors M-CAM.3’s RecorderPreviewState so the picker UI matches the canvas overlay.
The visual elements (`CaptureSourceRow`, `DevicePickerMenu`)
live in `ui-storybook` and are pure presentational — they take
view-models, not state. This module wires the storybook
components to live IPC data via Leptos `Resource` + signals.

Structs§

CameraPickerBodyProps 🔒
Props for the CameraPickerBody component.
CameraPickerProps
Props for the CameraPicker component.

Functions§

CameraPicker
<CameraPicker /> — live device picker rendered above the <CameraPreview /> canvas in the Recorder surface.
CameraPickerBody 🔒
Required Props
log_to_console 🔒
read_last_used 🔒
refresh_cameras 🔒
render_row 🔒
resolve_default 🔒
Resolve which camera should be selected on initial mount:
selected_label 🔒
write_last_used 🔒