You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue3-audio-player

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-audio-player

A beautiful Audio Player Component for Vue3

1.0.7
latest
Source
npmnpm
Version published
Weekly downloads
341
10%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

vue3

FAQs

Package last updated on 01 Feb 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