icecast stream html5 player audio tag

2.7k Views Asked by At

I am having trouble getting a stream to embed with this audio tag:

<audio controls autoplay="autoplay"><source src="http://159.65.84.223:8000/stream?type=.mp3" type="audio/mp3">Your browser does not support the audio element.</audio>

should I use another code?

Thanks

1

There are 1 best solutions below

1
On

You can find the correct audio link inside the XSPF file of your stream (open it as text file).

Try setting code as:

<audio controls autoplay="true">
<source src="http://mensajito.mx:8000/00a48ebe728b" type="audio/mp3">
</audio>

Test the example link below, and report if this gives a correct (playing) result:

https://jsfiddle.net/5s69pb34/

Some notes:

  • Your stream link is http:// and may not work if used inside some https:// website.

  • The type can be either "audio/mp3" or "audio/mpeg". Try each type if got errors.