Skip to content

fix(player): restore audible volume when unmuting from zero - #544

Merged
hoangsvit merged 3 commits into
stagingfrom
fix/volume-zero-unmute-20261122
Nov 23, 2026
Merged

hoangsvit merged 3 commits into
stagingfrom
fix/volume-zero-unmute-20261122

Conversation

@hoangsvit

Copy link
Copy Markdown
Member

Reproduction

  1. On a browser with writable HTMLMediaElement.volume, drag the volume slider to 0 (muted remains false).
  2. Click the volume-x button labeled Unmute.
  3. 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.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

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.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

ePlus OnAir — PR Preview

🗃️ Preview expired. This PR is closed; the Preview link is hidden.

View build status

Preview is noindex; the full catalog is available on Staging after merge.

@hoangsvit
hoangsvit marked this pull request as ready for review November 23, 2026 11:14
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@hoangsvit
hoangsvit merged commit 68a99fe into staging Nov 23, 2026
3 checks passed
@hoangsvit
hoangsvit deleted the fix/volume-zero-unmute-20261122 branch November 23, 2026 11:14

This branch was previously deployed

1 inactive deployment
preview — 5d4a5040 Deployed Nov 23, 2026 by hoangsvit via Remove closed PR Preview #566
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.

1 participant