leoasis / react-sound

Sound component to play audio in your web apps
ISC License
491 stars 80 forks source link

Audio stuck when switching networks #82

Open ThisIsSet-L opened 5 years ago

ThisIsSet-L commented 5 years ago

When using on mobile, and transferring from 4G to WiFi, the audio enters a stuck state, where it's state is "PLAYING", and onError doesn't fire (which it would with a HTML5 Audio tag).

Because I'm playing back an Icecast stream, this means the user has to dig out their phone, stop the playback, and restart it manually, which is frustrating for users.

Adding an onStalled event would allow me to automate restarting the playback.