Copy link to clipboard
Copied
I have a wedding website on which I need background music (I know, I know) to play automatically as each page is loaded. At the top of the page needs to be a mute button which toggles to a play button. Many audio players can do this (I have bought SIX now) but NONE of them will work on all platforms - PC, tablet and mobile phone. They all have this quirk when viewed on the mobile platforms - they will not autoplay. You have to a) wait for the audio file to load, which takes a while, b) you have to click the mute button, then click the play button, then click the mute button again - and then the track plays. This is the case on all bought audio players, even though they say they work on all platforms, and even though some of them allow the configuration of mp3, ogg and wav file versions, presumably for the three platforms. Am about to give up - any ideas for a fool-proof widget which will autoplay on all platforms? This sounds a simple question and should have a solution, surely.
Copy link to clipboard
Copied
As you found out, it doesn't exist. There's simply no way to control the behavior in particular on mobile devices since for millions of reasons like only allowing one foreground app, energy saving considerations, app sandboxing and a lot of other stuff the audio will almost always only be initialized with delay or upon user request. You might as well just give up. Even the "dumb" stuff with teh plain <audio> tag doesn't always work and that alone says enough...
Mylenium
Copy link to clipboard
Copied
maybe this will help
jquery - Can you autoplay HTML5 videos on the iPad? - Stack Overflow