JSFiddle - React, Tailwind, and code Playground

by Aakash Chakravarthy

HTML

<audio controls="controls" >
    <source src="http://api.ispeech.org/api/rest?apikey=developerdemokeydeveloperdemokey&action=convert&voice=usenglishfemale&text=The%20end%20result%20is%20to%20skip%20the%20Done%20button%20after%20an%20html5%20video%20has%20finished%20playing,%20to%20display%20a%20content%20page,%20preferably%20using%20jQuery-Mobile." type="audio/mpeg" />
</audio>

JavaScript

var video = document.getElementsByTagName('audio')[0];

    
    var audio = document.createElement("audio");
audio.setAttribute("id","myid");
audio.setAttribute("autoplay","autoplay");
document.body.appendChild(audio);

audio.addEventListener('ended', foo);




function foo(){
    alert('lll');
}