Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
74ebc10
docs(react): say how 1:1 calls ring on the Calls SDK 5.1 flow
PrajwalDhuleCC Nov 23, 2026
efcc40a
docs(react): raise the Chat SDK and Calls SDK floors for 7.3
PrajwalDhuleCC Nov 23, 2026
486cb45
docs(react): bring the calling integration guide to the ringing flow
PrajwalDhuleCC Nov 23, 2026
6a36325
docs(react): describe the call buttons on the ringing flow
PrajwalDhuleCC Nov 23, 2026
87488f3
docs(react): give the incoming call card's callbacks their new meaning
PrajwalDhuleCC Nov 23, 2026
72632c1
docs(angular): add the call host, and say how calls ring
PrajwalDhuleCC Nov 23, 2026
975405f
docs(react): show "Ringing..." and place calls the kit's way on Outgo…
PrajwalDhuleCC Nov 23, 2026
4452edd
docs(react): say how callSettingsBuilder applies to 1:1 calls elsewhere
PrajwalDhuleCC Nov 23, 2026
fa64888
docs(angular): call settings are a plain SessionSettings object, laid…
PrajwalDhuleCC Nov 23, 2026
c5de493
docs(react): say how calls show in the conversation list
PrajwalDhuleCC Nov 23, 2026
145e3e8
docs(react): document logout's calls and the ringing flow's troublesh…
PrajwalDhuleCC Nov 23, 2026
1e05c72
docs(react): say that the kit publishes a ringing call's events itself
PrajwalDhuleCC Nov 23, 2026
82c95ee
docs(angular): the incoming and outgoing call screens on the ringing …
PrajwalDhuleCC Nov 23, 2026
1828583
docs(react): add a guide to custom call screens
PrajwalDhuleCC Nov 23, 2026
8f6500b
docs(angular): Calls SDK 5.1.1 and Chat SDK 4.2.1, logout, storage mo…
PrajwalDhuleCC Nov 23, 2026
e1d1011
docs(react): tighten the decline lines on Call Buttons and Incoming Call
PrajwalDhuleCC Nov 23, 2026
c6c1f0d
docs(react): say that only group calls the kit places skip ringing
PrajwalDhuleCC Nov 23, 2026
cc51632
docs(angular): name the dashboard setting for call activities
PrajwalDhuleCC Nov 23, 2026
1acd294
docs(react): one rule for call settings, and fixes from testing the s…
PrajwalDhuleCC Nov 25, 2026
9016b64
docs(angular): one rule for call settings, and fixes from testing the…
PrajwalDhuleCC Nov 25, 2026
7f55018
Merge main (the React offline docs for 7.3.0) into the ringing docs
PrajwalDhuleCC Nov 25, 2026
3bb99d7
Merge main (the Angular offline docs for 5.3.0) into the ringing docs
PrajwalDhuleCC Nov 25, 2026
f90b994
Merge the React ringing docs into the ringing docs for both kits
PrajwalDhuleCC Nov 26, 2026
3d37346
docs(calls): Calls SDK 5.1.1 for JavaScript, and the web UI Kits that…
PrajwalDhuleCC Nov 26, 2026
e1d1145
docs(calls): show the onAccept change for apps coming from React UI K…
PrajwalDhuleCC Nov 27, 2026
bde0bfa
docs(calls): address the first-pass review of the ringing pages
PrajwalDhuleCC Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions calls/javascript/migrating-from-legacy-ringing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Migrating from Legacy Ringing"
sidebarTitle: "Migrating from Legacy Ringing"
sdk_version: "5.x"
description: "Move a web app from Chat SDK call signalling (CometChat.initiateCall, acceptCall, rejectCall) to ringing with the Calls SDK 5.1: what to add, what to delete, and how each method maps."

Check warning on line 5 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'acceptCall'?

Check warning on line 5 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'rejectCall'?
---

