Reputation: 155
So only in safari on the ipad I am having an issue with the play/pause not firing inside a setTimeout. This works in all browsers and even in safari on PC and Mac, just not on ipad. If I take the setTimeout it works, but I need the setTimeout. This is for JWPlayer 5.9.2156
jwplayer("Container").setup({
events: {
onBeforePlay: function () {
jwplayer("Container").pause('true');
if(tOut) {
clearTimeout(tOut);
tOut = null;
}
var tOut = setTimeout($.proxy(function () {
jwplayer("Container").pause("false"); //this doesnt happen
console.log("this happens");
}.bind(this), this), 1000);
},
onPause: function (e) {
//this isnt firing
console.log("OnPause fired: "+e.oldstate);
}
...
Upvotes: 1
Views: 1147
Reputation: 155
While this may not be on the same topic at first glance the accepted answer given here also applies to this situation.
HTML5 audio object doesn't play on iPad (when called from a setTimeout)
Upvotes: 1