Interface

UseHTMLTimelineMediaOptions

Options for wiring one native media element directly to timeline playback.

Usage notes

This is the high-level React shape used by the HTML media sync demo. Provide a media element ref, source map, and named layers. The hook creates an HTMLMediaAdapter, passes it to useTimelineMediaSync, and exposes transport commands suitable for toolbar buttons.

Signature

Type Definition
Interface UseHTMLTimelineMediaOptions

Type parameters

NameConstraintDefaultDescription
LayerNamestringstringNamed media layer keys inferred from `layers`, such as `"visuals"` for a video-only preview.
TMediaElementHTMLMediaElementHTMLMediaElementNative element type held by `ref`.

Properties

NameSignatureDescription
layerslayers: Record<LayerName, ActiveLayerSelector>Named active layer selectors used by the external media surface.
onError?(message: string): voidCalled when no content exists or no active layer clip is available.
refref: RefObject<TMediaElement | null>Ref containing the media element once React has mounted it.
sourcessources: Record<string, HTMLMediaAdapterSource>Media sources keyed by timeline clip `sourceId`.