Read the full tutorial here:
https://www.cometchat.com/tutorials/build-a-voice-and-video-chat-app-with-vue-js-and-cometchat/
This application shows you how to add voice and video chat to your web application using Vue.js and CometChat. Take a look at the screenshot below:
This demo uses:
- CometChat Pro 1.3.0
- Vuejs
To run the demo follow these steps:
- Head to CometChat Pro and create an account
- From the dashboard, create a new app called "demo-first-app"
- Once created, click Explore
- Go to the API Keys tab and click Create API Key button
- Create an API Key called "demo-first-app" with Full Access
- Download the repository here or by running
git clone https://github.com/yemiwebby/comet-voice-video.git
- Run this command
npm install
to install all the project's dependencies. - Create a
.env
file with the root folder of the project and paste the following content in it:
VUE_APP_COMMETCHAT_API_KEY=YOUR_API_KEY
VUE_APP_COMMETCHAT_APP_ID=YOUR_APP_ID
Replace YOUR_API_KEY
and YOUR_APP_ID
with your API KEY and APP ID as obtained from your CometChat dashboard.
- Run
npm run serve
to start the application and navigate tohttp://localhost:8080
to view the app
- Open the application in two separate windows and log in with any two of the test users: superhero1, superhero2, superhero3, superhero4 or superhero5
- Once you are able to log in from both window, enter the
UID
of one user and click on Start Call
Click Accept Call to accept a call or Reject Call to reject a call