Domanda

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

È stato utile?

Soluzione

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 preview@audiopump.co if you are interested.)

Altri suggerimenti

Here is an example I found on a shoutcast radio station website:

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

Works fine in various browsers. I tested Firefox, Chrome and Safari.

<!--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 enter the Internet open and a window to the .Flm

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top