0.0.2 • Published 4 years ago

vue-mplayer v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

vue-mplayer

Introduction

vue-mplayer is a vue component to play music

Features

  • Beautiful UI
  • Playlist with repeat & shuffle controls
  • Custom theme color
  • Mutex play
  • HLS support
  • Easy props and API
  • Dependency free and light-weight
  • Lyrics
  • mini player
  • music list and play history

By the way, if you want to play m3u8(hls), you should import the hls before. for example:

<script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>

Usage

# install
npm install vue-mplayer --sav
import MPlayer from 'vue-mplayer'
Vue.component('MPlayer', MPlayer)
<MPlayer :playList="playList" theme="black" />

Props

propsdesctypevaluedefault
playListmusic listarray--[]
themethemestringmetal, blue, black, orangeblack
textColortext colorstringhex or rgba''
iconColoricon colorstringhex or rgba''
backgroundbackground colorstringhex or rgba''

if you use the textColor or iconColor or background, it will cover the theme color

Methods

play() and pause() and togglePlay(bool?) and prev() and next()

Contributing

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.

License

vue-mplayer is MIT Licensed.

Questions or advise

If you have some question or advise, you can send me a E-mail(zxpscau@163.com).