JSFiddle - React, Tailwind, and code Playground
by Optimix
HTML
<li class="flex-item " > A
<span class="flex-SubItem"> <br /> BOOM </span>
<audio id="boom" >
<source src="https://s3.amazonaws.com/Diffuser/placeholder-slow-down.mp3" type="audio/mpeg">
</audio>
</li>
<button id="stop-audio">Play audio</button>
JavaScript
(function () {
// document.getElementById('boom').play();
document.getElementById('boom').stop();
$('#stop-audio').on('click', function() {
document.getElementById('boom').play();
});
})()