Stop the call volume slider at 1% when muting is not possible - #31297
Open
meh7an wants to merge 1 commit into
Open
Stop the call volume slider at 1% when muting is not possible#31297meh7an wants to merge 1 commit into
meh7an wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Releasing a voice chat participant's volume slider at 0% doesn't set their volume to zero.
MenuVolumeItemsends a mute request instead, because the lowest volumephone.editGroupCallParticipantaccepts is 1: a request with volume 0 is rejected withUSER_VOLUME_INVALID.That mute doesn't always stick:
In both cases the slider went back to the previous volume the next time the menu was opened, so 0% looked ignored. For example, a call admin dragging their own volume to 0% saw it return to where it was.
Now
Members::Controllertells the volume item whether the participant can be muted from it, throughMenuVolumeItem::setCanMute(). When they can't, the slider's adjust callback keeps the value at 1% or above, so dragging it to the left end stops at 1% and sets that volume. For participants who can be muted, 0% still mutes them, and the Mute menu item is unchanged.Testing
Built and tested on macOS (Debug), in a voice chat managed by the account:
Before this change, a build that sent volume 0 instead of the mute was tried on the own account, another account and a regular participant, and the server rejected it with
USER_VOLUME_INVALIDevery time.