仅支持 Vue 2.x,Vue 3 项目不适用;README 顶部提示先阅读 Future of vue-aplayer 讨论再决定是否使用;音频与封面需自备 URL,组件不内置曲库

vue-aplayer
SevenOutmanMIT活跃维护基于 Vue 2.x 的 HTML5 音乐播放器组件,封装 APlayer,几行代码就能在 Vue 项目里嵌入带播放列表和歌词的音乐播放界面。
:cake: Easy-to-use music player for Vue 2.x
npm install vue-aplayerREADME 未说明,纯前端组件,无 GPU 或显存要求
Vue 2.x 的 APlayer 音乐播放器组件,几行 props 就能给页面加上带歌词和播放列表的播放条
基于 Vue 2.x 的 HTML5 音乐播放器组件,封装 APlayer,几行代码就能在 Vue 项目里嵌入带播放列表和歌词的音乐播放界面。
核心能力
- 用 props 传入 music 对象即可渲染播放器
- 支持歌词滚动显示
- 播放列表带循环与随机播放控制
- 支持自定义主题色与自适应主题色
- 支持 HLS 流播放,且无第三方依赖、gzip 后 16KB
容易踩的坑
- 1.6.1v1.6.1最新正式版2018-06-25 · 2018-06-25 07:18 UTC
Bug Fixes
- Update webpack build config, fix #76 (b289e5a66cee1dfcd6d8c82a76b279d7ad4f6ed9)
- 1.6.0v1.6.02018-05-28 · 2018-05-28 04:30 UTC
查看更新说明
Completed.
This release is the final minor update for Vue-APlayer 1.x, which means there won't be new features added into Vue-APlayer v1. After some cleanup in commit history, we will checkout a
v1branch for future patches, and move on to Vue-APlayer 2.API Change
- New
disableVersionBadgeAPI. 6d5fff779f97f98620b7af611543b8bb890b90dd
Improvements
- Remove
!importantstyles. 3f938d8d3f51141bac95a5f479b6017fe6b40144
- New
- 1.5.2v1.5.22018-05-18 · 2018-05-18 17:09 UTC
查看更新说明
Bug Fixes
- Prevent error thrown on seeking a failed audio src b4f58c40a0fdde8bf0a11c22963d1472b90070e7
- Prevent alignments being affected by parent elements' styles, fix #41 01cc205dec0828a9c3d42b2cfd38b8ceb9191dc5
Improvements
- Fix styling issues on mobile devices 9938a83551b8e708f82299765f8c2b2ef740daed
- Improved flexbox-based UI implementation
- 1.5.0v1.5.02018-04-20 · 2018-04-20 15:54 UTC
查看更新说明
Play the list
This minor release comes with some changes focusing on the playlist that we recommend every user should update.
Prop Changes
- Removed
mode, replaced with newshuffleandrepeatprops (a39a023caef13e0f3c22a8644ad413ea6d47d241). - Note that
modeis REMOVED rather than simply deprecated, which means usingmodein v1.5.0+ does not work and may cause errors (Deprecated props still work but with warnings).
- Removed
- 1.4.3v1.4.32018-04-13 · 2018-04-13 11:03 UTC
查看更新说明
Improvements
- Reduce bundle size, fix #33
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Please refer to Future of vue-aplayer before you continue.
Vue implementation of APlayer prototype. Demo

Features
- Beautiful clean UI
- Lyrics scroll
- Playlist with repeat & shuffle controls
- Custom theme color / Self-adapting theme color
- Drag and place anywhere
- Mutex play
- HLS support
- Easy props and API
- Dependency free and light-weight (gzipped 16KB)
Using Vue-APlayer in your project? Let me know!
Usage
<aplayer autoplay
:music="{
title: 'secret base~君がくれたもの~',
artist: 'Silent Siren',
src: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.mp3',
pic: 'https://moeplayer.b0.upaiyun.com/aplayer/secretbase.jpg'
}"
/>
Changelog
Detailed changes fro each release are documented in the release notes.
Contribution
Feel free to open an issue if you find a bug or have a nice idea.
The name
- When referring to
Vue-APlayer, the name should be written in exactly the same case. - When referring to its versions, either
[email protected](GitHub) or[email protected](npm) is fine.
Related projects
- APlayer: Prior art
- @moefe/vue-aplayer: Another Vue implementation of APlayer by @u3u
Thanks
@DIYgod, for creating APlayer and sharing cloud storage for hosting Vue-APlayer's demo page media resources.
License
Vue-APlayer is MIT Licensed.
Copyright (c) 2016-present Shenghao "Doma" Lei