![](https://secure.gravatar.com/avatar/20e6ec293ad9c98f5f7a5c8684758ca5?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
iPad and onReady to start audio file
I keep seeing that it's not possible to autoplay an audio file on the iPad. What's strange is that the following code works on SOME iPads, but not all:
function loadPlayer(file)
{
jwplayer("mediaplayer").setup({
flashplayer: "js/jwplayer.flash-6.5.swf",
html5player: "js/jwplayer.html5-6.5.js",
file: "assets/audio/"+file,
controls: true,
width: 100,
height: 50,
events: {
onComplete: function() {
pageCompleted();
}
}
});
jwplayer("mediaplayer").onReady(function(event) {
jwplayer("mediaplayer").play();
});
}
//this is called after other stuff happens (loading XML, etc)
loadPlayer(file);
Can you 100% confirm that the above code should not be possible? And can you explain why it would work on some iPads and not others? There is no commonality amongst them that I can find -- I've duplicated settings, etc. It works on some iPad 2s, and not others.