StreamingAgent
Represents a streaming object to interact with streaming platforms. Add the following line to your scenario code to use the class:
Methods
activeAudioTrack
Gets the track ID of an active audio track or -1 if there is none.
activeVideoTrack
Gets the track ID of an active video track or -1 if there is none.
addEventListener
Adds a handler for the specified StreamingAgentEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.
Parameters
audioTracks
Gets the list of all current audio tracks.
id
Returns the StreamingAgent’s id.
removeEventListener
Removes a handler for the specified StreamingAgentEvents event.
Parameters
setActiveTrack
Sets a certain audio and/or video track as active. If an active video track is set, it is not replaced by the new one unlike in the default mode. Default mode: The active video track is the one that started sending data last. The active audio track is always the first one. To return to the default mode, set the track IDs equal to -1.
Parameters
stop
Stops streaming. Triggers the StreamStopped event. Do not call any other streaming methods after a StreamingAgent.stop call.
videoTracks
Gets the list of all current video tracks.