| name | session-settings |
| description | Configure all SessionSettings options for React Native — layouts, session type, hide buttons, idle timeout, recording, audio mode. Use when customizing call UI or pre-session config. Triggers on "SessionSettings", "session settings", "hide button", "layout type", "idle timeout", "sessionType". |
| inclusion | manual |
CometChat Calls SDK v5 — Session Settings (React Native)
Overview
SessionSettings is a plain object passed as the sessionSettings prop to <CometChatCalls.Component>. It configures every aspect of a call session. All properties are optional with sensible defaults.
Key Imports
import { CometChatCalls } from '@cometchat/calls-sdk-react-native';
Implementation
Full Settings Example
<CometChatCalls.Component
callToken={callToken}
sessionSettings={{
sessionType: 'VIDEO',
layout: 'TILE',
startAudioMuted: false,
startVideoPaused: false,
autoStartRecording: false,
audioMode: 'SPEAKER',
idleTimeoutPeriodBeforePrompt: 60000,
idleTimeoutPeriodAfterPrompt: 120000,
displayName: 'John Doe',
title: 'Team Meeting',
hideControlPanel: false,
hideHeaderPanel: false,
hideSessionTimer: false,
hideNetworkIndicator: false,
hideRecordingStatusIndicator: false,
hideLeaveSessionButton: false,
hideToggleAudioButton: false,
hideToggleVideoButton: false,
hideSwitchCameraButton: false,
hideRecordingButton: true,
hideRaiseHandButton: false,
hideShareInviteButton: true,
hideParticipantListButton: false,
hideChangeLayoutButton: false,
hideChatButton: true,
hideAudioModeButton: false,
enableSpotlightDrag: true,
enableSpotlightSwap: true,
enableParticipantContextMenu: true,
}}
/>
Constants Reference
CometChatCalls.CALL_MODE.DEFAULT
CometChatCalls.CALL_MODE.SPOTLIGHT
CometChatCalls.AUDIO_MODE.SPEAKER
CometChatCalls.AUDIO_MODE.EARPIECE
CometChatCalls.AUDIO_MODE.BLUETOOTH
CometChatCalls.AUDIO_MODE.HEADPHONES
Common Presets
Voice call:
<CometChatCalls.Component
callToken={callToken}
sessionSettings={{
sessionType: 'VOICE',
layout: 'SPOTLIGHT',
startVideoPaused: true,
audioMode: 'EARPIECE',
}}
/>
Video call:
<CometChatCalls.Component
callToken={callToken}
sessionSettings={{
sessionType: 'VIDEO',
layout: 'TILE',
startVideoPaused: false,
}}
/>
Custom UI (hide default controls):
<CometChatCalls.Component
callToken={callToken}
sessionSettings={{
hideControlPanel: true,
hideHeaderPanel: true,
}}
/>
Button Defaults
| Button | Default Hidden? |
|---|
| Recording | Yes (true) |
| Share Invite | Yes (true) |
| Chat | Yes (true) |
| All others | No (false) |
Gotchas
- All properties are optional — pass only what you need to override
sessionType uses 'VOICE' not "AUDIO"
- Layout values:
'TILE', 'SIDEBAR', 'SPOTLIGHT' — all caps
- Idle timeout values are in milliseconds
- Recording, share invite, and chat buttons are hidden by default
hideControlPanel: true hides the entire bottom bar — individual hide flags are ignored
hideAudioModeButton and audioMode are mobile-specific (not available on web SDK)
- No
hideScreenSharingButton — screen sharing initiation is not supported on React Native
- No
hideVirtualBackgroundButton, enableNoiseReduction, or device ID selection — those are web-only