You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(player): restore audible volume when unmuting from zero - #544
On a browser with writable HTMLMediaElement.volume, drag the volume slider to 0 (muted remains false).
Click the volume-x button labeled Unmute.
Before: toggleMute only flipped media.muted to true, leaving volume at 0; the next click flipped muted false but playback remained silent.
Fix
When media is muted or volume is zero, treat the action as Unmute. Restore volume to 1 only if volume is zero and browser supports writable media volume; otherwise preserve the prior volume. Keep iOS/system-volume-only handling unchanged.
Regression coverage
tests/player-volume-unmute.test.mjs: zero-volume unmute, preserving nonzero level, normal mute, system-volume-only case. Run node --test tests/player-volume-unmute.test.mjs and npm test in CI (Node 24.15.0).
Risk and acceptance
Risk: zero-volume unmute restores full volume rather than the previous audible level (not currently tracked); user can adjust slider. Accept when zero-volume unmute produces audible playback, nonzero mute/unmute preserves volume, and iOS system volume is not written. No production deployment or release.
Local full test execution unavailable because the runtime cannot resolve github.com; CI verification required.
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing
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
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.
Reproduction
media.mutedto true, leaving volume at 0; the next click flipped muted false but playback remained silent.Fix
When media is muted or volume is zero, treat the action as Unmute. Restore volume to 1 only if volume is zero and browser supports writable media volume; otherwise preserve the prior volume. Keep iOS/system-volume-only handling unchanged.
Regression coverage
tests/player-volume-unmute.test.mjs: zero-volume unmute, preserving nonzero level, normal mute, system-volume-only case. Runnode --test tests/player-volume-unmute.test.mjsandnpm testin CI (Node 24.15.0).Risk and acceptance
Risk: zero-volume unmute restores full volume rather than the previous audible level (not currently tracked); user can adjust slider. Accept when zero-volume unmute produces audible playback, nonzero mute/unmute preserves volume, and iOS system volume is not written. No production deployment or release.
Local full test execution unavailable because the runtime cannot resolve github.com; CI verification required.