The SessionSettingsBuilder is a powerful configuration tool that allows you to customize every aspect of your call session before participants join. From controlling the initial audio/video state to customizing the UI layout and hiding specific controls, this builder gives you complete control over the call experience.Proper session configuration is crucial for creating a seamless user experience tailored to your application’s specific needs.
These are pre-session configurations that must be set before joining a call. Once configured, pass the SessionSettings object to the joinSession() method. Settings cannot be changed after the session has started, though many features can be controlled dynamically during the call using call actions.
Method:setTitle(_ title: String)Sets the title that appears in the call header. This helps participants identify the purpose or name of the call session. The title is displayed prominently at the top of the call interface.
Method:setDisplayName(_ name: String)Sets the display name that will be shown to other participants in the call. This name appears on your video tile and in the participant list, helping others identify you during the session.
Method:setType(_ type: CallType)Defines the type of call session. Choose .video for video calls with camera enabled, or .audio for audio-only calls. This setting determines whether video streaming is enabled by default.
Method:setLayout(_ layoutType: LayoutType)Sets the initial layout mode for displaying participants. .tile shows all participants in a grid, .spotlight focuses on the active speaker with others in a sidebar, and .sidebar displays the main speaker with participants in a side panel.
Method:setIdleTimeoutPeriod(_ timeoutSeconds: Int)Configures the timeout duration in seconds before automatically ending the session when you’re the only participant. This prevents sessions from running indefinitely when others have left.
Method:startAudioMuted(_ muted: Bool)Determines whether the microphone is muted when joining the session. Set to true to join with audio muted, requiring users to manually unmute. Useful for large meetings to prevent background noise.
Method:startVideoPaused(_ muted: Bool)Controls whether the camera is turned off when joining the session. Set to true to join with video disabled, allowing users to enable it when ready. Helpful for privacy or bandwidth considerations.
Method:setAudioMode(_ audioMode: AudioModeType)Sets the initial audio output device for the call. Options include .speaker for loudspeaker, .earpiece for phone earpiece, .bluetooth for connected Bluetooth devices, or .headphones for wired headphones.
Method:setInitialCameraFacing(_ initialCameraFacing: CameraFacing)Specifies which camera to use when starting the session. Choose .FRONT for the front-facing camera (selfie mode) or .BACK for the rear camera. Users can switch cameras during the call.
Method:enableAutoStartRecording(_ enabled: Bool)Automatically starts recording the session as soon as it begins. When enabled, recording starts without manual intervention, ensuring the entire session is captured from the start.
Method:hideControlPanel(_ hidden: Bool)Hides the bottom control bar that contains call action buttons. Set to true to remove the control panel entirely, useful for custom UI implementations or view-only modes.
Method:hideHeaderPanel(_ hidden: Bool)Hides the top header bar that displays the call title and session information. Set to true to maximize the video viewing area or implement a custom header.
Method:hideSessionTimer(_ hidden: Bool)Hides the session duration timer that shows how long the call has been active. Set to true to remove the timer display from the interface.
Method:hideLeaveSessionButton(_ hidden: Bool)Hides the button that allows users to leave or end the call. Set to true to remove this button, requiring an alternative method to exit the session.
Method:hideToggleAudioButton(_ hidden: Bool)Hides the microphone mute/unmute button from the control panel. Set to true to remove audio controls, useful when audio control should be managed programmatically.
Method:hideToggleVideoButton(_ hidden: Bool)Hides the camera on/off button from the control panel. Set to true to remove video controls, useful for audio-only calls or custom video control implementations.
Method:hideSwitchCameraButton(_ enabled: Bool)Hides the button that allows switching between front and rear cameras. Set to true to remove this control, useful for devices with single cameras or fixed camera requirements.
Method:hideRecordingButton(_ enabled: Bool)Hides the recording start/stop button from the control panel. Set to false to show the recording button, allowing users to manually control session recording.
Method:hideAudioModeButton(_ enabled: Bool)Hides the button that toggles between speaker, earpiece, and other audio output modes. Set to true to remove audio mode controls from the interface.
Method:hideRaiseHandButton(_ enabled: Bool)Hides the raise hand button that participants use to signal they want to speak. Set to true to remove this feature from the interface.
Method:hideShareInviteButton(_ enabled: Bool)Hides the button that allows sharing session invite links with others. Set to false to show the invite button, enabling easy participant invitation.
Method:hideParticipantListButton(_ hidden: Bool)Hides the button that opens the participant list view. Set to true to remove access to the participant list, useful for simplified interfaces.
Method:hideChangeLayoutButton(_ hidden: Bool)Hides the button that allows switching between different layout modes (tile, spotlight, sidebar). Set to true to lock the layout to the initial setting.
Method:hideChatButton(_ hidden: Bool)Hides the button that opens the in-call chat interface. Set to false to show the chat button, enabling text communication during calls.