StreamSwitchHardSettings.onSwitchComplete property
Callback which will be called if a switch request has been effectuated - that is, after a source switch is requested and has been accepted (is not an error), the desired source is now active on the output. For video sources, this means that a keyframe (IDR/IRAP/etc) has arrived on (at least one video stream), for audio-only sources this will be any frame.
Signature:
onSwitchComplete?: (source?: string) => void;