goldfire / howler.js

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

WebAudio stops working after a period of inactivity (Android Chrome on some devices) #391

Closed Melatonin64 closed 8 years ago

Melatonin64 commented 8 years ago

On some Android devices, on latest Chrome using howlerjs 2.0, Web Audio will shutdown after some period of inactivity. You can read more about the issue here and here.

There's a decent workaround suggested on stackoverflow, and it would be great if this would be implemented within howler.js 2.0.

Thanks!

goldfire commented 8 years ago

I've found that using suspend/resume can solve this issue, but am still thinking through the best way to handle it. I've outlined my initial thoughts on how to approach the problem in #315.

goldfire commented 8 years ago

Also, for reference, this appears to be related to this bug report: https://code.google.com/p/chromium/issues/detail?id=518863

goldfire commented 8 years ago

This should now be fixed with 7022ab9fb756e12013b4d455b2765b27827c0ac7.

Melatonin64 commented 8 years ago

Great - thanks!!

tomosaigon commented 8 years ago

I'm now getting the same exact symptoms on Chrome (OS X, not Android) with the latest Howler (2.0.0 via CDNJS). My working work-around is to auto-trigger an audio play every 25 seconds.

Setting {autoSuspend: false} didn't help.

stevenbirr commented 8 years ago

Setting {autoSuspend: false} didn't help for me, too. Auto-trigger a play every 25 seconds is very unlovely, but sadly seems to be the only option...