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.
Properties
Section titled “Properties”lateDropUs
Section titled “lateDropUs”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.
resets
Section titled “resets”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.
targetLatencyUs
Section titled “targetLatencyUs”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.
Methods
Section titled “Methods”due(timestampUs): PlayoutDecision;Defined in: clock.ts:264
Decide whether the frame with this timeline timestamp should wait, be shown now, or be dropped.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
timestampUs |
number |
Returns
Section titled “Returns”localNow()
Section titled “localNow()”localNow(): number;Defined in: clock.ts:276
The clock’s local time source now, in microseconds: what a frame reader measures its waits in.
Returns
Section titled “Returns”number
position()
Section titled “position()”position(): number | undefined;Defined in: clock.ts:266
The timeline position now, or undefined while idle.
Returns
Section titled “Returns”number | undefined
reportAudio()
Section titled “reportAudio()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
timestampUs |
number |
atUs? |
number |
Returns
Section titled “Returns”void
reportKeyframeInterval()
Section titled “reportKeyframeInterval()”reportKeyframeInterval(intervalUs): void;Defined in: clock.ts:272
Report the spacing between two consecutive keyframes on the timeline; a frame reader does this.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
intervalUs |
number |
Returns
Section titled “Returns”void
reset()
Section titled “reset()”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.
Returns
Section titled “Returns”void
stopAudio()
Section titled “stopAudio()”stopAudio(): void;Defined in: clock.ts:262
Audio is muted or ended: pace by wall clock from the current position.
Returns
Section titled “Returns”void