vue-record-audio
Paquete para la grabacion de contenido con el microfono por defecto del navegador
1,294
| Install | |
|---|---|
npm install vue-record-audio |
|
| Latest Version: | 0.1.19 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Dec 28, 2023 |
| Links: | npm |
Maintainer: fiscalia_bo
Descripcion
Paquete para la grabacion de contenido con el microfono por defecto del navegador
Instalacion
Instalacion del paquete
npm i vue-record-audio
Configuracion para la Grabacion del Audio
<template>
<div>
<RecordsAudio :saveRecord="saveRecord" :iconsRecord="iconsRecord" @listenEventsRecord="listenEventsRecord" @listenEventsPlayer="listenEventsPlayer">
<!-- control de grabador -->
<template #btnCancelRecord="{ControllerRecord}">
<button class="btn btn-sm btn-transparent" @click="ControllerRecord.cancelRecord">
<IconClose/>
</button>
</template>
<template #btnRecord="{ControllerRecord}">
<button class="btn btn-primary" @click="ControllerRecord.playAudio">
<IconMic v-if="!ControllerRecord.record"/>
<IconPause color="#ffffff" v-else-if="!ControllerRecord.pause" />
<IconPlay color="#ffffff" v-else/>
</button>
</template>
<template #btnStopRecord="{ControllerRecord}">
<button class="btn btn-sm btn-transparent" @click="ControllerRecord.stopRecord">
<IconStop/>
</button>
</template>
<!-- control de player -->
<template #btnPlayerCancel="{ControllerPlayer}">
<button class="btn btn-sm btn-transparent" @click="ControllerPlayer.cancelPlay">
<IconClose/>
</button>
</template>
<template #btnPlayer="{ControllerPlayer}">
<button class="btn btn-primary" @click="ControllerPlayer.playRecord">
<IconPause color="#ffffff" v-if="ControllerPlayer.play"/>
<IconPlay color="#ffffff" v-else-if="ControllerPlayer.pause" />
<IconPlay color="#ffffff" v-else/>
</button>
</template>
<template #btnPlayerStop="{ControllerPlayer}">
<button class="btn btn-sm btn-transparent" @click="ControllerPlayer.stopPlay">
<IconStop/>
</button>
</template>
</RecordsAudio>
</div>
</template>
<script setup lang="ts">
import { RecordsAudio,IconClose,IconStop,IconMic,IconPlay,IconPause,IconDeVol,IconInVol } from "vue-record-audio"
const saveRecord = (data:any) => {
console.log(data)
}
const listenEventsRecord = (data:any)=>{
console.log("listen record",data)
}
const listenEventsPlayer = (data:any)=>{
console.log("listen player",data)
}
</script>
<style>
@import url(/node_modules/vue-record-audio/dist/style.css);
</style>
Configuracion reproducir audio sin grabacion
<template>
<div>
<RecordAudio :playAudioBase64="playAudioBase64" :justPlay="true" @listenEventsPlayer="listenEventsPlayer">
<template #btnPlayerCancel="{ControllerPlayer}">
<button class="btn btn-sm btn-transparent" @click="ControllerPlayer.cancelPlay">
<IconClose/>
</button>
</template>
<template #btnPlayer="{ControllerPlayer}">
<button class="btn btn-primary" @click="ControllerPlayer.playRecord">
<IconPause color="#ffffff" v-if="ControllerPlayer.play"/>
<IconPlay color="#ffffff" v-else-if="ControllerPlayer.pause" />
<IconPlay color="#ffffff" v-else/>
</button>
</template>
<template #btnPlayerStop="{ControllerPlayer}">
<button class="btn btn-sm btn-transparent" @click="ControllerPlayer.stopPlay">
<IconStop/>
</button>
</template>
</RecordAudio>
</div>
</template>
<script setup lang="ts">
import { RecordsAudio,IconClose,IconStop,IconMic,IconPlay,IconPause,IconDeVol,IconInVol} from "vue-record-audio"
const playAudioBase64:"//vUxAADwAABpAAAAC...."
const listenEventsPlayer = (data:any)=>{
console.log("listen player",data)
}
</script>
<style>
@import url(/node_modules/vue-record-audio/dist/style.css);
</style>
Subir Archivo de Audio
En la parte superior derecha se tiene un boton para subir un archivo de audio, ni bien se suba un archivo este llamara al evento saveRecord y devolvera el base64
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.19 | ^3.2.47 | MIT | |
| 0.1.18 | ^3.2.47 | MIT | |
| 0.1.17 | ^3.2.47 | MIT | |
| 0.1.16 | ^3.2.47 | MIT | |
| 0.1.15 | ^3.2.47 | MIT | |
| 0.1.14 | ^3.2.47 | MIT | |
| 0.1.13 | ^3.2.47 | MIT | |
| 0.1.12 | ^3.2.47 | MIT | |
| 0.1.11 | ^3.2.47 | MIT | |
| 0.1.10 | ^3.2.47 | MIT | |
| 0.1.9 | ^3.2.47 | MIT | |
| 0.1.8 | ^3.2.47 | MIT | |
| 0.1.7 | ^3.2.47 | MIT | |
| 0.1.6 | ^3.2.47 | MIT | |
| 0.1.5 | ^3.2.47 | MIT | |
| 0.1.4 | ^3.2.47 | MIT | |
| 0.1.3 | ^3.2.47 | MIT | |
| 0.1.2 | ^3.2.47 | MIT | |
| 0.1.1 | ^3.2.47 | MIT | |
| 0.1.0 | ^3.2.47 | MIT | |
| 0.0.23 | ^3.2.47 | MIT | |
| 0.0.22 | ^3.2.47 | MIT | |
| 0.0.21 | ^3.2.47 | MIT | |
| 0.0.20 | ^3.2.47 | MIT | |
| 0.0.19 | ^3.2.47 | MIT | |
| 0.0.18 | ^3.2.47 | MIT | |
| 0.0.17 | ^3.2.47 | MIT | |
| 0.0.12 | ^3.2.47 | MIT | |
| 0.0.11 | ^3.2.47 | MIT | |
| 0.0.10 | ^3.2.47 | MIT |
Showing the latest 30 of 38. See every release on npm