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 SIGNALLING_ONLY.

info

Important Changes Javascript SDK in Version v0.1.4

  • The following modes have been deprecated:
    • CONFERENCE has been replaced by SEND_AND_RECV
    • VIEWER has been replaced by SIGNALLING_ONLY

Please update your implementation to use the new modes.

⚠️ Compatibility Notice:
To ensure a seamless meeting experience, all participants must use the same SDK version.
Do not mix version v0.1.4 + with older versions, as it may cause significant conflicts.

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 SIGNALLING_ONLY and display the count.

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

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

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?