mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
artplayer-plugin-danmuku@4.3.19
This commit is contained in:
1 parent
526096bef3
commit
e5753e8f82
8 files changed
+18
-11
No files matched your search
@@ -397,6 +397,7 @@ export default class Danmuku {
|
||||
|
||||
show() {
|
||||
this.isHide = false;
|
||||
this.start();
|
||||
this.$danmuku.style.display = 'block';
|
||||
this.art.emit('artplayerPluginDanmuku:show');
|
||||
return this;
|
||||
@@ -404,6 +405,8 @@ export default class Danmuku {
|
||||
|
||||
hide() {
|
||||
this.isHide = true;
|
||||
this.stop();
|
||||
this.queue.forEach((item) => this.makeWait(item));
|
||||
this.$danmuku.style.display = 'none';
|
||||
this.art.emit('artplayerPluginDanmuku:hide');
|
||||
return this;
|
||||
|
||||
@@ -8,7 +8,7 @@ export default function getDanmuTop({
|
||||
antiOverlap,
|
||||
}) {
|
||||
const danmus = emits
|
||||
.filter((item) => item.mode === target.mode && item.top <= clientHeight - marginBottom)
|
||||
.filter((item) => item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom)
|
||||
.sort((prev, next) => prev.top - next.top);
|
||||
|
||||
if (danmus.length === 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {
|
||||
const danmus = emits
|
||||
.filter((item) => item.mode === target.mode && item.top <= clientHeight - marginBottom)
|
||||
.filter((item) => item.mode === target.mode && item.top > marginTop && item.top <= clientHeight - marginBottom)
|
||||
.sort((prev, next) => prev.top - next.top);
|
||||
|
||||
if (danmus.length === 0) {
|
||||
|
||||
Reference in new issue
Block a user