Playing a .pls stream using libVLC?

This forum is about all development around libVLC.
akc3523
New Cone
New Cone
Posts: 1
Joined: 04 Dec 2020 22:44

Playing a .pls stream using libVLC?

Postby akc3523 » 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:

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!

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: Playing a .pls stream using libVLC?

Postby mfkl » 15 Dec 2020 04:14

Can the VLC app play your .pls stream? If so, try like this https://code.videolan.org/videolan/LibV ... tube-video
https://mfkl.github.io

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Playing a .pls stream using libVLC?

Postby Rémi Denis-Courmont » 15 Dec 2020 15:40

Sounds like you are ignoring the sub-item events.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 28 guests