mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 08:01:20 -08:00
add danmuku colors
This commit is contained in:
1 parent
e690af2de4
commit
8bcc020627
8 files changed
+191
-39
No files matched your search
@@ -73,14 +73,16 @@ var art = new Artplayer({
|
||||
mode: 1,
|
||||
},
|
||||
],
|
||||
speed: 5, // Animation time
|
||||
opacity: 1, // Opacity
|
||||
size: 25, // Font size
|
||||
margin: ['10%', 20], // Margin top and margin bottom
|
||||
antiOverlap: true, // Anti overlap
|
||||
useWorker: true, // Use web worker or not
|
||||
synchronousPlayback: false, // Synchronous playback speed
|
||||
filter: (danmu) => danmu.text.length <= 50, // filter function
|
||||
speed: 5, // The duration of the barrage, in seconds, in the range [1 ~ 10]
|
||||
opacity: 1, // Barrage transparency, the range is [0 ~ 1]
|
||||
fontSize: 25, // Font size, supports numbers and percentages
|
||||
color: '#FFFFFF', // Default font color
|
||||
mode: 0, // Default mode, 0-scroll, 1-still
|
||||
margin: ['2%', 60], // Barrage top and bottom margins, supports numbers and percentages
|
||||
antiOverlap: true, // Whether to prevent overlapping
|
||||
useWorker: true, // whether to use web workers
|
||||
synchronousPlayback: false, // Whether to sync to playback speed
|
||||
filter: (danmu) => danmu.text.length < 50, // Barrage filter function
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
@@ -75,12 +75,14 @@ var art = new Artplayer({
|
||||
],
|
||||
speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
|
||||
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
|
||||
size: 25, // 字体大小,支持数字和百分比
|
||||
margin: ['10%', 20], // 弹幕上下边距,支持数字和百分比
|
||||
fontSize: 25, // 字体大小,支持数字和百分比
|
||||
color: '#FFFFFF', // 默认字体颜色
|
||||
mode: 0, // 默认模式,0-滚动,1-静止
|
||||
margin: ['2%', 60], // 弹幕上下边距,支持数字和百分比
|
||||
antiOverlap: true, // 是否防重叠
|
||||
useWorker: true, // 是否使用 web worker
|
||||
synchronousPlayback: false, // 是否同步到播放速度
|
||||
filter: (danmu) => danmu.text.length <= 50, // 弹幕过滤函数
|
||||
filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user