Class AudioStreamChecker
- Namespace
- RadioExt_Helper.utility
- Assembly
- RadioExt-Helper.dll
Checks the validity of an audio stream URL. The stream is valid if its content type is an audio type.
Originally designed to check radio.garden streams but can also be used to check any URL that might be an audio stream.
public sealed class AudioStreamChecker
- Inheritance
-
AudioStreamChecker
- Inherited Members
Constructors
AudioStreamChecker(TimeSpan)
Initializes a new instance of the AudioStreamChecker class with the specified timeout.
public AudioStreamChecker(TimeSpan timeout)
Parameters
timeout
TimeSpan- The timespan to wait before the request times out.
Methods
ConvertRadioGardenUrl(string)
Convert a URL string from radio.garden into a usable audio stream URL.
public static string ConvertRadioGardenUrl(string originalUrl)
Parameters
originalUrl
string- The original web URL.
Returns
- string
- The API URL for the station's stream.
~AudioStreamChecker()
Disposes the resources used by the AudioStreamChecker.
protected ~AudioStreamChecker()
IsAudioStreamValidAsync(string)
Checks if the audio stream at the specified URL is valid. The stream is valid if its content type is an audio type.
public Task<bool> IsAudioStreamValidAsync(string url)
Parameters
url
string- The URL of the audio stream to check.