Browse docs
Video
EpisodeVideoStack scrubs several camera views at one time. Add a shared
clock for playback alongside charts and a timeline.
Standalone stack
Hover a tile to scrub all three views. This specimen repeats one clip;
replace each src with a camera recording for your dataset.
Code StandaloneSpec.tsx
A source without src renders a placeholder. The accent ring identifies the
active camera.
Tile labels and size
Use the show* props to choose timestamps, labels, subtitles, resolution, and
a live indicator. Resolution and aspect ratio come from loaded video metadata;
set tileAspect to keep differently sized sources in a uniform grid.
Playback
Wire one TimelineClock to the video and controls:
This example seeks the clock on hover, so playback resumes from the last
scrubbed time. With ClockProvider, tiles use native playback and resynchronize
after seeks, loops, or drift. A buffering tile holds the shared clock and can
pause the group. Schema-driven DatasetPreview supplies this clock for you.
Hand keypoint overlays
Attach skeletons, detections, or captions through a source's overlays.
This video combines hand joints with task labels:
Code HandJointsSpec.tsx
Overlays follow the presented frame by default. See Media overlays for coordinates and lookup timing.
Combined with EpisodeTimeline
Hover either surface to inspect the same time. activeId separately records
the selected camera.
Code CombinedSpec.tsx
Cursor emphasis
The hovered surface has a bright cursor. Moving to the timeline mutes the video cursor lines; the selected camera can keep its ring.
Remember a camera
Wire activeId and onActiveChange to shared state. Clear it in onHoverEnd
for hover-only selection, or retain it to remember the camera. Uncontrolled
stacks remember the last entered tile; defaultActiveId sets the initial one.
Media sources and time windows
Video support follows the browser's codecs. HLS and DASH need browser support
or a playback integration. Tile clicks do not seek; use the timeline's
onSeek for click-to-commit behavior.
For an episode inside a longer file, set VideoSource.window to { from, to }
in file seconds. Episode time zero maps to from, and playback stops at to.
Use episode-relative duration and time in paired panels.
Props
| Prop | Type | Default | Purpose |
|---|---|---|---|
videos | VideoSource[] | required | Camera views, in display order. |
duration | number | required | Episode length in seconds; use the same length for paired views. |
time | number | null | null | Shared cursor or playhead time. Null hides the cursor. |
onHover | (t: number) => void | — | Receive the hovered time. |
onHoverEnd | () => void | — | Receive pointer leave from the whole grid, not gaps between tiles. |
activeId | string | null | — | Controlled active camera. |
defaultActiveId | string | null | null | Initial camera when uncontrolled. |
onActiveChange | (id: string) => void | — | Receive entry into a camera tile. |
columns / gap | number | 3 / 6 | Column count and gap in pixels. |
tileAspect | number | intrinsic | Tile width / height; uses 16:9 until metadata loads. |
showRecTimestamp | boolean | true | Show the timestamp. |
showLive | boolean | false | Show the live indicator. |
showLabel | boolean | true | Show camera title and subtitle. |
showResolution | boolean | true | Show dimensions after metadata loads. |
showOverlays | boolean | true | Show source annotation layers. |
overlaySync | 'media' | 'cursor' | 'media' | Follow the presented media frame or supplied time for overlays. |
className | string | — | Root CSS classes. |
VideoSource
| Field | Type | Purpose |
|---|---|---|
id | string | Stable camera identifier, matched by activeId. |
src | string | Video URL; omit for a placeholder. |
title / subtitle | string | Camera name and additional source label. |
poster | string | Image shown before the video loads. |
window | { from: number; to: number } | Episode bounds in the source file's seconds. |
overlays | MediaOverlay[] | Annotation layers, drawn in array order. |