Question

I have already tried jplayer but unfortunately there are problems with Shoutcast mp3 streaming and Android.

Is there an alternative? I wouldnt mind even "serving" the stream directly in some way and cause the Android device to open its default media player if that is posible. - I just want to make sure that an Android device will play my stream.

Was it helpful?

Solution

Unfortunately, you can't open an MP3 stream from SHOUTcast on Android directly. This is because of the way SHOUTcast has broken HTTP. Instead of a normal status line:

HTTP/1.0 200 OK

SHOUTcast sends this:

ICY 200 OK

Android's HTTP client doesn't like this. The good news is that with a different server, you can link directly to the MP3 stream, and it will open up on Android. Instead of linking to the playlist file like you would do for iOS, link to the stream. Android will detect the content type audio/mpeg, and open whatever player is configured for that content type.

Icecast is compatible with this method. Alternatively, I offer a hosting service that can relay your SHOUTcast streams for Android. E-mail me at brad@audiopump.co if you are interested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top