/cometchat-skills:cometchat-angular-v5-callsfrom cometchat-skills
Adds voice/video calling to Angular CometChat apps using the calls SDK. Handles incoming-call listeners, call buttons, call logs, and diagnosing calls that never ring.
Ships in cometchat-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Ground truth: calling UI ships INSIDE
@cometchat/chat-uikit-angular@5— there is no separate calls-UI package — but the WebRTC engine is a SEPARATE, NOT-bundled peer:@cometchat/calls-sdk-javascript@^5.0.3(major 5, distinct from the chat SDK's v4). EveryCometChat*symbol below exists in theangular-v5catalog. Exhaustive inputs/outputs and advanced call surfaces are FETCHED, not baked —{DOCS_BASE}/ui-kit/angular/call-features.md, the per-component pages (/components/cometchat-incoming-call,-call-buttons,-call-logs,-outgoing-call), and/guides/call-log-details; base + paths incometchat-angular-v5-core/references/docs-map.md. APPEND to the user's app — additive wiring only (RULES.md).
cometchat-angular-v5-core — install, credentials, init→login→render. Assumed.cometchat-angular-v5-placement — where the incoming-call listener mounts.Adding voice/video calling, or diagnosing calls that never ring.
npm install @cometchat/calls-sdk-javascript@^5
It is an optional peer of the UI Kit (^5.0.3), so it is not installed by default. Without it the call components are inert and CometChatUIKit.isCallingEnabled() returns false.
Calling must also be enabled for the app in the dashboard. Code alone is not enough.
core inits with initFromSettings, and on that path the kit derives calling from the settings object:
// verified in the shipped 5.1.0 and 5.2.2 bundles
const callingEnabled = !!settings.uiKit?.['callsSDK'];
if (callingEnabled) builder.setCallingEnabled(true);
So you must declare a uiKit.callsSDK block or calling stays off no matter what you installed:
CometChatUIKit.initFromSettings({
appId, region,
credentials: { authKey },
chatSDK: { presenceSubscription: { type: 'ALL_USERS' } },
uiKit: { callsSDK: {} }, // ← REQUIRED for calling on the initFromSettings path
});
Symptom if you miss it: <cometchat-call-buttons> renders as a zero-size empty element and the message header shows no call buttons. Nothing errors, nothing logs, and the package is installed — so it reads as a layout or CSS bug. CometChatUIKit.isCallingEnabled() returns false; check that first.
The docs' builder path uses
.setCallingEnabled(true)onUIKitSettingsBuilderinstead. Both are correct for their own init — seecometchat-angular-v5-core/references/lifecycle.md. Do not mix them.
<cometchat-incoming-call> at APP ROOT — not in the chat page.Step 2 is the one that goes wrong.
<!-- app.component.html -->
<cometchat-incoming-call
(callAccepted)="onAccepted($event)"
(callDeclined)="onDeclined($event)"
(error)="onError($event)">
</cometchat-incoming-call>
<router-outlet></router-outlet>
Mounted inside the chat page it unmounts the moment the user navigates elsewhere, so calls stop ringing anywhere except that one route. It looks like the calls SDK is broken; it is a placement bug.
Remember CometChatIncomingCallComponent in the root component's imports: [].
<cometchat-message-header> renders voice and video buttons itself — check the running app before adding your own. Suppress with [hideVoiceCallButton]="true" / [hideVideoCallButton]="true".
The default is not hardcoded: the header reads COMETCHAT_GLOBAL_CONFIG and tracks whether you set the input explicitly, so an app-wide config can hide the buttons even though nothing on the component says so. If they are missing, check the global config before concluding the header does not render them — and if they are present, do not add <cometchat-call-buttons> alongside or you get two sets.
Standalone, elsewhere in your UI:
<cometchat-call-buttons [user]="activeUser()" [group]="activeGroup()" (error)="onError($event)"></cometchat-call-buttons>
Both call components must be in the consuming component's imports: [] — omitted, they
render nothing and never ring. Mount <cometchat-incoming-call> at the app root, not
inside a route, or it stops ringing the moment the user navigates away:
import { Component, inject, computed } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
ChatStateService,
CometChatCallButtonsComponent,
CometChatIncomingCallComponent,
CometChatUIKitCalls,
} from '@cometchat/chat-uikit-angular';
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, CometChatCallButtonsComponent, CometChatIncomingCallComponent],
template: `
<cometchat-incoming-call (callAccepted)="onAccepted($event)"></cometchat-incoming-call>
<cometchat-call-buttons [user]="activeUser()" [group]="activeGroup()"></cometchat-call-buttons>
`,
})
export class AppRootComponent {
private readonly chatState = inject(ChatStateService);
readonly activeUser = computed(() => this.chatState.activeUser() ?? undefined);
readonly activeGroup = computed(() => this.chatState.activeGroup() ?? undefined);
// CometChatUIKitCalls is the calls-SDK accessor the kit exposes; it is null until the
// SDK has loaded, so never touch it during construction.
readonly calls = CometChatUIKitCalls;
onAccepted(_call: unknown) { /* route to your ongoing-call screen */ }
}
The kit drives these once a call is accepted. Outputs, if you need to react:
| Component | Outputs |
|---|---|
<cometchat-incoming-call> | callAccepted callDeclined error |
<cometchat-outgoing-call> | callCanceled error |
<cometchat-ongoing-call> | callEnded error |
<cometchat-call-buttons> | error |
<cometchat-call-logs> | itemClick callButtonClicked |
<cometchat-call-bubble> | buttonClick |
<cometchat-ongoing-call> takes [sessionID] and optionally [callSettingsBuilder] / [isAudioOnly]. Do not build your own call screen — WebRTC state, permissions and teardown are handled.
Huddle / docked call (Slack-style, not full screen): <cometchat-ongoing-call> always covers the whole viewport (:host is position: fixed), wherever you mount it. For a docked or drop-in group call, follow references/huddle.md (BAKED — start / join override / dock via the Calls SDK / leave, verified vs 5.2.2).
⚠️
<cometchat-call-logs>HARD-CRASHES if it mounts before the Calls SDK has loaded. ItsngOnInitsynchronously runsnew CometChatUIKitCalls.CallLogRequestBuilder(), butCometChatUIKitCallsisnulluntil the lazily-loaded Calls SDK resolves — so on a freshinitFromSettingsapp the tab renders an "OOPS! / Retry" error state and logs[CometChatCallLogs] Error: TypeError: Cannot read properties of null (reading 'CallLogRequestBuilder'). Retry does NOT recover it. This is the same "CometChatUIKitCallsis null until the SDK has loaded, so never touch it during construction" trap as the standalone accessor above — it just bites INSIDE the kit's own component. GATE the call-logs surface on the calls-SDK namespace ACTUALLY being populated — not oncallingReadyalone. Verified live (AUDIT-163):CometChatUIKit.callingReadydefaults to a pre-resolvedPromise.resolve(), and even afterinitCalling()runs the lazily-loadedCometChatUIKitCallsnamespace can still benull(e.g. the calls chunk never loaded) — so acallingReady-ONLY gate STILL crashes. AwaitcallingReady, THEN confirmCometChatUIKitCallsis non-null before mounting:
// component
import { CometChatUIKit, CometChatUIKitCalls } from '@cometchat/chat-uikit-angular';
readonly callsReady = signal(false);
constructor() {
CometChatUIKit.callingReady
.then(() => this.callsReady.set(!!CometChatUIKitCalls)) // namespace must be populated, not just "ready"
.catch(() => this.callsReady.set(false));
}
<!-- Do NOT mount <cometchat-call-logs> unguarded — it NPEs on CometChatUIKitCalls being null. -->
<cometchat-call-logs *ngIf="callsReady()" (itemClick)="openCall($event)"></cometchat-call-logs>
<div *ngIf="!callsReady()">Loading call history...</div>
STOPGAP (remove once the kit component awaits
getCometChatCalls()/ null-guardsCometChatUIKitCallsitself — filed as a UIKit bug; the docs page also omits this prerequisite — DOCS-BACKLOG).isCallingEnabled()is the sync settings check;callingReady+ aCometChatUIKitCallsnull-check is what actually guards the mount (callingReadyalone is NOT enough — proven live).
Also available: CallLogsService for headless querying, and guides/call-log-details for a detail view.
getUserMedia is blocked on plain HTTP, so calls fail on a LAN IP over http.CometChatUIKit.callingReady is a promise that resolves once calling is initialised; isCallingEnabled() is the synchronous check.uiKit.callsSDK missing from initFromSettings → calling silently off; call buttons render as zero-size empty elements. Installing the package is not enough.getUserMedia blocked.<cometchat-ongoing-call>.Two browsers, two users, HTTPS or localhost · caller sees outgoing UI, callee's device rings from any route · accepting connects audio/video both ways · ending returns both to chat · the call appears in call logs · no console errors.
Tell the developer what changed, naming the files: calling — the packages added, that uiKit: { callsSDK: {} } is what switches it on, and where <cometchat-incoming-call> is mounted. Flag anything dev-only as dev-only, and say what you did not touch — this is additive.
Then offer these THREE options as a SELECTABLE choice and WAIT for the pick — never auto-continue (RULES.md §19):
features.angular-v5.json. Never offer an auto entry (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.cometchat-angular-v5-customization.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cometchat/cometchat-skills --plugin cometchat-skills98 skills in this plugin
/cometchatEntry point for any CometChat task on any platform. Detects the framework + UI Kit version (React, Angular, iOS, Android, React Native, Flutter), then routes to that family's skills — for a NEW integration or a change to an existing one. Triggers: 'add chat', 'add cometchat', 'add chat to my app', 'add calling', 'change something in my chat', 'my chat is already set up', 'add a feature to the chat', 'add chat to my android app', 'integrate cometchat android', 'add chat to my ios app', 'integrate cometchat ios', 'add chat to my swift app', 'migrate my app to cometchat', 'migrate from sendbird', 'migrate from getstream / stream', 'replace sendbird / stream chat with cometchat', 'build a <app> clone', 'make a chat app like <app>', 'make it look and work like <app>'./cometchat-a11yKeep a CometChat integration accessible — the UI Kit is designed targeting WCAG 2.1 AA with keyboard navigation (verify per component in its docs; full conformance still needs manual testing), and this skill makes sure the HOST app doesn't break that, covering contrast, focus, screen-reader context, reduced motion, RTL, and calls accessibility. Cross-family. Triggers: 'is cometchat accessible', 'WCAG / 508 / ADA compliance', 'screen reader support', 'keyboard navigation', 'a11y audit', 'accessible chat', 'contrast/focus issues in chat'.Other plugins' skills for the same job