SinkMediaNode.subscribeToPins() method

Subscribe to the given sources.

This version of the function call accepts the target pins of an output and is suitable for advanced use where a node is capable of subscribing to multiple video streams and provides a means of distinguishing them via pins discarding any existing subscriptions.

Signature:

subscribeToPins(sources: ReceiveFromAddress<Pins>[], validation?: (context: Context) => SubscriptionValidationResponse, done?: (error?: SubscriptionError) => void): void;

Parameters

Parameter Type Description

sources

ReceiveFromAddress<Pins>[]

validation

(context: Context) ⇒ SubscriptionValidationResponse

(Optional)

done

(error?: SubscriptionError) ⇒ void

(Optional) will be called with no arguments if the subscription succeeds, or an error if it failed. This error indicates the specific reason it failed, so you can take appropriate actions in response. It will be called before the subscribedStreamsChangedFn or subscribeErrorFn callbacks provided in the config for the node.

Errors are also logged to the debug log.

Returns:

void