Don't consider system users when deciding simulcast.

This prevents simulcast from being switched on when we enable
recording.
This commit is contained in:
Juliusz Chroboczek committed 2021-12-02 00:09:28 +01:00
1 parent e74156e1b0
commit 662b8ad9b3
1 file changed
+9 -1
+9 -1
View File
@@ -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;