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

vuetify3-audio-player

v1.1.0

Published

Audio player for Vue 3 based on Vuetify.

Downloads

205

Readme

vuetify3-audio-player

This is an audio player for Vue 3 based on Vuetify 3. This project is forked from here and migrated to Vue 3.

Features

  • Supports Vue 3 and Vuetify 3.
  • Supports most of the audio play in this component.
  • You can set the color you want for all component buttons.
  • Supports downloading the audio file.
  • Support Dark mode of Vuetify.
  • Supports auto play, but if user didn't interact with the document first, the audio can't be played.
  • Supports disabling audio download button.
  • Supports disable the Vuetify Card style, and you can use this component in your own Vuetify Card of your page.
  • You can set custom icons supported by vuetify v-icon component.
  • Supports small size with the minimal props.

Preview

Example

Installation

Use npm: npm install vuetify3-audio-player --save

Prepare

At first make sure your project is Vue project, and has Vuetify as UI framework:

  1. Install Vuetify:
npm install vuetify --save-dev
  1. Add Vuetify to app.js or main.js:
import Vuetify from "vuetify";
import "vuetify/dist/vuetify.min.css";

Vue.use(Vuetify);

You also can use Vue plugin to install Vuetify by only one line command:

vue add vuetify

Node: Make sure you are using the default Vuetify iconfont (mdi) or override the icon attributes with some other supported by v-icon component.

Usage

Add below code into your <script>:

export default {
  components: {
    VuetifyAudio: () => import("vuetify3-audio-player"),
  },
  data: () => ({
    file: "http://www.hochmuth.com/mp3/Boccherini_Concerto_478-1.mp3",
  }),
};

OR

import VuetifyAudio from "vuetify3-audio-player";
export default {
  components: {
    VuetifyAudio,
  },
  data: () => ({
    file: "http://www.hochmuth.com/mp3/Boccherini_Concerto_478-1.mp3",
  }),
};

And below code in the <template>:

<vuetify-audio
  :file="file"
  color="success"
  :ended="audioFinish"
  downloadable
></vuetify-audio>

Attributes

  • file (String) (Required): Set audio file for the audio player
  • ended (Function) (Optional): Set callback function name after audio finish
  • canPlay (Function) (Optional): Set callback function name when audio ready for playing
  • color (String) (Optional): Set all component buttons color
  • autoPlay (Boolean) (Optional, default is false): Add it to make the audio auto play, but in some web browsers maybe failed, because some browsers need user active in the page first then allow sound auto play.
  • downloadable (Boolean) (Optional, default is false): Add it to let the audio file can be downloaded.
  • minimal (Boolean) (Optional, default is false): Sets the player to be minimal (Reduces size).
  • flat (Boolean) (Optional, default is false): When set to true, make the Vuetify Card style to flat, that you can combine other information/image/data with this control in your page.
  • playIcon (String) (Optional, default is mdi-play): Set the icon for play
  • pauseIcon (String) (Optional, default is mdi-pause): Set the icon for pause
  • stopIcon (String) (Optional, default is mdi-stop): Set the icon for stop
  • refreshIcon (String) (Optional, default is mdi-refresh): Set the icon for refresh
  • downloadIcon (String) (Optional, default is mdi-download): Set the icon for download
  • volumeHighIcon (String) (Optional, default is mdi-volume-high): Set the icon for volume
  • volumeMuteIcon (String) (Optional, default is mdi-volume-mute): Set the icon for mute

License

MIT