Old 10th September 2011, 16:27   #1
ildaniel8
Junior Member
 
Join Date: Sep 2011
Posts: 3
HTML5 <audio>

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...
ildaniel8 is offline   Reply With Quote
Old 11th September 2011, 12:12   #2
ildaniel8
Junior Member
 
Join Date: Sep 2011
Posts: 3
Anyone?
ildaniel8 is offline   Reply With Quote
Old 12th September 2011, 09:54   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
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).

-daz
DrO is offline   Reply With Quote
Old 12th September 2011, 10:26   #4
QOAL
[STILL a retard!]
 
QOAL's Avatar
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 1,168
Tada! http://jsmad.org/


count!last.fmdastylishplanner
QOAL is online now   Reply With Quote
Old 15th September 2011, 14:54   #5
ildaniel8
Junior Member
 
Join Date: Sep 2011
Posts: 3
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)
ildaniel8 is offline   Reply With Quote
Old 15th September 2011, 22:11   #6
QOAL
[STILL a retard!]
 
QOAL's Avatar
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 1,168
No, I haven't. I was just passing this part of the forum and saw the thread title and felt like having a look.
Your post made me remember seeing this [http://hacks.mozilla.org/2011/06/jsm...t-mp3-decoder/], and I think it's the only pure JS solution for what you're trying to achieve.
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!".

count!last.fmdastylishplanner
QOAL is online now   Reply With Quote
Old 15th September 2011, 22:12   #7
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
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.

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 15th September 2011, 22:28   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by QOAL View Post
But yeah, it was just a passing "oh this could help!".
people doing things like that get them into trouble

-daz
DrO is offline   Reply With Quote
Old 16th September 2011, 06:54   #9
hackerdork
Forum King
 
hackerdork's Avatar
 
Join Date: Feb 2006
Location: Earth Circa sometime.
Posts: 3,297
I have a working HTML5 player that works on IE9, Chrome , firefox, safari, iphone/ipad as well

http://indienation.fm/html5/

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.

take care

~ According to the ship's log we're down to our last 3000 vomit bags.It'll never be enough.
search the forums! don't PM me on how-to, or ask me to setup you system. you do it so you learn.
hackerdork is offline   Reply With Quote
Old 16th January 2012, 18:12   #10
DirtMcGirt
Member
 
Join Date: Jan 2009
Posts: 62
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.
DirtMcGirt is offline   Reply With Quote
Old 16th January 2012, 21:54   #11
Bryon Stout
Senior Member
 
Join Date: Feb 2011
Posts: 377
Maybe you can find some good info here

http://www.schillmania.com/projects/soundmanager2/
Bryon Stout is offline   Reply With Quote
Old 1st June 2012, 17:30   #12
jackcr
Junior Member
 
Join Date: Jan 2010
Location: Costa Rica
Posts: 7
code:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>

<body>
<audio controls="controls" autoplay="autoplay" src="http://YOURSERVER.COM:YOURPORT/;stream.mp3">
</audio>
</body>
</html>

jackcr is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Site Design

Tags
<audio>, 2 streams, html5

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump