Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 860228bea..95b56de03 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 弹幕库添加 maxLength 选项,控制输入最大可输入字数 - 弹幕库添加 minWidth 选项,控制输入框最小宽度 - 弹幕库添加 maxWidth 选项,控制输入框最大宽度 +- 弹幕库添加 mount 选项,控制输入框自定义挂载位置 +- 弹幕库添加 beforeEmit 选项,控制弹幕发送前的校验 ## [4.4.0] - 2022-05-15 diff --git a/docs/assets/example/danmuku.js b/docs/assets/example/danmuku.js index 6094b302b..792e69ace 100644 --- a/docs/assets/example/danmuku.js +++ b/docs/assets/example/danmuku.js @@ -23,8 +23,12 @@ var art = new Artplayer({ filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数 lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60] maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500] - minWidth: 200, // 输入框最少宽度,范围在[0 ~ 500],填 0 则为无限制 + minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制 maxWidth: 400, // 输入框最大宽度,范围在[minWidth ~ Infinity],填 0 则为 100% 宽度 + beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送 + + // 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效 + // mount: document.querySelector('.artplayer-danmuku'), }), ], }); diff --git a/docs/document/404.html b/docs/document/404.html index 3ef222622..e7528e916 100644 --- a/docs/document/404.html +++ b/docs/document/404.html @@ -5,13 +5,13 @@
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.