AAC can be played in a limited number of browsers using the HTML5 audio element, however, some browsers do not support the codec for various reasons. AAC.js enables playback and other decoding tasks in all browsers using the Aurora.js audio framework.
AAC.js is based on the prior work of many open source projects, including JAAD, FAAD, FFMpeg, and Helix Datatype.
DemoYou can check out a demo alongside our other decoders MP3.js, flac.js, and alac.js. Currently, AAC.js works properly in the latest versions of Firefox, Chrome, and Safari.
AuthorsAAC.js was written by @devongovett of Audiocogs.
BuildingWe use browserify to build AAC.js. You can download a prebuilt version from the Github releases page. To build AAC.js for the browser yourself, use the following commands:
This will place a built
npm install make browser
aac.jsfile, as well as a source map in the
AAC.js depends on Aurora.js, our audio codec framework. For detailed information on how to use Aurora.js, check out the documentation.
FeaturesAAC.js supports the AAC Low Complexity Profile, which is the most common profile. Support for the Main, High Efficiency (Spectral Band Replication) and High Efficiency v2 (Spectral Band Replication + Parametric Stereo) profiles is planned. Other profiles, such as the low delay, and error resilient profiles are not supported, but we'd love pull requests if you feel motivated to implement them! :)
LicenseAAC.js is licensed under the LGPL.
AAC.js is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. AAC.js is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.