<audio loop id="effect" src="/assets/web/audio/effect.mp3"></audio>
<script>document.getElementById('effect').pause();</script>
I stop a playing audio this way, the problem is it ends abruptly in the moment I run the javascript code. It's probably tricky but I wonder how could I stop it but allowing it to complete the playing iteration?