Rate this page:

StreamingAgentEvents

Add the following line to your scenario code to use the events:

require(Modules.StreamingAgent);

Constants

AudioStreamCreated

Copy URL

Triggered when there is audio data in the stream.

Parameters

  • streamingAgent:

    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

Copy URL

Triggered when the audio stream is switched.

Parameters

  • reason:

    string

    Reason why the stream is switched. Possible values are: "New stream", "Set stream".

  • streamingAgent:

    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

Copy URL

Triggered when a streaming object is connected to a streaming platform.

ConnectionFailed

Copy URL

Triggered when connection to a streaming platform is failed.

Disconnected

Copy URL

Triggered when a streaming object is disconnected from a streaming platform.

Error

Copy URL

Triggers if a streaming object cannot be created, e.g., due to incorrect serverUrl.

StreamError

Copy URL

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:

    StreamingAgent

    Streaming object that triggered the event.

StreamStarted

Copy URL

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:

    StreamingAgent

    Streaming object that triggered the event.

StreamStopped

Copy URL

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:

    StreamingAgent

    Streaming object that triggered the event.

VideoStreamCreated

Copy URL

Triggered when there is video data in the stream.

Parameters

  • streamingAgent:

    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

Copy URL

Triggered when the video stream is switched.

Parameters

  • reason:

    string

    Reason why the stream is switched. Possible values are: "New stream", "Set stream".

  • streamingAgent:

    StreamingAgent

    Streaming object that triggered the event.

  • trackId:

    number

    ID of an audio or video track. Equals to -1 if there is no track.