What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Cant auto play audio in iPad safari...

kristievalerie

iPF Noob
Joined
Aug 21, 2010
Messages
1
Reaction score
0
Location
HK
I have write a script to play, its fail, how to write a script to auto play audio in ipad? audio only can play when i click link, it can not auto play, even i put into bady onload. :confused:


<audio src="alert.mp3" id="audio" autobuffer="autobuffer" autoplay="autoplay"></audio>
<script type="text/javascript">
function playAudio() {
var audio = document.getElementById('audio');
audio.play();
}
playAudio();
</script>
<a href="javascript: playAudio()" id="clickme">hit me</a>
 

Most reactions

Latest posts

Top