I would like to play a PLS file (http://live.radioguerrilla.ro:8002/listen.pls) from a website. I would like to use the audio
tag introduced by HTML5 but I don't think it can stream from PLS files. What alternative would your recommend?
Could you also provide a sample code as I tried to play the file with jwPlayer but I wasn't able to get it going. Thanks!
How to Open a PLS File. Audio Playlist files with the . PLS file extension can be opened with iTunes, Winamp Media Player, VLC, PotPlayer, Helium, Clementine, CyberLink PowerDVD, AudioStation, and other media management software programs. You can also open PLS files in Windows Media Player with Open PLS in WMP.
Run VLC. Click on Media on menu bar, choose Open File and import PLS files.
PLS files, themselves, are just metadata. You can write (or find) a parser to get at the real audio source.
The contents of the PLS url you included above contains:
[playlist]
NumberOfEntries=1
File1=http://live.radioguerrilla.ro:8002/
You could then use the url of File1 (or FileN, if more than 1) as your audio source.
<audio source="http://live.radioguerrilla.ro:8002/"> </audio>
...
EDIT:
I was just reading that HTML5 should support streaming, but after a quick research into firefox and chrome, neither explicitly supports shoutcast protocol. Shoutcast protocol is a meta-protocol on top of http. Unlike examples of using with sources as files (mp3, ogg, wav), one can determine the content-type thru the request. With shoutcast, the response payload needs to be processed by something else. The content-type result of any shoutcast stream will return text/plain, and both will throw a message saying so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With