1.0.2 • Published 3 years ago
eaplayer v1.0.2
EaPlayer
introduce
Music player written in native JS
- The UI interface comes from the
EA PlayerWrodPress plugin of Louis (louie). - Features are in native JS
- Packaged with WebPack
- compatible TypeScript
Installation
$ npm install eaplayer
or$ yarn add eaplayer
Usage
import EaPlayer from "eaplayer";
new EaPlayer({
playlist: {
"Playlist Name": [
{name: "song name", artist: "artist name", src: "song link", image: "song picture", lrc: "lyric link"},
{name: "song name", artist: "artist name", src: "song link", image: "song picture", lrc: "lyric link"},
],
},
});Config
| parameter | description | type | optional value | default value |
|---|---|---|---|---|
| title | title | string | - | EaPlayer |
| open | Expand player | boolean | - | false |
| color | background color | string | - | #333333 |
| autoplay | autoplay | boolean | - | false |
| volume | Music volume | number | 0-100 | 100 |
| playmode | play mode | string | all | once / shuffle / all |
| defaultPlayList | Default playlist | string | - | "Welcome" default playlist |
| playlist | Playlist information | Object | - |
playlist
| parameter | description | type |
|---|---|---|
| name | song name | string |
| artist | Artist name | string |
| src | song link | string |
| image | song image | string |
| lrc | song lyrics | string |
build
- install:
npm install - build:
npm run build
ref
License
EaPlayer is open source using GPL V3.0 protocol, please try to abide by the open source protocol.
Participate in contribution
- Fork this repository
- Create a new Feat_xxx branch
- Submit the code
- Create a new Pull Request