Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't update mute when reaching the user count threshold. #2474

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Jul 10, 2024

Fixes: #2464

The idea is to mute whenever the participant count reaches 8 or more ppl. since there is a high chance for multiple users joining at the same time we update the mute state whenever we reach over 8ppl. So that a scheduled meeting still starts with everyone muted even though the meeting looked empty when the users were still in the lobby.

This changes it to only check this condition once at the beginningof the lobby and where the call just loaded (the client knows the user account)

Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine though I wonder if it would be more idiomatic as:

useEffect(() => {
  if (memberships.length >= MUTE_PARTICIPANT_COUNT)
    muteStates.audio.setEnabled?.(false)
}, [])

without the useCallback

@toger5
Copy link
Contributor Author

toger5 commented Jul 18, 2024

This looks fine though I wonder if it would be more idiomatic as:

I added it to allow for the upgrade path to useEffectEvent. But for now the simpler version is reasonable.

@toger5 toger5 force-pushed the toger5/disable-auto-mute branch from fbd7022 to ddd9366 Compare July 18, 2024 16:12
@toger5 toger5 merged commit afee9ea into livekit Jul 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Magically mute without user input (automatically) after starting the call
2 participants