Developers build flac decoder with javascript
Official.fm developers have written a decoder in javascript for the lossless audio format flac. The decoder allows the audio format to be used in combination with the web audio API of some modern browsers.
According to the developers, the flac decoder in javascript, which is freely available with an lgpl license, works well on browsers that use the audio api, including Mozilla’s Audio Data API and Google Chrome’s Web Audio api. However, the WebKit implementation of iOS 6, currently available in beta, would still encounter issues.
The flac decoder can be enabled via the html 5 audio tag, but this method has the limitation that it cannot play real-time audio because the entire flac file has to be decoded first. Using the web audio api would therefore not cause this problem in Chrome and Firefox, but it is not yet supported by Opera and Internet Explorer and the specification of the api is not yet finalized.
Web developers could leverage the flac.js script for new types of web apps, such as audio editors and DJ applications. In addition, the developers state that the javascript engines in most browsers now perform sufficiently to be able to decode other audio codecs, even if a browser cannot or, due to licensing reasons, does not want to support a certain codec.