From fd7914020142be5c8da1fd780079b423efbb0fb2 Mon Sep 17 00:00:00 2001 From: Rhys <66695742+RhysRdm@users.noreply.github.com> Date: Wed, 7 Dec 2022 15:54:58 +0000 Subject: [PATCH] Changes to allow a user to set the max participants on a jitsi conference (#2323) * Changes to allow a user to set the max participants on a jitsi conference * changed var name from jitsi_max_participants to matrix_prosody_jitsi_max_participants --- docs/configuring-playbook-jitsi.md | 10 ++++++++++ roles/custom/matrix-jitsi/defaults/main.yml | 5 +++++ roles/custom/matrix-jitsi/templates/prosody/env.j2 | 3 +++ 3 files changed, 18 insertions(+) diff --git a/docs/configuring-playbook-jitsi.md b/docs/configuring-playbook-jitsi.md index 4c29b3eb..a9d3c2de 100644 --- a/docs/configuring-playbook-jitsi.md +++ b/docs/configuring-playbook-jitsi.md @@ -127,6 +127,16 @@ Read how it works [here](https://github.com/jitsi/jitsi-videobridge/blob/master/ You may want to **limit the maximum video resolution**, to save up resources on both server and clients. +## (Optional) Specify a Max number of participants on a Jitsi conference + +The playbook allows a user to set a max number of participants allowed to join a Jitsi conference. By default there is no limit. + +In order to set the max number of participants add the following variable to your `inventory/host_vars/matrix.DOMAIN/vars.yml` configuration: + +``` +matrix_prosody_jitsi_max_participants: +``` + ## (Optional) Additional JVBs By default, a single JVB ([Jitsi VideoBridge](https://github.com/jitsi/jitsi-videobridge)) is deployed on the same host as the Matrix server. To allow more video-conferences to happen at the same time, you may need to provision additional JVB services on other hosts. diff --git a/roles/custom/matrix-jitsi/defaults/main.yml b/roles/custom/matrix-jitsi/defaults/main.yml index c2d5948d..e923055c 100644 --- a/roles/custom/matrix-jitsi/defaults/main.yml +++ b/roles/custom/matrix-jitsi/defaults/main.yml @@ -277,3 +277,8 @@ matrix_jitsi_jvb_container_rtp_tcp_host_bind_port: "{{ matrix_jitsi_jvb_rtp_tcp_ # # Takes an ":" or "" value (e.g. "127.0.0.1:12090"), or empty string to not expose. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: '' + +# Default max participants to the empty string +# +# The setting requires an integer to be set for usage and allows a user to specify the max number of particpants on a conference. +matrix_prosody_jitsi_max_participants: '' diff --git a/roles/custom/matrix-jitsi/templates/prosody/env.j2 b/roles/custom/matrix-jitsi/templates/prosody/env.j2 index 941f2c25..147c01d7 100644 --- a/roles/custom/matrix-jitsi/templates/prosody/env.j2 +++ b/roles/custom/matrix-jitsi/templates/prosody/env.j2 @@ -58,3 +58,6 @@ XMPP_MUC_MODULES= XMPP_INTERNAL_MUC_MODULES= XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} XMPP_CROSS_DOMAIN=true +{% if matrix_prosody_jitsi_max_participants is number %} +MAX_PARTICIPANTS={{ matrix_prosody_jitsi_max_participants }} +{% endif %} \ No newline at end of file