Logo Cometchat Angular V5 Calls

Cometchat Angular V5 Calls

Tổ chức
cometchat
cometchat-angular-v5-calls

Add voice and video calling to an Angular CometChat app — install the calls SDK, mount the incoming-call listener at app root, call buttons in the message header, and call logs. Triggers: 'add voice calling', 'add video calls', 'enable calling', 'show call history', 'incoming call not ringing'.

Add to TypingMind

Tổng quan

Nhà phát hànhcometchat
Kho mãcometchat-skills
Tên kỹ năngcometchat-angular-v5-calls
Sao
109
Bản fork
2
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được cometchat công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Cometchat Angular V5 Calls trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-angular-v5-calls
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cometchat/cometchat-skills.git /tmp/cometchat-skills
mkdir -p .claude/skills
cp -r /tmp/cometchat-skills/skills/cometchat-angular-v5-calls .claude/skills/cometchat-angular-v5-calls
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Cometchat Angular V5 Calls trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Cometchat Angular V5 Calls ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Cometchat Angular V5 Calls với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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). Every CometChat* symbol below exists in the angular-v5 catalog. 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 in cometchat-angular-v5-core/references/docs-map.md. APPEND to the user's app — additive wiring only (RULES.md).

Companion skills (read first)

  • cometchat-angular-v5-core — install, credentials, init→login→render. Assumed.
  • cometchat-angular-v5-placement — where the incoming-call listener mounts.

Use this skill when

Adding voice/video calling, or diagnosing calls that never ring.

Prerequisites & install — calls needs a second package

bash
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.

⚠️ Installing the package is NOT what turns calling on

core inits with initFromSettings, and on that path the kit derives calling from the settings object:

ts
// verified in the shipped 5.1.0 bundle
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:

ts
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) on UIKitSettingsBuilder instead. Both are correct for their own init — see cometchat-angular-v5-core/references/lifecycle.md. Do not mix them.

The four things, in order

  1. Install the calls SDK (above).
  2. Mount <cometchat-incoming-call> at APP ROOT — not in the chat page.
  3. Add call buttons — the message header renders them by default.
  4. Optionally add call logs.

Step 2 is the one that goes wrong.

Incoming calls — app root, not the chat route

html
<!-- 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: [].

Call buttons

<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:

html
<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:

ts
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 */ }
}

Ongoing and outgoing

The kit drives these once a call is accepted. Outputs, if you need to react:

ComponentOutputs
<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.

Call history

⚠️ <cometchat-call-logs> HARD-CRASHES if it mounts before the Calls SDK has loaded. Its ngOnInit synchronously runs new CometChatUIKitCalls.CallLogRequestBuilder(), but CometChatUIKitCalls is null until the lazily-loaded Calls SDK resolves — so on a fresh initFromSettings app 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 "CometChatUIKitCalls is 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 on callingReady alone. Verified live (AUDIT-163): CometChatUIKit.callingReady defaults to a pre-resolved Promise.resolve(), and even after initCalling() runs the lazily-loaded CometChatUIKitCalls namespace can still be null (e.g. the calls chunk never loaded) — so a callingReady-ONLY gate STILL crashes. Await callingReady, THEN confirm CometChatUIKitCalls is non-null before mounting:

ts
// 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));
}
html
<!-- 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-guards CometChatUIKitCalls itself — filed as a UIKit bug; the docs page also omits this prerequisite — DOCS-BACKLOG). isCallingEnabled() is the sync settings check; callingReady + a CometChatUIKitCalls null-check is what actually guards the mount (callingReady alone is NOT enough — proven live).

Also available: CallLogsService for headless querying, and guides/call-log-details for a detail view.

Environment requirements

  • HTTPS or localhost. getUserMedia is blocked on plain HTTP, so calls fail on a LAN IP over http.
  • Microphone/camera permission is a user-gesture prompt — trigger it from a click, never on load.
  • CometChatUIKit.callingReady is a promise that resolves once calling is initialised; isCallingEnabled() is the synchronous check.

Common pitfalls

  1. Listener in the chat page → calls ring only on that route.
  2. uiKit.callsSDK missing from initFromSettings → calling silently off; call buttons render as zero-size empty elements. Installing the package is not enough.
  3. Calls SDK not installed → components inert, no error.
  4. Calling not enabled in the dashboard → code correct, nothing happens.
  5. Plain HTTP → getUserMedia blocked.
  6. Duplicate call buttons → the header already renders them.
  7. Hand-rolled call screen → loses WebRTC teardown; use <cometchat-ongoing-call>.
  8. No zero-height container — the ongoing-call surface needs real dimensions like any other component.

Verify it works

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.

Explain what you built (REQUIRED close)

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):

  1. Add another feature → call-log details, or another grow-set feature from features.angular-v5.json. Never offer an auto entry (reactions, mentions, receipts, typing, media) — those are core in v5 and already on.
  2. Customize theming → cometchat-angular-v5-customization.
  3. Test it manually → do nothing further; hand back so the user runs it.

Câu hỏi thường gặp

Kỹ năng AI Cometchat Angular V5 Calls làm được gì?

Add voice and video calling to an Angular CometChat app — install the calls SDK, mount the incoming-call listener at app root, call buttons in the message header, and call logs. Triggers: 'add voice calling', 'add video calls', 'enable calling', 'show call history', 'incoming call not ringing'.

Vì sao nên dùng Cometchat Angular V5 Calls trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Cometchat Angular V5 Calls là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Cometchat Angular V5 Calls trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-angular-v5-calls. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Cometchat Angular V5 Calls?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Cometchat Angular V5 Calls với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Cometchat Angular V5 Calls với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Cometchat Angular V5 Calls có miễn phí không?

Có. Kỹ năng này được cometchat phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