@@ -24,7 +24,7 @@ npm install aplayer
2424
2525## Usage
2626
27- ### The following HTML structure is used for APlayer :
27+ ### HTML:
2828
2929```
3030<link rel="stylesheet" href="APlayer.css">
@@ -36,7 +36,7 @@ npm install aplayer
3636<script src="APlayer.js"></script>
3737```
3838
39- ### And this is how the APlayer is initialized :
39+ ### JS :
4040
4141```
4242var ap = new APlayer({
@@ -54,6 +54,23 @@ var ap = new APlayer({
5454ap.init();
5555```
5656
57+ ### JS Initialized Options
58+
59+ ```
60+ {
61+ element: document.getElementById('player1'), // Optional, player element
62+ narrow: false, // Optional, narrow style
63+ autoplay: true, // Optional, autoplay
64+ showlrc: false, // Optional, show lrc
65+ music: { // Required, musci info
66+ title: 'Preparation', // Required, music title
67+ author: 'Hans Zimmer/Richard Harvey', // Required, music author
68+ url: 'http://7xifn9.com1.z0.glb.clouddn.com/Preparation.mp3', // Required, music url
69+ pic: 'http://7xifn9.com1.z0.glb.clouddn.com/Preparation.jpg' // Required, music picture
70+ }
71+ }
72+ ```
73+
5774### With lrc
5875
5976Using [ LRC format] ( https://en.wikipedia.org/wiki/LRC_(file_format) )
@@ -87,10 +104,11 @@ HTML:
87104
88105JS:
89106
90- Init Option: ` showlrc: false `
107+ Initialized Option: ` showlrc: false `
91108
92109### API
93110
111+ + ` ap.init() `
94112+ ` ap.play() `
95113+ ` ap.pause() `
96114
@@ -107,9 +125,10 @@ gulp
107125- [x] 分享到微博
108126- [x] 加载样式及错误处理
109127- [x] 窄样式 及 移动版样式
128+ - [x] 歌词展示
129+ - [x] 默认选项
110130- [ ] 移动端兼容性
111131- [ ] 播放列表
112- - [ ] 歌词展示
113132- [ ] 宽度高度自定义
114133
115134## Issues
0 commit comments