浏览代码

fix danmaku can not be hideen, close #41

DIYgod 8 年之前
父节点
当前提交
e1a854285e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/DPlayer.js

+ 1 - 1
src/DPlayer.js

@@ -444,7 +444,7 @@ class DPlayer {
                 this.element.getElementsByClassName('dplayer-ptime')[0].innerHTML = secondToTime(this.video.currentTime);
                 this.trigger('playing');
             }, 100);
-            if (this.option.danmaku) {
+            if (this.option.danmaku && showdan) {
                 danmakuTime = setInterval(() => {
                     let item = this.dan[this.danIndex];
                     while (item && this.video.currentTime >= parseFloat(item.time)) {