0.0.2 • Published 5 years ago
vue-mplayer v0.0.2
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 --savimport MPlayer from 'vue-mplayer'
Vue.component('MPlayer', MPlayer)<MPlayer :playList="playList" theme="black" />Props
| props | desc | type | value | default |
|---|---|---|---|---|
| playList | music list | array | -- | [] |
| theme | theme | string | metal, blue, black, orange | black |
| textColor | text color | string | hex or rgba | '' |
| iconColor | icon color | string | hex or rgba | '' |
| background | background color | string | hex 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).