A plugin for recording/exporting the output of Web Audio API nodes
var rec = new Recorder(source [, config])
Creates a recorder instance.
- source - The node whose output you wish to capture
- config - (optional) A configuration object (see config section below)
- workerPath - Path to recorder.js worker script. Defaults to 'js/recorderjs/recorderWorker.js'
- callback - A default callback to be used with
- type - The type of the Blob generated by
exportWAV. Defaults to 'audio/wav'.
Pretty self-explanatory... record will begin capturing audio and stop will cease capturing audio. Subsequent calls to record will add to the current recording.
This will clear the recording.
This will generate a Blob object containing the recording in WAV format. The callback will be called with the Blob as its sole argument. If a callback is not specified, the default callback (as defined in the config) will be used. If no default has been set, an error will be thrown.
In addition, you may specify the type of Blob to be returned (defaults to 'audio/wav').
This will set the configuration for Recorder by passing in a config object.
Utility Methods (static)
This method will force a download using the new anchor link download attribute. Filename defaults to 'output.wav'.