I use the XamarinMediaManager in a Xamarin.Forms project, to play audio from a web radio.
But I would like to manage error cases, like when the URL is no longer available, or if there is not internet access for example.
I launch the audio stream like this:
var mediaItem = await CrossMediaManager.Current.Play(audioUrl);
If I use a "wrong" URL, nothing happens, but I didn't found how to "identify" this case. It's the same thing if I activate the airplane mode.
I would like to display an error message to the user in both cases, so he could understand why the audio doesn't launch.
Is there a way to manage this?