Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions client/src/components/audio/sound-cloud-audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,16 @@ export function SoundCloudAudioProvider({ children }: { children: React.ReactNod
const next = !prev;
const widget = widgetRef.current;
if (widget) {
widget.setVolume(next ? 0 : 100);
widget.play();
// Mute by pausing, not by setVolume(0): on mobile (notably iOS) volume is
// hardware-controlled and setVolume is a no-op, so volume-based muting
// silently failed there. play()/pause() honor the user's tap on every
// platform — and the tap is the gesture mobile needs to start audio.
if (next) {
widget.pause();
} else {
widget.setVolume(100);
widget.play();
}
}
return next;
});
Expand Down