Options
All
  • Public
  • Public/Protected
  • All
Menu

Events dispatched by Session object. Manage event listeners with Session.on, Session.once and Session.off methods.

Example:

session.on('connectionCreated', (event) => {
console.log('Connection ' + event.connection.connectionId + ' created');
}

session.off('connectionDestroyed');

Hierarchy

Index

Properties

connectionCreated: ConnectionEvent

Event dispatched when a new user has connected to the session.

It is fired for both the local user and remote users.

connectionDestroyed: ConnectionEvent

Event dispatched when a remote user has left the session.

For the local user see sessionDisconnected.

connectionPropertyChanged: ConnectionPropertyChangedEvent

This feature is part of OpenVidu PRO and ENTERPRISE editions

Event dispatched when a property of the local Connection object changes.

It is fired only for the local user.

The properties that may change are Connection.role and Connection.record. The only way the Connection properties may change is by updating them through:

exception: ExceptionEvent

This event acts as a global handler for asynchronous errors that may be triggered for multiple reasons and from multiple origins. To see the different types of exceptions go to ExceptionEventName.

networkQualityLevelChanged: NetworkQualityLevelChangedEvent

This feature is part of OpenVidu PRO and ENTERPRISE editions

Event dispatched when the network quality level of a Connection changes. See network quality.

publisherStartSpeaking: PublisherSpeakingEvent

Event dispatched when a user has started speaking.

It is fired for both the local user and remote users.

Extra information:

  • This event will only be triggered for streams that have audio tracks (Stream.hasAudio must be true).
  • Further configuration can be applied on how the event is dispatched by setting property publisherSpeakingEventsOptions in the call of OpenVidu.setAdvancedConfiguration.
publisherStopSpeaking: PublisherSpeakingEvent

Event dispatched when a user has stopped speaking.

It is fired for both the local user and remote users.

Extra information:

  • This event will only be triggered for streams that have audio tracks (Stream.hasAudio must be true).
  • Further configuration can be applied on how the event is dispatched by setting property publisherSpeakingEventsOptions in the call of OpenVidu.setAdvancedConfiguration.
reconnected: never

Event dispatched when the local user has successfully recovered its connection to the session after losing it.

If the connection was recovered but OpenVidu Server already evicted the user due to timeout, then this event will not be dispatched. A sessionDisconnected event with reason networkDisconnect will be triggered instead.

See Reconnection events.

reconnecting: never

Event dispatched when the local user has lost its connection to the session, and starts the automatic reconnection process.

recordingStarted: RecordingEvent

Event dispatched when the session has started being recorded.

Property OPENVIDU_RECORDING_NOTIFICATION of OpenVidu Server configuration defines which users should receive this events (by default, only users with role PUBLISHER or MODERATOR)

recordingStopped: RecordingEvent

Event dispatched when the session has stopped being recorded.

Property OPENVIDU_RECORDING_NOTIFICATION of OpenVidu Server configuration defines which users should receive this events (by default, only users with role PUBLISHER or MODERATOR)

sessionDisconnected: SessionDisconnectedEvent

Event dispatched when the local user has left the session.

For remote users see connectionDestroyed.

signal: SignalEvent

Event dispatched when a signal is received (see Send text messages between users).

If the listener is added as signal:TYPE, only signals of type TYPE will trigger the event.

speechToTextMessage: SpeechToTextEvent

This feature is part of OpenVidu PRO and ENTERPRISE editions

Event dispatched when a speech-to-text message has been received for certain Stream. See Speech To Text.

streamCreated: StreamEvent

Event dispatched when a user has started publishing media to the session (see Session.publish).

It is fired for both the local user and remote users.

streamDestroyed: StreamEvent

Event dispatched when a user stops publishing media to the session.

It is fired for both the local user and remote users.

streamPropertyChanged: StreamPropertyChangedEvent

Event dispatched when a Stream undergoes any change in any of its mutable properties (see StreamPropertyChangedEvent.changedProperty).

It is fired for both remote streams (owned by a Subscriber) or local streams (owned by a Publisher).

Generated using TypeDoc