AutoSinkMediaNode.subscribe() method
Subscribe to the given sources.
This version of subscribe simply requires a list of stream keys to be returned from each selector, and the server will automatically assign each stream to the appropriate pin on the sink node. This is the appropriate method for most cases.
Signature:
subscribe(sources: ReceiveFromAddressAuto[], validation?: (context: Context) => SubscriptionValidationResponse, done?: (error?: SubscriptionError) => void): void;
Parameters
Parameter | Type | Description |
---|---|---|
sources |
||
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 Errors are also logged to the debug log. |
Returns:
void