Merge pull request #190 from Oukanina/master

Fix danmaku blocked after fullscreen
This commit is contained in:
DIYgod
2018-01-27 00:13:15 +08:00
committed by GitHub
2 changed files with 10 additions and 4 deletions
+8 -4
View File
@@ -22,14 +22,14 @@
.dplayer-danmaku-bottom {
&.dplayer-danmaku-move {
animation: danmaku-center 6s linear;
animation-play-state: paused;
animation-play-state: inherit;
}
}
.dplayer-danmaku-right {
&.dplayer-danmaku-move {
animation: danmaku 8s linear;
animation-play-state: paused;
animation-play-state: inherit;
}
}
}
@@ -106,8 +106,12 @@
.dplayer-bezel .diplayer-loading-icon {
display: block;
}
}
.dplayer-danmaku .dplayer-danmaku-move {
&.dplayer-loading,
&.dplayer-paused {
.dplayer-danmaku,
.dplayer-danmaku-move {
animation-play-state: paused;
}
}
@@ -165,4 +169,4 @@
left: 0;
margin: 0;
padding: 0;
}
}
+2
View File
@@ -183,6 +183,7 @@ class DPlayer {
}).then(() => {
});
this.time.enable();
this.container.classList.remove('dplayer-paused');
this.container.classList.add('dplayer-playing');
if (this.danmaku) {
this.danmaku.play();
@@ -212,6 +213,7 @@ class DPlayer {
this.video.pause();
this.time.disable();
this.container.classList.remove('dplayer-playing');
this.container.classList.add('dplayer-paused');
if (this.danmaku) {
this.danmaku.pause();
}