Shoutcast Streaming & HTML5 Audio Player

It really drives me crazy

I'm trying to make an audio tag stream a scream stream

I’ve been shooting this from two days, and the best result I got makes it work on Safari

I have read all stackoverflow questions about this. I read all the training materials that I tested for all players, and I need to get it to work on mobile phones and, in particular, on iOS, so I can not use flash, I tried a lot.

<audio controls src="http://a7lafm.callu.ps:8000/;" autoplay></audio> 

This snippet only works in Safari

I tried a semicolon ; and stream.ogg I think I tried everything, so I post the question here.

Any help really appreciated

+4
source share
3 answers

This problem has nothing to do with your code. There are two problems.

The first is browser codec support. Check the MDN page for updated browser codec support information .

The second problem is that SHOUTcast returns the oddball status bar. It will send ICY 200 OK instead of HTTP/1.0 200 OK . Some browsers will not accept this header. The only way is to use something else for your streaming server like Icecast . (If you're interested, I also run a streaming service that can relay an existing SHOUTcast stream to a standards-compliant HTTP stream that has better compatibility. Email preview@audiopump.co if you're interested.)

+3
source
 <!--listen2myradio.com SHOUTcast Flash Player--> <p id='preview'></p><script id='myscript' language='javascript' src='http://flashplayer.listen2myradio.com/getInfo.js?id=17733c2862180eaa3883250ab04087609ae4'></script> <!--End Player--> 

This is your radio and where we pray every time we go online and open the .Flm window

+1
source

Here is an example I found on the shoutcast website:

 <audio autoplay preload="auto" controls src="http://174.137.50.51:16504/;"></audio> 

Works great in different browsers. I tested Firefox, Chrome and Safari.

0
source

Source: https://habr.com/ru/post/1498516/


All Articles