fix(player): handle mute state explicitly in volume control#3211
Merged
ImprovedTube merged 1 commit intocode-charity:masterfrom Oct 1, 2025
Merged
Conversation
Member
|
hi again and thank you! @rajanarahul93 |
Contributor
Author
|
@ImprovedTube is there any change I should make ? |
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.
fix(player): Correctly handle mute state in forced volume
Summary
This pull request fixes a bug where setting the player volume to 0% via the "Forced Volume" feature would not mute the audio. The patch ensures that the player's mute state is always synchronized with the volume level, restoring native player behavior.
Root Cause
The
playerVolumefunction directly manipulated the volume level but did not manage the player's separateisMutedstate. When the volume was set to0, theplayer.mute()method was never called, which could leave audio playing.Changes
js&css/web-accessible/www.youtube.com/player.js: Modified theplayerVolumefunction to explicitly callplayer.mute()when the target volume is 0 andplayer.unMute()when it is greater than 0.Screenshots
These screenshots demonstrate the fix is working correctly with the "Forced Volume" feature enabled.
Player Muted at 0% Volume
Shows the player UI correctly displaying a muted state when the volume is set to 0. The audio was confirmed to be silent during testing.
Player at 100% Volume
Shows the player UI correctly displaying full volume, which was confirmed to be working as expected.
Testing
Risk & Rollback
git revert <commit_hash>.Related