The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript playing music on a site Re: playing music on a site


It would be easy to give the user a warning using JavaScript. You could attach an event handler to the document and run this when it was ready:

window.confirm(“if you wish to continue music will stop playing”);

You could then write logic that. if they confirmed, would fire the audio playing (only if you have a JS API).