Skip to main content

resume

resume(id: string, skipDispatchEvent?: boolean): void;

Resume a paused sound by its ID. Playback continues from the exact position where pause was called. Has no effect if the sound is already playing or stopped.

ParameterTypeDescription
idstringID of the sound to resume
skipDispatchEventbooleanWhen true, suppresses the resume event

Example

await soundManager.loadSounds([{ id: 'tokyo-train', url: 'tokyo-train-melody.mp3' }]);

soundManager.play('tokyo-train', { loop: true });

soundManager.pause('tokyo-train');

// Later: continue from the saved position
soundManager.resume('tokyo-train');
stopped
Try it: Play the sound, pause it, then resume — notice the audio continues from the same point rather than restarting.