Search code examples
htmlinternet-exploreraudio-streaminghtml5-audioshoutcast

HTML5 audio element in IE 10+ throwing "Invalid Source" for ShoutCAST mp3 stream


HTML example:

<audio src="http://subfocus.fm:8000/stream2.mp3" type="audio/mpeg" controls></audio>

Confirmed to be working fine in Internet Explorer 9 and the latest versions of Firefox and Chrome on Windows 7. Since version 10, Internet Explorer returns "Invalid Source". Live example: http://subfocus.fm. Any known workarounds out there?


Solution

  • Internet Explorer 10 (and a few other browsers, including specific versions of Firefox) can't handle responses from SHOUTcast because the response status line is invalid. Instead of something normal like HTTP/1.0 200 OK, SHOUTcast returns:

    ICY 200 OK
    

    The standard solution is to not use SHOUTcast, or proxy requests to your SHOUTcast server with other software. Icecast is one of many options.