icecast-metadata-js icon indicating copy to clipboard operation
icecast-metadata-js copied to clipboard

icecast-metadata-player retry / reconnect logic not working in iOS 17

Open blantonl opened this issue 7 months ago • 1 comments

The retry / reconnect logic is not working in iOS 17. For instance, if roaming from Wifi to Cellular, the player just stops and doesn't attempt to reconnect.

This can be recreated on the the bare minimum demo: https://eshaz.github.io/icecast-metadata-js/bare-minimum-demo.html

Using an iOS 17 device, start the stream while connected to Wifi, and then turn off Wifi and the stream stops and doesn't attempt to reconnect. I've also verified this behavior by manually roaming from Wifi to cellular - the player just stops.

blantonl avatar Nov 17 '23 12:11 blantonl

Thanks for entering this issue.

I'm wondering if the connection is not being aborted by iOS when the network changes from WiFi to cellular. The fetch request being aborted / throwing an exception is what triggers the retry logic. Could you reproduce this with your iPhone connected to the dev tools in Safari so you can view the network tab to verify this?

If this is the case, I could add a feature that will trigger a retry once the audio buffer runs out so it doesn't have to rely on the browser's fetch implementation.

eshaz avatar Nov 26 '23 17:11 eshaz