Skip to main content
Configure call sessions using a plain sessionSettings object. This allows you to customize the call UI, behavior, and features.

Session Settings Object

The sessionSettings object is a plain JavaScript object whose properties configure the call session. Pass it to CometChatCalls.Component via the sessionSettings prop:

Configuration Options

Call Type

PropertyTypeDefaultDescription
sessionTypestring'VIDEO'Set to 'VOICE' for audio-only calls or 'VIDEO' for video calls

Layout Mode

PropertyTypeDefaultDescription
layoutstring'TILE'Call layout mode
Available layouts:
LayoutDescription
'TILE'Grid layout with all participants visible
'SIDEBAR'Focus on one participant with others in a sidebar
'SPOTLIGHT'Focus on one participant with others overlaid

UI Controls

PropertyTypeDefaultDescription
hideControlPanelbooleanfalseHide the default button layout
hideLeaveSessionButtonbooleanfalseHide the leave session button
hideToggleAudioButtonbooleanfalseHide the mute audio button
hideToggleVideoButtonbooleanfalseHide the pause video button
hideSwitchCameraButtonbooleanfalseHide the switch camera button
hideAudioModeButtonbooleanfalseHide the audio mode button
hideRecordingButtonbooleantrueHide the recording button

Initial State

PropertyTypeDefaultDescription
startAudioMutedbooleanfalseStart call with audio muted
startVideoPausedbooleanfalseStart call with video paused
audioModestring-Set the default audio output mode
Available audio modes:
ModeDescription
'SPEAKER'Phone speaker
'EARPIECE'Phone earpiece
'BLUETOOTH'Bluetooth device
'HEADPHONES'Wired headphones

Recording

PropertyTypeDefaultDescription
hideRecordingButtonbooleantrueHide the recording button
autoStartRecordingbooleanfalseAuto-start recording when call begins

Idle Timeout

PropertyTypeDefaultDescription
idleTimeoutPeriodBeforePromptnumber180000Milliseconds of inactivity before the prompt appears
idleTimeoutPeriodAfterPromptnumber120000Milliseconds the user has to respond before the session ends

Video Tile Interaction

PropertyTypeDefaultDescription
enableSpotlightSwapbooleantrueEnable clicking video tiles to swap in Spotlight mode
enableSpotlightDragbooleantrueEnable dragging video tiles in Spotlight mode

Event Subscription

Subscribe to call events with CometChatCalls.addEventListener. Pass an AbortSignal to each listener and call controller.abort() once to remove them all on cleanup:

Complete Example

  • Join Session - Start a call with these settings
  • Events - Detailed event documentation
  • Actions - Control the call programmatically