isPaused
isPaused(id: string): boolean;
Check if a sound is currently paused. Returns true if the sound has been paused via pause, false otherwise.
Example
await soundManager.loadSounds([{ id: 'helicopter', url: 'helicopter.mp3' }]);
soundManager.play('helicopter', { loop: true });
// Pause and check
soundManager.pause('helicopter');
console.log(soundManager.isPaused('helicopter')); // true
// Resume and check again
soundManager.resume('helicopter');
console.log(soundManager.isPaused('helicopter')); // false
Sound State
stopped
isPlaying: falseisPaused: falseisStopped: trueTry it: Use the buttons to change the helicopter sound's state. Watch the status update in real time —
isPlaying, isPaused, and isStopped are mutually exclusive.