Kicking participant briefly shows its screen. Can this be avoided?

Hello all,

I am using the IFrame API and let’s say that, for some reason, I want to prevent anyone named Alfred from joining my room.

Here’s my code for the ParticipantJoined event (JitsiApi is an existing global instance).

function Handle_ParticipantJoined(eventObject)
	var tmpName;
	var tmpId;
	var arrParticipants = JitsiApi.getParticipantsInfo();
	for (index=0; index < arrParticipants.length; index++)
		tmpName = arrParticipants[index].displayName.toUpperCase();
		tmpId = arrParticipants[index].participantId;
		if (tmpName == "ALFRED")
			JitsiApi.executeCommand('kickParticipant', tmpId);
	return true;	

This works fine, except that Alfred’s screen briefly flashes on everybody’s screens as the kick is executed.

Is there any way to avoid that? I tried to look into moderation but it seems it’s not available with the IFrame API.


That is normal as you are handling the kick after the participant joins.
If you want to avoid that you need a custom prosody module and handling that on the server-side.

Ah, I see! Well, as I have no clue what a prosody is, I’ll just grin and bear it :slight_smile: It’s not a major issue. Thanks for taking the time to inform me.