Question

I want to play a .pls file which is an radio file. When I click over this file it plays video in my iIunes (I am using mac). I want to play this pls file in browser especially in Safari as I want to play it in iPhone.

My code:

<audio src="radioveronica.pls" controls="controls">
    Your browser does not support the audio element.
</audio>

Following is content of my pls file:

[playlist]
File1=http://5713.live.streamtheworld.com:80/VERONICAAACCMP3
Title1=Radio Veronica
Length1=-1
File2=http://5713.live.streamtheworld.com:3690/VERONICAAACCMP3
Title2=Radio Veronica
Length2=-1
File3=http://5713.live.streamtheworld.com:443/VERONICAAACCMP3
Title3=Radio Veronica
Length3=-1
File4=http://5723.live.streamtheworld.com:80/VERONICAAACCMP3
Title4=Radio Veronica
Length4=-1
File5=http://5723.live.streamtheworld.com:3690/VERONICAAACCMP3
Title5=Radio Veronica
Length5=-1
File6=http://5723.live.streamtheworld.com:443/VERONICAAACCMP3
Title6=Radio Veronica
Length6=-1
NumberOfEntries=6
Version=2
Was it helpful?

Solution

The pls file is actually just a text file that contains a link or links to audio streams or other source files. There is no audio data in the file that can be played directly.

There are only four formats supported by the audio tag (and not in all browsers):

  • Ogg Vorbis
  • MP3
  • WAV
  • (Safari actually also supports another format which need not be named)

OTHER TIPS

for shoutcast servers is without stream.nsv(most servers) for icecast is like you said , for virtual dj is same as shoutcast , example:

<html>
    <head><title> Listen To Ma' Radio</title></head>
    <body>
    <audio controls="controls" src="http://50.22.217.113:13679/;&type=mp3"></audio>
    </body>
</html>

and you can implent another functions , as it it basic html you can even implent in php , enjoy

Yes, you can stream thru HTML5 audio tag:

<audio controls="controls" src="http://IP:port/;stream.nsv&type=mp3"></audio>

Fantastic

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top