with one click
picture-in-picture
// Enable Picture-in-Picture mode for calls. Use when implementing PiP, floating call window, or PiP layout events. Triggers on "picture in picture", "PiP", "pip mode", "floating window".
// Enable Picture-in-Picture mode for calls. Use when implementing PiP, floating call window, or PiP layout events. Triggers on "picture in picture", "PiP", "pip mode", "floating window".
Set up CometChat Calls SDK v5 for iOS. Use when adding SDK via SPM or CocoaPods, configuring CallAppSettingsBuilder, CometChatCalls init, Info.plist permissions. Triggers on "setup calls sdk", "add cometchat dependency", "initialize calls", "spm setup", "cocoapods setup".
Control audio during calls — mute/unmute microphone, switch audio output device (speaker, earpiece, bluetooth). Use when implementing audio toggle, audio mode switching, or custom mute buttons. Triggers on "mute audio", "unmute", "audio mode", "speaker", "earpiece", "bluetooth audio".
Fetch call history using CallLogsRequest with pagination and filters. Use when displaying call logs, filtering by type/status/recording, or accessing recordings. Triggers on "call logs", "call history", "CallLogsRequest", "fetch recordings".
Build custom call UI — custom control panel, UIViewRepresentable patterns, layout customization. Use when hiding default controls and building your own call interface. Triggers on "custom control panel", "custom UI", "hideControlPanel", "custom call interface", "UIViewRepresentable".
Register call event listeners — SessionStatusListener, ParticipantEventListener, MediaEventsListener, ButtonClickListener. Use when handling call events, session status, participant changes, media state, or button clicks. Triggers on "event listener", "session listener", "participant listener", "media listener", "button click".
Manage call participants — mute, pause video, pin/unpin, raise hand, view participant list. Use when implementing moderation, participant actions, or custom participant UI. Triggers on "mute participant", "pin participant", "participant list", "raise hand", "participant management".
| name | picture-in-picture |
| description | Enable Picture-in-Picture mode for calls. Use when implementing PiP, floating call window, or PiP layout events. Triggers on "picture in picture", "PiP", "pip mode", "floating window". |
| inclusion | manual |
PiP lets users continue calls in a floating window while using other apps. The Calls SDK provides methods to enable/disable the PiP-optimized layout.
import CometChatCallsSDK
CallSession.shared.enablePictureInPictureLayout()
CallSession.shared.disablePictureInPictureLayout()
// In your call view controller or SwiftUI view
NotificationCenter.default.addObserver(
forName: UIApplication.didEnterBackgroundNotification,
object: nil, queue: .main
) { _ in
if CallSession.shared.isCallSessionActive() {
CallSession.shared.enablePictureInPictureLayout()
}
}
NotificationCenter.default.addObserver(
forName: UIApplication.willEnterForegroundNotification,
object: nil, queue: .main
) { _ in
CallSession.shared.disablePictureInPictureLayout()
}
AVPictureInPictureControllerisCallSessionActive() before enabling PiP to avoid errorsCallView.swift — Call activity that could be extended with PiP support