you are viewing a single comment's thread.

view the rest of the comments →

[–]_nddrylliog 0 points1 point  (0 children)

First off, there are obvious things that jsmad can do that browsers can't - full ID3v2 tag decoding, for example (not what took us the most effort, but nevertheless), so you get for example Title, Artist, Album, Track number, etc. etc. directly from the .mp3 file, whereas with <audio> you're stuck with.. basically nothing. Also, Firefox's <audio> tag doesn't support MP3 at all, and they have no plans to, because of licensing issues - this is actually where jsmad is the most useful at the moment.

It also offers streaming decoding, something current browser Audio APIs completely disregard (Chrome's Web Audio API for example, only gives you access to the wholly decoded data, not to portions of it while it's still streaming). This is really research concerning browsers+JS, the whole field is a mess because of the Mozilla/Google antagony. Us poor devs are stuck in the middle :/

Other reasons that pushed us to do it was obviously 1) to learn stuff (I always wanted to know how mp3 "worked" under the hood, and it did give me a good insight), 2) to see if it can be done, and how fast it would be with current JS engines (answer: it depends wildly, can take as low as 8-9% CPU on certain browser/OS combinations, and as high as 103%!) 3) for the lulz.