Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9c3ec2d
feat: 弹幕轨道算法优化
Aug 18, 2025
4d83030
feat: 修复缩放弹幕元素重叠
Sep 10, 2025
ec241e0
feat: 处理元素离屏后元素突然消失
Sep 10, 2025
506033e
feat: 修复切换后台后, 弹幕无法正常飘屏显示
Sep 11, 2025
bf5fde2
fix: 修复字号调整时,弹幕元素位移在开始位置突然出现,已离屏元素直接销毁
Sep 14, 2025
7f0d2b4
publish 1.1.13-douyin-0.1
Sep 15, 2025
39e49fa
feat: 修复切换字号碰撞问题
Sep 20, 2025
124e117
feat: 字号调整问题修复, 整理代码
Sep 20, 2025
7de1e3a
feat: 字号调整问题修复, 删除log
Sep 20, 2025
043350e
feat: 0.2版本
Sep 21, 2025
377b7ff
feat: 修复字号调整导致的元素重叠及元素间距过大
Sep 25, 2025
0fd5f53
feat: 修复字号切换问题发包
Sep 25, 2025
997e8c2
publish 1.1.13-douyin-0.4
Sep 26, 2025
3d8ef89
feat: 修复轨道扩缩导致的元素位置错乱
Sep 29, 2025
bf8e339
feat: 修复字号调整结合区域调整导致的元素重叠问题
Sep 29, 2025
ccc96d4
feat: 修复字号调整结合区域调整导致的元素重叠问题
Sep 29, 2025
f7b1be3
feat: 删除console, 增加clear方法
Sep 29, 2025
5b648f7
1.1.13-douyin-0.4版本
Sep 29, 2025
0d125ff
1.1.13-douyin-0.6
Sep 29, 2025
3eceeab
feat: 修复元素重复创建问题
Sep 30, 2025
7c139f8
1.1.13-douyin-0.7
Sep 30, 2025
d7e603f
feat: 计算recalculate场景下的重叠问题
Oct 10, 2025
298ae00
feat: 修复弹幕倍速不上屏,暂停状态字号调大重叠问题
Oct 10, 2025
3313d5b
1.1.13-douyin-0.8
Oct 10, 2025
2add73d
feat: 解决频繁切换全屏状态下,导致弹幕节点没有预期回收
Oct 11, 2025
4cddf1a
1.1.13-douyin-0.9
Oct 11, 2025
86ef951
feat: 修复频繁调节轨道失效, 自发弹幕显示异常
Oct 11, 2025
3cf363d
1.1.13-douyin-1.0
Oct 11, 2025
6aa58ae
feat: 修复自发轨道报错, 及元素大小调节后显示异常
Oct 13, 2025
72b6763
1.1.13-douyin-1.1
Oct 13, 2025
9bae20c
feat: 修复startTime名称
Oct 13, 2025
0b83357
feat: 修复切换字体部分弹幕元素不生效
Oct 13, 2025
62c060a
1.1.13-douyin-1.2
Oct 13, 2025
25fda75
[email protected]
Oct 14, 2025
ce01028
feat: 整理代码
Oct 14, 2025
bd6e806
feat: 修复循环退出问题
Oct 14, 2025
7d67b2a
1.1.13-douyin-1.5修复极端情况下切换弹幕字体大小重叠
Oct 15, 2025
6c8d3a6
1.1.13-douyin-1.6: 删除弹幕数据读取前置判断轨道可用性 & appendChild前置判断main状态 & startT…
Oct 27, 2025
8e22a71
1.1.13-douyin-1.7减少弹幕元素上屏前的排序逻辑,增加数据读取,元素添加队列,元素开始移动中间环节打点
Oct 29, 2025
bf4f29c
feat: 修复js报错
Oct 29, 2025
01e8867
1.1.13-douyin-1.9 修复js报错
Oct 29, 2025
2bfbe02
1.1.13-douyin-2.0: 修改时间戳上报方式
Oct 29, 2025
64e0d68
1.1.13-douyin-2.1 修复发送弹幕偶现不消失问题
Nov 3, 2025
832e95a
v1.1.13-douyin-2.2 新版本支持弹幕尺寸修改的时候更新轨道高度
Nov 5, 2025
553d2c6
feat: 字体调整时同步修改元素高度
Nov 6, 2025
f2d7af8
feat: 修复弹幕循环播放场景下, 自发弹幕多次显示
Nov 17, 2025
a1728e8
1.1.13-douyin-2.4
Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ danmu.sendComment({
//发送弹幕
duration: 15000,
id: 'id',
start: 3000, //不提供该项则立即发送
start: 3001, //不提供该项则立即发送
txt: '弹幕内容',
style: {
color: '#ff9500',
Expand All @@ -121,7 +121,7 @@ danmu.updateComments([
{
duration: 15000,
id: 'id',
start: 3000, //不提供该项则立即发送
start: 3001, //不提供该项则立即发送
txt: '弹幕内容',
style: {
color: '#ff9500',
Expand Down
16 changes: 13 additions & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
left: 0;
width: 100%;
height: 100%;
background: red;
}
#btnwrap {
position: absolute;
Expand Down Expand Up @@ -115,7 +116,15 @@
end: 1
},
disableCopyDOM: true,
dropStaleComments: true
dropStaleComments: true,
hooks: {
bulletCreateEl(item) {
const el = document.createElement('div');
console.log('item', item)
el.innerHTML = item.text
return el;
}
}
})

danmu.on('bullet_hover', (e) => {
Expand Down Expand Up @@ -146,13 +155,14 @@
id++
// console.log('sendComment: ', id);
danmu.sendComment({
duration: 10000,
elLazyInit: true,
duration: 5000,
id: '' + id,
// prior: id % 20 === 0,
// realTime: true,
// txt,
start: player.currentTime * 1000,
el,
text: txt,
disableCopyDOM: true,
// realTime: true,
// start: 1000*currentTime,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "danmu.js",
"version": "1.1.13",
"version": "1.1.13-douyin-2.4",
"description": "HTML5 danmu (danmaku) plugin for any DOM element",
"main": "./dist/index.js",
"files": [
Expand Down
Loading