web-recorder
v0.0.12
Published
Browser microphone initialization and recording management written in TypeScript
Downloads
13
Maintainers
Readme
🎤 Web recorder written in Typescript 🎤
Docs
https://puemos.github.io/web-recorder
Example
Usage
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()
}