| name | session-settings |
| description | Configure all SessionSettingsBuilder options — layouts, session type, audio mode, hide buttons, idle timeout, recording. Use when customizing call UI or pre-session config. Triggers on "SessionSettingsBuilder", "session settings", "hide button", "layout type", "audio mode", "idle timeout". |
| inclusion | manual |
CometChat Calls SDK v5 — Session Settings
Overview
SessionSettingsBuilder configures every aspect of a call session before joining. Settings are immutable after build() — pass the result to joinSession().
Key Imports
import CometChatCallsSDK
Implementation
Full Builder Example
let sessionSettings = SessionSettingsBuilder()
.setTitle("Team Meeting")
.setDisplayName("John Doe")
.setSessionType(.video)
.setLayout(.tile)
.setAudioMode(.speaker)
.setInitialCameraFacing(.FRONT)
.startAudioMuted(false)
.startVideoPaused(false)
.setIdleTimeoutPeriod(300)
.enableAutoStartRecording(false)
.enableNotifications(true)
.hideControlPanel(false)
.hideHeaderPanel(false)
.hideSessionTimer(false)
.hideLeaveSessionButton(false)
.hideToggleAudioButton(false)
.hideToggleVideoButton(false)
.hideSwitchCameraButton(false)
.hideRecordingButton(true)
.hideAudioModeButton(false)
.hideRaiseHandButton(false)
.hideShareInviteButton(true)
.hideParticipantListButton(false)
.hideChangeLayoutButton(false)
.hideChatButton(true)
.build()
Common Presets
Voice call:
let voiceSettings = SessionSettingsBuilder()
.startVideoPaused(true)
.startAudioMuted(false)
.build()
Video call:
let videoSettings = SessionSettingsBuilder()
.startVideoPaused(false)
.startAudioMuted(false)
.build()
Custom UI (hide default controls):
let customSettings = SessionSettingsBuilder()
.hideControlPanel(true)
.hideHeaderPanel(true)
.build()
Button Defaults
| Button | Default Hidden? |
|---|
| Recording | Yes (true) |
| Share Invite | Yes (true) |
| Chat | Yes (true) |
| All others | No (false) |
Gotchas
- Settings are immutable after
build() — create a new builder for changes
setIdleTimeoutPeriod() takes seconds, default is 300 (5 minutes)
- Recording, share invite, and chat buttons are hidden by default
- These are pre-session configs only; use
CallSession.shared actions for runtime changes
Sample App Reference
CallView.swift — SessionSettingsBuilder configuration in startSession()