eplayer 1.5.12 → 1.5.13
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 -1
- package/docs/index.html +3 -1
- package/package.json +1 -1
package/docs/eplayer.js
CHANGED
|
@@ -6,13 +6,14 @@ class Eplayer extends HTMLElement {
|
|
|
6
6
|
this.type = this.getAttribute('type')
|
|
7
7
|
this.beatmap = this.getAttribute('beatmap')
|
|
8
8
|
this.height = this.getAttribute('height')
|
|
9
|
+
this.live = JSON.parse(this.getAttribute('live'))
|
|
9
10
|
|
|
10
11
|
this.init()
|
|
11
12
|
this.stream()
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
static get observedAttributes() {
|
|
15
|
-
return ['src', 'type', 'beatmap', 'height']
|
|
16
|
+
return ['src', 'type', 'beatmap', 'height','live']
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
attributeChangedCallback(name, _, newVal) {
|
|
@@ -20,6 +21,7 @@ class Eplayer extends HTMLElement {
|
|
|
20
21
|
if (name === 'type') this.type = newVal
|
|
21
22
|
if (name === 'beatmap') this.beatmap = newVal
|
|
22
23
|
if (name === 'height') this.height = newVal
|
|
24
|
+
if (name === 'live') this.live = JSON.parse(newVal)
|
|
23
25
|
this.stream()
|
|
24
26
|
this.startMug()
|
|
25
27
|
this.video.load()
|
|
@@ -267,6 +269,7 @@ class Eplayer extends HTMLElement {
|
|
|
267
269
|
z-index:1;
|
|
268
270
|
}
|
|
269
271
|
.progress{
|
|
272
|
+
display:${this.live?'none':'block'};
|
|
270
273
|
position:relative;
|
|
271
274
|
bottom:15px;
|
|
272
275
|
left:0;
|
|
@@ -290,6 +293,7 @@ class Eplayer extends HTMLElement {
|
|
|
290
293
|
color:#fff;
|
|
291
294
|
}
|
|
292
295
|
.time{
|
|
296
|
+
display:${this.live?'none':'inline-block'};
|
|
293
297
|
position:relative;
|
|
294
298
|
top:-2px;
|
|
295
299
|
}
|
package/docs/index.html
CHANGED
|
@@ -108,7 +108,9 @@
|
|
|
108
108
|
</script>
|
|
109
109
|
<div class="wrapper">
|
|
110
110
|
|
|
111
|
-
<e-player id="ep"
|
|
111
|
+
<e-player id="ep"
|
|
112
|
+
src="https://a1.alibabausercontent.com/prod/feupload/user/edos8/2f0e7af0-29f1-11ef-b3cd-818e64ac843d.mp4"
|
|
113
|
+
live="false">
|
|
112
114
|
</e-player>
|
|
113
115
|
|
|
114
116
|
<a href="https://github.com/132yse/eplayer">github</a>
|