I had to post this note to self as it has driven me crazy for a while it was surprisingly difficult to identify (and locate via search) why jPlayer wasn’t working on Chrome for Android, it must be annoying a lot of people. This issue occurs in Chrome versions above Google Chrome v.36.0.1985.122 but definitely check it out of you cannot get jPlayer to work in Android Chrome.
The two key threads are here:
https://groups.google.com/forum/#!msg/jplayer/BoVUNok0yl4/LU8q2wggQaYJ
https://groups.google.com/forum/#!msg/jplayer/-i-Hb9gs8aM/07rI5BJg-bUJ
Basically highlighting an issue with the “androidFix” process they are required to keep in jPlayer due to the vagaries of Chrome on Android:
The issue related to:
self.androidFix.setMedia = true;
Which you can simply comment out of jquery.jplayer.js (not the minified version which will make things a lot harder!)
Take a look at the issues around Android here
Quote:
“The problem here is that Google keep moving the goal posts.
First of all they took about 4 years to fix a basic bug with the audio element… Simply change the SRC and tell it to play and OMFG that was too complicated. So we had to allow it time for a cup of warm milk and a biscuit in between changing the media URL and asking it to play. To do this, we used the progress event to ensure that the media element was ready and setup with the new URL and ready to play it without throwing the pacifier. We used the progress event as an alternative to the “wait 3 seconds and it should work” solution… After all, we are making every android user wait, so I wanted it to be the absolute minimum and robust time, hence the progress event.
Pretty much as we released the android fix, the mainstream – non google – devices, like Samsung, started working without the fix in the default browser.
In the current Android, the progress event does not fire in the same way as before. Before, changing the SRC would cause the progress event to fire, which we used to apply the fix. Now that never happens, so the fix is breaking all of android.
I am currently looking into other events that we could use for the purpose, otherwise we cannot fix both the old bugs while supporting the current release… And the current release will win if it comes to an ultimatum. ie., Just remove the fix.
It should be noted, that this android fix that I talk of only affected cases where you changed the media, such as a playlist.”
Alternatively you can go to the latest and greatest version 2.71 which contains the fix but at time of writing wasn’t listed on the main jPlayer site:
direct link to script (don’t hotlink – it won’t work, and it’ll need minifiying)
Thanks to the ongoing efforts of the
jPlayer team, who do an awesome job on this.