0

I am using iframe API of Jitsi, I would like to keep the limit of a room to only 3 participants. If a fourth participant joins the room, the participant should automatically get kicked. This is my current api, how do I kick the 4th participant?

var api = new JitsiMeetExternalAPI(domain, options);

            api.addListener('videoConferenceJoined', ({id}) => {
                let numberOfParticipants = api.getNumberOfParticipants();
                if(numberOfParticipants > 3) {
                     api.executeCommand('kickParticipant',
                     //
                   );
               }
            });
Roy
  • 17
  • 6

1 Answers1

0

You can use the "participantJoined" event instead of "videoConferenceJoined".

As it is fired whenever a participant joins. While "videoConferenceJoined" fires when you join the conference.

MaXo
  • 81
  • 3