I'm using HTML <embed> to play music in the background on a site, and I have a list of songs I'd like it to play. Is there some way to detect the end of the song and start the next?
document.body.removeChild(soundEmbed)
soundEmbed = document.createElement("embed")
soundEmbed.setAttribute("src", "Music/"+Song)
soundEmbed.setAttribute("hidden", true)
soundEmbed.setAttribute("autostart", true)
document.body.appendChild(soundEmbed)
This allows me to change songs (Bound to a button press) but I'd like it to run automatically. Any help would be appreciated.