View Full Version : HTML5 <audio>
10th September 2011, 16:27
Hey Everybody i was making a new player in HTML5(using the <audio>) for a shoutcast server, and i managed to make it work on IE9 and Chrome (because of their support for mp3 files) but doesn't work in opera and firefox because they support only .ogg files.
Is it possible to stream mp3 and ogg files at the same time?
Unfortunately i do not have server passwords and i don't even know how it would be, i got asked to make a new webpage for it...
11th September 2011, 12:12
12th September 2011, 09:54
this part of the forum isn't fast moving so it will take a while for people to (possibly) reply.
SHOUTcast won't stream in OGG (at least not in an officially support manner) and streaming the same content in multiple formats all depends on the station as to what version of the broadcasting tools are being used.
i don't know if there's a way to get an mp3 decoder in the other browsers (not seeing anything obvious at the moment) with most suggestions being to drop back to flash (which has issues of it's own for mp3 streams).
12th September 2011, 10:26
15th September 2011, 14:54
Thanks QOAL, have you ever used this with a shoutcast server?
It has no documentation at all...(at least i can't find any other than the comments in the files)
15th September 2011, 22:11
No, I haven't. I was just passing this part of the forum and saw the thread title and felt like having a look.
As for documentation etc, it seems you're on your own there. (I'll assume that any documentation for libmad could be of help, as jsmad is a port of it.)
But yeah, it was just a passing "oh this could help!".
15th September 2011, 22:12
QOAL's link is interesting, but hardly useful, proof of concept at best. e.g. Switch to a different tab in firefox - stutters like a bastard.
15th September 2011, 22:28
But yeah, it was just a passing "oh this could help!".people doing things like that get them into trouble ;)
16th September 2011, 06:54
I have a working HTML5 player that works on IE9, Chrome , firefox, safari, iphone/ipad as well
the jplayer I found falls back to flash if the browser doesn't support the <audio> tag.
player.php is a ugly player example but its plays the live stream running on sc_trans and sc_serv :)
all based on http://www.jplayer.org/
fyi if you look at the source code file you will notice I point to 8000/; as the ; seams to trick the player into working with shoutcast streams and not just local mp3 files
using stream.nsv; stream.hackerdork; something.file; all seem to work when it's the semicolon ';' that does this trick.
let me know if this works for you as well.
16th January 2012, 18:12
hackerdork, can you elaborate on your html5 code? I can't get my stream to play. It's an icecast stream, but I also have a shoutcast stream as a backup.
16th January 2012, 21:54
Maybe you can find some good info here
1st June 2012, 17:30
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<audio controls="controls" autoplay="autoplay" src="http://YOURSERVER.COM:YOURPORT/;stream.mp3">
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.