StreamSwitchSmoothSettings interface

Settings for the Smooth Source Switch see NorskControl.streamSwitchSmooth()

Signature:

export interface StreamSwitchSmoothSettings<Pins extends string> extends ProcessorNodeSettings<StreamSwitchSmoothNode<Pins>>

Properties

Property Type Description

activeSource?

Pins

(Optional) The presently active source being used to generate output for this node

alignment?

"aligned" | "not_aligned"

(Optional) Alignment behaviour of the component whether to rebase all incoming streams to a common timeline Note: This will modify the timestamps, meaning that merging streams not involved in this may result in operation may result in sync issues. To avoid this, you can use NorskTransform.streamAlign() instead of relying on this component for this behaviour Note: This behaviour may be removed in a future release and replaced with something similar

audioLatencyMs?

number

(Optional) Latency in milliseconds for the audio gap filler. Higher values allow better concealment of gaps/overlaps at the cost of added audio delay. Defaults to 0 (no latency).

channelLayout

ChannelLayout

The constant channel layout that all output audio will be resampled to

frameRate

FrameRate

The constant framerate that all output video will be sampled to

hardwareAcceleration?

ComposeHardwareAcceleration

(Optional) Optionally attempt to perform the compose operation on hardware

maxQueueMs?

number

(Optional) Maximum duration to hold any stream in the case that one or more are running behind. In the case the late stream is delayed rather than having a large gap, this will result in discarded input frames.

onInboundContextChange?

(allStreams: Map<Pins, StreamMetadata[]>) ⇒ Promise<void>

(Optional) Callback to be called when inbound context changes on some input; presence of an input means that media has arrived and is ready to switch immediately

onSwitchError?

(message: string, inputPin?: Pins) ⇒ void

(Optional) Callback which will be called if a switch request cannot be fulfilled

onTransitionComplete?

(inputPin: Pins) ⇒ void

(Optional) Callback which will be called a transition has succesfully completed for a requested switch, i.e. the new source is now showing.

Note that if additional transitions are triggered when a transition is already in progress, a notification may only be given for the last transition to finish.

outputResolution

Resolution

The constant resolution that all output video will be scaled to

outputSource

string

The source name given to the output of this node

sampleFormat?

SampleFormat

(Optional) The sample format of the built outgoing stream (Defaults to FLTP)

sampleRate

SampleRate

The constant samplerate that all output audio will be resampled to

startAudioStreamId?

number

(Optional) Starting stream ID for the output audio stream (default 2)

startVideoStreamId?

number

(Optional) Starting stream ID for the output video stream (default 1)

transitionDurationMs?

number

(Optional) How many milliseconds to use for the fade operation between two sources