Browse Source

fix danmaku can not be hideen, close #41

DIYgod 8 years ago
parent
commit
e1a854285e
1 changed files with 1 additions and 1 deletions
  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)) {