Legacy ringing signalled calls through the Chat SDK: `CometChat.initiateCall` created the call, a `CallListener` on the Chat SDK's real-time connection told the callee, and `acceptCall`, `rejectCall` and `endCall` answered, declined and ended it. Ringing now runs on the Calls SDK: it creates the call, prepares and joins the session, and ends the ring. The Chat SDK's calling methods are superseded by the Calls SDK and no longer used. On the web, the Chat SDK's `CallListener` stays: it is still how an incoming call reaches an open tab.
Expand All @@ -12,8 +12,10 @@
## Before you start

Ringing with the Calls SDK is opt-in on the client: update your app to the APIs below. While some of your users are still on legacy ringing, one dashboard setting lets the two flows call each other; see [While some users are still on legacy ringing](#while-some-users-are-still-on-legacy-ringing).
This page is for apps that use the SDKs directly. If you use the CometChat UI Kit, its
support for this flow comes with a coming UI Kit release; keep legacy ringing until then.
This page is for apps that use the SDKs directly. The web UI Kits ring 1:1 calls on this flow themselves from
React UI Kit 7.4.0 and Angular UI Kit 5.4.0, so if you use one, update the kit instead of following this page. See
How calls ring for the [React UI Kit](/ui-kit/react/call-features#how-calls-ring) and the
[Angular UI Kit](/ui-kit/angular/call-features#how-calls-ring). Earlier kit versions stay on legacy ringing.

<Note>
Web and mobile apps ring each other on this flow when the mobile app also rings with the Calls SDK 5.1 and the Push Notifications SDK 2.0. Calls between an app on legacy ringing and an app on this flow ring once **Connect legacy ringing** is on in the dashboard; see [While some users are still on legacy ringing](#while-some-users-are-still-on-legacy-ringing).
Expand All @@ -24,9 +26,9 @@
| Legacy | Now |
|--------|-----|
| The Chat SDK created the call, and `acceptCall` / `rejectCall` / `endCall` were HTTP calls your app had to sequence with `generateToken` and `joinSession` | The Calls SDK creates the call and prepares its session. Answer = join; decline, busy, cancel and no answer are one `endCall(sessionId, status)` |
| The caller only knew "accepted" or "rejected" | The caller sees "Ringing…" (the callee's device was reached) and "answered" from the Calls SDK. A decline, busy or no answer still arrives as the Chat SDK's `onOutgoingCallRejected`, with the reason in its status |

Check warning on line 29 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
| Joining took a token request and a full connect after the answer | The session is prepared while it rings, so the join is near-instant |
| Web and mobile rang through different paths | One call, rung in the callee's open tabs (Chat SDK) and on the callee's phones (Push Notifications SDK 2.0, in a mobile app on the Calls SDK 5.1) |

Check warning on line 31 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

Check warning on line 31 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

## Before and after

Expand Down Expand Up @@ -71,7 +73,7 @@
## Step 1: Update dependencies

```bash
npm install @cometchat/calls-sdk-javascript@5.1.0
npm install @cometchat/calls-sdk-javascript@5.1.1
# @cometchat/chat-sdk-javascript (4.2.1 or later) stays: chat, and incoming calls on the web
```

Expand All @@ -85,8 +87,8 @@
|--------|-----|-------|
| `CometChat.initiateCall(new CometChat.Call(receiverId, callType, receiverType))` | `CometChatCalls.initiateCall(receiver, { type, receiverType, sessionSettings })` → `{ data, error }` | `data.session` is the caller's session, already preparing. Set `sessionType` in `sessionSettings`, and `isPeerCall: true` for a 1:1 call |
| `CometChat.initiateCall(call, timeout)` | No timeout parameter | Run your own timer on the caller and end the call with `endCall(sessionId, "unanswered")` after 45 s, the default length of a phone's ring |
| `onOutgoingCallAccepted(call)` | `CometChatCalls.addEventListener("onParticipantJoined", ...)` on the prepared session, then `data.session.join(container)` | New in-between event: `onParticipantConnected` = the callee's device is ringing |

Check warning on line 90 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
| `onOutgoingCallRejected(call)` | Unchanged: a decline, busy or no answer still arrives on the Chat SDK's `CallListener`, with the reason in `call.getStatus()`. Also `onConnectionClosed` when a callee that had prepared a 1:1 session declines | The Calls SDK reports no reason itself. Check `getCallInitiator()`: a 1:1 decline reaches the callee's other tabs too. Keep a 3 s status poll as a backstop for a message a tab missed (asleep, reconnecting) |

Check warning on line 91 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
| `CometChat.rejectCall(sessionId, CometChat.CALL_STATUS.CANCELLED)` | `CometChatCalls.endCall(sessionId, "cancelled")` | Tears the caller's prepared session down first |
| `generateToken` + `joinSession` after the answer | `data.session.join(container)` | Takes no settings: the ones passed to `initiateCall` apply |

Expand Down Expand Up @@ -222,7 +224,7 @@

## What users will notice

- The caller sees "Ringing…" once the callee's tab or phone is reached, and the call screen closes when the call is declined, busy or missed (from `onOutgoingCallRejected`, the status poll, or the ring timer).

Check warning on line 227 in calls/javascript/migrating-from-legacy-ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
- Answering joins almost at once, because the session was prepared while it rang.
- Calls ring between web and mobile users in both directions, when the mobile app also rings with the Calls SDK 5.1 and the Push Notifications SDK 2.0. Calls between an app on legacy ringing and an app on this flow ring too, once **Connect legacy ringing** is on in the dashboard.
- The browser asks for the camera and microphone when the call is joined, not while it rings.
Expand Down
2 changes: 1 addition & 1 deletion calls/javascript/ringing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

## How ringing works

The caller creates the call with the Calls SDK. The CometChat backend delivers the call message to the callee's open tabs through the Chat SDK, and to the callee's phones by push. The callee's tab rings and prepares the session while it rings; when the callee answers, it joins. The caller's app learns that the callee is ringing and has answered from the Calls SDK, without joining the session first.

Check warning on line 29 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

Check warning on line 29 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

Check warning on line 29 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

```mermaid
sequenceDiagram
Expand All @@ -51,7 +51,7 @@
| Stage | Caller | Callee (web) |
|-------|--------|--------|
| Call created | `initiateCall` resolves; show "Calling…" | `onIncomingCallReceived` in each open tab; ring and call `connect` |
| Callee's device reached | `onParticipantConnected` → show "Ringing…" | Ringing |

Check warning on line 54 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'Callee's'?
| Callee answers | `onParticipantJoined` → `data.session.join(container)` | `session.join(container)` |
| Callee declines / is busy / does not answer | The Chat SDK's `onOutgoingCallRejected`, with `call.getStatus()` saying why; also `onConnectionClosed` when the callee had prepared a 1:1 session. [Poll the status](#detect-a-decline-busy-or-no-answer) and keep your [ring timer](#ring-timeout) as a backstop | `endCall(sessionId, "rejected")` or `"busy"`; your own ring timer |
| Caller cancels | — (you ended it) | `onIncomingCallCancelled`, or (1:1) `onConnectionClosed` on the prepared session; [poll the status](#stop-ringing-on-the-callee) as a backstop |
Expand All @@ -68,7 +68,7 @@
- HTTPS in production, for camera and microphone access.

```bash
npm install @cometchat/calls-sdk-javascript@5.1.0 @cometchat/chat-sdk-javascript@^4.2.1
npm install @cometchat/calls-sdk-javascript@5.1.1 @cometchat/chat-sdk-javascript@^4.2.1
```

## Start a call
Expand Down Expand Up @@ -118,7 +118,7 @@

## Show "Ringing…" and detect the answer

The caller stays on the session that `initiateCall` prepared and listens to it. Do not join yet: joining only when the callee has joined keeps the caller's camera and microphone off until there is someone to talk to. While the session is only prepared, the SDK still reports the callee's device reaching the room and the callee joining it.

Check warning on line 121 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

Listeners registered with `CometChatCalls.addEventListener` (or `call.session.addEventListener`) are global: they work before the prepare has finished and stay registered across sessions until you call the function they return. Register them right after `initiateCall` resolves, and check that the event belongs to the call on screen.

Expand Down Expand Up @@ -198,7 +198,7 @@
| Event | On the prepared session it means |
|-------|----------------------------------|
| `onConnected` | Your own prepare finished; the join will be near-instant |
| `onParticipantConnected(participant)` | The callee's device prepared the session: it is ringing there. `participant` carries `uid`, `name`, `pid` and `avatar` |

Check warning on line 201 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
| `onParticipantJoined(participant)` | The callee answered. Join now |
| `onConnectionClosed` | The call ended before anyone joined (declined, cancelled, the room went away, or the prepared session expired after 5 minutes). It carries no reason. `onSessionTimedOut` is not part of this: it only reports an idle joined session |

Expand Down Expand Up @@ -495,7 +495,7 @@

## Cancel a call

The caller ends a call that is still ringing with `endCall` and the `cancelled` status. The SDK first starts tearing the caller's prepared session down, then tells the server; `onConnectionClosed` follows when the room closes (the sample below has already removed its own listener). The callee's ring stops.

Check warning on line 498 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

```javascript
async function cancelOutgoingCall(sessionId) {
Expand Down Expand Up @@ -528,7 +528,7 @@

Nothing in the web SDKs ends a ring on a timer, so run a timer on both sides.

On the caller, start it when `initiateCall` resolves and end the call as `unanswered` when it runs out; `watchOutgoingCall` above does this. Use 45 seconds, the default ring window of a callee on a phone. A callee on a phone stops ringing at its Push SDK's ring window, but if the callee's device is never reached, nothing else ends the caller's ringing until the prepared session expires after 5 minutes. A group call the caller stops waiting on is withdrawn as `cancelled` instead: `unanswered` is a 1:1 outcome.

Check warning on line 531 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?

On the callee, stop ringing after 60 seconds, a little after the caller would have given up, with `stopRinging(sessionId, "over")`. Do not send a status: the caller ends the call.

Expand Down Expand Up @@ -583,7 +583,7 @@
| `rejected` | Callee declined | Callee, `endCall(sessionId, "rejected")` |
| `busy` | Callee was in another call | Callee, `endCall(sessionId, "busy")` |
| `cancelled` | Caller ended it before an answer | Caller, `endCall(sessionId, "cancelled")` |
| `unanswered` | Nobody answered in the ring window | Caller's timer, `endCall(sessionId, "unanswered")`, or a mobile callee's Push SDK |

Check warning on line 586 in calls/javascript/ringing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
| `ended` | Hung up after being answered | Backend, when the session ends |
| `missed` | How an unanswered or cancelled incoming call appears in call logs | Call logs |

Expand Down
6 changes: 4 additions & 2 deletions calls/javascript/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ If you're using CometChat UI Kits, voice and video calling can be quickly integr

👉 [React UI Kit Calling Integration](/ui-kit/react/calling-integration)

👉 [Angular UI Kit Call Features](/ui-kit/angular/call-features)

Use this Calls SDK directly only if you need custom call UI or advanced control.
</Info>

Expand All @@ -27,12 +29,12 @@ Install the CometChat Calls SDK using npm or yarn:
<Tabs>
<Tab title="npm">
```bash
npm install @cometchat/calls-sdk-javascript@5.1.0
npm install @cometchat/calls-sdk-javascript@5.1.1
```
</Tab>
<Tab title="yarn">
```bash
yarn add @cometchat/calls-sdk-javascript@5.1.0
yarn add @cometchat/calls-sdk-javascript@5.1.1
```
</Tab>
</Tabs>
Expand Down
4 changes: 3 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@
"ui-kit/react/guide-custom-text-formatter",
"ui-kit/react/guide-search-messages",
"ui-kit/react/guide-new-chat-creation",
"ui-kit/react/guide-message-privately"
"ui-kit/react/guide-message-privately",
"ui-kit/react/guide-custom-call-screens"
]
},
{
Expand Down Expand Up @@ -2686,6 +2687,7 @@
"group": "Calls",
"pages": [
"ui-kit/angular/components/cometchat-call-buttons",
"ui-kit/angular/components/cometchat-call-host",
"ui-kit/angular/components/cometchat-incoming-call",
"ui-kit/angular/components/cometchat-outgoing-call",
"ui-kit/angular/components/cometchat-call-logs"
Expand Down
7 changes: 4 additions & 3 deletions ui-kit/angular/api-reference/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
title: Services
description: "Reference for CometChat UIKit Angular injectable services."

Check warning on line 3 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

Check warning on line 3 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'injectable'?
---

<Accordion title="AI Integration Quick Reference">

| Field | Value |
| --- | --- |
| Purpose | Index of the Angular UI Kit's injectable services — start here to find the right one |

Check warning on line 10 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'injectable'?
| Package | `@cometchat/chat-uikit-angular` v5.x |
| Services | `ChatStateService` · `FormatterConfigService` · `MessageBubbleConfigService` · `RichTextEditorService` · `SearchConversationsService` · `SearchMessagesService` · `CometChatTemplatesService` |
| Injected with | `inject(<Service>)` — all are `providedIn: 'root'` except `SearchConversationsService` and `SearchMessagesService`, which are component-provided (add them to your component's `providers`) |
| Full list | See [Services](#services) |

</Accordion>
This section documents the Angular services provided by the CometChat UIKit. These are injectable services you use via Angular's dependency injection to manage state, configure components, and customize behavior.

Check warning on line 17 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

Check warning on line 17 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'injectable'?

## Core Classes

### CometChatUIKit

The main entry point for initializing and configuring the UIKit.

Check warning on line 23 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

```typescript expandable
class CometChatUIKit {
Expand All @@ -39,7 +39,7 @@
```

<Note>
The UIKit exposes two session-check methods with intentionally different casing — this mirrors the underlying CometChat SDK naming.

Check warning on line 42 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

- `getLoggedInUser()` (capital **I**, synchronous) — returns the in-memory cached user immediately. Use this for quick checks inside components where you already know the user is logged in.
- `getLoggedinUser()` (lowercase **i**, async) — makes an SDK call to verify the session. Use this in `ngOnInit` or `main.ts` before rendering components, as it is the authoritative check.
Expand Down Expand Up @@ -72,14 +72,15 @@
| `subscribePresenceForFriends()` | — | — | Subscribe to presence updates for friends only |
| `subscribePresenceForRoles(roles)` | `string[]` | — | Subscribe to presence updates for specific roles |
| `setAutoEstablishSocketConnection(auto)` | `boolean` | `true` | Auto-establish WebSocket connection on init |
| `setCallingEnabled(enabled)` | `boolean` | `false` | Enable voice/video calling. When `true`, the Calls SDK is initialized after login and call buttons become visible in MessageHeader, CallButtons, and CallLogs. When `false` (default), call buttons are hidden and the Calls SDK is not initialized |
| `setCallingEnabled(enabled)` | `boolean` | `false` | Enable voice/video calling. When `true`, the Calls SDK is initialized after login and call buttons become visible in MessageHeader, CallButtons, and CallLogs. The Calls SDK reads the logged-in user from the Chat SDK, so the app doesn't log in to it. When `false` (default), call buttons are hidden and the Calls SDK is not initialized |
| `setCallAppSettings(settings)` | `any` | — | Custom `CallAppSettings` for the Calls SDK. Built via `CometChatUIKitCalls.CallAppSettingsBuilder`. If not set, the UIKit builds default settings from `appId` and `region` |

Check warning on line 76 in ui-kit/angular/api-reference/introduction.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?
| `setStorageMode(mode)` | `CometChat.StorageMode` | `LOCAL` | Storage mode for the SDK |
| `setStorageMode(mode)` | `CometChat.StorageMode` | `LOCAL` | Storage mode for the Chat SDK and the Calls SDK. The kit passes it to the Calls SDK too, unless your `CallAppSettings` sets its own `storageMode` |
| `setAdminHost(host)` | `string` | — | Override the admin host URL |
| `setClientHost(host)` | `string` | — | Override the client host URL |


<Info>
`setCallingEnabled(true)` requires `@cometchat/calls-sdk-javascript` to be installed. Without the Calls SDK package, calling features will not activate even when enabled.
`setCallingEnabled(true)` requires `@cometchat/calls-sdk-javascript` 5.1.1 or later to be installed. Without the Calls SDK package, calling features will not activate even when enabled. On 5.0.x, every 1:1 call fails with the error `CALLS_SDK_UNAVAILABLE`.
</Info>

## Services
Expand Down
36 changes: 35 additions & 1 deletion ui-kit/angular/call-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Overview

CometChat Calls integrates 1:1 and group audio/video calling into the Angular UIKit. Install the Calls SDK and the UIKit auto-detects it, enabling call components.

Check warning on line 8 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

Check warning on line 8 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

<Note>
Ensure `CometChatUIKit.init()` has completed and the user is logged in before using call features.
Expand All @@ -16,9 +16,13 @@
Install the Calls SDK:

```bash
npm install @cometchat/calls-sdk-javascript
npm install @cometchat/calls-sdk-javascript@^5.1.1
```

<Note>
1:1 calls need the Calls SDK 5.1.1 or later. On 5.0.x, every 1:1 call fails with the error `CALLS_SDK_UNAVAILABLE`.
</Note>

Then enable calling in your `UIKitSettingsBuilder`:

```typescript
Expand All @@ -36,9 +40,21 @@

When enabled, [cometchat-call-buttons](/ui-kit/angular/components/cometchat-call-buttons) renders in [cometchat-message-header](/ui-kit/angular/components/cometchat-message-header) and the trailing call button appears in [cometchat-call-logs](/ui-kit/angular/components/cometchat-call-logs).

### Add the incoming call card and the call host

Put [cometchat-incoming-call](/ui-kit/angular/components/cometchat-incoming-call) and [cometchat-call-host](/ui-kit/angular/components/cometchat-call-host) once in your root component, next to the router outlet, and add `RouterOutlet`, `CometChatIncomingCallComponent` and `CometChatCallHostComponent` to its `imports`:

```html
<router-outlet />
<cometchat-incoming-call></cometchat-incoming-call>
<cometchat-call-host></cometchat-call-host>
```

The incoming call card rings for calls to the logged-in user. The call host draws the screens of every call, so a call carries on when the user opens another chat. Without it, the call buttons draw the screens themselves, and a call ends when the call buttons that placed it are destroyed.

### Custom Call App Settings

By default the UIKit builds `CallAppSettings` from your `appId` and `region`. If you need custom configuration (e.g. a different region for the Calls SDK or additional settings), pass your own `CallAppSettings`:

Check warning on line 57 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?

```typescript
import { CometChatUIKitCalls } from '@cometchat/calls-sdk-javascript';
Expand All @@ -58,13 +74,31 @@
```

<Info>
`setCallAppSettings` is optional. When omitted, the UIKit automatically creates settings from the `appId` and `region` you already provided.

Check warning on line 77 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'UIKit'?
</Info>

<Frame>
<img src="/images/cf123e9d-calling_call_buttons_web_screens-a0a134d7d742a761689aaebe2d6e71c2.png" />
</Frame>

## How calls ring

From UI Kit 5.4.0, 1:1 calls ring through the Calls SDK, on its [ringing flow](/calls/javascript/ringing). The kit places, answers, declines and cancels them, so the app writes no ringing code:

- The caller's screen reads "Calling...", then "Ringing..." once the callee's device rings.

Check warning on line 88 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
- The callee sees the [cometchat-incoming-call](/ui-kit/angular/components/cometchat-incoming-call) card. When one of the callee's tabs or devices answers or declines, the others stop ringing.

Check warning on line 89 in ui-kit/angular/call-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

Vale.Spelling

Did you really mean 'callee's'?
- If nobody answers within 45 seconds, the caller's kit ends the call as unanswered.
- A tab that is already in a call, placing one or showing an incoming call answers a new 1:1 call busy, without showing it.

Group calls that the kit places don't ring. The kit sends a meeting message to the group, and members join the call from it.

### The Connect legacy ringing setting

**Connect legacy ringing**, in the dashboard under **Voice & Video Calls → Settings**, also sends calls on this flow as legacy call events. Turn it on while some of your users are on apps on legacy ringing, such as an older UI Kit or a mobile app that doesn't ring with the Calls SDK 5.1 and the Push Notifications SDK 2.0; see [While some users are still on legacy ringing](/calls/javascript/migrating-from-legacy-ringing#while-some-users-are-still-on-legacy-ringing). While it's off:

- An app on legacy ringing that is called keeps ringing after the caller cancels.
- A decline, a cancel or no answer shows on the other side a few seconds late. The kit learns of it by reading the call's status every 3 seconds while the call rings, and from the call's messages once it ends.

## Features

### Incoming Call
Expand Down
33 changes: 17 additions & 16 deletions ui-kit/angular/components/cometchat-call-buttons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: "A standalone Angular component that provides voice and video call
| Primary output | `(error)` — call initiation failures |
| Prerequisites | `CometChatUIKit.initFromSettings()` resolved **and** `login()` complete before render — see [Integration](/ui-kit/angular/integration) |
| Stitching | Bind `[user]`/`[group]`. The message header already renders call buttons, so check before adding a second set. |
| Automatic behaviour | Call initiation and permission prompts are internal |
| Automatic behaviour | Call initiation and permission prompts are internal. 1:1 calls ring through the Calls SDK; group calls send a meeting message. See [How calls ring](/ui-kit/angular/call-features#how-calls-ring) |
| Sizing | Fills its container — an ancestor without a resolved height collapses it to 0px |
| Full props | See [Properties](#properties) |
| Events | See [Events](#events) |
Expand All @@ -27,7 +27,7 @@ description: "A standalone Angular component that provides voice and video call

## Overview

The CometChatCallButtons component renders voice and video call buttons for initiating calls to a user or group. It delegates call state management and initiation logic to an internal service, and displays the outgoing call overlay and ongoing call screen automatically when a call is in progress.
The CometChatCallButtons component renders voice and video call buttons for initiating calls to a user or group. It delegates call state management and initiation logic to an internal service, and displays the outgoing call overlay and ongoing call screen automatically when a call is in progress. With a [cometchat-call-host](/ui-kit/angular/components/cometchat-call-host) at the root of the app, the host draws those screens instead, so they stay up when this component is destroyed. Without one, destroying the last call buttons that draw the screens ends the call: a ringing call is cancelled, and an answered call is left.

### Key Features

Expand Down Expand Up @@ -95,7 +95,8 @@ export class CallButtonsDemoComponent {
| `onError` | `((error: CometChat.CometChatException) => void) \| null` | `null` | Error callback invoked for any error during call operations. |
| `outgoingCallDisableSoundForCalls` | `boolean` | `false` | Disables sound for the outgoing call overlay. Supports global config override. |
| `outgoingCallCustomSoundForCalls` | `string` | `''` | Custom sound URL for the outgoing call overlay. Supports global config override. |
| `callSettingsBuilder` | `SessionSettings` | `undefined` | A plain v5 `SessionSettings` object used to override the default call settings in the ongoing call screen. Pass a built `SessionSettings` object — the kit does **not** call `.build()` internally. Follows the three-tier priority: @Input > [GlobalConfig](/ui-kit/angular/customization/global-config) > default. |
| `callSettingsBuilder` | `SessionSettings` | `undefined` | A plain v5 `SessionSettings` object for the call screen. It is laid over the kit's defaults, with `sessionType` from the button pressed. See [Custom Call Settings](#custom-call-settings). Follows the three-tier priority: @Input > [GlobalConfig](/ui-kit/angular/customization/global-config) > default. |
| `hideOverlays` | `boolean` | `false` | When `true`, these buttons don't draw the outgoing and ongoing call screens for the calls they place. A [cometchat-call-host](/ui-kit/angular/components/cometchat-call-host) still draws them. |
| `voiceCallButtonView` | `TemplateRef<any> \| null` | `null` | Replaces the default voice call button with a custom template. |
| `videoCallButtonView` | `TemplateRef<any> \| null` | `null` | Replaces the default video call button with a custom template. |

Expand Down Expand Up @@ -137,12 +138,12 @@ cometchat-call-buttons {

### Custom Call Settings

Pass a plain v5 `SessionSettings` object to customize the call UI. Build the object yourself with `.build()` — the kit does **not** call `.build()` internally:
Pass a plain v5 `SessionSettings` object to customize the call screen. It isn't a builder: the kit lays the object over its own defaults, so you set only what you change.

```typescript expandable
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { CometChat } from '@cometchat/chat-sdk-javascript';
import { CometChatCalls } from '@cometchat/calls-sdk-javascript';
import type { SessionSettings } from '@cometchat/calls-sdk-javascript';
import { CometChatCallButtonsComponent } from '@cometchat/chat-uikit-angular';

@Component({
Expand All @@ -156,20 +157,19 @@ import { CometChatCallButtonsComponent } from '@cometchat/chat-uikit-angular';
</cometchat-call-buttons>
`
})
export class CustomCallSettingsComponent implements OnInit {
export class CustomCallSettingsComponent {
activeUser!: CometChat.User;
customCallSettings: any;

ngOnInit(): void {
// Build the SessionSettings object yourself — the kit does not call .build().
this.customCallSettings = new CometChatCalls.CallSettingsBuilder()
.enableDefaultLayout(true)
.setIsAudioOnlyCall(false)
.build();
}

customCallSettings: SessionSettings = {
layout: 'SIDEBAR',
startAudioMuted: true,
hideRecordingButton: false,
};
}
```

The kit lays the object over its own defaults, and `sessionType` comes from the button pressed (voice or video). A 1:1 call's settings are fixed when the call is placed, so a change made while it rings or runs doesn't reach that call; `isPeerCall` is always on for it, so hanging up ends the call for both people.

<Tip>
You can also set `callSettingsBuilder` globally via [GlobalConfig](/ui-kit/angular/customization/global-config) so all call components use the same settings without passing the input to each one.
</Tip>
Expand All @@ -191,6 +191,7 @@ export class CustomCallSettingsComponent implements OnInit {

## Related Components

- [CometChatCallHost](/ui-kit/angular/components/cometchat-call-host) — Draws the call screens instead of this component, so they outlive it
- [CometChatOutgoingCall](/ui-kit/angular/components/cometchat-outgoing-call) — Displayed automatically when a call is initiated
- [CometChatOngoingCall](/ui-kit/angular/components/cometchat-outgoing-call) — Displayed automatically when a call is accepted
- [CometChatMessageHeader](/ui-kit/angular/components/cometchat-message-header) — Typically hosts the call buttons
Loading