Skip to main content

pauseAllSounds

pauseAllSounds(): void;

Pause all currently playing sounds. The playback position is preserved for each sound — call resumeAllSounds to continue from the same points.


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 });

// Pause all sounds at once — positions are saved
soundManager.pauseAllSounds();

// Resume all later
soundManager.resumeAllSounds();
Tokyo Trainstopped
Bells Melodystopped
Techno Tunestopped
Try it: Click "Play All" to hear all three sounds together. Use Pause/Resume/Stop to control them simultaneously.