Howler.js: Audio always starts at the beginning on Android

Created on 2 Nov 2017  路  7Comments  路  Source: goldfire/howler.js

When I play an audio on Android it always starts at the beginning.
I tried this in two ways:

  • Play/Pause the audio
  • Change the audio position using seek and trying to play the audio

This are my Howler settings

this.howler = new howler.Howl({
      src: this.state.sources[usersSettings.selectedAudioSpeed],
      format: ['mp3'],
      loop: true,
      html5: true,
      onplay: this.onPlay.bind(this),
      onend: this.onEnd.bind(this),
      onload: this.onLoad.bind(this),
      onloaderror: this.onLoadError.bind(this),
      onplayerror: this.onPlayError.bind(this),
      volume: this.state.howlerVolume,
    });

I tried this on my PC browser (Chrome) and it worked without a problem.
Do you have any idea what the problem could be?

Most helpful comment

Is there anything new about this issue and how to fix it?

All 7 comments

After some more testing this issue only happens when I have html5: true when its false it doesn't happen. The problem is that I need that flag on true because otherwise I can't load big audio files.

Is there anything new about this issue and how to fix it?

I'm also running into this issue, has anyone found a resolution?

I was dealing with a similar issue.

At my local php server it only worked with html: false.

It worked fine (with html5:true) when I tested at an online staging server.

The issue is the same with the current howler version 2.1.2
Any idea?

Usually if you want to use html5: true, which makes use of the audio element, your server needs to support range requests. Otherwise things like seeking will not work reliably as the client has no other choice than to just download the whole file.

If you run into issues when html5 is set to true, you might want to check if your server works correctly, or try a different server to narrow down the issue.

Closing due to inactivity. If this is still an issue, reply with more info and I'll reopen.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Glutch picture Glutch  路  3Comments

bflora2 picture bflora2  路  4Comments

jmeyers91 picture jmeyers91  路  4Comments

brancusi picture brancusi  路  4Comments

inglesuniversal picture inglesuniversal  路  4Comments