https://puemos.github.io/web-recorder
import { Recorder } from 'web-recorder'
function onGotStream(stream) {
audioRecorder = new WebRecorder.Recorder(stream)
audioRecorder.addEventListener('data', ev => {
var blobUrl = URL.createObjectURL(ev.detail)
const record = document.getElementById('record')
record.src = blobUrl
})
audioRecorder.record()
}
function start() {
navigator.getUserMedia(
{
audio: {
advanced: [
{
echoCancelation: false
}
]
}
},
onGotStream,
console.error
)
}
function stop() {
audioRecorder.stop()
}