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 🙏

© 2026 – Pkg Stats / Ryan Hefner

vuetify-music-player

v0.1.0

Published

Music Player based on Vuetify Framework.

Readme

vuetify-music-player

GitHub

一款带播放列表的底边栏现代化播放器,内嵌有插播最后播放等功能,可自定义额外按钮。

界面

image-20210625152524137

image-20210625152541462

Demo&Docs

Docs

安装

 npm -i vuetify-music-player
import VMusicPlayer from 'vuetify-music-player';
export default Vue.extend({
  components: {
    VMusicPlayer,
  },
  ...

使用

安装

// in main.ts(main.js)
import VMusicPlayer from 'vuetify-music-player';
Vue.use(VMusicPlayer);
...

全局播放

// in your any *.vue file.
this.$player.play({
  avatarSrc: ..., // string
  title: ..., // string
  authors: ..., // string[]
  fileSrc: ..., // string
  duration: ..., // string 可以不指定
})

插播

// in your any *.vue file.
this.$player.cutIn({
  avatarSrc: ..., // string
  title: ..., // string
  authors: ..., // string[]
  fileSrc: ..., // string
  duration: ..., // string 可以不指定
})

最后播放

// in your any *.vue file.
this.$player.append({
  avatarSrc: ..., // string
  title: ..., // string
  authors: ..., // string[]
  fileSrc: ..., // string
  duration: ..., // string 可以不指定
})

选项

  • dark: 指定主题
  • show: 指定是否显示
  • futurePlaylistItems: 播放列表
  • historyPlaylistItemsInit: 初始历史记录
  • fixed
  • abosulte

插槽

  • centerLeading:播放栏左侧位置
  • centerTrailing: 播放栏右侧位置
  • right: 音量调节右侧位置

示例


<template>
  <v-music-player v-model="player" bottom fixed :dark="dark">
    <template #centerLeading v-if="centerLeading">
      <v-btn icon class="my-auto"><v-icon>mdi-heart</v-icon></v-btn>
    </template>
    <template #centerTrailing v-if="centerTrailing">
      <v-btn icon class="my-auto"><v-icon>mdi-share</v-icon></v-btn>
    </template>
    <template #right v-if="right">
      <v-btn icon class="my-auto"><v-icon>mdi-shuffle-variant</v-icon></v-btn>
    </template>
  </v-music-player>
</template>


<script lang="ts">
  ...
  import { Component, Vue } from 'vue-property-decorator';

  @Component({
    data: () => ({
      player: false,
      ...
    }),
    methods: {
      play(song: any) {
        this.$player.play(song)
      }
    },
    ...
  })
...
      

基本思路

graph LR;
			外部文件改变--放入历史记录tag=true-->play((播放));
			play-->loaded(loaded);
			loaded--获得时长-->放入历史记录if_tag=true;
			
			内部文件改变-->下一首;
			下一首-->将播放列表第0个元素插到历史记录中;
      内部文件改变-->上一首;
			上一首-->将历史记录第0个元素插到播放列表中;
			将播放列表第0个元素插到历史记录中--放入历史记录tag=false-->play;
			将历史记录第0个元素插到播放列表中--放入历史记录tag=false-->play;

TODO

  • 歌词
  • UI优化
  • 移动端UI优化