https://github.com/mashirozx/alice-player
A beautiful H5 music player built with Vue3. đ
https://github.com/mashirozx/alice-player
h5 player vue3
Last synced: 6 months ago
JSON representation
A beautiful H5 music player built with Vue3. đ
- Host: GitHub
- URL: https://github.com/mashirozx/alice-player
- Owner: mashirozx
- Created: 2021-05-02T02:58:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-16T07:05:05.000Z (over 2 years ago)
- Last Synced: 2025-03-13T02:36:51.973Z (7 months ago)
- Topics: h5, player, vue3
- Language: Vue
- Homepage: https://player.2heng.xin
- Size: 721 KB
- Stars: 57
- Watchers: 2
- Forks: 7
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AlicePlayer
> A beautiful H5 music player built with Vue3. đ
**This project is under heavy development, APIs might be changed in the feature.**
  
## Preview
| The cover | The play list | The lyrics |
| :-: | :-: | :-: |
|  |  |  |Demo [here](https://player.2heng.xin/)
## Install
Using npm:
```bash
npm install alice-player --save
```Using Yarn:
```bash
yarn add alice-player
```## Quick Start
```html
```
```js
var playList = [
{
audio: 'https://s3-hk.2heng.xin/mstdn/static/alice-player/demo/ćăăźæă«ăŻäœăăȘăăăšă.mp3',
cover: 'https://s3-hk.2heng.xin/mstdn/static/alice-player/demo/ćăăźæă«ăŻäœăăȘăăăšă.jpg',
lrc: 'https://s3-hk.2heng.xin/mstdn/static/alice-player/demo/ćăăźæă«ăŻäœăăȘăăăšă.lrc',
name: 'ćăăźæă«ăŻäœăăȘăăăšăă',
artist: 'RAM WIRE',
},
]var options = {
container: '#app',
preload: 'metadata',
}var ap = new AlicePlayer(playList, options)
```## Options
| Key | Type | Default | Description |
| :-: | :-: | :-: | :-- |
| container | String | `'#app'` | Where we render the player on HTML |
| autoplay | Boolean | `false` | Auto play audio |
| preload | String | `'metadata'` | [HTMLMediaElement.preload](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-preload) |
| color | String | `null` | The default theme color, can also be set in track info object in `playList`, which will overwrite the global color setting |
| playMode | String | `'order'` | Value can be one of `order`, `random`, and `single` |
| volume | Number | `0.7` | The default volume, range from 0 to 1 |
| storageName | String | `'alice-player-setting'` | The key prefix where we save values in cookie |_Note: This plugin is still under heavy development, some options doesn't really work now._
## TODO
- [ ] Audio buffer progress
- [ ] Media error handling
- [ ] HLS stream support
- [ ] Vue component encapsulation
- [ ] Split vender script file
- [ ] Github Pages build workflow