Shoutcast Streaming & HTML5 Audio Player

Seder picture Seder · Aug 23, 2013 · Viewed 13.7k times · Source

This is really driving me crazy

I am trying t make audio tag stream a shoutcast stream

I am shooting on this since two days and the best result I got is making it working on Safari

I read all the questions on stackoverflow about this I read all the tutorials I tested all the players and I need to make it work on Mobile phones and specifically on iOS so I can't use flash tried a lot

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

This snippet works on Safari ONLY

I tried the ; semicolon and stream.ogg I think I tried everything so I am posting the question here

Any help are really appreciated

Answer

Brad picture Brad · Aug 23, 2013

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

The first is browser codec support. Check out the MDN page for updated info on codec support per browser.

The second problem is that SHOUTcast returns an oddball status line. It will send ICY 200 OK instead of HTTP/1.0 200 OK. Some browsers will not accept this header. The only way around it is to use something else for your streaming server, such as Icecast. (If you're interested, I also run a streaming service that can relay your existing SHOUTcast stream in a standards-compliant HTTP stream that has better compatibility. E-mail [email protected] if you are interested.)