Join Meeting - Javascript
note
This page uses the following asynchronous methods. Refer to their API reference for the errors each Promise may reject with, and handle these rejections appropriately based on your use case.
Overview
Before joining the meeting, it has to be initialized. If you have not initialized a meeting yet, you can follow the guide here.
join()
- To join a meeting you can call the
join()method on the createdmeetingobject. - This method can be invoked after the meeting is initialized using the
initMeetingmethod.
let meeting;
// Initialize Meeting
meeting = VideoSDK.initMeeting({
// ...
});
const joinBtn = document.getElementById("joinBtn");
joinBtn.addEventListener("click", async () => {
// Joining Meeting
try {
await meeting?.join();
} catch (err) {
console.error("join failed:", err);
}
});
Events associated with Join
Following events are received when a participant successfully joins a meeting.
- The Local Participant will receive the
meeting-joinedevent, when the meeting is successfully joined. - The Remote Participant will receive the
participant-joinedevent with the newly joinedParticipantobject.
let meeting;
// Initialize Meeting
meeting = VideoSDK.initMeeting({
// ...
});
meeting.on("meeting-joined", () => {
console.log("Meeting Joined Successfully");
});
meeting.on("participant-joined", (participant) => {
console.log("New Participant Joined: ", participant.id);
});
API Reference
The API references for all the methods and events utilized in this guide are provided below.
Got a Question? Ask us on discord

