Skip to main content
CometChatOngoingCall is the call itself: the CometChat Calls SDK’s own call view — video tiles, mute, camera and end controls — with a spinner over it while it connects, and “Call failed” if the join fails. It shows a 1:1 call once it is answered, a group meeting, or a call answered from CallKit.
CometChatOngoingCall while the call connects

Where It Fits

The Kit shows this screen for every call it starts or answers — the call buttons, the call log’s call-back, a meeting bubble’s Join, and a call answered from CallKit. See Call Features.
The screen is shown through .cometChatCallPresenter() when your app installs it, otherwise from the component that started the call.

Quick Start

For a call your app placed or answered itself, show its session.
The screen finds the call before it joins anything: the store you pass; else the Kit’s current call for sessionId; else it joins sessionId through the Kit’s CallCoordinator, so your push integration hears about the join like any other.

Joining a Meeting

A group meeting is joined directly, with .directCalling. It ends only from its own leave button, not when one member leaves.
callSettingsBuilder takes the Calls SDK’s SessionSettingsBuilder. It applies only to a meeting this screen joins itself; any other call’s settings were fixed when it was placed, so the screen reports it once through onError instead.

Actions and Events

Callback Methods

onCallEnded has the signature () -> Void; onError is (CometChatError) -> Void.

Global Events

Leaving the screen does not end the call.
The Kit emits callEnded on CometChatEvents when the call ends.

Functionality


Advanced Methods

Store Access

OngoingCallStore is the call: its call (an ActiveCall — session, kind, title), its state (connecting, joined, ended, failed) and leave(). CallCoordinator.shared.activeCall is the call that is up now, if any.

Subclassing

CometChatOngoingCall is a View struct. Customise it with its style.

Style

The Calls SDK draws the call; the Kit draws only what covers it while it connects and if it fails.

Next Steps

Outgoing Call

The ringing screen that becomes this call

Call Buttons

Start a call or a group meeting

Call Logs

The calls the user has had

Call Features

How calls ring and are presented