[opus] port Opus to Javascript using Emscripten

Timothy B. Terriberry
Fri, 20 Jun 2014 19:30:37 -0000

Wu, Rachel wrote:
> We are interested in adopting Opus into our web based application for
> speech recording. I?m wondering if there is a plan to port Opus encoder
> and decoder to Javascript using Emscripten in the near future?

libopus compiles with Emscripten without any problems.

Early work on a full player can be found here:
https://github.com/maikmerten/ogv.js/tree/opus

A live example of that code is here: http://maikmerten.de/opus-demo/

Be cautioned that that code doesn't work particularly well in Firefox at
the moment because of
<https://bugzilla.mozilla.org/show_bug.cgi?id=970773> (though of course
Firefox has native Opus support).

No one has done any work on an encoder in JS that I know of, but Firefox
at least supports the Media Recorder API:
<https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API>. I
don't know if or when other browsers plan to add support for this API.