4

I'm trying to find a solution for my website which desperately needs an upgrade. Currently I am using Flash-based players to stream content from Shoutcast, which doesn't work too terribly, but unfortunately it leaves mobile users behind.

Ideally, I would love to have an HTML5/Javascript player that can play Shoutcast (or other) streams online. I've tried jPlayer, which seems pretty good for playing individual files, but have been unsuccessful in trying to get it to work with Shoutcast and Icecast.

Does anybody have any suggestions on where to start?

William Thomas
  • 2,108
  • 3
  • 22
  • 32
  • Given the limited scope of the question, I'm voting to re-open. There are very few possible solutions, and he has definitely defined a specific criteria. – Brad Dec 08 '12 at 03:29
  • To answer your question: What I do these days for station websites is provide the browser-based players for clients that support them, and then provide links to native players for those who don't (or users that prefer them). Android and iOS can both play the streams in their native players. Many Android devices can play Flash. Versions of Android and iOS can also do HTML5 audio. The biggest problem is supporting various codecs and player types simultaneously. If this question does not get re-opened, shoot me an e-mail at brad@audiopump.co, and I'll help answer your questions. – Brad Dec 08 '12 at 04:16

1 Answers1

1

You can use jPlayer to play your shoutcast stream using HTML5 native player - it works quite well on most browsers/platforms except android. In that case jPlayer provides the flash player backup.

You need to specify your type of audio as 'mp3' (aac streams do not work so make sure you are specifying a straight icy mp3 stream) I have used 'mp3' but you can also try type 'stream'

You need to change the url of your stream slightly:

Normal: http://yourserver.com:8000/listen.pls

jPlayer: http://yourserver.com:8000/;listen.pls (note the addition of the semicolon - this helps with shoutcast servers)

Here is the documentation from the jPlayer site that should help as well.

http://www.jplayer.org/latest/demo-08/

Happy Streaming!

chaudruc
  • 41
  • 1
  • No need for `listen.pls` after the semicolon. Just a semicolon will change the user-agent to `MPEG OVERRIDE`, causing it to ignore the fact that its a `Mozilla`-compatible (which loads the admin interface instead of the stream). – Brad Dec 11 '12 at 06:00