1.0.3 • Published 2 years ago
wavesurfer-record-plugin-wav v1.0.3
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-wavyarn install wavesurfer-record-plugin-wavExample
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.