We have seen a major increase in the usage of virtual meetings in the past year and the existing platforms cannot cater to everyone's custom needs. Also, building a custom feature-rich solution for your need from scratch is not a great option as you need to manage a lot of tasks, this is where VideoSDK.live comes to rescue.
- Node.js v12+
- NPM v6+ (comes pre-installed with newer Node versions)
- You should have a video SDK account to generate token. Visit video SDK dashboard to generate token.
│ ├── css
│ │ ├── index.css
│ ├── js
│ ├── index.js
index.html file with the
If you don't want to use
<script ... /> you can use
npm to install video SDK in your project.
npm install @videosdk.live/js-sdk
//or you can use yarn
yarn add @videosdk.live/js-sdk
For the interface, we will have simple Join and Create Meeting meeting buttons which will join and create a new meeting room respectively.
The meeting room will show the local participant view, remote participant view and show buttons to toggle mic, webcam, and leave the meeting.
You can get the complete custom CSS style from here.
We will declare all the DOM variables we will need in the
To start the meeting implementation, we will need the token so if you don't have one, you can generate it from here.
Now update your token in the
index.jsfile as shown to add the token in the script and add a validator.
We have got the token. Now we will add the meetingHandler which will create or join to a meeting room.
Now the meetingId is either generated or updated with the value user entered. After this, startMeeting is triggered which is responsible to initialize the meeting with the required configuration and join the meeting.
Now we will create the local participant view.
To show the remote participants, we will add the event listeners on meeting which will notify us when a participant joins or leaves the meeting.
At last, we will add the event listeners to the toggle buttons and leave button.
To run the app you will need
live-server. If you don't have it installed already you can do it using:
npm install -g live-server
Once you have the
live-server installed, just run it using: