Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-record-audio

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-record-audio

Paquete para la grabacion de contenido con el microfono por defecto del navegador

  • 0.0.10
  • npm
  • Socket score

Version published
Weekly downloads
84
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

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">
          <!-- control de grabador -->
          <template #btnCancelRecord="{ControllerRecord}">
              <button class="btn btn-sm" @click="ControllerRecord.cancelRecord"><i :class="ControllerRecord.iconBtn"></i></button>
          </template>
          <template #btnRecord="{ControllerRecord}">
              <button class="btn" @click="ControllerRecord.playAudio"><i :class="ControllerRecord.iconBtn"></i></button>
          </template>
          <template #btnStopRecord="{ControllerRecord}">
              <button class="btn btn-sm" @click="ControllerRecord.stopRecord"><i :class="ControllerRecord.iconBtn"></i></button>
          </template>
          <!-- control de player -->
          <template #btnPlayerCancel="{ControllerPlayer}">
              <button class="btn btn-sm" @click="ControllerPlayer.cancelPlay"><i :class="ControllerPlayer.iconBtn"></i></button>
          </template>
          <template #btnPlayer="{ControllerPlayer}">
              <button class="btn" @click="ControllerPlayer.playRecord"><i :class="ControllerPlayer.iconBtn"></i></button>
          </template>
          <template #btnPlayerStop="{ControllerPlayer}">
              <button class="btn btn-sm" @click="ControllerPlayer.stopPlay"><i :class="ControllerPlayer.iconBtn"></i></button>
          </template>
      </RecordsAudio>
    </div>
</template>
<script setup lang="ts">
import { RecordsAudio } from "vue-record-audio"
const iconsRecord = {
        iconMic:'icon-mic',
        iconPause:'icon-pause',
        iconPLay:'icon-play',
        iconClose:'icon-close',
        iconStop:'icon-stop'
    }
const saveRecord = (data:any) => {
    console.log(data)
}
</script>
<style>
 @import url(/node_modules/vue-record-audio/dist/style.css);
</style>

Configuracion reproducir audio sin grabacion

<template>
    <div>
    <RecordAudio :iconsRecord="iconsRecord" :playAudioBase64="playAudioBase64">
        <template #btnPlayerCancel="{ControllerPlayer}">
            <button class="btn btn-sm" @click="ControllerPlayer.cancelPlay"><i :class="ControllerPlayer.iconBtn"></i></button>
        </template>
        <template #btnPlayer="{ControllerPlayer}">
            <button class="btn" @click="ControllerPlayer.playRecord"><i :class="ControllerPlayer.iconBtn"></i></button>
        </template>
        <template #btnPlayerStop="{ControllerPlayer}">
            <button class="btn btn-sm" @click="ControllerPlayer.stopPlay"><i :class="ControllerPlayer.iconBtn"></i></button>
        </template>
    </RecordAudio>
    </div>
</template>
<script setup lang="ts">
import { RecordsAudio } from "vue-record-audio"
const iconsRecord = {
        iconMic:'icon-mic',
        iconPause:'icon-pause',
        iconPLay:'icon-play',
        iconClose:'icon-close',
        iconStop:'icon-stop'
    }
const playAudioBase64:"//vUxAADwAABpAAAAC...."
</script>

<style>
 @import url(/node_modules/vue-record-audio/dist/style.css);
</style>

Para los iconos

Debe copiar la carpeta icons a su carpeta public /public/icons/*

Keywords

FAQs

Package last updated on 01 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc