StreamingAgentEvents
Add the following line to your scenario code to use the events:
require(Modules.StreamingAgent);
Constants
AudioStreamCreated
Triggered when there is audio data in the stream.
Parameters
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there is no track.
AudioSwitched
Triggered when the audio stream is switched.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there is no track.
Connected
Triggered when a streaming object is connected to a streaming platform.
ConnectionFailed
Triggered when connection to a streaming platform is failed.
Disconnected
Triggered when a streaming object is disconnected from a streaming platform.
Error
Triggers if a streaming object cannot be created, e.g., due to incorrect serverUrl.
StreamError
Triggered when a streaming object caused an error, e.g., due to a codec mismatch.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamName:
string
Name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
StreamStarted
Triggered when a stream is successfully started.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamName:
string
Name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
StreamStopped
Triggered when a stream is stopped.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamName:
string
Name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
VideoStreamCreated
Triggered when there is video data in the stream.
Parameters
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there is no track.
VideoSwitched
Triggered when the video stream is switched.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there is no track.