Join Meeting - Javascript
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 createdmeeting
object. - This method can be invoked after the meeting is initialized using the
initMeeting
method.
let meeting;
// Initialize Meeting
meeting = VideoSDK.initMeeting({
// ...
});
const joinBtn = document.getElementById("joinBtn");
joinBtn.addEventListener("click", () => {
// Joining Meeting
meeting?.join();
});
Events associated with Join
Following events are received when a participant successfully joins a meeting.
- The Local Participant will receive the
meeting-joined
event, when the meeting is successfully joined. - The Remote Participant will receive the
participant-joined
event with the newly joinedParticipant
object.
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