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.
| Parameter | Type | Description |
|---|---|---|
id | string | ID of the sound to resume |
skipDispatchEvent | boolean | When 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.