eplayer 1.5.7 → 1.5.8
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 +5 -3
- package/docs/index.html +3 -1
- package/package.json +1 -1
package/docs/eplayer.js
CHANGED
|
@@ -12,13 +12,14 @@ class Eplayer extends HTMLElement {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
static get observedAttributes() {
|
|
15
|
-
return ['src', 'type', 'beatmap']
|
|
15
|
+
return ['src', 'type', 'beatmap', 'height']
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
attributeChangedCallback(name, _, newVal) {
|
|
19
19
|
if (name === 'src') this.src = this.$('.video').src = newVal
|
|
20
20
|
if (name === 'type') this.type = newVal
|
|
21
21
|
if (name === 'beatmap') this.beatmap = newVal
|
|
22
|
+
if (name === 'height') this.height = newVal
|
|
22
23
|
this.stream()
|
|
23
24
|
this.startMug()
|
|
24
25
|
this.video.load()
|
|
@@ -36,6 +37,8 @@ class Eplayer extends HTMLElement {
|
|
|
36
37
|
|
|
37
38
|
startMug() {
|
|
38
39
|
this.$('.mug').style.display = 'block'
|
|
40
|
+
this.$('.mug').style.height = this.height + 'px'
|
|
41
|
+
this.$('.mug').style.width = (this.height / 8 * 5) + 'px'
|
|
39
42
|
this.$('.ep-video').style.display = 'none'
|
|
40
43
|
this.$('.controls').style.display = 'none'
|
|
41
44
|
if (!this.beatmap) return
|
|
@@ -436,7 +439,7 @@ class Eplayer extends HTMLElement {
|
|
|
436
439
|
}
|
|
437
440
|
.mug {
|
|
438
441
|
height: ${this.height}px;
|
|
439
|
-
width: ${this.height/8*5}px;
|
|
442
|
+
width: ${this.height / 8 * 5}px;
|
|
440
443
|
position: absolute;
|
|
441
444
|
z-index: 999;
|
|
442
445
|
/* pointer-events: none; */
|
|
@@ -448,7 +451,6 @@ class Eplayer extends HTMLElement {
|
|
|
448
451
|
}
|
|
449
452
|
.wrap{
|
|
450
453
|
position: relative;
|
|
451
|
-
// height: ${this.height}px;
|
|
452
454
|
}
|
|
453
455
|
</style>
|
|
454
456
|
<div class="wrap">
|
package/docs/index.html
CHANGED
|
@@ -102,12 +102,14 @@
|
|
|
102
102
|
</style>
|
|
103
103
|
<script>
|
|
104
104
|
setTimeout(() => {
|
|
105
|
+
document.querySelector('e-player').setAttribute('height', '450')
|
|
106
|
+
|
|
105
107
|
document.querySelector('e-player').setAttribute('beatmap', '1:2|2:1|3:3|4:4|6:2|6:1|7:3|8:4|8:2|9:1|11:3|12:4|12:2|13:1|14:3|15:4|16:2|16:1|17:3|19:4|19:2|20:1|21:3|22:4')
|
|
106
108
|
}, 1000)
|
|
107
109
|
</script>
|
|
108
110
|
<div class="wrapper">
|
|
109
111
|
|
|
110
|
-
<e-player id="ep" src="https://mp4.ziyuan.wang/view.php/67c796ed2dad70c429bda73a647704f0.mp4"
|
|
112
|
+
<e-player id="ep" src="https://mp4.ziyuan.wang/view.php/67c796ed2dad70c429bda73a647704f0.mp4">
|
|
111
113
|
</e-player>
|
|
112
114
|
|
|
113
115
|
<a href="https://github.com/132yse/eplayer">github</a>
|