fix(audio): mute toggle works on mobile (pause instead of setVolume)#167
Closed
sacha-l wants to merge 1 commit into
Closed
fix(audio): mute toggle works on mobile (pause instead of setVolume)#167sacha-l wants to merge 1 commit into
sacha-l wants to merge 1 commit into
Conversation
The mute toggle relied on widget.setVolume(0), but volume is hardware-controlled on mobile (notably iOS) where setVolume is a no-op — so tapping mute kept playing at full volume. Mute now pauses and unmute plays (setVolume(100) on desktop); play/pause honor the user's tap on every platform.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Superseded — rolled the mobile mute fix into the umbrella 'Minor bug fixes' PR #168 (same commit). Closing to avoid a duplicate. |
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.
Problem
The audio mute button doesn't work in production on mobile.
Cause
The toggle muted via
widget.setVolume(0). On mobile — notably iOS — playback volume is hardware-controlled andsetVolumeis a no-op, so tapping "mute" leftplay()running at full volume and nothing actually muted.Fix
Mute by pausing, unmute by playing (with
setVolume(100)for desktop).play()/pause()honor the user's tap on every platform — and the tap is the user gesture mobile needs anyway. Persistence-across-pages and the finish→loop behavior are unchanged.Test plan
cd client && npm run build— cleancd client && npm run lint— clean (0 warnings)aria-pressedfalse→true), no console errors.Draft → develop. Since this is a prod bug, promote to
mainafter merge to ship it.