WebAppers

/ best free open source web resources /

Shopify

A Suite of JavaScript Audio Codecs

Posted · Category: GPL License, Sound

Web browsers are becoming more and more powerful, and new APIs like the Web Audio API and Audio Data API are making the web an ever more interesting and dynamic place.

At ofmlabs they are invested in improving the state of audio on the web, and with JSMad showed that decoding audio purely in JavaScript is possible thanks to these APIs and the hard work of browser makers and spec authors.

And now they have done it again. Introducing alac.js, a port of the recently open sourced Apple Lossless decoder to JavaScript. Now it is possible to play MP3 and Apple Lossless even in browsers without native support. Check out the suite of JavaScript audio codecs to hear JavaScript rocking out!

audio-player-javascript

Requirements: -
Demo: http://codecs.ofmlabs.org/
License: GPL, Apache 2 License

5 Comments
  • http://blog.ssokolow.com/ Stephan Sokolow

    Very impressive, but aside from private apps with browser-based UIs, useless to me.

    I really hope someone ports Vorbis and WebM codecs to Javascript. (or cross-compiles them with something like Emscripten)

    Otherwise, I’ll just have to include a message in my creations for Safari and Internet Explorer users without an appropriate media framework plugin along the lines of “For political reasons, your browser manufacturer refuses to provide features upon which this site depends. You may resolve this problem either by using a different browser (eg. Firefox, Chrome, or Opera) or by installing either Adobe Flash or [name of DirectShow/QuickTime plugin].”

  • http://www.ethanhackett.com Ethan Hackett

    I agree with Spehan it’s cool but useless. Until there’s something that’s supported by a majority of the browsers it won’t really be practical or wise. Limiting it to Firefox and Chrome is just plain silly.

  • http://badassjs.com/ Devon Govett

    No, not useless… once all browsers have an API for writing audio data (why it only works in Chrome and Firefox at the moment), we will be able to support any audio codec we want in the browser without waiting for browsers to implement them or resolve their political differences. This is awesome in my opinion and gives the control back to developers.

    Also, because of JSMad, MP3s (probably the most popular audio codec out there) can now play in every major browser except Opera. Use the HTML5 audio element in Safari and Internet Explorer, and JSMad in Chrome and Firefox where MP3s aren’t supported. Huzzah, cross browser support!

  • http://www.goboxy.com goboxy

    I noticed one major problem, that it takes a long time to download the file, and it downloads at least 10% to start playing the file, I know both files are (demo) are kinda HQ, but comparing to other JavaSript audio codecs, I guess some work must be done

  • http://badassjs.com/ Devon Govett

    @goboxy well yes lossless audio files are pretty large… the demo file is over 25 MB. It isn’t really a problem with the decoder but more of a bandwidth problem… lossless files were not designed for small file sizes and quick downloading :)

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons