StreamSwitchHardNode.switchSource() method

Switch to a new active source at its first valid keyframe; the old source’s still-arriving frames stop emitting at the same instant. For the gapless-playlist pattern (where the previous source’s tail must keep playing while the next source warms up), use NorskControl.streamSourceSequence() instead.

The target pin must already be carrying streams; a switch to a pin whose source has not produced a context yet is refused by the engine and the switcher stays where it was. The refusal is reported through StreamSwitchHardSettings.onSwitchError and returned as the StreamSwitchResult; the promise resolves either way, never rejects. reflects the engine’s answer, not the request.

Signature:

switchSource(newSource: Pins): Promise<StreamSwitchResult>;

Parameters

Parameter Type Description

newSource

Pins

Returns: