goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.74k stars 2.22k forks source link

Audio Stops Playing when iPhone 6 Goes to Sleep #783

Closed ayjee closed 4 years ago

ayjee commented 7 years ago

On an iPhone 6 using howlerjs in the chrome browser, when audio is playing and the phone is locked or goes to sleep, the audio stops. Is there a way to keep the audio playing while the phone sleeps or is locked with howlerjs?

I know it is possible, although maybe not with howler because it works from this site http://www1.play.it/audio/the-sports-junkies/. Click the play button and it will work.

itsucks commented 7 years ago

sound = data.howl = new Howl({ src: [data.file], html5: true, format: "mp3", ......

add html5:true, may solve this.

ayjee commented 7 years ago

thanks @itsucks will try this, for some reason didn't get a notification on github that you replied!

ayjee commented 7 years ago

@devlab2425

green-coder commented 7 years ago

html5: true worked for me.

I am using an audio recording plugin in my app, and I suspect that it is doing some kind of context switching which was making howler lose its audio.

goldfire commented 4 years ago

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