vue-dictaphone
🎙️ Vue.js dictaphone component to record audio from the user
Features
- HTML/CSS is fully customizable via Scoped Slots
- Spectrum analyser for visualising frequencies (Optional)
stop
event returns an$event
object containing- the audio blob (
$event.blob
) for further processing - and a data URL (
$event.src
) for immediate output to the user
- the audio blob (
- Components emit an
error
event, when the browser does not support audio recording or the user has blocked microphone access.
Installation
npm install --save vue-dictaphone
yarn add vue-dictaphone
Usage
;Vue;
Start recording Stop recording
// ... data: audioSource: null methods: { thisaudioSource = src; } // ... ;
File types
You can pass an optional mime-type
prop on the vue-dictaphone
element to change the MIME type of the recorded audio.
<!-- ... -->
For a list of MIME types supported by major browsers take a look a Media formats for HTML audio and video on MDN.
Author
Manuel Wieser
https://manu.ninja/
https://twitter.com/manuelwieser
https://www.paypal.me/manuninja