wavesurfer-record-plugin-wav
v1.0.3
Published
![NPM](https://img.shields.io/npm/l/wavesurfer-record-plugin-wav) ![NPM](https://img.shields.io/npm/v/wavesurfer-record-plugin-wav) ![GitHub Workflow Status](https://github.com/tscritch/wavesurfer-record-plugin-wav/actions/workflows/wavesurfer-record-plug
Downloads
268
Readme
Wavesurfer Record Plugin Wav
Replacement Wavesurfer.js Record Plugin for recording .wav
files. Uses the extendable-media-recorder to encode to wav.
Getting started
Installation
npm install wavesurfer-record-plugin-wav
yarn install wavesurfer-record-plugin-wav
Example
Songleaf - Audio Workbench
Usage
Use this as you would the default Wavesurfer.js Record Plugin
When creating and registering the plugin, make sure to set mimeType
to "audio/wav"
import WaveSurfer from "wavesurfer.js"
import RecordPlugin from "wavesurfer-record-plugin-wav"
...
wavesurfer = WaveSurfer.create(...)
record = wavesurfer.registerPlugin(RecordPlugin.create({
mimeType: "audio/wav",
}))
See the example usage here - https://wavesurfer.xyz/examples/?record.js
Caveats
Because extendable-media-recorder does not support MediaRecorder.requestData
(MDN) function the RecordPlugin.pause()
will not function properly. I've left it in for parity but it noops.