Opus.js
An Opus audio decoder for aurora.js ported using emscripten
Install / Use
/learn @audiocogs/Opus.jsREADME
opus.js
An Opus audio decoder for aurora.js, ported using Emscripten.
Browser usage
You can either use Browserify to build your project using the Node module
system, or download standalone versions of aurora.js,
ogg.js, and opus.js
to include as <script> tags on your HTML page.
See the Aurora.js docs for details on using Aurora.js.
Node usage
Install using npm:
npm install av opus.js
Register codecs and play a file:
var AV = require('av');
require('opus.js'); // and any other codecs you want...
AV.Player.fromFile('filename.ogg').play();
In node, requiring opus.js automatically loads the ogg.js demuxer.
See the Aurora.js docs for more details.
Building from source
- Install Emscripten.
- Run
maketo fetch and build the submodules, and to build the emscripten lib. Run this again whenever you make changes to the C wrapper or a new version of libogg is released. - Run
make browserto generate a browser version of opus.js, or use browserify to build your application.
License
libopus is available under its existing license, and the JavaScript and C wrapper code in this repo for Aurora.js is licensed under MIT.
