npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-audio-tapir-x

v1.3.0

Published

Audio recorder tapir component for Vue.js 3. It enables to record, play and send audio messages to a server.

Downloads

7

Readme

vue-audio-tapir SOURCE npm npm StandWithUkraine

this is a clone of vue-audio-tapir

Audio recorder component for Vue.js 3. It enables to record, play and send audio messages to a server. There is a corresponding serverless backend function called audio-tapir-function. You can use both in combination to send you an email with the recorded audio message.

Demo

Demo page of Audio Tapir, you can record and play audio, but submitting is disabled.

Use Case

The most popular use case of vue-audio-tapir is to deliver an audio contact message directly from a website to your email inbox.

Architecture Overview

The developer includes the vue-audio-tapir component in his Vue 3 website. When the user of the website wants to leave a voice message, he records his message and submits it. Vue-audio-tapir contacts the backend server, a Netlify serverless function and uploads the audio data. The serverless backend function sends the audio data to an email address using the email service Sendgrid. Finally the email with the voice message arrives at the destination, probably the email application of the website owner.

Installation

In a Vue 3 application install with:

npm i vue-audio-tapir-x --save

or

yarn add vue-audio-tapir-x --save

Example Usage

<template>
  <tapir-widget :time="2" backendEndpoint="https://your-endpoint.com/.netlify/functions/audio-message" 
                buttonColor="green" audioFormat="MP3"/>
</template>

<script>
import TapirWidget from 'vue-audio-tapir-x';
import 'vue-audio-tapir-x/dist/vue-audio-tapir.css';

export default {
  name: 'App',
  components: {
    TapirWidget,
  }
}
</script>

Properties

| Name | Type | Description | |------------------|----------|---------------------------------------------------| | time | Number | Maximum recording time in minutes | | bitRate | Number | bit rate of recording | | sampleRate | Number | sample rate of recording | | backendEndpoint | String | URL of the service that receives the data as POST | | buttonColor | String | color code of the buttons for theming | | audioFormat | String | file format of audio recording (MP3 or WAV) | | afterRecording | Function | callback function when recording is finished. | | successfulUpload | Function | callback function that is called when data is uploaded successfully | | failedUpload | Function | callback function that is called when upload failed. |

The data sent to the server is encoded either in the MP3 or WAV format. For MP3 encoding the lamejs library is used.

MP3 encoding saves space but needs more processing power on the client device. WAV has bigger file size but the encoding is faster and needs less power.

Dependencies

More Information

Follow me on Twitter for updates: @tderflinger

Your can read more about the Audio Tapir project on my blog:

https://www.tderflinger.com/en/easily-receive-audio-messages-from-users

Further Reading

References

This project has been inspired by vue-audio-recorder by Gennady Grishkovtsov.

License

MIT License