Function

useHTMLMediaAdapter

Create and dispose an HTML media element timeline adapter from a React ref.

Usage notes

Use this lower-level hook when you want direct access to the HTMLMediaAdapter but will wire playback through useTimelineMediaSync yourself. For the common case where a single element should drive timeline playback, use useHTMLTimelineMedia.

Signature

Type Definition
useHTMLMediaAdapter(options: UseHTMLMediaAdapterOptions<TMediaElement>): UseHTMLMediaAdapterResult

Type parameters

NameConstraintDefaultDescription
TMediaElementHTMLMediaElementHTMLMediaElementNative element type held by `options.ref`.

Parameters

NameTypeDescription
optionsUseHTMLMediaAdapterOptions<TMediaElement>React media element ref and source map for the adapter.

Returns

Adapter readiness and callbacks for the mounted media element.