1.0.7 • Published 1 year ago

vue3-audio-player v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0-2

2 years ago

1.0.0-1

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1-9

2 years ago

0.0.1-8

2 years ago

0.0.1-7

2 years ago

0.0.1-6

2 years ago

0.0.1-5

2 years ago

0.0.1-4

2 years ago

0.0.1-3

2 years ago

0.0.1-2

2 years ago

0.0.1-1

2 years ago

0.0.1

2 years ago