Skip to main content
This guide walks you through integrating the CometChat Calls SDK into a Vue.js application. By the end, you’ll have a working video call implementation with proper state management and lifecycle handling.

Prerequisites

Before you begin, ensure you have:
  • A CometChat account with an app created (Sign up)
  • Your App ID, Region, and API Key from the CometChat Dashboard
  • A Vue 3 project (Vite, Vue CLI, or Nuxt)
  • Node.js 16+ installed

Step 1: Install the SDK

Install the CometChat Calls SDK package:

Step 2: Create a Composable for SDK Management

Create a composable that handles initialization, login, and provides reactive state:

Step 3: Initialize in App.vue

Initialize the SDK when your app mounts:

Step 4: Create the Call Component

Build a call component with proper lifecycle management:

Step 5: Create the Call Page

Create a page that manages the call flow:

Call Composable (Optional)

For reusable call logic across multiple components:

Vue 2 Support

For Vue 2 projects using the Options API, see the Vue 2 migration guide or use the @vue/composition-api package to use the Composition API in Vue 2. For more detailed information on specific topics covered in this guide, refer to the main documentation: