fix danmaku can not be hideen, close #41

This commit is contained in:
DIYgod 2016-12-21 15:29:06 +08:00
parent e97090fcc0
commit e1a854285e
No known key found for this signature in database
GPG Key ID: F8797DD1088C6506
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {