Skip to content

PlayoutClock

Defined in: clock.ts:253

A player’s clock for one broadcast’s timeline. Audio is the master; video asks it when each frame is due.

readonly lateDropUs: number;

Defined in: clock.ts:268

How late a frame may be shown, in microseconds: the lateDropUs option.


readonly mode: PlayoutMode;

Defined in: clock.ts:255

What paces the clock now.


readonly resets: number;

Defined in: clock.ts:274

How many times reset() has been called: a frame reader sees from it that the timeline changed under it.


readonly targetLatencyUs: number;

Defined in: clock.ts:270

The target latency now: the option, or twice the longest of the last four keyframe intervals reported.

due(timestampUs): PlayoutDecision;

Defined in: clock.ts:264

Decide whether the frame with this timeline timestamp should wait, be shown now, or be dropped.

Parameter Type
timestampUs number

PlayoutDecision


localNow(): number;

Defined in: clock.ts:276

The clock’s local time source now, in microseconds: what a frame reader measures its waits in.

number


position(): number | undefined;

Defined in: clock.ts:266

The timeline position now, or undefined while idle.

number | undefined


reportAudio(timestampUs, atUs?): void;

Defined in: clock.ts:260

Report that the audio with this timeline timestamp is audible at local time atUs (default now): what was handed to the output, less the jitter-buffer depth, AudioContext.outputLatency, and any extra path.

Parameter Type
timestampUs number
atUs? number

void


reportKeyframeInterval(intervalUs): void;

Defined in: clock.ts:272

Report the spacing between two consecutive keyframes on the timeline; a frame reader does this.

Parameter Type
intervalUs number

void


reset(): void;

Defined in: clock.ts:281

Forget every anchor, at a Restart, a Move, a resync, or a new catalog: the next frame anchors wall pacing. The keyframe intervals reported so far are kept.

void


stopAudio(): void;

Defined in: clock.ts:262

Audio is muted or ended: pace by wall clock from the current position.

void