From 6df56004961f2b4eb9dc58d2cd9c2b673ddfce03 Mon Sep 17 00:00:00 2001 From: James A <84336185+jqdrqgnq@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:29:50 -0500 Subject: [PATCH] Clip start-muted values to sender limit values (#844) Co-authored-by: James A --- .../jitsi/jicofo/conference/JitsiMeetConferenceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java b/src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java index 24ebe5f5a5..3e15f10401 100644 --- a/src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java +++ b/src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java @@ -965,20 +965,24 @@ private boolean[] hasToStartMuted(Participant participant, boolean justJoined) if (!startMuted[0]) { + int limit = ConferenceConfig.config.getMaxAudioSenders(); Integer startAudioMuted = config.getStartAudioMuted(); if (startAudioMuted != null) { - startMuted[0] = (participantNumber > startAudioMuted); + limit = Math.min(limit, startAudioMuted); } + startMuted[0] = (participantNumber > limit); } if (!startMuted[1]) { + int limit = ConferenceConfig.config.getMaxVideoSenders(); Integer startVideoMuted = config.getStartVideoMuted(); if (startVideoMuted != null) { - startMuted[1] = (participantNumber > startVideoMuted); + limit = Math.min(limit, startVideoMuted); } + startMuted[1] = (participantNumber > limit); } return startMuted;