From d410b43b59a8e69f57ad2205fbad9e754fa40770 Mon Sep 17 00:00:00 2001
From: Clark Boylan <clark.boylan@gmail.com>
Date: Wed, 17 Mar 2021 13:24:38 -0700
Subject: [PATCH] Restore some meetpad settings we had previously set

This starts conferences with participant video muted and it disabled p2p
connections for calls between two participants. We had these settings
before but the recent container image update undid them.

Change-Id: I4152ace083f79116758020fbbcbbb96e39eef9ed
---
 .../files/jitsi-meet-docker/meet-docker-compose.yaml       | 2 ++
 playbooks/roles/jitsi-meet/templates/jvb-env.j2            | 7 +++++++
 playbooks/roles/jitsi-meet/templates/meet-env.j2           | 7 +++++++
 3 files changed, 16 insertions(+)

diff --git a/playbooks/roles/jitsi-meet/files/jitsi-meet-docker/meet-docker-compose.yaml b/playbooks/roles/jitsi-meet/files/jitsi-meet-docker/meet-docker-compose.yaml
index 7f8caeef9b..0c2140f30b 100644
--- a/playbooks/roles/jitsi-meet/files/jitsi-meet-docker/meet-docker-compose.yaml
+++ b/playbooks/roles/jitsi-meet/files/jitsi-meet-docker/meet-docker-compose.yaml
@@ -19,6 +19,7 @@ services:
             - ENABLE_LETSENCRYPT
             - ENABLE_HTTP_REDIRECT
             - ENABLE_TRANSCRIPTIONS
+            - ENABLE_P2P
             - DISABLE_HTTPS
             - JICOFO_AUTH_USER
             - LETSENCRYPT_DOMAIN
@@ -40,6 +41,7 @@ services:
             - JIBRI_RECORDER_USER
             - JIBRI_RECORDER_PASSWORD
             - ENABLE_RECORDING
+            - START_VIDEO_MUTED
 
     # XMPP server
     prosody:
diff --git a/playbooks/roles/jitsi-meet/templates/jvb-env.j2 b/playbooks/roles/jitsi-meet/templates/jvb-env.j2
index f0d5eac4c4..09c240dd78 100644
--- a/playbooks/roles/jitsi-meet/templates/jvb-env.j2
+++ b/playbooks/roles/jitsi-meet/templates/jvb-env.j2
@@ -196,3 +196,10 @@ JVB_TCP_PORT=4443
 
 # Redirects HTTP traffic to HTTPS. Only works with the standard HTTPS port (443).
 #ENABLE_HTTP_REDIRECT=1
+
+# Participants after the Nth (value below) joining will have their video muted.
+# This should mute video for all participants who join.
+START_VIDEO_MUTED=0
+
+# Disable P2P connections for meetings between two participants.
+ENABLE_P2P=false
diff --git a/playbooks/roles/jitsi-meet/templates/meet-env.j2 b/playbooks/roles/jitsi-meet/templates/meet-env.j2
index 6602cfee68..80fcdb8f60 100644
--- a/playbooks/roles/jitsi-meet/templates/meet-env.j2
+++ b/playbooks/roles/jitsi-meet/templates/meet-env.j2
@@ -299,3 +299,10 @@ JIBRI_LOGS_DIR=/config/logs
 
 # Redirects HTTP traffic to HTTPS. Only works with the standard HTTPS port (443).
 #ENABLE_HTTP_REDIRECT=1
+
+# Participants after the Nth (value below) joining will have their video muted.
+# This should mute video for all participants who join.
+START_VIDEO_MUTED=0
+
+# Disable P2P connections for meetings between two participants.
+ENABLE_P2P=false