mp3 not playing on android Firefox

355 views
Skip to first unread message

Rob Voyle

unread,
Nov 15, 2013, 4:07:13 PM11/15/13
to jpl...@googlegroups.com
Hi Folks

What is the work around for playing mp3 on android firefox?
they are playing fine on the basic android browser.

The also play on windows firefox.

Thanks
Rob

Mark Panaghiston

unread,
Nov 15, 2013, 4:16:29 PM11/15/13
to jpl...@googlegroups.com, robv...@voyle.com
Have you tried visiting the mp3 url directly in Android Firefox?
If that does not work, then the browser does not like the encoding you used.

I admit that it is an odd problem. Usually it is the standard browser that is the odd one out.

Rob Voyle

unread,
Nov 16, 2013, 2:11:26 PM11/16/13
to Mark Panaghiston, jpl...@googlegroups.com
Hi Mark
The direct url is playing in FF
Here is the page with the player:
http://localhost:8501/kickassvps/appreciativeway/hope/hope.cfm
Child of the angels is the mp3

Here is the code:

<script type="text/javascript">
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {mp3:
"childOfTheAngels-MJessen.mp3"
}).jPlayer("play");
},
swfPath: "../jplayer",
supplied: "mp3"
});
});
</script>

And the message is the "no solution but the adobe link:
http://get.adobe.com/flashplayer/
doesn't work on the droid.

Thanks for your help

Rob

Mark Panaghiston

unread,
Nov 18, 2013, 1:18:12 PM11/18/13
to jpl...@googlegroups.com, Mark Panaghiston, robv...@voyle.com
I cannot see your localhost.

I strongly suggest you take away the autoplay attempt. That may even be the problem.

This bit from the ready handler:
.jPlayer("play")

Most mobile browsers stop you from auto playing and the user must press a button to initiate the playback... Plus, Android has been known to have problems with the standard browser where you need to give it a bit of time to setup before you try and play it... Otherwise the browser wigs out and there is nothing we can do about it.

Rob Voyle

unread,
Nov 19, 2013, 6:50:15 PM11/19/13
to Mark Panaghiston, jpl...@googlegroups.com
Hi Mark

Removed the auto play and I still get the error message in FF on Samsung Droid.
but not on the default browser.
The mp3 on its own plays in both.
You can see it at:
http://www.appreciativeway.com/hope/test.cfm

Mark Panaghiston

unread,
Nov 19, 2013, 8:21:27 PM11/19/13
to jpl...@googlegroups.com, Mark Panaghiston, robv...@voyle.com
The way you wrote the code here looks iffy:


$(this).jPlayer("setMedia", {mp3:
"childOfTheAngels-MJessen.mp3"
});

I always see them written on the same line.
mp3: "childOfTheAngels-MJessen.mp3"
But http://jshint.com/ does not complain... Hmmm...

You could try using jPlayer 2.5.0 since you're using 2.2.0... It might help... Actually, you should definately upgrade to jPlayer 2.5.0 since security problems were fixed in jPlayer 2.4. You should delete all old jPlayer files on your server, especially the Jplayer.SWF.

jQuery-ui and jplayer.inspector appear to be 404 errors, but your server is giving a strange response.
Oh... They forward to http://www.appreciativeway.com/notfound.cfm?Error:%20This%20url%20had%20an%20invalid%20action
You could get that to return the 404 code so the browser understands it is a broken url.

The mp3 seems to give the correct response:
http://www.appreciativeway.com/hope/childOfTheAngels-MJessen.mp3

I will need to take a look tomorrow on the Nexus 7... My misses has nicked it and I dare not wake her to ask where it is.

Rob Voyle

unread,
Nov 20, 2013, 2:18:10 AM11/20/13
to Mark Panaghiston, jpl...@googlegroups.com
Hi Mark

Sorry to be a pain.
Upgraded to jplayer 2.5 changed the code so it is:

<script type="text/javascript">
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer({
ready: function () {
$(this).jPlayer("setMedia", {
mp3: "childOfTheAngels-MJessen.mp3"
});
},
swfPath: "../jplayer",
supplied: "mp3"
});
});
</script>

Entire thing is at:
www.appreciativeway.com/hope/test.cfm

Still won't run on firefox in samsung droid.
Rob


On 19 Nov 2013 at 17:21, Mark Panaghiston wrote:

> The way you wrote the code here looks iffy:
>
> $(this).jPlayer("setMedia", {*mp3: *
> * "childOfTheAngels-MJessen.mp3" *
> });
>

Mark Panaghiston

unread,
Nov 20, 2013, 2:27:23 PM11/20/13
to jpl...@googlegroups.com, Mark Panaghiston, robv...@voyle.com
I suggest you bug report it to Firefox.
https://bugzilla.mozilla.org/

And maybe to Samsung, but probably little they can do about it.

I tried it on Firefox on the Nexus 7 and is worked fine. Android 4.3... My nexus is now 2 years old - That went fast! - Gulp.

I did get asked a question about activating plugins when i visited your page the first time. I said "yes".

I also see under settings that there is dev tools -> remote debugging... Probably debugging it via a computer with firefox - like with iOS Safari and safari on a mac.

Hmmm... Interesting. I found where to turn off the plugins and now it complains about requiring an updated browser or Flash plugin.
I can only assume that you will need to supply an OGG version in order for it to play through HTML5.

There are encoders at the end of this section:
http://jplayer.org/latest/developer-guide/#jPlayer-media-encoding

I would have thought that Firefox was using the devices MP3 decoder, but obviously not.
   $(this).jPlayer("setMedia", {
      mp3: "childOfTheAngels-MJessen.mp3",
      oga: "childOfTheAngels-MJessen.ogg"
   });

   supplied: "mp3,oga"

Let us know if that fixes it.

Kevin Brosnan

unread,
Nov 20, 2013, 8:09:46 PM11/20/13
to jpl...@googlegroups.com, Mark Panaghiston, robv...@voyle.com
Firefox for Android will use the libstagefright from Android to play back files that Android supports. Going directly to http://www.appreciativeway.com/hope/childOfTheAngels-MJessen.mp3 in Firefox 25 plays back the file without issue. It is only when using jplayer without Flash installed that this happens. I suspect that the software is making some incorrect assumptions about the user agent of Firefox for Android or similar. You should be testing on a device without Flash as very few Android users have it and Android 4.4 breaks support of Flash.

Rob filed a bug against Firefox at https://bugzilla.mozilla.org/show_bug.cgi?id=941187 it is possible that our website analysts may have time to dig into the source of the page. However it likely that Mark has a better understanding of the jPlayer design.

Kevin Brosnan

Mark Panaghiston

unread,
Nov 21, 2013, 3:36:36 PM11/21/13
to jpl...@googlegroups.com, Mark Panaghiston, robv...@voyle.com
The bug report for this is here:
https://bugzilla.mozilla.org/show_bug.cgi?id=941187

Which is de to this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=887517

The mime check in jPlayer is as follows, which expresses the bug in Firefox Android:
mediaElement.canPlayType('audio/mpeg; codec="mp3"') == ""

I understand that without the codec we get:
mediaElement.canPlayType('audio/mpeg') == "Maybe"
NB: not sure if it is maybe or probably, but difference has never been of value. Truethy is all that matters.
Reply all
Reply to author
Forward
0 new messages