Skip to main content
Handle call session events to build responsive UIs. The SDK provides event listeners to monitor session status, participant activities, media changes, button clicks, and layout changes.

Adding Event Listeners

Use the addEventListener() method to register event listeners. The method returns an unsubscribe function that you should call to remove the listener when no longer needed.

Session Events

Monitor the call session lifecycle including join/leave events and connection status.

Session Joined

Fired when you successfully connect to the session.

Session Left

Fired when you leave the session.

Session Timed Out

Fired when the session ends due to inactivity timeout.

Connection Lost

Fired when the network connection is interrupted.

Connection Restored

Fired when the connection is restored after being lost.

Connection Closed

Fired when the connection is permanently closed.

Participant Events

Monitor participant activities including join/leave, audio/video state, hand raise, screen sharing, and recording.

Participant Joined

Fired when a participant joins the call.

Participant Left

Fired when a participant leaves the call.

Participant List Changed

Fired when the participant list is updated.

Participant Audio Muted

Fired when a participant mutes their microphone.

Participant Audio Unmuted

Fired when a participant unmutes their microphone.

Participant Video Paused

Fired when a participant turns off their camera.

Participant Video Resumed

Fired when a participant turns on their camera.

Participant Hand Raised

Fired when a participant raises their hand.

Participant Hand Lowered

Fired when a participant lowers their hand.

Participant Started Screen Share

Fired when a participant starts screen sharing.

Participant Stopped Screen Share

Fired when a participant stops screen sharing.

Participant Started Recording

Fired when a participant starts recording.

Participant Stopped Recording

Fired when a participant stops recording.

Dominant Speaker Changed

Fired when the active speaker changes.

Media Events

Monitor your local media state changes including audio/video status, recording, and device changes.

Audio Muted

Fired when your microphone is muted.

Audio Unmuted

Fired when your microphone is unmuted.

Video Paused

Fired when your camera is turned off.

Video Resumed

Fired when your camera is turned on.

Recording Started

Fired when call recording starts.

Recording Stopped

Fired when call recording stops.

Screen Share Started

Fired when you start screen sharing.

Screen Share Stopped

Fired when you stop screen sharing.

Audio Input Device Changed

Fired when the audio input device changes.

Audio Output Device Changed

Fired when the audio output device changes.

Video Input Device Changed

Fired when the video input device changes.

Audio Input Devices Changed

Fired when the list of available audio input devices changes.

Audio Output Devices Changed

Fired when the list of available audio output devices changes.

Video Input Devices Changed

Fired when the list of available video input devices changes.

Button Click Events

Intercept UI button clicks from the default call interface to add custom behavior or analytics.

Leave Session Button Clicked

Fired when the leave button is clicked.

Toggle Audio Button Clicked

Fired when the mute/unmute button is clicked.

Toggle Video Button Clicked

Fired when the video on/off button is clicked.

Raise Hand Button Clicked

Fired when the raise hand button is clicked.

Share Invite Button Clicked

Fired when the share/invite button is clicked.

Change Layout Button Clicked

Fired when the layout change button is clicked.

Participant List Button Clicked

Fired when the participant list button is clicked.

Chat Button Clicked

Fired when the in-call chat button is clicked.

Recording Toggle Button Clicked

Fired when the recording toggle button is clicked.

Screen Share Button Clicked

Fired when the screen share button is clicked.

Layout Events

Monitor layout changes including layout type switches and participant list visibility.

Call Layout Changed

Fired when the call layout changes.

Participant List Visible

Fired when the participant list panel is opened.

Participant List Hidden

Fired when the participant list panel is closed.

Participant Object Reference

PropertyTypeDescription
uidStringUnique identifier (CometChat user ID)
nameStringDisplay name
avatarStringURL of avatar image