Search code examples
androidjqueryjplayer

jQuery jPlayer not playing in Android


I'm using jPlayer to play some audio on a web site. Works fine on computers and iPhone, but it's having some issues playing on Android.

Tested on a S3 mini with Android 4.2, a S5 with Android 4.4 and on an Emulator running Android 2.2 and all of them have the same problem. Nothing happens when you click play.

Debugging I found that it's a format support issue. Where it checks to see if the format is supported using the line:

if(self[solution].support[format] && self._validString(media[format])) { // Format supported in solution and url given for format.

It never returns true.

Tested the combinations of solutions (HTML and Flash) and format (mp3, m4a and oga) for support and it only returns true for m4a using the HTML player.

Is this a bug on jQuery or mp3 support for Android?

Tested using Chrome and Dolphin with the same result.


Solution

  • It is a jQuery bug. It's not a OS related issue, but browser related.

    Was using jPlayer 2.6.0 and in my S3 mini only worked in the default Samsung browser (Chrome and Dolphin didn't play the music). Upgraded to jPlayer 2.6.4 and now it works in Chrome but not Dolphin, so I guess they still have some work to do, I'll report this bug.

    You can download jPlayer 2.6.4 here: https://raw.githubusercontent.com/happyworm/jPlayer/master/jquery.jplayer/jquery.jplayer.js (still not available in the CDN)