StreamingAgentEvents
Add the following line to your scenario code to use the events:
require(Modules.StreamingAgent);
Constants
AudioStreamCreated
Triggers when there is audio data in a stream.
Parameters
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there's no track.
AudioSwitched
Triggers when an 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's no track.
Connected
Triggers when a streaming object is connected to a streaming platform.
ConnectionFailed
Triggers when connection to a streaming platform is failed.
Disconnected
Triggers 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
Triggers 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
Stream name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
StreamStarted
Triggers when a stream is successfully started.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamName:
string
Stream name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
StreamStopped
Triggers when a stream is stopped.
Parameters
reason:
string
Reason why the stream is switched. Possible values are: "New stream", "Set stream".
streamName:
string
Stream name of a streaming object that triggered the event.
streamingAgent:
Streaming object that triggered the event.
VideoStreamCreated
Triggers when there is video data in a stream.
Parameters
streamingAgent:
Streaming object that triggered the event.
trackId:
number
ID of an audio or video track. Equals to -1 if there's no track.
VideoSwitched
Triggers when a 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's no track.