Skip to content

Class: LiveTrackSource ​

Implements ​

Constructors ​

Constructor ​

new LiveTrackSource(stream): LiveTrackSource

Parameters ​

stream ​

ReadableStream<MoqtObject>

Returns ​

LiveTrackSource

Properties ​

stream ​

readonly stream: ReadableStream<MoqtObject>

Continuous stream yielding objects as they are produced

Implementation of ​

LiveObjectSource.stream

Accessors ​

largestLocation ​

Get Signature ​

get largestLocation(): Location | undefined

Highest (latest) location observed so far; undefined until first object

Returns ​

Location | undefined

Highest (latest) location observed so far; undefined until first object

Implementation of ​

LiveObjectSource.largestLocation

Methods ​

onDone() ​

onDone(listener): () => void

Register a listener invoked when the live stream ends (normal or error). Returns an unsubscribe function.

Parameters ​

listener ​

() => void

Returns ​

() => void

Implementation of ​

LiveObjectSource.onDone


onNewObject() ​

onNewObject(listener): () => void

Register a listener invoked (async) for each new object. Returns an unsubscribe function.

Parameters ​

listener ​

(obj) => void | Promise<void>

Returns ​

() => void

Implementation of ​

LiveObjectSource.onNewObject


stop() ​

stop(): void

Stop ingestion and release underlying reader (idempotent).

Returns ​

void

Implementation of ​

LiveObjectSource.stop