eplayer 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/eplayer.js +7 -18
- package/package.json +1 -1
package/docs/eplayer.js
CHANGED
|
@@ -140,11 +140,11 @@ class Eplayer extends HTMLElement {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
alow() {
|
|
143
|
-
console.log(111)
|
|
144
143
|
clearTimeout(this.timer)
|
|
145
144
|
this.$('.mark').style.cursor = 'default'
|
|
145
|
+
this.$('.eplayer').classList.add('hover')
|
|
146
146
|
this.timer = setTimeout(() => {
|
|
147
|
-
this.$('.
|
|
147
|
+
this.$('.eplayer').classList.remove('hover')
|
|
148
148
|
this.$('.mark').style.cursor = 'none'
|
|
149
149
|
}, 5000)
|
|
150
150
|
}
|
|
@@ -226,7 +226,7 @@ class Eplayer extends HTMLElement {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
speed(e) {
|
|
229
|
-
this.video.playbackRate ===
|
|
229
|
+
this.video.playbackRate === 3 ? (this.video.playbackRate = 1) : (this.video.playbackRate = this.video.playbackRate + 0.25)
|
|
230
230
|
this.$('.speed').innerText = this.video.playbackRate + 'x'
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -264,12 +264,9 @@ class Eplayer extends HTMLElement {
|
|
|
264
264
|
bottom:-34px;
|
|
265
265
|
z-index:1;
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
.hover:hover .controls{
|
|
268
268
|
bottom:0;
|
|
269
|
-
|
|
270
|
-
animation-fill-mode: forwards;
|
|
271
|
-
transition: .3s ease-out;
|
|
272
|
-
}
|
|
269
|
+
}
|
|
273
270
|
.progress{
|
|
274
271
|
display:${this.live ? 'none' : 'block'};
|
|
275
272
|
position:relative;
|
|
@@ -334,13 +331,6 @@ class Eplayer extends HTMLElement {
|
|
|
334
331
|
transform: translate(50%,0);
|
|
335
332
|
cursor:pointer;
|
|
336
333
|
z-index:1;
|
|
337
|
-
}
|
|
338
|
-
@keyframes hidden {
|
|
339
|
-
to {
|
|
340
|
-
|
|
341
|
-
transition: .3s ease-out;
|
|
342
|
-
bottom:-34px;
|
|
343
|
-
}
|
|
344
334
|
}
|
|
345
335
|
@keyframes loading{
|
|
346
336
|
0%{
|
|
@@ -423,7 +413,7 @@ class Eplayer extends HTMLElement {
|
|
|
423
413
|
|
|
424
414
|
</style>
|
|
425
415
|
|
|
426
|
-
<div class="eplayer">
|
|
416
|
+
<div class="eplayer hover">
|
|
427
417
|
<div class="danmaku"></div>
|
|
428
418
|
<video id="video" class="video" src="${this.src || ''}"></video>
|
|
429
419
|
<div class="mark loading"></div>
|
|
@@ -451,7 +441,6 @@ class Eplayer extends HTMLElement {
|
|
|
451
441
|
</div>
|
|
452
442
|
</div>
|
|
453
443
|
</div>
|
|
454
|
-
<iconpark-icon icon-id="play"></iconpark-icon>
|
|
455
444
|
<div class="panel"></div>
|
|
456
445
|
</div>
|
|
457
446
|
`
|
|
@@ -534,7 +523,7 @@ class Eplayer extends HTMLElement {
|
|
|
534
523
|
},
|
|
535
524
|
})
|
|
536
525
|
this.delegate('keydown', this.keydown)
|
|
537
|
-
this.delegate('
|
|
526
|
+
this.delegate('mousemove', this.alow)
|
|
538
527
|
this.$('.eplayer').oncontextmenu = () => false
|
|
539
528
|
}
|
|
540
529
|
|