vue-audio-recorder-and-player
A simple vuejs Audio Recorder plugin
1,557
| Install | |
|---|---|
npm install vue-audio-recorder-and-player |
|
| Latest Version: | 0.1.13 |
| Vue: | 2 |
| Last Updated: | Mar 28, 2021 |
| Links: | GitHub · npm |
Maintainer: pratikaher88
VUE AUDIO RECORDER AND PLAYBACK
A simple Audio recorder and player to record audio content.

Installation
npm i vue-audio-recorder-and-player --save
Module
import vue-audio-recorder-and-player from 'vue-audio-recorder-and-player';
Usage
Below is an example of how to handle recording result
<template>
<div>
<vue-audio-recorder-and-player @recordingstop="recordingStopped" />
</div>
</template>
<script>
import vue-audio-recorder-and-player from 'vue-audio-recorder-and-player';
export default {
},
methods: {
async recordingStopped(blob) {
const readBlobAsBase64 = (blob) => {
var reader = new FileReader();
return new Promise((resolve) => {
reader.addEventListener("load", function() {
resolve(reader.result);
});
reader.readAsDataURL( blob );
});
};
try {
this.audioURL = await readBlobAsBase64(blob)
} catch (e) {
console.warn(e.message)
}
console.log("here", this.audioURL) // Audio blob as base 64 string
}
}
</script>
<style lang="css">
</style>
Return voice recording
This line in package helps to send a response to the parent.
this.$emit('recordingstop', blob)
You can have a mehtod in the parent classs to fetch the response in a function as shown in the example above.
Authors
Pratik Aher - Developer
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.13 | ^2.6.11 | ||
| 0.1.12 | ^2.6.11 | ||
| 0.1.11 | ^2.6.11 | ||
| 0.1.10 | ^2.6.11 | ||
| 0.1.9 | ^2.6.11 | ||
| 0.1.8 | ^2.6.11 | ||
| 0.1.7 | ^2.6.11 | ||
| 0.1.6 | ^2.6.11 | ||
| 0.1.5 | ^2.6.11 | ||
| 0.1.4 | ^2.6.11 | ||
| 0.1.3 | ^2.6.11 | ||
| 0.1.2 | ^2.6.11 | ||
| 0.1.0 | ^2.6.11 |