Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.13 KB

README.md

File metadata and controls

50 lines (39 loc) · 1.13 KB

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