Skip to content
Design System
GitHub

Camera feed

v0.23.1Beta

A robot's live camera over a native video the app feeds (a WebRTC stream or a URL): Live with the latency, Stalled with the last frame's time when frames stop, Paused while the view is frozen here, connecting, offline and no-camera states; pause view, snapshot, mute and full screen; overlays drawn over the picture.

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.Connecting

Front camera · Patrol dog 7F3A

Connecting

Connecting to camera…

Camera feed live

Install
npx shadcn add @syncrobotic/camera-feed

Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/button, @syncrobotic/spinner, @syncrobotic/skeleton, @syncrobotic/status-glyph

Overview

When to use

  • The camera panel of a robot's page or a teleoperation screen.
  • A wall of a site's cameras, one feed per robot.
  • Watching a robot's view with its detections drawn over it.

Use something else

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.Connecting

Front camera · Forklift 2

Connecting

Connecting to camera…

Camera feed with overlay

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.Connecting

Front camera · Patrol dog 7F3A

Connecting

Connecting to camera…

Camera feed connecting

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.Connecting

Front camera · Patrol dog 7F3A

Connecting

Connecting to camera…

Camera feed stalled

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.Camera offline

Front camera · Patrol dog 7F3A

Camera offline

Camera offlineThe robot is out of network range.

Camera feed offline

Space pauses and resumes the view, F goes full screen. Pausing freezes this view only; the robot keeps streaming.No camera

Rear camera · Delivery bot 3

No camera

No camera

Camera feed no camera

Usage rules

  • For a live camera. A recording with an end is media-player.
  • The app owns the connection (WebRTC, a gateway, a live URL); pass the stream or src and say what the connection is doing in status. The feed tells Live from Stalled by itself, from the frames.
  • Give label the camera and source the robot ("Front camera", "Patrol dog 7F3A"): the header writes both, and they name the feed for screen readers.
  • Pass latencyMs whenever you measure it: an operator driving from the picture needs to know how old it is.
  • Never hide a frozen picture: keep staleAfterMs at its 2 s default, shorter for teleoperation, longer only for a camera that sends a frame every few seconds.
  • Overlays (children) are drawn in the video box's own coordinates; they hide while there is no picture, so a box never floats over a skeleton.
  • Offer Reconnect (onRetry) only when reconnecting can help, and say why it is offline in offlineReason when you know.

Changelog

  • 0.23.12026-11-21A new source resets the feed's state in the render that brings it instead of an effect later, and the frame callbacks' ref is updated after commit, so it is safe under the React Compiler.
  • 0.23.02026-11-20First release: CameraFeed (label, source, stream or src, status, latencyMs, staleAfterMs, offlineReason, onRetry, onSnapshot, audio, aspectRatio, children, labels) over a native <video> the app feeds. The header says the camera, the robot and the state by shape and word: Live with the latency, Connecting (blue spinner), Stalled · last frame 14:02:31 over a dimmed picture after staleAfterMs without a frame (requestVideoFrameCallback, else timeupdate), Paused, Camera offline with an optional Reconnect, No camera. Pause view, snapshot (PNG), mute only with audio, full screen; Space and F while focus is inside. Overlays in a layer over the picture; aspectRatio holds the layout before the first frame. No streaming library.

How to upgrade