scottschiller / SoundManager2

A JavaScript Sound API supporting MP3, MPEG4 and HTML5 audio + RTMP, providing reliable cross-browser/platform audio control in as little as 12 KB. BSD licensed.
http://www.schillmania.com/projects/soundmanager2/
Other
4.99k stars 768 forks source link

Bar-UI single stream, autoplay #201

Closed gmorks closed 6 years ago

gmorks commented 6 years ago

I'm integrating soundmanager to an amateur online radio station web page, everything works, but can't find a way to start the audio as soon as the web page ends loading. Can anyone guide me how to do it?

scottschiller commented 6 years ago

Howdy. Auto-play has been blocked on mobile devices for years, in desktop Safari more recently, and it's about to be blocked in Chrome on desktop - so my suggestion is that you have a "tap to play" or similar big play button that users can click / touch to start playback.

A bit more detail yonder. https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

gmorks commented 6 years ago

ok, thank you for the reply