Playing a pls file using HTML5 audio - html

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

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

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)

Yes, you can stream thru HTML5 audio tag:
<audio controls="controls" src="http://IP:port/;stream.nsv&type=mp3"></audio>
Fantastic

Related

WAV audio format is not working on HTML5 page

I need to use a .wav format audio in my HTML code. I used the following code and test it on chrome.
<audio controls controlsList="nodownload"><source src="sample.wav" type="audio/wav"></audio>
But it's showing an empty audio file on my webpage over and over again and my chrome browser telling me to download that .wav file. How to solve that problem?
Your snippet works well, you can test it here (I made a copy and paste from your post)
http://87.106.127.248/wav.html
Use only well known combinations of sample rate/bit depth, i.e. 44.100/16 bit with browsers
For streaming purposes on the web (like in an audio tag) you should create copies of your audio file in .mp3 and .ogg format and use these for your website.
Then a typical audio tag which could be handled by practically all modern browsers would look like this:
<audio>
<source src="path/to/yourfile.ogg" type="audio/ogg">
<source src="path/to/yourfile.mp3" type="audio/mpeg">
</audio>

Issue using <audio> tag trying to stream m3u8 on Firefox

I have this really simple html:
<head>
</head>
<body>
<br>
Test
<audio controls preload>
<source src="https://stream11.polskieradio.pl/pr1/pr1.sdp/playlist.m3u8" />
</audio>
</body>
When I paste this directly into address bar of a browser, I'm getting a suggestion to open this in VLC Player.
My question is simple, is it possible to embed this into <audio> tag to be able to play this from a browser?? Because as it is it's just frozen and doesn't play anything...
Any help/suggestion would be appreciated.
Thank you!
According to previous question:
HTML5 audio tag - Handling of m3u8 in chrome/firefox
Seems like these browsers don't support HLS directly. You need to use something like HLS.js to load the video in via MediaSource Extensions

Playing live streaming .wav file in HTML

I have a .wav file that is being continuously appended to. Is it possible to play this file using the HTML <audio> element? Here is my current approach:
<audio controls="controls" autoplay="autoplay" preload>
<source src="stream.wav/" type="audio/wav">
</audio>
If I refresh the page, it reflects the new audio available in the file, but it does not render as a streaming player. It seems like it should be playing in "live" mode according to this question.
I would also be open to using some kind of framework or JavaScript to accomplish this if that would be best practice, but I haven't found anything yet.
Files cant end in /
src="stream.wav/"
Should be src="stream.wav"
In order to stream live audio and video, you will need to run specific streaming software on your server or use third-party services.
https://developer.mozilla.org/en-US/docs/Web/Guide/Audio_and_video_delivery/Live_streaming_web_audio_and_video#Server-side_Streaming_Technologies
That section of that page lists a few popular options for doing this.

HTML5 audio file fails to play, with Invalid Source error message

I am trying to test if some audio files we currently have, can be played via HTML5.
The html code is as follows:
<audio width="720" height="405" controls src="https://machinename/media/play?ID=2" type="audio/wav"></audio>
When the page loads, it seems to be doing something, and later fails with a message that says Invalid source.
If i then look at F12 for more debugging info, it says:
AUDIO/VIDEO: Unknown MIME type
The content being rendered by the tag src="abc" is a wav file.
What am i missing? I am testing in IE11 and Chrome 43.
Any help much appreciated.
Since this seems to be a popular question, I will explain what the error was and how i fixed it.
At first glance it might seem that setting the src property to a url link is not quite right, but it infact this url link renders me a wav file. However the wav could not by played by the HTML5 autio tag, because of its encoding type; That is, the encoding of the content of the wav file. This can be mulaw, alaw, linear etc. Alaw is not a supported format for HTML5, so I changed mine to Ulaw, and now it is working perfectly.
W3C suggests that WAV files are not supported by Internet Explorer and the only file type that works across most browsers is mp3.
I also faced this issue while using a .wav file. I converted it to .mp3 and it worked fine.
<audio controls>
<source src="https://machinename/media/play?ID=2" type="audio/wav">
</audio>
You should be using the HTML5 <audio> ...</audio> tags for your purposes.
A sample code for wav would be as follows:
<audio controls>
<source src="abc.wav" type="audio/wav">
</audio>
Currently, there are 3 supported file formats for the element: MP3, Wav, and Ogg:
Chrome supports MP3, Wav, and Ogg formats, and Internet Explorer currently supports MP3 only, hence the possible invalid source error message you are seeing.
Simply convert all your wav files into mp3 and you should be safe for all browsers!
You can read more here http://www.w3schools.com/html/html5_audio.asp
Hope this helps!

How to play .amr file on a website?

i have tried below code but not working ? does anyone play amr files in website
<audio id="audio" src="upload/hello2.amr"
preload="auto" controls muted loop autoplay>
</audio>
any plugin or player which can play amr file in web
AMR file is not one of the supported audio files that html5 audio tag supports. Please see the list below for supported audio formats:
http://en.wikipedia.org/wiki/HTML5_Audio#Supported_audio_coding_formats
I would recommend you convert your amr file to mp3 or ogg and then upload it and play it on your server.
original answer:
Your code specifies an mp3 file. Are you sure you put in the amr file?