Replacement Wavesurfer.js Record Plugin for recording .wav
files. Uses the extendable-media-recorder to encode to wav.
npm install wavesurfer-record-plugin-wav
yarn install wavesurfer-record-plugin-wav
Songleaf - Audio Workbench
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
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.