Open ilippert opened 5 years ago
Currently I can't check this behaviour as I don't do network connection shifts.
Does this issue appear with other media players, e.g. lollypop and radio streams as well? Maybe it's not extension related
thanks for the hint - yes, the playback stops also in Rhythmbox - do you know where to communicate this issue?
It could be possible to fix it in the extension directly.
We just need to remember if the radio was playing. Then, when we have a network error and if the radio was playing, we could retry after a few seconds ?
Should be possible to do it in the extension, but the gstreamer api has to be checked for the proper messages.
Not sure, but maybe there is way to subscribe for dbus message for network reconnection.
Maybe this is helpful: https://stackoverflow.com/questions/59258931/how-to-use-dbus-and-networkmanager-to-activate-a-connection (this wan is to open connection, but maybe there is message which informs that connection was established
As of gstreamer supporting network stream errors, here is some previous art:
A very common problem in GStreamer, especially when working with live network streams, is that the source might just fail at some point. Your own network might have problems, the source of the stream might have problems, …
Without any special handling of such situations, the default behaviour in GStreamer is to simply report an error and let the application worry about handling it. The application might for example want to restart the stream, or it might simply want to show an error to the user, or it might want to show a fallback stream instead, telling the user that the stream is currently not available and then seamlessly switch back to the stream once it comes back.
Implementing all of the aforementioned is quite some effort, especially to do it in a robust way. [...]
Since most radio stations probably use icecast, souphttpsrc is assembled with the playbin. This has a retry property:
So when setting this to infinite (-1), the stream should restart until the user presses stop.
In my experience, the playback stops when I shift the system's connection, e.g. from ethernet to wifi.