fix danmaku.show

This commit is contained in:
DIYgod
2017-08-17 00:12:48 +08:00
parent 5f1ff79ab1
commit 4339338d30
6 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ body {
background: #fff;
border: 1px solid #ddd;
border-radius: 4px;
width: 110px;
width: 128px;
height: 40px;
font-size: 14px;
margin: 0 0 10px;
+7 -2
View File
@@ -32,8 +32,13 @@
<h2 id="options">Options</h2>
<div class="example">
<button class="btn" onclick="switchDPlayer()">Switch Video</button>
<button class="btn" onclick="dp2.notice('Notice演示')">Notice</button>
<button class="btn" onclick="dp2.destroy()">Destroy</button>
<button class="btn" onclick="dp2.notice('Notice演示')">notice</button>
<button class="btn" onclick="dp2.seek(120)">seek</button>
<button class="btn" onclick="dp2.volume(0.2)">volume</button>
<button class="btn" onclick="dp2.toggle()">toggle</button>
<button class="btn" onclick="dp2.destroy()">destroy</button>
<button class="btn" onclick="dp2.danmaku.hide()">danmaku.hide</button>
<button class="btn" onclick="dp2.danmaku.show()">danmaku.show</button>
<div id="dplayer2"></div>
<script>
var dp2 = new DPlayer({
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -412,7 +412,6 @@ class DPlayer {
showDanToggle.checked = !showDanToggle.checked;
if (showDanToggle.checked) {
showdan = true;
this.danmaku.seek();
if (!this.paused) {
this.danmaku.show();
}
+1 -1
View File
@@ -299,8 +299,8 @@ class Danmaku {
}
show () {
this.showing = true;
this.seek();
this.showing = true;
this.play();
}
}