Live data from Hacker News

JavaScript mp3 decoder allows Firefox to play mp3 without flash

jsmad.org

71–80 of 99 posts

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#71

If imitation is the sincerest form of flattery, feature requests must be the next-sincerest. With that out of the way, I'd love to see: * Standard playback widgets: volume, position slider, etc. * A way to link songs, e.g. http://jsmad.org/play/114578 Fantastic work!

...and I was working on the volume control feature while we got Slashdotted. Now fulltime on trying to get the server to handle the load. Sorry, will have to wait :(

(edit: typo)

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#72

Earlier quoted context omitted.

From what I hear,the HTML5 tag implementation quality varies wildly. It hasn't been used much in production for desktop-targeted web apps. It is, however, quite popular on the iPlatforms, because you have no Flash there! As far as I can tell, jsmad is not going to replace the HTML5 audio tag on mobile devices. However, it does constitute a nice legal workaround for MP3 in desktop browsers such as Firefox. It gives ac…

At 50% cpu utilization this is very impractical outside tech demos.

Yes, please help optimize it.

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#73

Earlier quoted context omitted.

From what I hear,the HTML5 tag implementation quality varies wildly. It hasn't been used much in production for desktop-targeted web apps. It is, however, quite popular on the iPlatforms, because you have no Flash there! As far as I can tell, jsmad is not going to replace the HTML5 audio tag on mobile devices. However, it does constitute a nice legal workaround for MP3 in desktop browsers such as Firefox. It gives ac…

At 50% cpu utilization this is very impractical outside tech demos.

[deleted]

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#74

Firefox 4.0+ AND Chrome 13.0+ are supported. However, Web Audio API doesn't seem enabled in Chrome 13 by default, just go to 'audio:flags', check "Web Audio", then click the "restart browser" button and it should work.

How did you find working with Firefox's AudioAPI and Chrome's Web Audio API, how do they compare? What drawbacks and advantages did you find working with each of them?

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#76
post #48

Earlier quoted context omitted.

Did you click the Relaunch Chrome button at the bottom of the about:flags page? I got it working with Chrome on OSX once I did that.

You are right, it does work. Thank you!

Confirmed, it works after restart.

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#77
post #55

Earlier quoted context omitted.

Yes, as said in the README, the audio output doesn't work on Chrome. I have no idea why - audiolib.js should support it. Maybe we're just using it wrong? If the audiolib.js dev is here or anyone else has a clue, it'd be very welcome.

Really? It's working on Chrome 13 for me, though because of how Chrome slows down JS execution when you switch to another tab, things can get... funky.

It's the same thing in Firefox, https://bugzilla.mozilla.org/show_bug.cgi?id=665000

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#78
post #74

Firefox 4.0+ AND Chrome 13.0+ are supported. However, Web Audio API doesn't seem enabled in Chrome 13 by default, just go to 'audio:flags', check "Web Audio", then click the "restart browser" button and it should work.

How did you find working with Firefox's AudioAPI and Chrome's Web Audio API, how do they compare? What drawbacks and advantages did you find working with each of them?

Actually, we're using audiolib.js, which abstracts over the Audio Data API and the Web Audio API, so your question would be better directed to the audiolib.js author :)

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#79

Earlier quoted context omitted.

At 50% cpu utilization this is very impractical outside tech demos.

Yes, please help optimize it.

The question is can it be optimized? My knowledge of this stuff is very limited but I assume javascript object wrappers for number types and lack of SSE/SSE2 instructions will be the biggest blockers to performance.

Re: JavaScript mp3 decoder allows Firefox to play mp3 without flash

#80

As a wise Keanu Reeves once said, "Woah." Is there any upper limit you've found with bitrates, etc.? Also, what was the most difficult part in building this?

Been playing 320kbps Stereo flawlessly afaik. The bitrate is really not much of an issue. Browsers have a much harder time dealing with binary XHRs, huge typed arrays, huge strings, and a real fucking lot of arithmetic operations. I think the most difficult part was the debugging. Jens Nockert, Matthias Georgi & I finally used node.js and carefully diff'd the output from minimad.c (the canonical libmad example) and j…

I suspect that there's a fairly interesting blog post with samples of the gnuplot output waiting to be written about this.
Post reply on HN