mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
chore: Refactor artplayerPluginDanmuku plugin and add artplayerPluginChromecast plugin
This commit is contained in:
1 parent
9ca560fd05
commit
313b6ae54d
5 files changed
+111
-45
No files matched your search
@@ -1,9 +1,9 @@
|
||||
function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {
|
||||
function getDanmuTop({ target, visibles, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {
|
||||
// 弹幕最大高度
|
||||
const maxTop = clientHeight - marginBottom;
|
||||
|
||||
// 过滤同模式的弹幕,即每种模式各不影响
|
||||
const danmus = emits
|
||||
const danmus = visibles
|
||||
.filter((item) => item.mode === target.mode && item.top <= maxTop)
|
||||
.sort((prev, next) => prev.top - next.top);
|
||||
|
||||
|
||||
Reference in new issue
Block a user