3.0.1 • Published 9 months ago

vuejs2-audio-recorder v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

vuejs2-audio-recorder

New version of audio recorder for Vue.js with vite. It allows to record, play, download and store records on a server. It is based on vue-audio-recorder which is not longer being supported by the original author (grishkovelli).

Default Mode

npm.io

Minimal Mode

npm.io

Wave Mode

npm.io

Features

  • Beautiful clean UI
  • Time limit
  • Records limit
  • Individual an audio player
  • MP3/WAV support

Bug

  • Player Error CORS for external URL

Tested in (desktop)

  • Edge
  • Chrome
  • Firefox
  • Safari

Installation

npm i vuejs2-audio-recorder --save

AudioRecorder props

PropTypeDescription
attemptsNumberNumber of recording attempts
timeNumberTime limit for the record (minutes)
bit-rateNumberDefault: 128 (only for MP3)
sample-rateNumberDefault: 44100
filenameStringDownload/Upload filename
formatStringWAV/MP3. Default: mp3
show-download-buttonBooleanIf it is true show a download button. Default: true
show-upload-buttonBooleanIf it is true show an upload button. Default: true
micFailedEventCallback fires after microphone permission denied
beforeRecordingEventCallback fires before click the stop button or exceeding the time limit
afterRecordingEventCallback fires after click the stop button or exceeding the time limit
selectRecordChangedEventCallback fires after choice a record. Returns the record
removeRecordEventCallback fires after remove record
customUploadFunctionCallback fires for upload file
compactBooleanA minimal interface to record just one audio and play it.
countdownBooleanWill show the time remaining instead of current recorded time. Default: false
customPlayerBooleanshow custom player style. Default: false
wavePlayerBooleanshow Wave player style. Default: false
countdownTitleStringTitle over time remaining when countdown is set to true. Default: "Time Remaining"

AudioPlayer props

PropTypeDescription
srcStringSpecifies the URL of the audio file
customPlayerBooleanshow custom player style. Default: false
wavePlayerBooleanshow Wave player style. Default: false
compactBooleanA minimal interface to record just one audio and play it.

CSS Variable

variableDescription
primary-colorPrimary color
danger-colorError color
border-colorBorder color

Usage

import RecorderWidget from "vuejs2-audio-recorder";
import PlayerWidget from "vuejs2-audio-recorder";
<recorder-widget
  :attempts="3"
  :time="2"
  :afterRecording="afterRec"
  :backendEndpoint="backendEndpoint"
  :customUpload="customUp"
  :customPlayer="customPlayer"
  :wavePlayer="wavePlayer"
  :countdown="countdown"
  :attempts="attempts"
  compact
/>
<player-widget src="/demo/example.mp3" />

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification (must be built with node v12.x)
npm run build

PUBLISH TO NPM

npm publish --access public

Authors

Gennady Grishkovtsov - Developer

Olga Zimina - UIX Designer

Contributors

Jonathan Arias - Developer

Hossein Rahimi - Developer

TNX

Thomas Derflinger - Recorder for Vue3

3.0.1

9 months ago

3.0.0

9 months ago

2.0.0

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago