vue-mplayer is a vue component to play music
- 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>
# install
npm install vue-mplayer --sav
import MPlayer from 'vue-mplayer'
Vue.component('MPlayer', MPlayer)
<MPlayer :playList="playList" theme="black" />
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
play()
and pause()
and togglePlay(bool?)
and prev()
and next()
- ⇄ Pull requests and ★ Stars are always welcome.
- For bugs and feature requests, please create an issue.
vue-mplayer is MIT Licensed.
If you have some question or advise, you can send me a E-mail(zxpscau@163.com).