Page 1 of 1

Playing a .pls stream using libVLC?

Posted: 14 Dec 2020 17:52
by akc3523
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:

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); }
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!

Re: Playing a .pls stream using libVLC?

Posted: 15 Dec 2020 04:14
by mfkl
Can the VLC app play your .pls stream? If so, try like this https://code.videolan.org/videolan/LibV ... tube-video

Re: Playing a .pls stream using libVLC?

Posted: 15 Dec 2020 15:40
by RĂ©mi Denis-Courmont
Sounds like you are ignoring the sub-item events.