SyntaxFix
Write A Post
Hire A Developer
Questions
I believe it would be good to check if the audio is playing state and reset the currentTime property.
if (sound.currentTime !== 0 && (sound.currentTime > 0 && sound.currentTime < sound.duration) { sound.currentTime = 0; } sound.play();