muteAllSounds
muteAllSounds(): void;
Mute all sounds without stopping them. All sounds continue playing silently. The original volume is preserved — call unmuteAllSounds or toggleGlobalMute to restore audio.
Example
await soundManager.loadSounds([
{ id: 'tokyo-train', url: 'tokyo-train-melody.mp3' },
{ id: 'bells-melody', url: 'bells-melody.mp3' },
{ id: 'techno-tune', url: 'techno-tune.mp3' }
]);
soundManager.play('tokyo-train', { loop: true });
soundManager.play('bells-melody', { loop: true });
soundManager.play('techno-tune', { loop: true });
// Mute everything
soundManager.muteAllSounds();
// Later: restore
soundManager.unmuteAllSounds();
// Or toggle
soundManager.toggleGlobalMute();
🔇 Press "Play All" to start
Try it: Play three sounds together, then use Mute All / Unmute All to toggle all sounds at once.
toggleGlobalMute switches between muted and unmuted — useful for a single master mute button.