I am trying to implement this method because I have a table of audio to play/pause individually, so I found this way after many research. But pause is not working here. Could anyone please help me?
function playAudio(url) {
new Audio(url).play();
}
function pauseAudio(url) {
new Audio(url).pause();
}
<input type="button" value="PLAY" onclick="playAudio('https://cldup.com/qR72ozoaiQ.mp3')" />
<input type="button" value="PAUSE" onclick="pauseAudio('https://cldup.com/qR72ozoaiQ.mp3')" />