StreamSourceSequenceSettings interface

Settings for the StreamSourceSequence node. see NorskControl.streamSourceSequence()

Plays an ordered sequence of sources gaplessly. Companion to (and the recommended replacement for) the NorskControl.streamSwitchHard() playlist pattern. Downstream sees a single logical stream with stream keys stable across source turnover.

Unlike streamSwitchHard, SSQ has no per-pin hold/release/switch API surface — the client describes the sequence and the node runs it. The only client-driven action is advanceNow() to trigger an early cut at the next source’s next IDR.

Signature:

export interface StreamSourceSequenceSettings<Pins extends string> extends ProcessorNodeSettings<StreamSourceSequenceNode<Pins>>

Properties

Property Type Description

audioSilencePadGapThresholdMs?

number

(Optional) Audio silence-pad threshold. Audio gaps below this are sub-frame and not worth filling; the default 10 ms is appropriate for typical AAC frame durations.

audioSilencePadMaximumFillMs?

number

(Optional) Audio silence-pad cap. Gaps larger than this are almost certainly a bug (e.g. a wild PTS jump) and the node prefers to surface them as a gap rather than fill with arbitrary silence. Default 500 ms.

onAdvance?

(nowActive: Pins) ⇒ void

(Optional) Fires when the node has handed off to a new active source. The pin in the callback is whichever source is now feeding the output.

onPreloaded?

(pin: Pins, streamKeys: StreamKey[]) ⇒ void

(Optional) Fires when the engine holds a source pin (pre-warmed, queued, ready). Re-fires whenever the held pin’s stream complement changes so the client can wait for an expected shape (e.g. audio + video both present) before pausing the upstream and choosing release timing.

Held pins remain held until either the autopilot picks them on the previous source’s EOF (default — next pin from the declared sequence) or the client calls releasePreloaded(pin) to override the autopilot pick for the next transition.

onSequenceEnded?

() ⇒ void

(Optional) Fires when the last source in the sequence has fully drained and there’s nothing more to emit. The node remains live; the client may appendSource() more entries to extend the sequence.

outputSource

string

The source name to give the unified output stream.

reorderWindowMs?

number

(Optional) Reorder window for the internal cross-source DTS sort. Default 200 ms — sized to cover B-frame ptsOffset plus cross-source jitter at the boundary, while staying small enough for sub-second steady-state latency.

sources

{ pin: Pins; transitionFromPrevious?: 'hardCutAtEof' | 'hardCutAtIdr'; }[]

The ordered sequence of source pins to play. The first entry plays first; later entries activate as earlier ones reach EOF (or via the StreamSourceSequenceNode.advanceNow() trigger). May be empty at construction and appended to later via StreamSourceSequenceNode.appendSource().

startAncillaryStreamId?

number

(Optional) Starting stream ID for the unified output ancillary stream.

startAudioStreamId?

number

(Optional) Starting stream ID for the unified output audio stream.

startSubtitleStreamId?

number

(Optional) Starting stream ID for the unified output subtitle stream.

startVideoStreamId?

number

(Optional) Starting stream ID for the unified output video stream.

stripVolatileMetadata?

boolean

(Optional) When true, strip volatile metadata fields (currently bitrate on compressed audio/video) from the output context so downstream consumers don’t see spurious context changes when the active source’s instantaneous bitrate fluctuates. Defaults to false.