Skip to content
A plugin for recording/exporting the output of Web Audio API nodes
Branch: master
Clone or download
Pull request Compare This branch is 26 commits ahead, 20 commits behind mattdiamond:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Recorder.js component

This is little more than a port of Matt Diamond's excellent work to a component-friendly format.

Such a port was necessary because Matt's version has the worker code in a separate file (presumably served statically), while components are meant to be built into a single file. My thread component lightly wraps workers in a way that makes writing worker code in-line palatable.

I expect this codebase to diverge from Matt's, but credit for the worker idea and the WAV algorithm should remain solely his.


var Recorder = require('itsjoesullivan/recorderjs');
var context = new AudioContext();
var source = context.createBufferSource();
source.buffer = buffer; // Imagine
var r = new Recorder( source );
setTimeout(function() {
  r.getBuffer(function( err, buffer ) {
    // buffer is PCM buffer of what you recorded
  r.getWAV(function( err, blob ) {
    // blob is a wav!
}, 500);
You can’t perform that action at this time.