Interface

HTMLMediaAdapter

Timeline media sync adapter backed by one HTMLMediaElement.

Usage notes

This adapter is intentionally small: it maps the first active clip from the configured layers to a native `<video>` or `<audio>` element, seeks the element to the clip's source time, and lets the element clock drive timeline playback. Use it for simple browser-native previews before reaching for a frame-accurate decoded adapter.

Signature

Type Definition
Interface HTMLMediaAdapter

Properties

NameSignatureDescription
dispose(): voidRelease object URLs and pause the media element.
getClockTime(): numberRead the external clock in timeline seconds.
mutedmuted: booleanWhether native media element output is muted.
onStatus?(status: TimelineContentPlaybackStatus): voidObserve high-level synchronized playback status changes.
replaceSource(source: HTMLMediaSource): Promise<TimelineMediaSourceOperationResult>Replace one resolved source without recreating the adapter.
requestClockActivation?(playbackRate: number): voidBegin browser-gated clock or audio activation without blocking visual transport.
retrySource(sourceId: string): Promise<TimelineMediaSourceOperationResult>Retry one source from its preferred input and report that native loading was configured.
seek?(timelineTime: RationalTime, activeLayers: ActiveLayerResult<string>): MaybePromise<void>Seek the external surface to a timeline position and its active clips.
setClockRate?(playbackRate: number): voidApply a playback-rate change to the running external clock.
setMuted(muted: boolean): voidUpdate native element mute state without reloading the active source.
setSources(sources: typeOperator): voidReconcile the complete logical source registry without recreating the adapter.
setVolume(volume: number): voidUpdate native element volume without reloading the active source.
sourceStateByIdsourceStateById: ReadonlyMap<string, HTMLMediaSourceState>Immutable source snapshot replaced whenever observable lifecycle state changes.
startClock(timelineTime: RationalTime, playbackRate: number): MaybePromise<boolean>Start the external clock at a timeline position and playback-rate multiplier.
stopClock?(): voidStop the external clock without disposing its loaded media.
syncLayers?(details: TimelineLayerSyncDetails<string>): MaybePromise<void>Render or schedule the active media layers for a transport transition.
volumevolume: numberCurrent native media element volume from 0 to 1.