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 356c73a42..de24e0b96 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -8,12 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - 添加 art.isInput 属性,当为 true 的时候不自动隐藏控制栏,如弹幕正在输入时 - 添加 art.isLock 属性,在移动端当为 true 的时候不能操作快进、开始和暂停 -- 弹幕库监听 resize 事件,当输入框少于 150px 时,自动隐藏弹幕输入框 - 修复弹幕输入框的固定宽度 bug - 设置面板支持 range 和 onRange 选项 - 添加 isAndroid 和 isiOS 工具函数 -- 弹幕库添加 mount 选项,可自定义发送器的挂载位置 +- 弹幕库添加 mount 选项,可自定义弹幕输入框的挂载位置 - 弹幕库添加 lockTime 选项,可自定义输入框的锁定时间 +- 弹幕库添加 maxLength 选项,控制输入最大可输入字数 +- 弹幕库添加 minWidth 选项,控制输入框最小宽度 +- 弹幕库添加 maxWidth 选项,控制输入框最大宽度 ## [4.4.0] - 2022-05-15 diff --git a/docs/assets/example/danmuku.js b/docs/assets/example/danmuku.js index 34a65543c..b3f4dcf95 100644 --- a/docs/assets/example/danmuku.js +++ b/docs/assets/example/danmuku.js @@ -21,6 +21,10 @@ var art = new Artplayer({ useWorker: true, // 是否使用 web worker synchronousPlayback: false, // 是否同步到播放速度 filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数 + lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60] + maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500] + minWidth: 150, // 输入框最少宽度,范围在[0 ~ 500],超出则隐藏,填 0 则永不隐藏 + maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则 100% 宽度 // mount 选项用于自定义弹幕输入框的挂载位置,默认挂载在播放器控制栏中间 // 但在移动端下控制栏宽度不足,所以最好自己决定弹幕输入框放在那里 diff --git a/docs/danmuku.html b/docs/danmuku.html index ec4236b91..1b9d5ffa5 100644 --- a/docs/danmuku.html +++ b/docs/danmuku.html @@ -30,6 +30,9 @@ } .danmuku-input { + display: flex; + align-items: center; + justify-content: center; padding: 5px; background-color: #000; } @@ -154,6 +157,9 @@ synchronousPlayback: false, filter: (danmu) => danmu.text.length < 50, lockTime: 5, + maxLength: 100, + minWidth: 150, + maxWidth: 0, mount: document.querySelector('.danmuku-input'), }), ], diff --git a/docs/document/404.html b/docs/document/404.html index 166ed0ca5..2e68ae083 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.