0.0.1-alpha.1 • Published 3 years ago

@yoonit/javascript-recorder v0.0.1-alpha.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

yoonit-recorder

How to run the project

npm install @yoonit/javascript-recorder

How to use it

import YooRecorder from '@yoonit/javascript-recorder'

const recorder = await YooRecorder()

It's important to allow microphone, to audio capture be possible.

Methods

start

  • It starts recording audio.
recorder.start()

pause

  • Pauses current audio record.
recorder.pause()

stop

  • It stops recording and clear it.
recorder.stop()

clear

  • It clears recorded data.
recorder.clear()

getMedia

  • Returns captured media.
const media = await recorder.getMedia()

sendAudio(media.audioBlob)
PropertyDescriptionType
audioAudio file typewmv
audioBlobAudio blobbinary
audioUrlAudio URLstring
fileAudio file objectFile
playFunction to play recorded audioFunction