Overview
Custom control panels allow you to:- Match your app’s branding and design language
- Simplify the interface by showing only relevant controls
- Add custom functionality and workflows
- Create unique user experiences
- Mute/Unmute audio button
- Pause/Resume video button
- Switch camera button
- End call button
Prerequisites
- CometChat Calls SDK installed and initialized
- Active call session (see Join Session)
- Familiarity with Actions and Events
Step 1: Hide Default Controls
Configure your session settings to hide the default control panel:You can also hide individual buttons while keeping the control panel visible. See SessionSettingsBuilder for all options.
Step 2: Create Custom Layout
Create a custom view for your controls programmatically or in Interface Builder:Step 3: Implement Control Actions
Set up button actions and call the appropriate SDK methods:Step 4: Handle State Updates
UseMediaEventsListener to keep your UI synchronized with the actual call state. Register the listener in the viewDidLoad of the CallViewController from Step 2 (the code below replaces that method), and remove it when the screen goes away (deinit in Swift, dealloc in Objective-C):
SessionStatusListener to handle session end events: