cometchat-react-calls

Integrate CometChat voice and video calling into React apps with dual SDK initialization.

Updated May 28, 2026
One-click install
npx skills add https://github.com/MAX5271/CometChat --skill cometchat-react-calls
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cometchat-react-calls
Source: https://github.com/MAX5271/CometChat/tree/main/.claude/skills/cometchat-react-calls
Command: npx skills add https://github.com/MAX5271/CometChat --skill cometchat-react-calls

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you integrate CometChat voice and video calling into React-family web apps without broken WebRTC sessions, missing incoming-call UI, or Next.js SSR failures.

Core Features & Use Cases

  • Two-mode calling integrations (Session vs Ringing): supports meeting-room style flows and recipient-ringing flows, with the correct component/route structure.
  • Dual-SDK initialization and correct auth flow: sequences @cometchat/chat-sdk-javascript (signaling) and @cometchat/calls-sdk-javascript (WebRTC), including Calls login requirements for v5.
  • Production-grade WebRTC guardrails: ensures the join container has measurable dimensions, cleans up getUserMedia tracks on hangup, and provides Next.js SSR-safe loading patterns.
  • CometChat UI Kit call components: covers CometChatIncomingCall, CometChatOutgoingCall, CometChatOngoingCall, and call button placement for additive mode.

Quick Start

Use the Skill to scaffold a React (or Next.js) calls integration by picking Calling mode, initializing Chat then Calls SDK, logging in correctly for v5, mounting call listeners at the app root, and ensuring the call join container has non-zero viewport dimensions.

Frequently Asked Questions about cometchat-react-calls

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add WebRTC voice and video calls to my React application?

To add voice and video calls to a React application, you coordinate the CometChat Chat SDK for signaling and the Calls SDK for WebRTC session joining. This requires correct v5 SDK initialization, user login, and mounting call listeners at the app root.

Why does CometChat calling fail during Next.js server-side rendering?

CometChat calling fails during Next.js server-side rendering because the Calls SDK requires browser APIs. You must implement SSR-safe SDK loading patterns to ensure WebRTC components initialize exclusively on the client side.

How do I set up CometChat call SDK initialization and login for v5?

CometChat call SDK initialization for v5 requires sequencing the Chat SDK first, followed by the Calls SDK. You must complete the Calls SDK login process after initialization to establish signaling and WebRTC sessions correctly.

What is the difference between session and ringing modes for CometChat calls?

Session mode handles meeting-room style flows using direct session URLs, while ringing mode manages recipient-ringing flows. Both require distinct component and route structures to manage incoming and outgoing call entities properly.

Why does my WebRTC joinSession container fail to display video?

WebRTC joinSession containers fail to display video when they have zero dimensions. You must validate that the call join container has measurable viewport dimensions before joining to ensure deterministic WebRTC video rendering.

How do I clean up getUserMedia tracks after hanging up a CometChat call?

To clean up getUserMedia tracks after hanging up a CometChat call, you must explicitly stop the media tracks during the hangup phase. This prevents WebRTC camera and microphone resource leaks in your React application.