Skip to content

Commit 763bec1

Browse files
authored
Merge pull request #25 from flxxyz/dev
update: web端日志方法的使用
2 parents baeaa96 + 72e0681 commit 763bec1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<a href="https://www.npmjs.com/package/douyudm"><img src="https://img.shields.io/npm/v/douyudm.svg?sanitize=true" alt="Version" /></a>
77
<a href="https://www.npmjs.com/package/douyudm"><img src="https://img.shields.io/npm/l/douyudm.svg?sanitize=true" alt="License" /></a>
88

9-
> \>= 1.1.0 支持所有消息输出到文件
9+
> \>= 1.1.1 支持所有消息输出到文件
1010
1111
## 安装(命令行)
1212
```shell
@@ -29,7 +29,7 @@ douyudm -i 房间号
2929
```
3030

3131
## 使用(WEB)
32-
挂载在window下,可通过 `douyudanmaku`, `danmaku`调用,开启 **debug** 可直接调用 `danmaku.logger.export()` 导出弹幕
32+
挂载在window下,可通过 `douyudanmaku`, `danmaku`调用
3333
```
3434
<script>
3535
window.onload = function() {
@@ -58,6 +58,12 @@ window.onload = function() {
5858
})
5959
//开始监听
6060
room.run()
61+
62+
//导出日志(不传入房间号默认为所有)
63+
room.logger.export(房间号)
64+
65+
//清除日志(不传入房间号默认为所有)
66+
room.logger.clear(房间号)
6167
}
6268
</script>
6369
```

0 commit comments

Comments
 (0)