Skip to content

Commit

Permalink
补充文档
Browse files Browse the repository at this point in the history
  • Loading branch information
August-Z authored Oct 2, 2018
1 parent 820cfe3 commit de8dab8
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install awesome-danmaku
```js
const DanmakuControl = require('awesome-danmaku').control

const danmakuPlayer = DanmakuControl.getPlay('#app')
const danmakuPlayer = DanmakuControl.getPlayer('#app')

danmakuPlayer.play()
.insert('Hello')
Expand All @@ -34,15 +34,24 @@ danmakuPlayer.insert({
使用一些配置项

```js
const DanmakuControl = require('awesome-danmaku').control

const DanmakuPlayer = DanmakuControl.getPlay({
el: '#app',
nodeClass: 'danmaku-item',
nodeMaxCount: 25,
rollingTime: 6000,
trackCount: 10,
trackHeight: 60,
const danmakuPlayer = DanmakuControl.getPlayer({
el: '#demo-b',
rollingTime: 3000,
nodeTag: 'div',
nodeClass: 'demo-b-item',
nodeMaxCount: 10,
nodeValueKey: 'text',
trackList: 7,
trackHeight: 70,
on: {
play () {
console.log('Demo-b Start playing !!')
}
}
})

danmakuPlayer.insert({
text: 'used some config'
})

```

0 comments on commit de8dab8

Please sign in to comment.