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