Skip to content

Commit

Permalink
Document update
Browse files Browse the repository at this point in the history
Document update 文档更新
  • Loading branch information
PoppinRubo committed May 4, 2017
1 parent 6d5ad01 commit 7e2dcb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ player外面可以用一个div包起来控制它的大小
play.config({
autoPlay: false,//自动播放
canvasId: "show",//canvas标签id
effect: 0,//频谱效果,不设置或-1为随机变化,0为条形柱状,1为环状声波
button: {//设置生成的控制按钮,不设置button默认全部创建
prev: true,//上一首
play: true,//播放,暂停
Expand All @@ -62,9 +63,14 @@ player外面可以用一个div包起来控制它的大小
},
event: function (e) {//这是一个事件方法,点击控制按钮会传到此方法,点击想要扩展可以写在这个事件方法里
//参数:e.eventType 事件类型
//参数:e.describe 事件描述
//参数:e.describe 事件详情,或参数
//类型为 prev:上一首,next:下一首,play:播放/暂停,energy:此时播放的能量值,时刻变化,值在e.describe里
if (e.eventType == "prev" || e.eventType == "next") {
//如果点击了下一首或上一首就执行你的某个方法,更多事件待开发
changBg();
}
if (e.eventType == "energy") {
console.log(e.describe);
}
},
playList: [//播放列表,mp3地址不可跨域,需要在服务器模式下
Expand Down

0 comments on commit 7e2dcb1

Please sign in to comment.