How do I limit the number of participants in a room so that not more than a total number of users can join?
const numberOfParticipants = api.getNumberOfParticipants();
How do I limit the number of participants in a room so that not more than a total number of users can join?
const numberOfParticipants = api.getNumberOfParticipants();
Assuming you’re hosting your own Jitsi instance, you can configure the muc_max_occupants prosody module. See:
I am self hosting in docker but is this the same file as shown in the link?
docker-jitsi-meet\prosody\rootfs\defaults\conf.d\jitsi-meet.cfg.lua
I’m afraid I’m not familiar with how one would configure that module for docker-jitsi-meet, but does look like the same file.
P.S. note for future posts – it might be worth posting under the Docker category for docker specific setup. That’s a useful context for people to know when they try to help.
Yup I changed the tag.
I followed the link but unfortunately the limit is not set for the room.
I tried to set maximum occupancy as “1” but 3 people can easily join.
I’m afraid I’m not familiar enough with the docker setup to help you debug this, especially with no obvious errors from prosody.
One thing I did note in your config is that you’ve added “muc_max_occupants” to multiple components and virtualhosts. You should only need it in Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
section. Change that and try again?
Other than that, I’m afraid I’m out of ideas.
Initially I had added it only there but since it did not work, I tried elsewhere.
try this env var XMPP_MUC_MODULES
I tried it this way but no luck again:
Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
storage = "memory"
modules_enabled = {
"muc_meeting_id";
"muc_max_occupants";
{{ if .Env.XMPP_MUC_MODULES -}}
"{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}";
{{ end -}}
{{ if and $ENABLE_AUTH (eq $AUTH_TYPE "jwt") -}}
"{{ $JWT_TOKEN_AUTH_MODULE }}";
{{ end -}}
{{ if not $DISABLE_POLLS -}}
"polls";
{{ end -}}
}
muc_max_occupants = "1"
muc_room_cache_size = 1000
muc_room_locking = false
muc_room_default_public_jids = true
The problem is that docker resets my .lua file no matter if I add the variables mentioned above. Is there a way to avoid this?