Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

When an audio element has been loaded by js "myaudio.load()" in firefox for android, it does not fire canplaythrough event., but it has truely been loaded.

  • 6 replies
  • 5 have this problem
  • 5 views
  • Last reply by mikefighter

more options

When an audio element has been loaded by js "myaudio.load()" in firefox for android, it does not fire canplaythrough event., but it has truely been loaded. Because you can play it and hear the sound. It works fine in desktop. When an audio element is loaded, which can fire the canplaythrough event.

here is the test example:

http://mostest.my-own-stage.com/test-audio4.html

please see the log

When an audio element has been loaded by js "myaudio.load()" in firefox for android, it does not fire canplaythrough event., but it has truely been loaded. Because you can play it and hear the sound. It works fine in desktop. When an audio element is loaded, which can fire the canplaythrough event. here is the test example: http://mostest.my-own-stage.com/test-audio4.html please see the log

All Replies (6)

more options

HI mikefighter,

I just tested this on Firefox version 36 and 35 and it loaded when I tapped on the play button. 

If you would like to try auto play, in this page find https://developer.mozilla.org/en-US/d.../Using_HTML5_audio_and_video

<audio src=" #" autoplay <="" p=""></audio>

more options

guigs2 said

HI mikefighter, I just tested this on Firefox version 36 and 35 and it loaded when I tapped on the play button. If you would like to try auto play, in this page find https://developer.mozilla.org/en-US/d.../Using_HTML5_audio_and_video <audio src=" #" autoplay <="" blockquote="">

sorry, guigs2, I do not quite get the point of what you say. Do you mean in such way the canplaythrough event can be fired from very beginning?

</audio>
more options

No, I assumed that the canplaythrough function was an autoplay function on the audio. If you would like to share the log please share it in a post via http://pastebin.mozilla.org/ and set the expiration to longer.

https://developer.mozilla.org/en-US/d.../Firefox_for_Android

more options

log from desktop

http://pastebin.mozilla.org/8680907

log from android (1)

http://pastebin.mozilla.org/8680931

actually the second log is just a fragment. It will repeat the pattern until I click button play. Then I get the log below

log from android (2)

http://pastebin.mozilla.org/8681126

according to these logs you can see that although running the same code, after loading these audio data, different platform has different performance.

The point is firefox(for android) should have fired canplaythrough event, just like firefox(for desktop) do, after the audio data have been loaded, but it do not.

more options

Hi mikefighter:

just tried: http://mostest.my-own-stage.com/test-audio4.html

on both Nexus 6 running FF35.0.1, Android Lollipop AND Mac OS X 10.10.2 running FF38 Nightly

and both have the same behaviour i.e. the audio (is it counting in Mandarin Chinese?) only plays on both Desktop and Android when you click/tap on play.

Anyhow this is a web developer question and this forum is for user questions. So our apologies but Rachel and I can't help further as we are focused on user questions.

Please ask this question on stackoverflow and tag it firefox:

http://stackoverflow.com/questions/tagged/firefox

Firefox developers and developer relations monitor the firefox tag and hopefully they can give you an answer there!

Cheers! ...Roland

more options

Thanks Roland. I will try there.