howler.js icon indicating copy to clipboard operation
howler.js copied to clipboard

Audio stream not working on Firefox Android

Open bugz313 opened this issue 5 years ago • 11 comments

Firefox for Android version 66.0.2

I am trying to play a radio stream but it's stuck loading forever. Static sound files play without problems.

I also tried playing the Live Radio demos from https://howlerjs.com/ and same thing happens.

bugz313 avatar Apr 09 '19 09:04 bugz313

Without code examples, output logs, or anything like that, no one will be able to assist you correctly.

darren-dev avatar Apr 12 '19 07:04 darren-dev

Without code examples, output logs, or anything like that, no one will be able to assist you correctly.

You can just visit howlerjs.com in Firefox on Android, scroll down to Demos, open Live Radio demos and try to play BBC Radio 1 or any other live radio. It never plays.

For code you can check: examples/radio/radio.js

bugz313 avatar Apr 12 '19 08:04 bugz313

Firefox for Android version 66.0.2

Yes, however I may not have the EXACT system you are using. I personally have a Note 4 (Which is older) and things work fine. Providing code isn't to prove that there is an issue, it's so another developer can look and try provide assistance.

EDIT: Looking at the demos, and checking in the console, I can see that it's trying to load HTTP data onto an HTTPS website. The cause of your issue could quite possibly be your browser blocking those requests. But again, we need to see code instead of just pointing me to something I can clearly see.

darren-dev avatar Apr 12 '19 09:04 darren-dev

Are you still seeing this issue? I've tested on the latest Firefox on 2 different Android devices and the live radio demo worked on both.

goldfire avatar Apr 19 '19 19:04 goldfire

I'm experiencing the same issue on my Android. Howler's live demos don't work either. I'm not seeing any errors.

When I was further debugging on my own site, I've noticed the following:

  • Howler instance is stuck on loading state
  • canplaythrough event is triggered after I unload the instance (gets triggered when I press STOP button)
  • instance was able to get into the loaded at random times which occurred very rarely (from the top of my head 5% of the times). When that occurred I unloaded the instance and tried playing it again which resulted in the same issue as before
  • unlock event is triggered after I unload the instance, if I try playing again it's stuck in the loading state again
  • I've was also listening to all events on the howler instance, but they didn't get triggered, with exception of unlock event which I mentioned above (see the list of methods in the sample code bellow)

This is how I initialize the howler instance:

new Howl({
    src: ['https://strm.radionula.com/classics'],
    html5: true,
    format: ['mp3'],
    onload: () => console.log('onload'),
    onloaderror: (e, msg) => console.log('onloaderror', e, msg),
    onplayerror: (e, msg) => console.log('onplayerror', e, msg),
    onplay: () => console.log('onplay'),
    onend: () => console.log('onend'),
    onpause: () => console.log('onpause'),
    onrate: () => console.log('onrate'),
    onstop: () => console.log('onstop'),
    onseek: () => console.log('onseek'),
    onfade: () => console.log('onfade'),
    onunlock: () => console.log('onunlock'),
});

Firefox for Android version 66.0.2. Android v9 (OxygenOS v9.0.13).

I'm using the Howler v2.1.2.

I've also tested on :

  • works OK on desktop FF/Chrome
  • works OK on FF/Safari on iOS 12
  • works OK on Chrome on Android (same specs as above)

Let me know if this information is sufficient. I'll try to do further debugging and will prepare a small project that will replicate the issue. Until then, if anyone has any ideas/suggestions what would be worth checking I'd greatly appreciate it.

roks0n avatar May 03 '19 21:05 roks0n

I haven't made much progress yet, but this is the sample project with which I'm able to replicate the issue: https://github.com/roks0n/howler-demo

Note:

roks0n avatar May 04 '19 06:05 roks0n

@goldfire I am still seeing the issue. Could this issue be reopened please?

bugz313 avatar May 10 '19 13:05 bugz313

Just to give my update: nothing changed since I posted and I haven't made any progress on the issue. I'll keep everyone updated if anything changes.

roks0n avatar May 10 '19 13:05 roks0n

we experience the same issues. any update on this will be great.

eladkolet avatar Aug 08 '19 01:08 eladkolet

@eladkolet @roks0n The issue on our side was caused by the stream not being secure and using a port. Now it works.

bugz313 avatar Aug 08 '19 06:08 bugz313

Still facing the issue on firefox for android. Works well on Chrome but not on Firefox. We already have https url for the audio.

Mobile :- Nokia 6.1 Plus Firefox for Android version:- 68.3

nikhilbhalwankar avatar Jan 03 '20 17:01 nikhilbhalwankar