"Ready" Event not firing on page load with apple devices

29 views
Skip to first unread message

Jbee_1

unread,
Apr 14, 2014, 5:51:53 PM4/14/14
to jpl...@googlegroups.com
Hi all..

Quick question...

I am using the "ready" event to start an animation

    $("#liveStream").bind($.jPlayer.event.ready, function (event) {

 
When i page load, the animation begins because the ready event fires.. all is working fine in internet explorer, firefox, opera etc.... but in IOS the ready event does not fire... and therefore my animation does not play..


any thoughts?

many thanks


Mark Panaghiston

unread,
Apr 15, 2014, 6:50:57 AM4/15/14
to jpl...@googlegroups.com
I have some thoughts... Some things for you to look at and consider.

In general, there is no reason why iOS should fail when using the ready event like this.

These days most browsers will be using the HTML solution by default, but iOS will always use it. I say this since if you used solution:"flash,html" then the other browsers would be using flash, while iOS used HTML. The time between the Flash ready event and the HTML ready event differs. The HTML ready will be ~100ms after instancing jPlayer. The Flash ready event will be "the time it takes to get the SWF", which can easily be 200ms and then the ~100ms delay after the SWF loads into the page.

I see you are using the bind() method to hook up the handler... You are doing this before you instance jPlayer, right?
You could put this in the other ready event handler normally used for setMedia()

Ah... There is a rather obscure issue where if you hide the jPlayer div then the media will not play... But I doubt this would cause this ready event issue... But check that you're not hiding the jPlayer div. Hiding the jPlayer div is bad for the Flash solution and would certainly impede the ready event on some browsers... iOS has the quirk that the media should be visible for it to be playable. Sensible for video maybe, but audio is not so sensible... I think it is related to power saving on iOS, where why bother doing stuff with stuff that is hidden, because you cannot see the stuff so why waste electrons doing the stuff in the first place. But once more, I have never seen any music... I hear it.

If you have a mac, plug your iOS device into it, open Safari and make sure you have the developer tool enabled in the options (the last option) and you can see everything the device is doing on the page. You seem to get almost too much info, but you should be able to find the console and check that events are firing with a console.log() here and there.

If you provide a link, maybe we can shed more light on the matter.
Reply all
Reply to author
Forward
0 new messages