| name | session-settings |
| description | Configure all SessionSettings options — layouts, session type, hide buttons, idle timeout, recording, noise reduction, virtual background. Use when customizing call UI or pre-session config. Triggers on "SessionSettings", "session settings", "hide button", "layout type", "idle timeout", "noise reduction". |
| inclusion | manual |
CometChat Calls SDK v5 — Session Settings
Overview
SessionSettings is a plain object that configures every aspect of a call session before joining. Pass it to joinSession() — all properties are optional with sensible defaults.
Key Imports
import { CometChatCalls, type SessionSettings } from '@cometchat/calls-sdk-javascript';
Implementation
Full Settings Example
const sessionSettings: SessionSettings = {
sessionType: 'VIDEO',
layout: 'TILE',
startAudioMuted: false,
startVideoPaused: false,
autoStartRecording: false,
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,
hideScreenSharingButton: false,
hideVirtualBackgroundButton: false,
enableNoiseReduction: false,
audioInputDeviceId: undefined,
audioOutputDeviceId: undefined,
videoInputDeviceId: undefined,
enableSpotlightDrag: true,
enableSpotlightSwap: true,
enableParticipantContextMenu: true,
};
CometChatCalls.joinSession(token, sessionSettings, container);
Constants Reference
CometChatCalls.constants.LAYOUT.TILE
CometChatCalls.constants.LAYOUT.SIDEBAR
CometChatCalls.constants.LAYOUT.SPOTLIGHT
CometChatCalls.constants.TYPE.VIDEO
CometChatCalls.constants.TYPE.VOICE
Common Presets
Voice call:
const voiceSettings: SessionSettings = {
sessionType: 'VOICE',
layout: 'SPOTLIGHT',
startVideoPaused: true,
};
Video call:
const videoSettings: SessionSettings = {
sessionType: 'VIDEO',
layout: 'TILE',
startVideoPaused: false,
};
Custom UI (hide default controls):
const customSettings: 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
SessionSettings is a Partial<> type — all properties are optional
sessionType uses 'VOICE' not "AUDIO"
- Layout values:
'TILE', 'SIDEBAR', 'SPOTLIGHT' — all caps
- Idle timeout values are in milliseconds (not seconds like Android)
- Recording, share invite, and chat buttons are hidden by default
hideControlPanel: true hides the entire bottom bar — individual hide methods are ignored
- These are pre-session configs only; use
CometChatCalls.* static methods for runtime changes
- Web-specific options (
enableNoiseReduction, hideVirtualBackgroundButton, device IDs) are not available on mobile SDKs