Skip to main content
Version: 0.0.x

Display Attendees Count - Javascript

This guide explains the process of displaying the number of attendees in realtime.

note

Before proceeding with this guide, ensure that all attendees join the meeting with the mode set to VIEWER.

Step 1: Start by obtaining all the participants using the meeting object.

function attendessCount() {
const participants = meeting.participants;
}

Step 2: Subsequently, filter out those who have joined as VIEWER and display the count.

function attendessCount() {
const participants = meeting.participants;

const attendees = [...participants.values()].filter((participant) => {
return participant.mode == VideoSDK.Constants.modes.VIEWER;
});

return attendees.length || 0;
}

API Reference

The API references for all the methods utilized in this guide are provided below.

Got a Question? Ask us on discord


Was this helpful?