From 662b8ad9b3790efc2ca5ab5e9470f2708fd150b4 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Thu, 2 Dec 2021 00:08:48 +0100 Subject: [PATCH] Don't consider system users when deciding simulcast. This prevents simulcast from being switched on when we enable recording. --- static/galene.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static/galene.js b/static/galene.js index 6594be7..0ab7fd8 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1085,7 +1085,15 @@ function doSimulcast() { case 'off': return false; default: - if(Object.keys(serverConnection.users).length <= 2) + let count = 0; + for(let n in serverConnection.users) { + if(!serverConnection.users[n].permissions["system"]) { + count++; + if(count > 2) + break; + } + } + if(count <= 2) return false; let bps = getMaxVideoThroughput(); return bps <= 0 || bps >= 2 * simulcastRate;