Skip to content

Commit 6df5600

Browse files
authored
Clip start-muted values to sender limit values (#844)
Co-authored-by: James A <[email protected]>
1 parent a6f3275 commit 6df5600

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/org/jitsi/jicofo/conference/JitsiMeetConferenceImpl.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,20 +965,24 @@ private boolean[] hasToStartMuted(Participant participant, boolean justJoined)
965965

966966
if (!startMuted[0])
967967
{
968+
int limit = ConferenceConfig.config.getMaxAudioSenders();
968969
Integer startAudioMuted = config.getStartAudioMuted();
969970
if (startAudioMuted != null)
970971
{
971-
startMuted[0] = (participantNumber > startAudioMuted);
972+
limit = Math.min(limit, startAudioMuted);
972973
}
974+
startMuted[0] = (participantNumber > limit);
973975
}
974976

975977
if (!startMuted[1])
976978
{
979+
int limit = ConferenceConfig.config.getMaxVideoSenders();
977980
Integer startVideoMuted = config.getStartVideoMuted();
978981
if (startVideoMuted != null)
979982
{
980-
startMuted[1] = (participantNumber > startVideoMuted);
983+
limit = Math.min(limit, startVideoMuted);
981984
}
985+
startMuted[1] = (participantNumber > limit);
982986
}
983987

984988
return startMuted;

0 commit comments

Comments
 (0)