Skip to content

Browser microphone initialization and recording management

License

Notifications You must be signed in to change notification settings

Dalee/web-recorder

 
 

Repository files navigation

🎤 Web recorder written in Typescript 🎤

styled with prettier Travis Dev Dependencies

Docs

https://puemos.github.io/web-recorder

Example

here

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()
}

About

Browser microphone initialization and recording management

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 80.0%
  • JavaScript 20.0%