CallSession.shared singleton instance during an active call session.
Get CallSession Instance
TheCallSession is a singleton that manages the active call. All actions are accessed through this instance.
Always check
isSessionJoined() before calling in-call actions to ensure you are in a call.Actions
Mute Audio
Mutes your local microphone, stopping audio transmission to other participants.Unmute Audio
Unmutes your local microphone, resuming audio transmission.Set Audio Mode
Changes the audio output device during a call.AudioMode Values
AudioMode Values
Pause Video
Turns off your local camera, stopping video transmission. Other participants see your avatar.Resume Video
Turns on your local camera, resuming video transmission.Switch Camera
Toggles between front and back cameras without interrupting the video stream.Start Recording
Begins server-side recording of the call. All participants are notified.Stop Recording
Stops the current recording. The recording is saved and accessible via the dashboard.Start Transcription
Available since v5.0.4 Begins server-side transcription of the call. This also enables the live closed captions overlay.Stop Transcription
Available since v5.0.4 Stops the current transcription and clears any captions currently on screen. The transcript is saved and can be retrieved withTranscriptsRequest.
Mute Participant
Mutes a specific participant’s audio. This is a moderator action.Pause Participant Video
Pauses a specific participant’s video. This is a moderator action.Pin Participant
Pins a participant to keep them prominently displayed regardless of who is speaking.Unpin Participant
Removes the pin, returning to automatic speaker highlighting.Set Layout
Changes the call layout. Each participant can choose their own layout independently.LayoutType Values
LayoutType Values
Enable Picture In Picture Layout
Enables PiP mode, allowing the call to continue in a floating window.Disable Picture In Picture Layout
Disables PiP mode, returning to full-screen call interface.Set Chat Button Unread Count
Updates the badge count on the chat button. Pass 0 to hide the badge.Is Session Active
isSessionActive() returns true while the SDK owns a session: one being prepared or prepared (for example an outgoing call that is still ringing), one being joined, or a joined one. isSessionJoined() is the narrower “in a call” check: true only once the media session is joined.
isCallSessionActive() is deprecated in 5.1 and renamed isSessionActive(). Because it now also covers a prepared session, use isSessionJoined() where you meant “in a call”.Leave Session
Ends your participation and disconnects gracefully. In a 1:1 call this is the hang-up: the other side receivesonParticipantLeft and the backend records the end, and a session joined as a peer call (setPeerCall(true)) ends for both. In a group call the session continues for the other participants. Leaving also cancels a session that is only prepared.
leaveSession() is deprecated in 5.1 and only calls leave(). To end a call that is still ringing use CometChatCalls.endCall(sessionID:status:onSuccess:onError:) with EndCallStatus.cancelled (caller), as described in Ringing; leave() alone does not tell the other side why.Raise Hand
Shows a hand-raised indicator to get attention from other participants.Lower Hand
Removes the hand-raised indicator.Hide Settings Panel
Hides the settings panel if it’s currently visible.Participant Object Reference
Participant Object Reference
Every property is Optional.
Participant carries no mute / video / pin / hand-raise /
screen-share flags, and the SDK exposes no getter for them — track that state in your own app
from the participant events. Because the events fire only on change, a
client that joins late cannot recover state that was already in effect.