Skip to content

Commit

Permalink
Clip start-muted values to sender limit values (#844)
Browse files Browse the repository at this point in the history
Co-authored-by: James A <[email protected]>
  • Loading branch information
jqdrqgnq and jqdrqgnq authored Dec 2, 2021
1 parent a6f3275 commit 6df5600
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6df5600

Please sign in to comment.