Playing a .pls stream using libVLC?
Posted: 14 Dec 2020 17:52
Hello! I am hoping to get some help with this. I am currently developing a C# application that plays live radio streams. So far, I have added support for hls (m3u8) streams, and shoutcast streams. But, I need to add support for pls streams, where the stream URL link ends with ".pls". But whenever I try to play the pls stream, nothing is returned, and I'm not sure why it's not working. This is the code that I have been using to play the stream links:
This code works perfectly for the hls and shoutcast streams, but does nothing for the .pls stream files. Could anyone let me know why this could be happening, and if it is possible for libVLC to playback pls streams? And how would I accomplish playing back the pls streams?
Thanks!
Code: Select all
LibVLC _libVLC;
MediaPlayer _mediaPlayer;
public void playRadio()
{
Core.Initialize();
_libVLC = new LibVLC();
_mediaPlayer = new MediaPlayer(_libVLC);
using (var media = new Media(_libVLC, new Uri(link)))
_mediaPlayer.Play(media);
}
Thanks!