I\'m trying to get HTML5 Audio to play/pause in one button. How would I possibly go around doing this? So the play button switches to the pause icon which is font awesome \'
Give this a whirl:
function aud_play_pause() { var myAudio = document.getElementById("myTune"); if (myAudio.paused) { myAudio.play(); } else { myAudio.pause(); } }
Play/Pause