vue3-audio-player

A beautiful Audio Player Component for Vue3
15,533
Install
npm install vue3-audio-player
Latest Version:1.0.7
Vue:3
License:MIT
Last Updated:Feb 1, 2023
Links: npm
Maintainer: coolsnow

What is vue3-audio-player?

This is a beautiful Audio Player Component for Vue3.

Installation

npm i vue3-audio-player

Usage

In your *.vue, you shall import the libraries and CSS:

import AudioPlayer from 'vue3-audio-player'
import 'vue3-audio-player/dist/style.css'

In your template:

<template>
  <AudioPlayer
    :option="{
        src: 'https://your-audio-file.mp3',
        title: 'your-audio-title',
        coverImage: 'https://your-cover-image.png',
   }"
  />
</template>

Here are some options about AudioPlayer:

 AudioPlayerOption {
  src: string //audio source
  title?: string //audio title (optional, default: '')
  coverImage?: string //cover image (optional, default: '')
  coverRotate?: boolean //cover rotate when playing (optional, default: true)
  progressBarColor?: string //progress bar color (optional, default: '#3C91F4')
  indicatorColor?: string //indicator color (optional, default: '#3C91F4')
}

Here are some events about AudioPlayer:

'loadedmetadata'
'playing'
'play'
'play-error'
'timeupdate'
'pause'
'ended'
'progress-start'
'progress-end'
'progress-move'
'progress-click'

Here are some methods about AudioPlayer:

play() // play the audio
pause() // pause the audio

Here are some propertys about AudioPlayer:

totalTime // total time of the audio (seconds)
currentTime // current time of the audio (seconds)
isPlaying // boolean

Here are some slots about AudioPlayer:

title

Related Packages

xns-audio-player-simple

A simple yet powerful music player for VueJs inspired by xns-audio-player

6,890 9
alanyitools

前端常用工具集:1、带波纹的音频录制功能;2、获取手机验证码功能;3、动态滑块选项...

693
vue-audio-recorder

Audio recorder for Vue.js. It allows to create, play, download and store records...

20,098 511
@ewhal/vue-audio-recorder

Audio recorder for Vue.js. It allows to create, play, download and store records...

1,802 511
@cycjimmy/vue-h5-audio-controls

Simple h5 music controller for vue

660 12

Version History

Version Released License
1.0.7 MIT
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT
1.0.3 MIT
Pre-releases (11)
Version Released License
1.0.0-2 MIT
1.0.0-1 MIT
0.0.1-9 MIT
0.0.1-8 MIT
0.0.1-7 MIT