@vindral/web-sdk 4.1.8 → 4.1.9-10-g6fb644c9
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/{Bfrv5P6J.js → BNXS4brp.js} +1 -1
- package/{47j9Rb9g.js → C6dcH4vo.js} +2448 -2330
- package/{C7zQi7LX.js → CgubnBAa.js} +1 -1
- package/api-client.d.ts +53 -49
- package/cast-sender.d.ts +44 -11
- package/core.d.ts +164 -128
- package/core.js +1 -1
- package/legacy.d.ts +164 -128
- package/legacy.es.js +3250 -3132
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.d.ts +161 -122
- package/player.js +769 -731
- package/react.d.ts +161 -122
package/player.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var $o = Object.defineProperty;
|
|
2
|
+
var Go = Object.getPrototypeOf;
|
|
3
|
+
var Ko = Reflect.get;
|
|
4
|
+
var fr = (c) => {
|
|
5
5
|
throw TypeError(c);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
var m = (c, a, t) =>
|
|
9
|
-
var e = (c, a, t) => (
|
|
10
|
-
var
|
|
7
|
+
var qo = (c, a, t) => a in c ? $o(c, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[a] = t;
|
|
8
|
+
var m = (c, a, t) => qo(c, typeof a != "symbol" ? a + "" : a, t), nn = (c, a, t) => a.has(c) || fr("Cannot " + t);
|
|
9
|
+
var e = (c, a, t) => (nn(c, a, "read from private field"), t ? t.call(c) : a.get(c)), l = (c, a, t) => a.has(c) ? fr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(c) : a.set(c, t), d = (c, a, t, i) => (nn(c, a, "write to private field"), i ? i.call(c, t) : a.set(c, t), t), n = (c, a, t) => (nn(c, a, "access private method"), t);
|
|
10
|
+
var gr = (c, a, t, i) => ({
|
|
11
11
|
set _(s) {
|
|
12
12
|
d(c, a, s, t);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
15
|
return e(c, a, i);
|
|
16
16
|
}
|
|
17
|
-
}), J = (c, a, t) =>
|
|
17
|
+
}), J = (c, a, t) => Ko(Go(c), t, a);
|
|
18
18
|
var B = (c, a, t) => new Promise((i, s) => {
|
|
19
19
|
var o = (v) => {
|
|
20
20
|
try {
|
|
@@ -31,11 +31,11 @@ var B = (c, a, t) => new Promise((i, s) => {
|
|
|
31
31
|
}, p = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, u);
|
|
32
32
|
p((t = t.apply(c, a)).next());
|
|
33
33
|
});
|
|
34
|
-
import { L as Tr, V as
|
|
34
|
+
import { L as Tr, V as Vo, i as Xo, C as jo, A as Yo, a as Jo, b as Wo } from "./C6dcH4vo.js";
|
|
35
35
|
import { E as ds } from "./Bx7s5QdT.js";
|
|
36
|
-
import { CastSender as
|
|
37
|
-
import { A as
|
|
38
|
-
const
|
|
36
|
+
import { CastSender as Qo } from "./cast-sender.js";
|
|
37
|
+
import { A as Zo, d as tl } from "./CPEMXA01.js";
|
|
38
|
+
const ln = 1e3, hn = ln * 1e3, Er = hn * 1e3, rn = (c, a, t) => c % a === 0 ? c / a : (c / a).toFixed(t), el = (c, a = 1) => c >= Er ? `${rn(c, Er, a)} Gbit/s` : c >= hn ? `${rn(c, hn, a)} Mbit/s` : c >= ln ? `${rn(c, ln, a)} Kbit/s` : `${c} bit/s`, il = ({ width: c, height: a }) => `${c}x${a}`, sl = ({
|
|
39
39
|
title: c,
|
|
40
40
|
subTitle: a = "Live stream",
|
|
41
41
|
poster: t
|
|
@@ -109,20 +109,24 @@ const on = 1e3, ln = on * 1e3, gr = ln * 1e3, nn = (c, a, t) => c % a === 0 ? c
|
|
|
109
109
|
SEEK: "seek",
|
|
110
110
|
GO_LIVE: "go-live"
|
|
111
111
|
};
|
|
112
|
-
function
|
|
112
|
+
function Sr(c) {
|
|
113
113
|
return c === "audio" || c === "video" || c === "audio+video" ? c : "audio+video";
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function an(c) {
|
|
116
116
|
return c === "trace" || c === "debug" || c === "info" || c === "warn" || c === "error" || c === "off" ? c : "off";
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function nl(c) {
|
|
119
119
|
if (c === null)
|
|
120
120
|
return;
|
|
121
121
|
const a = c.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
|
|
122
122
|
if (a.length !== 0)
|
|
123
123
|
return a;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function rl(c) {
|
|
126
|
+
if (c === "no-preference" || c === "prefer-hardware" || c === "prefer-software")
|
|
127
|
+
return c;
|
|
128
|
+
}
|
|
129
|
+
function al(c) {
|
|
126
130
|
if (c !== null)
|
|
127
131
|
try {
|
|
128
132
|
const a = JSON.parse(c);
|
|
@@ -135,7 +139,7 @@ function el(c) {
|
|
|
135
139
|
return;
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
|
-
function
|
|
142
|
+
function ol(c) {
|
|
139
143
|
if (c !== null)
|
|
140
144
|
try {
|
|
141
145
|
const a = JSON.parse(c);
|
|
@@ -161,16 +165,16 @@ function Wt(c) {
|
|
|
161
165
|
function x(c) {
|
|
162
166
|
return typeof c == "string";
|
|
163
167
|
}
|
|
164
|
-
function
|
|
168
|
+
function P(c, a) {
|
|
165
169
|
if (c === null)
|
|
166
170
|
return a != null ? a : void 0;
|
|
167
171
|
const t = c.toLowerCase();
|
|
168
172
|
return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
|
|
169
173
|
}
|
|
170
|
-
function
|
|
174
|
+
function Cr(c, a) {
|
|
171
175
|
return c === null ? a != null ? a : void 0 : c === "" || c.toLowerCase() === "true" ? !0 : c.toLowerCase() === "false" ? !1 : c;
|
|
172
176
|
}
|
|
173
|
-
function
|
|
177
|
+
function vs(c) {
|
|
174
178
|
if (c === null)
|
|
175
179
|
return;
|
|
176
180
|
const a = {}, t = c.split(",");
|
|
@@ -180,14 +184,14 @@ function ms(c) {
|
|
|
180
184
|
}
|
|
181
185
|
return Object.keys(a).length > 0 ? a : void 0;
|
|
182
186
|
}
|
|
183
|
-
function
|
|
187
|
+
function fs(c) {
|
|
184
188
|
if (c === null)
|
|
185
189
|
return;
|
|
186
190
|
const a = c.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
187
191
|
return a.length > 0 ? a : void 0;
|
|
188
192
|
}
|
|
189
|
-
const
|
|
190
|
-
|
|
193
|
+
const xr = document.createElement("template");
|
|
194
|
+
xr.innerHTML = /* HTML */
|
|
191
195
|
`
|
|
192
196
|
<style>
|
|
193
197
|
:host {
|
|
@@ -259,7 +263,7 @@ class rt extends HTMLElement {
|
|
|
259
263
|
}
|
|
260
264
|
this.addEventListener("keyup", e(this, ie), { once: !0 });
|
|
261
265
|
});
|
|
262
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
266
|
+
this.attachShadow({ mode: "open" }).appendChild(xr.content.cloneNode(!0));
|
|
263
267
|
}
|
|
264
268
|
get keysUsed() {
|
|
265
269
|
return ["Enter", " "];
|
|
@@ -283,13 +287,13 @@ class rt extends HTMLElement {
|
|
|
283
287
|
}
|
|
284
288
|
}
|
|
285
289
|
ge = new WeakMap(), ai = new WeakMap(), ie = new WeakMap(), oi = new WeakMap(), m(rt, "observedAttributes", ["disabled"]);
|
|
286
|
-
const
|
|
290
|
+
const Nr = document.createElement("template"), Ar = (
|
|
287
291
|
/* SVG */
|
|
288
292
|
`
|
|
289
293
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" ><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 18a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-12a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3" /><path d="M9 20h6l-3 -5z" /></svg>
|
|
290
294
|
`
|
|
291
295
|
);
|
|
292
|
-
|
|
296
|
+
Nr.innerHTML = /* HTML */
|
|
293
297
|
`
|
|
294
298
|
<style>
|
|
295
299
|
:host {
|
|
@@ -310,26 +314,26 @@ xr.innerHTML = /* HTML */
|
|
|
310
314
|
</style>
|
|
311
315
|
|
|
312
316
|
<slot name="icon">
|
|
313
|
-
<slot name="enter">${
|
|
314
|
-
<slot name="exit">${
|
|
317
|
+
<slot name="enter">${Ar}</slot>
|
|
318
|
+
<slot name="exit">${Ar}</slot>
|
|
315
319
|
</slot>
|
|
316
320
|
`;
|
|
317
|
-
var li,
|
|
321
|
+
var li, cn;
|
|
318
322
|
const Ve = class Ve extends rt {
|
|
319
323
|
constructor() {
|
|
320
324
|
var t;
|
|
321
325
|
super();
|
|
322
326
|
l(this, li);
|
|
323
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
327
|
+
(t = this.shadowRoot) == null || t.appendChild(Nr.content.cloneNode(!0));
|
|
324
328
|
}
|
|
325
329
|
connectedCallback() {
|
|
326
|
-
super.connectedCallback(), n(this, li,
|
|
330
|
+
super.connectedCallback(), n(this, li, cn).call(this);
|
|
327
331
|
}
|
|
328
332
|
disconnectedCallback() {
|
|
329
333
|
super.disconnectedCallback();
|
|
330
334
|
}
|
|
331
335
|
attributeChangedCallback(t, i, s) {
|
|
332
|
-
super.attributeChangedCallback(t, i, s), t === r.IS_AIRPLAYING && n(this, li,
|
|
336
|
+
super.attributeChangedCallback(t, i, s), t === r.IS_AIRPLAYING && n(this, li, cn).call(this);
|
|
333
337
|
}
|
|
334
338
|
set isAirPlaying(t) {
|
|
335
339
|
t ? this.setAttribute(r.IS_AIRPLAYING, "") : this.removeAttribute(r.IS_AIRPLAYING);
|
|
@@ -341,15 +345,15 @@ const Ve = class Ve extends rt {
|
|
|
341
345
|
this.dispatchEvent(new CustomEvent(k.REQUEST_AIRPLAY, { bubbles: !0, composed: !0 }));
|
|
342
346
|
}
|
|
343
347
|
};
|
|
344
|
-
li = new WeakSet(),
|
|
348
|
+
li = new WeakSet(), cn = function() {
|
|
345
349
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
346
350
|
}, m(Ve, "observedAttributes", [
|
|
347
351
|
...J(Ve, Ve, "observedAttributes"),
|
|
348
352
|
r.AIRPLAY_AVAILABLE,
|
|
349
353
|
r.IS_AIRPLAYING
|
|
350
354
|
]);
|
|
351
|
-
let
|
|
352
|
-
const
|
|
355
|
+
let dn = Ve;
|
|
356
|
+
const Rr = document.createElement("template"), ll = (
|
|
353
357
|
/* SVG */
|
|
354
358
|
`
|
|
355
359
|
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -388,7 +392,7 @@ const Nr = document.createElement("template"), sl = (
|
|
|
388
392
|
</svg>
|
|
389
393
|
`
|
|
390
394
|
);
|
|
391
|
-
|
|
395
|
+
Rr.innerHTML = /* HTML */
|
|
392
396
|
`
|
|
393
397
|
<style>
|
|
394
398
|
:host {
|
|
@@ -404,14 +408,14 @@ Nr.innerHTML = /* HTML */
|
|
|
404
408
|
}
|
|
405
409
|
</style>
|
|
406
410
|
|
|
407
|
-
<slot name="icon">${
|
|
411
|
+
<slot name="icon">${ll}</slot>
|
|
408
412
|
`;
|
|
409
413
|
var Ee;
|
|
410
|
-
class
|
|
414
|
+
class Ur extends HTMLElement {
|
|
411
415
|
constructor() {
|
|
412
416
|
super();
|
|
413
417
|
l(this, Ee, null);
|
|
414
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
418
|
+
this.attachShadow({ mode: "open" }).appendChild(Rr.content.cloneNode(!0));
|
|
415
419
|
}
|
|
416
420
|
connectedCallback() {
|
|
417
421
|
var t;
|
|
@@ -422,9 +426,9 @@ class Rr extends HTMLElement {
|
|
|
422
426
|
(t = e(this, Ee)) == null || t.disconnectListener(this);
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
|
-
Ee = new WeakMap(), m(
|
|
426
|
-
const
|
|
427
|
-
|
|
429
|
+
Ee = new WeakMap(), m(Ur, "observedAttributes", [r.BUFFERING]);
|
|
430
|
+
const Pr = document.createElement("template");
|
|
431
|
+
Pr.innerHTML = /* HTML */
|
|
428
432
|
`
|
|
429
433
|
<style>
|
|
430
434
|
:host {
|
|
@@ -483,11 +487,11 @@ Ur.innerHTML = /* HTML */
|
|
|
483
487
|
<div id="buffering-indicator"></div>
|
|
484
488
|
`;
|
|
485
489
|
var Ae;
|
|
486
|
-
class
|
|
490
|
+
class _r extends HTMLElement {
|
|
487
491
|
constructor() {
|
|
488
492
|
super();
|
|
489
493
|
l(this, Ae, null);
|
|
490
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
494
|
+
this.attachShadow({ mode: "open" }).appendChild(Pr.content.cloneNode(!0));
|
|
491
495
|
}
|
|
492
496
|
connectedCallback() {
|
|
493
497
|
var t;
|
|
@@ -498,9 +502,9 @@ class Pr extends HTMLElement {
|
|
|
498
502
|
(t = e(this, Ae)) == null || t.disconnectListener(this);
|
|
499
503
|
}
|
|
500
504
|
}
|
|
501
|
-
Ae = new WeakMap(), m(
|
|
502
|
-
const
|
|
503
|
-
|
|
505
|
+
Ae = new WeakMap(), m(_r, "observedAttributes", [r.BUFFERING]);
|
|
506
|
+
const Mr = document.createElement("template");
|
|
507
|
+
Mr.innerHTML = /* HTML */
|
|
504
508
|
`
|
|
505
509
|
<style>
|
|
506
510
|
:host {
|
|
@@ -525,22 +529,22 @@ _r.innerHTML = /* HTML */
|
|
|
525
529
|
}
|
|
526
530
|
</style>
|
|
527
531
|
`;
|
|
528
|
-
var ve,
|
|
532
|
+
var ve, pn, Dr;
|
|
529
533
|
const Xe = class Xe extends rt {
|
|
530
534
|
constructor() {
|
|
531
535
|
var t;
|
|
532
536
|
super();
|
|
533
537
|
l(this, ve);
|
|
534
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
538
|
+
(t = this.shadowRoot) == null || t.appendChild(Mr.content.cloneNode(!0));
|
|
535
539
|
}
|
|
536
540
|
connectedCallback() {
|
|
537
|
-
super.connectedCallback(), n(this, ve,
|
|
541
|
+
super.connectedCallback(), n(this, ve, pn).call(this);
|
|
538
542
|
}
|
|
539
543
|
disconnectedCallback() {
|
|
540
544
|
super.disconnectedCallback();
|
|
541
545
|
}
|
|
542
546
|
attributeChangedCallback(t, i, s) {
|
|
543
|
-
super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this, ve,
|
|
547
|
+
super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this, ve, Dr).call(this), t === r.IS_CASTING && n(this, ve, pn).call(this);
|
|
544
548
|
}
|
|
545
549
|
set isCasting(t) {
|
|
546
550
|
t ? this.setAttribute(r.IS_CASTING, "") : this.removeAttribute(r.IS_CASTING);
|
|
@@ -551,9 +555,9 @@ const Xe = class Xe extends rt {
|
|
|
551
555
|
handleClick(t) {
|
|
552
556
|
}
|
|
553
557
|
};
|
|
554
|
-
ve = new WeakSet(),
|
|
558
|
+
ve = new WeakSet(), pn = function() {
|
|
555
559
|
this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
|
|
556
|
-
},
|
|
560
|
+
}, Dr = function() {
|
|
557
561
|
var t, i;
|
|
558
562
|
if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
|
|
559
563
|
const s = document.createElement("google-cast-launcher");
|
|
@@ -564,9 +568,9 @@ ve = new WeakSet(), un = function() {
|
|
|
564
568
|
r.CAST_AVAILABLE,
|
|
565
569
|
r.IS_CASTING
|
|
566
570
|
]);
|
|
567
|
-
let
|
|
568
|
-
const
|
|
569
|
-
|
|
571
|
+
let un = Xe;
|
|
572
|
+
const Fr = document.createElement("template");
|
|
573
|
+
Fr.innerHTML = /* HTML */
|
|
570
574
|
`
|
|
571
575
|
<style>
|
|
572
576
|
:host {
|
|
@@ -603,12 +607,12 @@ Dr.innerHTML = /* HTML */
|
|
|
603
607
|
<span id="text"></span>
|
|
604
608
|
`;
|
|
605
609
|
var ye, ke;
|
|
606
|
-
class
|
|
610
|
+
class Or extends HTMLElement {
|
|
607
611
|
constructor() {
|
|
608
612
|
super();
|
|
609
613
|
l(this, ye, null);
|
|
610
614
|
l(this, ke, null);
|
|
611
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
615
|
+
this.attachShadow({ mode: "open" }).appendChild(Fr.content.cloneNode(!0));
|
|
612
616
|
}
|
|
613
617
|
connectedCallback() {
|
|
614
618
|
var t, i;
|
|
@@ -622,18 +626,18 @@ class Fr extends HTMLElement {
|
|
|
622
626
|
i === s || !e(this, ke) || t === "cast-receiver-name" && typeof s == "string" && (e(this, ke).innerText = `Casting to ${s || "device"}`);
|
|
623
627
|
}
|
|
624
628
|
}
|
|
625
|
-
ye = new WeakMap(), ke = new WeakMap(), m(
|
|
626
|
-
function
|
|
629
|
+
ye = new WeakMap(), ke = new WeakMap(), m(Or, "observedAttributes", [r.IS_CASTING, r.CAST_RECEIVER_NAME]);
|
|
630
|
+
function Hr(c = document) {
|
|
627
631
|
const a = c == null ? void 0 : c.activeElement;
|
|
628
632
|
if (!a) return null;
|
|
629
633
|
if (a.shadowRoot) {
|
|
630
|
-
const t =
|
|
634
|
+
const t = Hr(a.shadowRoot);
|
|
631
635
|
return t != null ? t : a;
|
|
632
636
|
}
|
|
633
637
|
return a;
|
|
634
638
|
}
|
|
635
|
-
const
|
|
636
|
-
|
|
639
|
+
const zr = document.createElement("template");
|
|
640
|
+
zr.innerHTML = /* HTML */
|
|
637
641
|
`
|
|
638
642
|
<style>
|
|
639
643
|
:host {
|
|
@@ -701,13 +705,13 @@ Hr.innerHTML = /* HTML */
|
|
|
701
705
|
<slot></slot>
|
|
702
706
|
`;
|
|
703
707
|
var se;
|
|
704
|
-
class
|
|
708
|
+
class dr extends HTMLElement {
|
|
705
709
|
constructor() {
|
|
706
710
|
super();
|
|
707
711
|
l(this, se);
|
|
708
712
|
m(this, "lastThumbnailUpdate");
|
|
709
713
|
const t = this.attachShadow({ mode: "open" });
|
|
710
|
-
d(this, se, document.createElement("span")), e(this, se).className = "channel-title", t.appendChild(e(this, se)), t.appendChild(
|
|
714
|
+
d(this, se, document.createElement("span")), e(this, se).className = "channel-title", t.appendChild(e(this, se)), t.appendChild(zr.content.cloneNode(!0));
|
|
711
715
|
}
|
|
712
716
|
attributeChangedCallback(t, i, s) {
|
|
713
717
|
if (i !== s)
|
|
@@ -727,9 +731,9 @@ class hr extends HTMLElement {
|
|
|
727
731
|
p && o.searchParams.set("auth.token", p), o.searchParams.set("t", Date.now().toString()), u.src = o.toString(), u.onload = () => this.style.backgroundImage = `url(${o.toString()})`;
|
|
728
732
|
}
|
|
729
733
|
}
|
|
730
|
-
se = new WeakMap(), m(
|
|
731
|
-
const
|
|
732
|
-
|
|
734
|
+
se = new WeakMap(), m(dr, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
|
|
735
|
+
const Br = document.createElement("template");
|
|
736
|
+
Br.innerHTML = /* HTML */
|
|
733
737
|
`
|
|
734
738
|
<style>
|
|
735
739
|
:host {
|
|
@@ -797,8 +801,8 @@ zr.innerHTML = /* HTML */
|
|
|
797
801
|
<slot name="grid" id="grid"></slot>
|
|
798
802
|
</div>
|
|
799
803
|
`;
|
|
800
|
-
var Rt, Ut, Ie, X,
|
|
801
|
-
class
|
|
804
|
+
var Rt, Ut, Ie, X, M, we, hi, di, ci, S, Gr, Kr, qr, bn, Vr, Xr, jr, Yr, Jr, Wr, Qr, $e;
|
|
805
|
+
class $r extends HTMLElement {
|
|
802
806
|
constructor() {
|
|
803
807
|
super();
|
|
804
808
|
l(this, S);
|
|
@@ -806,20 +810,20 @@ class Br extends HTMLElement {
|
|
|
806
810
|
l(this, Ut, null);
|
|
807
811
|
l(this, Ie, []);
|
|
808
812
|
l(this, X, []);
|
|
809
|
-
l(this,
|
|
810
|
-
l(this,
|
|
813
|
+
l(this, M);
|
|
814
|
+
l(this, we);
|
|
811
815
|
l(this, hi);
|
|
812
816
|
l(this, di);
|
|
813
817
|
l(this, ci);
|
|
814
818
|
m(this, "handleEvent", (t) => {
|
|
815
|
-
t.type === "keydown" && n(this, S,
|
|
819
|
+
t.type === "keydown" && n(this, S, Wr).call(this, t);
|
|
816
820
|
});
|
|
817
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
821
|
+
this.attachShadow({ mode: "open" }).appendChild(Br.content.cloneNode(!0));
|
|
818
822
|
}
|
|
819
823
|
connectedCallback() {
|
|
820
824
|
var t, i, s;
|
|
821
|
-
d(this, Ut, this.closest("vindral-controller")), (t = e(this, Ut)) == null || t.connectListener(this), n(this, S,
|
|
822
|
-
n(this, S,
|
|
825
|
+
d(this, Ut, this.closest("vindral-controller")), (t = e(this, Ut)) == null || t.connectListener(this), n(this, S, Gr).call(this), (s = e(this, Rt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), n(this, S, bn).call(this), d(this, hi, window.setInterval(() => {
|
|
826
|
+
n(this, S, Yr).call(this);
|
|
823
827
|
}, 1e4));
|
|
824
828
|
}
|
|
825
829
|
disconnectedCallback() {
|
|
@@ -830,14 +834,14 @@ class Br extends HTMLElement {
|
|
|
830
834
|
if (i !== s)
|
|
831
835
|
switch (t) {
|
|
832
836
|
case r.CHANNEL_ID: {
|
|
833
|
-
n(this, S,
|
|
837
|
+
n(this, S, jr).call(this, s);
|
|
834
838
|
break;
|
|
835
839
|
}
|
|
836
840
|
case r.CHANNELS:
|
|
837
|
-
d(this, Ie, JSON.parse(s)), n(this, S,
|
|
841
|
+
d(this, Ie, JSON.parse(s)), n(this, S, bn).call(this);
|
|
838
842
|
break;
|
|
839
843
|
case "authentication-token":
|
|
840
|
-
d(this,
|
|
844
|
+
d(this, we, s);
|
|
841
845
|
break;
|
|
842
846
|
}
|
|
843
847
|
}
|
|
@@ -846,22 +850,22 @@ class Br extends HTMLElement {
|
|
|
846
850
|
}
|
|
847
851
|
focus() {
|
|
848
852
|
var t;
|
|
849
|
-
d(this, di,
|
|
853
|
+
d(this, di, Hr()), (t = e(this, M)) == null || t.focus();
|
|
850
854
|
}
|
|
851
855
|
}
|
|
852
|
-
Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(),
|
|
856
|
+
Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), M = new WeakMap(), we = new WeakMap(), hi = new WeakMap(), di = new WeakMap(), ci = new WeakMap(), S = new WeakSet(), Gr = function() {
|
|
853
857
|
d(this, Rt, new IntersectionObserver(
|
|
854
858
|
(t) => {
|
|
855
859
|
t.forEach((i) => {
|
|
856
860
|
const { target: s, isIntersecting: o } = i;
|
|
857
|
-
s instanceof
|
|
861
|
+
s instanceof dr ? n(this, S, qr).call(this, s, o) : n(this, S, Kr).call(this, o);
|
|
858
862
|
});
|
|
859
863
|
},
|
|
860
864
|
{
|
|
861
865
|
root: e(this, Ut)
|
|
862
866
|
}
|
|
863
867
|
));
|
|
864
|
-
},
|
|
868
|
+
}, Kr = function(t) {
|
|
865
869
|
var i, s;
|
|
866
870
|
if (t) {
|
|
867
871
|
this.dispatchEvent(new CustomEvent(k.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 }));
|
|
@@ -871,20 +875,20 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
|
|
|
871
875
|
this.focus(), (u = this.parentElement) == null || u.removeEventListener("scroll", o);
|
|
872
876
|
}, 100));
|
|
873
877
|
};
|
|
874
|
-
(i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this,
|
|
878
|
+
(i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this, M) && (e(this, M).tabIndex = 0);
|
|
875
879
|
} else
|
|
876
|
-
e(this,
|
|
877
|
-
},
|
|
880
|
+
e(this, M) && (e(this, M).tabIndex = -1), this.dispatchEvent(new CustomEvent(k.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), (s = e(this, di)) == null || s.focus(), this.removeEventListener("keydown", this);
|
|
881
|
+
}, qr = function(t, i) {
|
|
878
882
|
i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
|
|
879
|
-
},
|
|
883
|
+
}, bn = function() {
|
|
880
884
|
var o;
|
|
881
885
|
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=grid]"), i = new Map(e(this, X).map((u) => [u.id, u])), s = this.getAttribute("channel-id");
|
|
882
886
|
d(this, X, e(this, Ie).map((u) => {
|
|
883
887
|
var A;
|
|
884
888
|
const p = i.get(u.channelId);
|
|
885
889
|
if (p)
|
|
886
|
-
return n(this, S,
|
|
887
|
-
const v = n(this, S,
|
|
890
|
+
return n(this, S, Vr).call(this, p.element, u), p;
|
|
891
|
+
const v = n(this, S, Xr).call(this, u, s);
|
|
888
892
|
return (A = e(this, Rt)) == null || A.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
|
|
889
893
|
})), i.forEach((u, p) => {
|
|
890
894
|
var v;
|
|
@@ -892,30 +896,30 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
|
|
|
892
896
|
}), e(this, X).sort((u, p) => u.element.hasAttribute("offline") && !p.element.hasAttribute("offline") ? 1 : -1).forEach((u) => {
|
|
893
897
|
t.contains(u.element) || t.appendChild(u.element);
|
|
894
898
|
});
|
|
895
|
-
}, qr = function(t, i) {
|
|
896
|
-
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
897
899
|
}, Vr = function(t, i) {
|
|
900
|
+
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
901
|
+
}, Xr = function(t, i) {
|
|
898
902
|
const s = document.createElement("vindral-channel-grid-item");
|
|
899
|
-
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this,
|
|
900
|
-
},
|
|
903
|
+
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, we) && s.setAttribute("authentication-token", e(this, we)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), d(this, M, s)), s.tabIndex = -1, s.onclick = () => n(this, S, Jr).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
|
|
904
|
+
}, jr = function(t) {
|
|
901
905
|
e(this, X).forEach((i) => {
|
|
902
|
-
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, d(this,
|
|
906
|
+
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, d(this, M, i.element)) : (i.element.tabIndex = -1, i.element.setAttribute("aria-selected", "false"));
|
|
903
907
|
});
|
|
904
|
-
},
|
|
908
|
+
}, Yr = function() {
|
|
905
909
|
this.hasAttribute("hidden") || e(this, X).forEach((t) => t.element.updateThumbnail());
|
|
906
|
-
},
|
|
910
|
+
}, Jr = function(t) {
|
|
907
911
|
var i;
|
|
908
912
|
(i = e(this, Ut)) == null || i.setAttribute("channel-id", t.channelId);
|
|
909
|
-
},
|
|
913
|
+
}, Wr = function(t) {
|
|
910
914
|
var p, v, A;
|
|
911
915
|
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
912
|
-
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((p = this.parentElement) == null || p.removeAttribute("open"), (v = e(this, Ut)) == null || v.focus()) : i === "Enter" || i === " " ? (A = e(this,
|
|
913
|
-
},
|
|
916
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((p = this.parentElement) == null || p.removeAttribute("open"), (v = e(this, Ut)) == null || v.focus()) : i === "Enter" || i === " " ? (A = e(this, M)) == null || A.click() : n(this, S, Qr).call(this, t));
|
|
917
|
+
}, Qr = function(t) {
|
|
914
918
|
var p;
|
|
915
|
-
if (!e(this,
|
|
919
|
+
if (!e(this, M)) return;
|
|
916
920
|
const { key: i } = t;
|
|
917
|
-
let o = e(this, X).findIndex((v) => v.element === e(this,
|
|
918
|
-
const u = e(this,
|
|
921
|
+
let o = e(this, X).findIndex((v) => v.element === e(this, M));
|
|
922
|
+
const u = e(this, M).getBoundingClientRect();
|
|
919
923
|
switch (i) {
|
|
920
924
|
case "ArrowUp":
|
|
921
925
|
if (o = n(this, S, $e).call(this, u, -1, 0), o < 0) {
|
|
@@ -942,7 +946,7 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
|
|
|
942
946
|
if (o >= 0 && o < e(this, X).length) {
|
|
943
947
|
const v = e(this, X)[o];
|
|
944
948
|
if (!v) return;
|
|
945
|
-
e(this,
|
|
949
|
+
e(this, M).setAttribute("aria-selected", "false"), e(this, M).tabIndex = -1, d(this, M, v.element), e(this, M).setAttribute("aria-selected", "true"), e(this, M).tabIndex = 0, e(this, M).focus();
|
|
946
950
|
}
|
|
947
951
|
}, $e = function(t, i, s) {
|
|
948
952
|
let o = -1, u = 1 / 0;
|
|
@@ -953,14 +957,14 @@ Rt = new WeakMap(), Ut = new WeakMap(), Ie = new WeakMap(), X = new WeakMap(), _
|
|
|
953
957
|
at < u && (u = at, o = v);
|
|
954
958
|
}
|
|
955
959
|
}), o;
|
|
956
|
-
}, m(
|
|
960
|
+
}, m($r, "observedAttributes", [
|
|
957
961
|
r.CHANNELS,
|
|
958
962
|
r.CHANNEL_ID,
|
|
959
963
|
r.AUTHENTICATION_TOKEN,
|
|
960
964
|
"mode",
|
|
961
965
|
"hidden"
|
|
962
966
|
]);
|
|
963
|
-
const
|
|
967
|
+
const hl = (
|
|
964
968
|
/* SVG */
|
|
965
969
|
`
|
|
966
970
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -971,8 +975,8 @@ const nl = (
|
|
|
971
975
|
<path d="M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" />
|
|
972
976
|
</svg>
|
|
973
977
|
`
|
|
974
|
-
),
|
|
975
|
-
|
|
978
|
+
), Zr = document.createElement("template");
|
|
979
|
+
Zr.innerHTML = /* HTML */
|
|
976
980
|
`
|
|
977
981
|
<style>
|
|
978
982
|
:host {
|
|
@@ -986,48 +990,48 @@ Qr.innerHTML = /* HTML */
|
|
|
986
990
|
display: none;
|
|
987
991
|
}
|
|
988
992
|
</style>
|
|
989
|
-
<slot name="button">${
|
|
993
|
+
<slot name="button">${hl}</slot>
|
|
990
994
|
`;
|
|
991
|
-
var
|
|
995
|
+
var Te, G, tt, Ns, $, ta, vn, gs, fn, gn;
|
|
992
996
|
const je = class je extends rt {
|
|
993
997
|
constructor() {
|
|
994
998
|
var t, i;
|
|
995
999
|
super();
|
|
996
1000
|
l(this, $);
|
|
997
|
-
l(this,
|
|
1001
|
+
l(this, Te);
|
|
998
1002
|
l(this, G);
|
|
999
1003
|
l(this, tt);
|
|
1000
|
-
l(this,
|
|
1001
|
-
t.composedPath().includes(this) || n(this, $,
|
|
1004
|
+
l(this, Ns, (t) => {
|
|
1005
|
+
t.composedPath().includes(this) || n(this, $, gs).call(this);
|
|
1002
1006
|
});
|
|
1003
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1007
|
+
(t = this.shadowRoot) == null || t.appendChild(Zr.content.cloneNode(!0)), d(this, Te, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
|
|
1004
1008
|
}
|
|
1005
1009
|
connectedCallback() {
|
|
1006
1010
|
var i;
|
|
1007
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), n(this, $,
|
|
1011
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), n(this, $, fn).call(this);
|
|
1008
1012
|
const t = this.getRootNode();
|
|
1009
|
-
(t instanceof Document || t instanceof ShadowRoot) && (d(this, G, t.querySelector("vindral-channel-grid")), ((i = e(this, G).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, G).hidden = !1, e(this, G).style.position = "relative", d(this, tt, e(this, G).parentElement))), n(this, $,
|
|
1013
|
+
(t instanceof Document || t instanceof ShadowRoot) && (d(this, G, t.querySelector("vindral-channel-grid")), ((i = e(this, G).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, G).hidden = !1, e(this, G).style.position = "relative", d(this, tt, e(this, G).parentElement))), n(this, $, gn).call(this);
|
|
1010
1014
|
}
|
|
1011
1015
|
disconnectedCallback() {
|
|
1012
1016
|
}
|
|
1013
1017
|
attributeChangedCallback(t, i, s) {
|
|
1014
|
-
super.attributeChangedCallback(t, i, s), (t === r.CHANNEL_GROUP_ID || t === r.CHANNELS) && n(this, $,
|
|
1018
|
+
super.attributeChangedCallback(t, i, s), (t === r.CHANNEL_GROUP_ID || t === r.CHANNELS) && n(this, $, fn).call(this);
|
|
1015
1019
|
}
|
|
1016
1020
|
enable() {
|
|
1017
|
-
super.enable(), document.addEventListener("click", e(this,
|
|
1021
|
+
super.enable(), document.addEventListener("click", e(this, Ns));
|
|
1018
1022
|
}
|
|
1019
1023
|
handleClick(t) {
|
|
1020
|
-
n(this, $,
|
|
1024
|
+
n(this, $, ta).call(this);
|
|
1021
1025
|
}
|
|
1022
1026
|
get isOpen() {
|
|
1023
1027
|
var t, i;
|
|
1024
1028
|
return ((t = e(this, tt)) == null ? void 0 : t.hasAttribute("open")) || !((i = e(this, G)) != null && i.hidden);
|
|
1025
1029
|
}
|
|
1026
1030
|
};
|
|
1027
|
-
|
|
1031
|
+
Te = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), Ns = new WeakMap(), $ = new WeakSet(), ta = function() {
|
|
1028
1032
|
var t;
|
|
1029
|
-
e(this, tt) ? e(this, tt).hasAttribute("open") ? n(this, $,
|
|
1030
|
-
},
|
|
1033
|
+
e(this, tt) ? e(this, tt).hasAttribute("open") ? n(this, $, gs).call(this) : n(this, $, vn).call(this) : (t = e(this, G)) != null && t.hidden ? n(this, $, vn).call(this) : n(this, $, gs).call(this), n(this, $, gn).call(this);
|
|
1034
|
+
}, vn = function() {
|
|
1031
1035
|
var t;
|
|
1032
1036
|
if (e(this, tt))
|
|
1033
1037
|
e(this, tt).setAttribute("open", "");
|
|
@@ -1035,18 +1039,18 @@ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $
|
|
|
1035
1039
|
if (!((t = e(this, G)) != null && t.hidden)) return;
|
|
1036
1040
|
e(this, G).hidden = !1, e(this, G).focus();
|
|
1037
1041
|
}
|
|
1038
|
-
e(this,
|
|
1039
|
-
},
|
|
1042
|
+
e(this, Te).setAttribute("aria-expanded", "true");
|
|
1043
|
+
}, gs = function() {
|
|
1040
1044
|
if (e(this, tt))
|
|
1041
1045
|
e(this, tt).removeAttribute("open");
|
|
1042
1046
|
else {
|
|
1043
1047
|
if (!e(this, G) || e(this, G).hidden) return;
|
|
1044
1048
|
e(this, G).hidden = !0;
|
|
1045
1049
|
}
|
|
1046
|
-
e(this,
|
|
1047
|
-
}, vn = function() {
|
|
1048
|
-
this.getAttribute(r.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(r.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1050
|
+
e(this, Te).setAttribute("aria-expanded", "false");
|
|
1049
1051
|
}, fn = function() {
|
|
1052
|
+
this.getAttribute(r.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(r.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1053
|
+
}, gn = function() {
|
|
1050
1054
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
1051
1055
|
}, m(je, "observedAttributes", [
|
|
1052
1056
|
...J(je, je, "observedAttributes"),
|
|
@@ -1054,9 +1058,9 @@ Le = new WeakMap(), G = new WeakMap(), tt = new WeakMap(), xs = new WeakMap(), $
|
|
|
1054
1058
|
r.CHANNELS,
|
|
1055
1059
|
"hidden"
|
|
1056
1060
|
]);
|
|
1057
|
-
let
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1061
|
+
let mn = je;
|
|
1062
|
+
const ea = document.createElement("template");
|
|
1063
|
+
ea.innerHTML = /* HTML */
|
|
1060
1064
|
`
|
|
1061
1065
|
<style>
|
|
1062
1066
|
:host {
|
|
@@ -1085,17 +1089,17 @@ ta.innerHTML = /* HTML */
|
|
|
1085
1089
|
<slot name="right"></slot>
|
|
1086
1090
|
</slot>
|
|
1087
1091
|
`;
|
|
1088
|
-
class
|
|
1092
|
+
class ia extends HTMLElement {
|
|
1089
1093
|
constructor() {
|
|
1090
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1094
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(ea.content.cloneNode(!0));
|
|
1091
1095
|
}
|
|
1092
1096
|
connectedCallback() {
|
|
1093
1097
|
}
|
|
1094
1098
|
disconnectedCallback() {
|
|
1095
1099
|
}
|
|
1096
1100
|
}
|
|
1097
|
-
m(
|
|
1098
|
-
class
|
|
1101
|
+
m(ia, "observedAttributes", []);
|
|
1102
|
+
class dl extends ds {
|
|
1099
1103
|
constructor(t) {
|
|
1100
1104
|
super();
|
|
1101
1105
|
m(this, "config");
|
|
@@ -1219,8 +1223,8 @@ const ee = class ee extends ds {
|
|
|
1219
1223
|
};
|
|
1220
1224
|
m(ee, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
|
|
1221
1225
|
let pt = ee;
|
|
1222
|
-
var
|
|
1223
|
-
class
|
|
1226
|
+
var Rs, Us, Ps, _s, Le, Ms, Ds, ui, Se;
|
|
1227
|
+
class yr extends ds {
|
|
1224
1228
|
constructor(t) {
|
|
1225
1229
|
super();
|
|
1226
1230
|
m(this, "unload", () => {
|
|
@@ -1228,14 +1232,14 @@ class Ar extends ds {
|
|
|
1228
1232
|
});
|
|
1229
1233
|
m(this, "request", () => B(this, null, function* () {
|
|
1230
1234
|
try {
|
|
1231
|
-
return yield e(this,
|
|
1235
|
+
return yield e(this, Rs).call(this);
|
|
1232
1236
|
} catch (t) {
|
|
1233
1237
|
throw this.onChange(), t;
|
|
1234
1238
|
}
|
|
1235
1239
|
}));
|
|
1236
1240
|
m(this, "exit", () => B(this, null, function* () {
|
|
1237
1241
|
try {
|
|
1238
|
-
return yield e(this,
|
|
1242
|
+
return yield e(this, Us).call(this);
|
|
1239
1243
|
} catch (t) {
|
|
1240
1244
|
throw this.onChange(), t;
|
|
1241
1245
|
}
|
|
@@ -1243,19 +1247,19 @@ class Ar extends ds {
|
|
|
1243
1247
|
m(this, "onChange", () => {
|
|
1244
1248
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1245
1249
|
});
|
|
1246
|
-
m(this, "isPictureInPictureActive", () => e(this,
|
|
1247
|
-
m(this, "isSupported", () => e(this, Se).call(this) || e(this,
|
|
1248
|
-
l(this,
|
|
1249
|
-
l(this,
|
|
1250
|
-
l(this,
|
|
1250
|
+
m(this, "isPictureInPictureActive", () => e(this, Ds).call(this) || e(this, Ms).call(this));
|
|
1251
|
+
m(this, "isSupported", () => e(this, Se).call(this) || e(this, Le).call(this));
|
|
1252
|
+
l(this, Rs, () => e(this, Le).call(this) ? e(this, Ps).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "picture-in-picture") : Promise.resolve());
|
|
1253
|
+
l(this, Us, () => this.isPictureInPictureActive() ? e(this, Le).call(this) ? e(this, _s).call(this) : e(this, Se).call(this) ? e(this, ui).call(this, "inline") : Promise.resolve() : Promise.resolve());
|
|
1254
|
+
l(this, Ps, () => B(this, null, function* () {
|
|
1251
1255
|
yield this.element.requestPictureInPicture();
|
|
1252
1256
|
}));
|
|
1253
|
-
l(this,
|
|
1257
|
+
l(this, _s, () => B(null, null, function* () {
|
|
1254
1258
|
yield document.exitPictureInPicture();
|
|
1255
1259
|
}));
|
|
1256
|
-
l(this,
|
|
1257
|
-
l(this,
|
|
1258
|
-
l(this,
|
|
1260
|
+
l(this, Le, () => !!this.element.requestPictureInPicture && !!document.pictureInPictureEnabled);
|
|
1261
|
+
l(this, Ms, () => !!document.pictureInPictureElement);
|
|
1262
|
+
l(this, Ds, () => this.element.webkitPresentationMode === "picture-in-picture");
|
|
1259
1263
|
l(this, ui, (t) => (this.element.webkitSetPresentationMode && this.element.webkitSetPresentationMode(t), Promise.resolve()));
|
|
1260
1264
|
l(this, Se, () => !!this.element.webkitSetPresentationMode);
|
|
1261
1265
|
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.setAttribute("autopictureinpicture", "");
|
|
@@ -1264,13 +1268,13 @@ class Ar extends ds {
|
|
|
1264
1268
|
return this.element;
|
|
1265
1269
|
}
|
|
1266
1270
|
}
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1271
|
+
Rs = new WeakMap(), Us = new WeakMap(), Ps = new WeakMap(), _s = new WeakMap(), Le = new WeakMap(), Ms = new WeakMap(), Ds = new WeakMap(), ui = new WeakMap(), Se = new WeakMap();
|
|
1272
|
+
const kr = (c) => {
|
|
1269
1273
|
var t;
|
|
1270
1274
|
let a = "observedAttributes" in c.constructor ? c.constructor.observedAttributes : void 0;
|
|
1271
1275
|
return !a && ((t = c.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(c), a = "observedAttributes" in c.constructor ? c.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => Lr.includes(i)) : [];
|
|
1272
1276
|
};
|
|
1273
|
-
function
|
|
1277
|
+
function cl(c) {
|
|
1274
1278
|
if (typeof c != "string") return NaN;
|
|
1275
1279
|
const a = /(\d+(?:\.\d+)?)([hms])/gi, t = [...c.matchAll(a)];
|
|
1276
1280
|
return t.length === 0 ? NaN : t.reduce((i, [, s, o]) => {
|
|
@@ -1287,7 +1291,7 @@ function al(c) {
|
|
|
1287
1291
|
}
|
|
1288
1292
|
}, 0);
|
|
1289
1293
|
}
|
|
1290
|
-
class
|
|
1294
|
+
class Ir extends ds {
|
|
1291
1295
|
constructor(t) {
|
|
1292
1296
|
super();
|
|
1293
1297
|
m(this, "audioContext");
|
|
@@ -1350,13 +1354,13 @@ class kr extends ds {
|
|
|
1350
1354
|
return this.source instanceof HTMLMediaElement;
|
|
1351
1355
|
}
|
|
1352
1356
|
}
|
|
1353
|
-
var f,
|
|
1354
|
-
class
|
|
1357
|
+
var f, D, L, Ce, bt, mt, Pt, ne, _t, et, pi, xe, C, w, sa, En, na, An, yn, ra, aa, oa, la, ha, da, Fs, Os, Ge, Qt;
|
|
1358
|
+
class ul {
|
|
1355
1359
|
constructor(a, t) {
|
|
1356
|
-
l(this, T);
|
|
1357
|
-
l(this, f);
|
|
1358
|
-
l(this, M);
|
|
1359
1360
|
l(this, w);
|
|
1361
|
+
l(this, f);
|
|
1362
|
+
l(this, D);
|
|
1363
|
+
l(this, L);
|
|
1360
1364
|
l(this, Ce);
|
|
1361
1365
|
l(this, bt);
|
|
1362
1366
|
m(this, "userPaused", !0);
|
|
@@ -1368,23 +1372,23 @@ class ol {
|
|
|
1368
1372
|
l(this, pi, 0);
|
|
1369
1373
|
l(this, xe, !1);
|
|
1370
1374
|
l(this, C, Tr.get().createContext("HlsPlayer"));
|
|
1371
|
-
l(this, Ds, () => {
|
|
1372
|
-
e(this, f).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !e(this, f).paused && n(this, T, Ge).call(this, !1);
|
|
1373
|
-
});
|
|
1374
1375
|
l(this, Fs, () => {
|
|
1375
|
-
e(this, f).readyState >= HTMLMediaElement.
|
|
1376
|
+
e(this, f).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !e(this, f).paused && n(this, w, Ge).call(this, !1);
|
|
1376
1377
|
});
|
|
1377
|
-
|
|
1378
|
+
l(this, Os, () => {
|
|
1379
|
+
e(this, f).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && n(this, w, Ge).call(this, !1);
|
|
1380
|
+
});
|
|
1381
|
+
d(this, D, a), d(this, Pt, t == null ? void 0 : t.maxVideoBitRate), e(this, D).style.position = "absolute", e(this, D).style.top = "0", e(this, D).style.left = "0", e(this, D).style.width = "100%", e(this, D).style.height = "100%", e(this, D).style.opacity = "0", e(this, D).style.pointerEvents = "none", e(this, D).style.transition = "opacity 0.12s linear";
|
|
1378
1382
|
const i = document.createElement("video");
|
|
1379
|
-
d(this, f, i), a.appendChild(e(this, f)), e(this, f).style.width = "100%", e(this, f).style.height = "100%", e(this, f).setAttribute("playsinline", ""), e(this, f).setAttribute("webkit-playsinline", ""), e(this, f).setAttribute("preload", "metadata"), n(this,
|
|
1383
|
+
d(this, f, i), a.appendChild(e(this, f)), e(this, f).style.width = "100%", e(this, f).style.height = "100%", e(this, f).setAttribute("playsinline", ""), e(this, f).setAttribute("webkit-playsinline", ""), e(this, f).setAttribute("preload", "metadata"), n(this, w, da).call(this), d(this, xe, e(this, f).muted), (t == null ? void 0 : t.volume) !== void 0 && (this.volume = t.volume), (t == null ? void 0 : t.muted) !== void 0 && (this.muted = t.muted);
|
|
1380
1384
|
}
|
|
1381
1385
|
hide() {
|
|
1382
|
-
d(this, ne, !0), d(this, _t, !1), e(this,
|
|
1386
|
+
d(this, ne, !0), d(this, _t, !1), e(this, D).classList.remove("active"), e(this, D).style.opacity = "0", e(this, D).style.pointerEvents = "none", d(this, et, null);
|
|
1383
1387
|
}
|
|
1384
1388
|
play() {
|
|
1385
1389
|
return B(this, null, function* () {
|
|
1386
1390
|
try {
|
|
1387
|
-
return e(this,
|
|
1391
|
+
return e(this, L) ? (this.userPaused = !1, yield e(this, f).play()) : Promise.reject("HLS not initialized");
|
|
1388
1392
|
} catch (a) {
|
|
1389
1393
|
e(this, C).error("Failed to play timeshift video:", a);
|
|
1390
1394
|
}
|
|
@@ -1396,10 +1400,10 @@ class ol {
|
|
|
1396
1400
|
d(this, et, null);
|
|
1397
1401
|
return;
|
|
1398
1402
|
}
|
|
1399
|
-
if (d(this, et, a.time > 0.1 ? a.time : null), this.isActive() && e(this,
|
|
1400
|
-
n(this,
|
|
1403
|
+
if (d(this, et, a.time > 0.1 ? a.time : null), this.isActive() && e(this, L))
|
|
1404
|
+
n(this, w, yn).call(this, a.time);
|
|
1401
1405
|
else
|
|
1402
|
-
return n(this,
|
|
1406
|
+
return n(this, w, ra).call(this, a);
|
|
1403
1407
|
});
|
|
1404
1408
|
}
|
|
1405
1409
|
shouldIgnoreTimeupdate() {
|
|
@@ -1417,10 +1421,10 @@ class ol {
|
|
|
1417
1421
|
return document.pictureInPictureElement === e(this, f) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1418
1422
|
}
|
|
1419
1423
|
isActive() {
|
|
1420
|
-
return e(this,
|
|
1424
|
+
return e(this, D).style.opacity === "1" || e(this, D).classList.contains("active");
|
|
1421
1425
|
}
|
|
1422
1426
|
cleanup() {
|
|
1423
|
-
n(this,
|
|
1427
|
+
n(this, w, An).call(this), e(this, mt) && (cancelAnimationFrame(e(this, mt)), d(this, mt, void 0)), d(this, et, null);
|
|
1424
1428
|
}
|
|
1425
1429
|
addEventListener(a, t) {
|
|
1426
1430
|
e(this, f).addEventListener(a, t);
|
|
@@ -1471,17 +1475,17 @@ class ol {
|
|
|
1471
1475
|
return e(this, Pt);
|
|
1472
1476
|
}
|
|
1473
1477
|
set maxVideoBitRate(a) {
|
|
1474
|
-
d(this, Pt, a), a !== void 0 && e(this,
|
|
1478
|
+
d(this, Pt, a), a !== void 0 && e(this, L) && n(this, w, En).call(this, a);
|
|
1475
1479
|
}
|
|
1476
1480
|
}
|
|
1477
|
-
f = new WeakMap(),
|
|
1481
|
+
f = new WeakMap(), D = new WeakMap(), L = new WeakMap(), Ce = new WeakMap(), bt = new WeakMap(), mt = new WeakMap(), Pt = new WeakMap(), ne = new WeakMap(), _t = new WeakMap(), et = new WeakMap(), pi = new WeakMap(), xe = new WeakMap(), C = new WeakMap(), w = new WeakSet(), sa = function() {
|
|
1478
1482
|
return B(this, null, function* () {
|
|
1479
1483
|
const { default: a } = yield import("./h5LA1Y1W.js");
|
|
1480
1484
|
if (d(this, Ce, a), !a.isSupported()) {
|
|
1481
1485
|
e(this, C).warn("HLS not supported");
|
|
1482
1486
|
return;
|
|
1483
1487
|
}
|
|
1484
|
-
d(this,
|
|
1488
|
+
d(this, L, new a({
|
|
1485
1489
|
capLevelToPlayerSize: !0,
|
|
1486
1490
|
enableWorker: !0,
|
|
1487
1491
|
backBufferLength: 30,
|
|
@@ -1501,36 +1505,36 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1501
1505
|
startFragPrefetch: !0,
|
|
1502
1506
|
testBandwidth: !1,
|
|
1503
1507
|
debug: !1
|
|
1504
|
-
})), e(this,
|
|
1505
|
-
e(this, C).error("[HLS] error:", i), i.fatal && n(this,
|
|
1506
|
-
}), e(this,
|
|
1508
|
+
})), e(this, L).attachMedia(e(this, f)), e(this, L).on(a.Events.MEDIA_ATTACHED, () => e(this, C).debug("[HLS] media attached")), e(this, L).on(a.Events.MANIFEST_PARSED, () => e(this, C).debug("[HLS] manifest parsed")), e(this, L).on(a.Events.ERROR, (t, i) => {
|
|
1509
|
+
e(this, C).error("[HLS] error:", i), i.fatal && n(this, w, na).call(this, i);
|
|
1510
|
+
}), e(this, L).on(a.Events.MANIFEST_PARSED, () => {
|
|
1507
1511
|
var t;
|
|
1508
|
-
!e(this, Pt) || ((t = e(this,
|
|
1509
|
-
}), e(this,
|
|
1512
|
+
!e(this, Pt) || ((t = e(this, L)) == null ? void 0 : t.levels.length) === 0 || n(this, w, En).call(this, e(this, Pt));
|
|
1513
|
+
}), e(this, L).on(a.Events.LEVEL_SWITCHED, () => {
|
|
1510
1514
|
var t, i;
|
|
1511
1515
|
e(this, C).debug(
|
|
1512
1516
|
"Level switched:",
|
|
1513
|
-
(t = e(this,
|
|
1517
|
+
(t = e(this, L)) == null ? void 0 : t.currentLevel,
|
|
1514
1518
|
"max:",
|
|
1515
1519
|
this.maxVideoBitRate,
|
|
1516
1520
|
"autoLevelCapping:",
|
|
1517
|
-
(i = e(this,
|
|
1521
|
+
(i = e(this, L)) == null ? void 0 : i.autoLevelCapping
|
|
1518
1522
|
);
|
|
1519
1523
|
});
|
|
1520
1524
|
});
|
|
1521
|
-
},
|
|
1525
|
+
}, En = function(a) {
|
|
1522
1526
|
var s;
|
|
1523
|
-
if (!e(this,
|
|
1527
|
+
if (!e(this, L)) {
|
|
1524
1528
|
e(this, C).warn("HLS not initialized, cannot set bitrate cap");
|
|
1525
1529
|
return;
|
|
1526
1530
|
}
|
|
1527
|
-
let t = e(this,
|
|
1531
|
+
let t = e(this, L).levels.map((o, u) => ({ i: u, bitrate: o.bitrate })).filter((o) => a >= o.bitrate * 0.8).map((o) => o.i).pop();
|
|
1528
1532
|
t === void 0 && (t = 0, e(this, C).debug(
|
|
1529
|
-
"No level fits under bitrate cap: " + a + ", defaulting to lowest level: " + ((s = e(this,
|
|
1533
|
+
"No level fits under bitrate cap: " + a + ", defaulting to lowest level: " + ((s = e(this, L).levels[0]) == null ? void 0 : s.bitrate)
|
|
1530
1534
|
));
|
|
1531
|
-
const i = e(this,
|
|
1532
|
-
e(this,
|
|
1533
|
-
},
|
|
1535
|
+
const i = e(this, L).currentLevel;
|
|
1536
|
+
e(this, L).autoLevelCapping = t, i !== t && (e(this, C).debug(`Current level ${i} exceeds cap ${t}, forcing immediate switch`), e(this, L).currentLevel = t);
|
|
1537
|
+
}, na = function(a) {
|
|
1534
1538
|
var i, s;
|
|
1535
1539
|
if (!e(this, Ce)) {
|
|
1536
1540
|
e(this, C).error("Hls class not available for error handling");
|
|
@@ -1539,40 +1543,40 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1539
1543
|
const t = e(this, Ce);
|
|
1540
1544
|
switch (a.type) {
|
|
1541
1545
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1542
|
-
e(this, C).warn("[HLS] network error -> startLoad"), (i = e(this,
|
|
1546
|
+
e(this, C).warn("[HLS] network error -> startLoad"), (i = e(this, L)) == null || i.startLoad();
|
|
1543
1547
|
break;
|
|
1544
1548
|
case t.ErrorTypes.MEDIA_ERROR:
|
|
1545
|
-
e(this, C).warn("[HLS] media error -> recoverMediaError"), (s = e(this,
|
|
1549
|
+
e(this, C).warn("[HLS] media error -> recoverMediaError"), (s = e(this, L)) == null || s.recoverMediaError();
|
|
1546
1550
|
break;
|
|
1547
1551
|
default:
|
|
1548
|
-
e(this, C).error("[HLS] fatal -> destroy"), n(this,
|
|
1552
|
+
e(this, C).error("[HLS] fatal -> destroy"), n(this, w, An).call(this);
|
|
1549
1553
|
break;
|
|
1550
1554
|
}
|
|
1551
|
-
},
|
|
1552
|
-
e(this,
|
|
1553
|
-
},
|
|
1555
|
+
}, An = function() {
|
|
1556
|
+
e(this, L) && (e(this, L).destroy(), d(this, L, void 0));
|
|
1557
|
+
}, yn = function(a) {
|
|
1554
1558
|
if (!Number.isFinite(a)) {
|
|
1555
1559
|
d(this, et, null);
|
|
1556
1560
|
return;
|
|
1557
1561
|
}
|
|
1558
|
-
const t = n(this,
|
|
1562
|
+
const t = n(this, w, ha).call(this, e(this, f), a);
|
|
1559
1563
|
d(this, et, t > 0.1 ? t : null), e(this, mt) && cancelAnimationFrame(e(this, mt)), d(this, mt, requestAnimationFrame(() => {
|
|
1560
1564
|
e(this, f).currentTime = t;
|
|
1561
1565
|
}));
|
|
1562
|
-
},
|
|
1566
|
+
}, ra = function(a) {
|
|
1563
1567
|
return B(this, null, function* () {
|
|
1564
|
-
const { time: t, playWhenReady: i = !0 } = a || {}, s = ++
|
|
1568
|
+
const { time: t, playWhenReady: i = !0 } = a || {}, s = ++gr(this, pi)._;
|
|
1565
1569
|
if (!e(this, bt)) {
|
|
1566
1570
|
e(this, C).warn("No timeshift URL");
|
|
1567
1571
|
return;
|
|
1568
1572
|
}
|
|
1569
|
-
if (!e(this,
|
|
1573
|
+
if (!e(this, L) && (yield n(this, w, sa).call(this), !n(this, w, Qt).call(this, s)))
|
|
1570
1574
|
return;
|
|
1571
|
-
d(this, ne, !1), d(this, _t, !1), e(this,
|
|
1575
|
+
d(this, ne, !1), d(this, _t, !1), e(this, L) && (!e(this, L).url || e(this, L).url !== e(this, bt)) && (e(this, C).debug("Loading timeshift URL", e(this, bt)), e(this, L).loadSource(e(this, bt)));
|
|
1572
1576
|
const o = this.muted;
|
|
1573
|
-
e(this, f).muted = !0, yield n(this,
|
|
1577
|
+
e(this, f).muted = !0, yield n(this, w, aa).call(this), n(this, w, Qt).call(this, s) && (n(this, w, yn).call(this, t), !(i && (yield this.play(), !n(this, w, Qt).call(this, s))) && n(this, w, oa).call(this, o, s));
|
|
1574
1578
|
});
|
|
1575
|
-
},
|
|
1579
|
+
}, aa = function() {
|
|
1576
1580
|
return e(this, f).duration && !isNaN(e(this, f).duration) ? Promise.resolve() : new Promise((a) => {
|
|
1577
1581
|
e(this, C).debug("Waiting for duration...");
|
|
1578
1582
|
const t = () => {
|
|
@@ -1582,15 +1586,15 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1582
1586
|
}, 2e4);
|
|
1583
1587
|
e(this, f).addEventListener("loadedmetadata", t);
|
|
1584
1588
|
});
|
|
1585
|
-
},
|
|
1589
|
+
}, oa = function(a, t) {
|
|
1586
1590
|
const i = HTMLMediaElement.HAVE_CURRENT_DATA, s = () => e(this, f).readyState >= i && e(this, f).videoWidth > 0 && e(this, f).videoHeight > 0, o = () => {
|
|
1587
|
-
e(this, ne) || e(this, _t) || !n(this,
|
|
1591
|
+
e(this, ne) || e(this, _t) || !n(this, w, Qt).call(this, t) || (d(this, _t, !0), e(this, C).debug("Revealing timeshift video"), e(this, D).classList.add("active"), e(this, D).style.opacity = "1", e(this, D).style.pointerEvents = "auto", e(this, f).dispatchEvent(
|
|
1588
1592
|
new CustomEvent("timeshiftready", {
|
|
1589
1593
|
detail: { activationId: t }
|
|
1590
1594
|
})
|
|
1591
|
-
), a || n(this,
|
|
1595
|
+
), a || n(this, w, la).call(this, t));
|
|
1592
1596
|
}, u = () => {
|
|
1593
|
-
e(this, ne) || e(this, _t) || !n(this,
|
|
1597
|
+
e(this, ne) || e(this, _t) || !n(this, w, Qt).call(this, t) || s() && (v(), o());
|
|
1594
1598
|
};
|
|
1595
1599
|
let p = !1;
|
|
1596
1600
|
const v = () => {
|
|
@@ -1604,9 +1608,9 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1604
1608
|
const A = setTimeout(() => {
|
|
1605
1609
|
e(this, C).debug("Timeout reached, forcing reveal"), v(), o();
|
|
1606
1610
|
}, 2e3);
|
|
1607
|
-
},
|
|
1611
|
+
}, la = function(a) {
|
|
1608
1612
|
const t = () => {
|
|
1609
|
-
n(this,
|
|
1613
|
+
n(this, w, Qt).call(this, a) && (e(this, f).muted = !1);
|
|
1610
1614
|
};
|
|
1611
1615
|
"requestVideoFrameCallback" in e(this, f) ? e(this, f).requestVideoFrameCallback(() => {
|
|
1612
1616
|
setTimeout(() => {
|
|
@@ -1615,15 +1619,15 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1615
1619
|
}) : setTimeout(() => {
|
|
1616
1620
|
t();
|
|
1617
1621
|
}, 120);
|
|
1618
|
-
},
|
|
1622
|
+
}, ha = function(a, t) {
|
|
1619
1623
|
const i = a.seekable;
|
|
1620
1624
|
if (!i || i.length === 0) return t;
|
|
1621
1625
|
const s = i.start(0), o = i.end(i.length - 1);
|
|
1622
1626
|
return e(this, C).debug("Clamped seekable:", Math.max(s, Math.min(t, o))), Math.max(s, Math.min(t, o));
|
|
1623
|
-
},
|
|
1627
|
+
}, da = function() {
|
|
1624
1628
|
const a = ["waiting", "seeking", "stalled", "loadstart"], t = ["canplay", "canplaythrough", "seeked", "loadeddata"];
|
|
1625
|
-
a.forEach((i) => e(this, f).addEventListener(i, () => n(this,
|
|
1626
|
-
},
|
|
1629
|
+
a.forEach((i) => e(this, f).addEventListener(i, () => n(this, w, Ge).call(this, !0))), t.forEach((i) => e(this, f).addEventListener(i, () => n(this, w, Ge).call(this, !1))), e(this, f).addEventListener("timeupdate", e(this, Fs)), e(this, f).addEventListener("progress", e(this, Os));
|
|
1630
|
+
}, Fs = new WeakMap(), Os = new WeakMap(), Ge = function(a) {
|
|
1627
1631
|
const t = a && (e(this, f).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || e(this, f).seeking || e(this, f).paused && !this.userPaused);
|
|
1628
1632
|
e(this, f).dispatchEvent(
|
|
1629
1633
|
new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
@@ -1634,8 +1638,8 @@ f = new WeakMap(), M = new WeakMap(), w = new WeakMap(), Ce = new WeakMap(), bt
|
|
|
1634
1638
|
}, Qt = function(a) {
|
|
1635
1639
|
return e(this, pi) === a;
|
|
1636
1640
|
};
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1641
|
+
const ca = document.createElement("template");
|
|
1642
|
+
ca.innerHTML = /* HTML */
|
|
1639
1643
|
`
|
|
1640
1644
|
<style>
|
|
1641
1645
|
:host {
|
|
@@ -1647,8 +1651,8 @@ da.innerHTML = /* HTML */
|
|
|
1647
1651
|
}
|
|
1648
1652
|
</style>
|
|
1649
1653
|
`;
|
|
1650
|
-
var Ne, Re, W, bi,
|
|
1651
|
-
class
|
|
1654
|
+
var Ne, Re, W, bi, Hs, zs, Be, ua, pa;
|
|
1655
|
+
class cr extends rt {
|
|
1652
1656
|
constructor() {
|
|
1653
1657
|
var t;
|
|
1654
1658
|
super();
|
|
@@ -1657,13 +1661,13 @@ class dr extends rt {
|
|
|
1657
1661
|
l(this, Re);
|
|
1658
1662
|
l(this, W);
|
|
1659
1663
|
l(this, bi, null);
|
|
1660
|
-
l(this,
|
|
1664
|
+
l(this, Hs, (t) => {
|
|
1661
1665
|
t.composedPath().includes(this) || this.hide();
|
|
1662
1666
|
});
|
|
1663
|
-
l(this,
|
|
1667
|
+
l(this, zs, () => {
|
|
1664
1668
|
this.hide();
|
|
1665
1669
|
});
|
|
1666
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1670
|
+
(t = this.shadowRoot) == null || t.appendChild(ca.content.cloneNode(!0));
|
|
1667
1671
|
}
|
|
1668
1672
|
connectedCallback() {
|
|
1669
1673
|
var u, p, v, A;
|
|
@@ -1686,24 +1690,24 @@ class dr extends rt {
|
|
|
1686
1690
|
d(this, W, t);
|
|
1687
1691
|
}
|
|
1688
1692
|
enable() {
|
|
1689
|
-
super.enable(), this.addEventListener("change", e(this,
|
|
1693
|
+
super.enable(), this.addEventListener("change", e(this, zs)), document.addEventListener("click", e(this, Hs));
|
|
1690
1694
|
}
|
|
1691
1695
|
hide() {
|
|
1692
1696
|
var t, i;
|
|
1693
1697
|
!e(this, W) || (t = e(this, W)) != null && t.hidden || (e(this, W).hidden = !0, (i = e(this, Ne)) == null || i.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(k.UNLOCK_UI, { bubbles: !0, composed: !0 })), this.focus());
|
|
1694
1698
|
}
|
|
1695
1699
|
handleClick(t) {
|
|
1696
|
-
e(this, W) && !t.composedPath().includes(e(this, W)) && n(this, Be,
|
|
1700
|
+
e(this, W) && !t.composedPath().includes(e(this, W)) && n(this, Be, ua).call(this);
|
|
1697
1701
|
}
|
|
1698
1702
|
}
|
|
1699
|
-
Ne = new WeakMap(), Re = new WeakMap(), W = new WeakMap(), bi = new WeakMap(),
|
|
1703
|
+
Ne = new WeakMap(), Re = new WeakMap(), W = new WeakMap(), bi = new WeakMap(), Hs = new WeakMap(), zs = new WeakMap(), Be = new WeakSet(), ua = function() {
|
|
1700
1704
|
var t;
|
|
1701
|
-
(t = e(this, W)) != null && t.hidden ? n(this, Be,
|
|
1702
|
-
},
|
|
1705
|
+
(t = e(this, W)) != null && t.hidden ? n(this, Be, pa).call(this) : this.hide();
|
|
1706
|
+
}, pa = function() {
|
|
1703
1707
|
var t, i, s;
|
|
1704
1708
|
(t = e(this, W)) != null && t.hidden && (e(this, W).hidden = !1, (i = e(this, Ne)) == null || i.setAttribute("aria-expanded", "true"), (s = e(this, Re)) == null || s.focus(), this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
1705
1709
|
};
|
|
1706
|
-
class
|
|
1710
|
+
class pl {
|
|
1707
1711
|
constructor(a) {
|
|
1708
1712
|
this.vindral = a;
|
|
1709
1713
|
}
|
|
@@ -1723,8 +1727,8 @@ class ll {
|
|
|
1723
1727
|
this.vindral.pause();
|
|
1724
1728
|
}
|
|
1725
1729
|
}
|
|
1726
|
-
const
|
|
1727
|
-
|
|
1730
|
+
const ba = document.createElement("template");
|
|
1731
|
+
ba.innerHTML = /* HTML */
|
|
1728
1732
|
`
|
|
1729
1733
|
<style>
|
|
1730
1734
|
:host {
|
|
@@ -1864,7 +1868,7 @@ class ni extends HTMLElement {
|
|
|
1864
1868
|
l(this, Ue, null);
|
|
1865
1869
|
l(this, Pe);
|
|
1866
1870
|
m(this, "range");
|
|
1867
|
-
d(this, Pe, this.attachShadow({ mode: "open" })), e(this, Pe).appendChild(
|
|
1871
|
+
d(this, Pe, this.attachShadow({ mode: "open" })), e(this, Pe).appendChild(ba.content.cloneNode(!0)), this.range = e(this, Pe).getElementById("range");
|
|
1868
1872
|
}
|
|
1869
1873
|
connectedCallback() {
|
|
1870
1874
|
var t;
|
|
@@ -1894,8 +1898,8 @@ class ni extends HTMLElement {
|
|
|
1894
1898
|
}
|
|
1895
1899
|
}
|
|
1896
1900
|
Ue = new WeakMap(), Pe = new WeakMap(), m(ni, "observedAttributes", ["disabled"]);
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1901
|
+
const ma = document.createElement("template");
|
|
1902
|
+
ma.innerHTML = /* HTML */
|
|
1899
1903
|
`
|
|
1900
1904
|
<style>
|
|
1901
1905
|
:host {
|
|
@@ -1994,6 +1998,10 @@ ba.innerHTML = /* HTML */
|
|
|
1994
1998
|
z-index: 0;
|
|
1995
1999
|
}
|
|
1996
2000
|
|
|
2001
|
+
#video video::-webkit-media-text-track-display {
|
|
2002
|
+
transform: translateY(var(--vindral-subtitle-offset, 0px)) !important;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
1997
2005
|
:host([user-interacting]) #video {
|
|
1998
2006
|
cursor: auto;
|
|
1999
2007
|
}
|
|
@@ -2087,8 +2095,8 @@ ba.innerHTML = /* HTML */
|
|
|
2087
2095
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
2088
2096
|
</div>
|
|
2089
2097
|
`;
|
|
2090
|
-
const
|
|
2091
|
-
var
|
|
2098
|
+
const on = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
2099
|
+
var Bs, vt, mi, Mt, Dt, vi, b, H, re, g, fi, ot, ft, Ft, $s, K, gt, ae, it, j, Et, gi, Ei, F, Ot, Ht, h, kn, Gs, Ks, Ai, yi, ki, Ii, wi, Ti, Li, Si, Ci, qs, In, wn, xi, Ni, Ri, Vs, Ui, Pi, _i, Mi, va, Tn, Di, Ln, fa, Es, ga, Ea, As, Aa, Sn, ya, ka, Ia, Fi, wa, Ta, La, Sa, Oi, Xs, js, Ca, Hi, Ys, Js, oe, Cn, xn, ys, xt, xa, ks, Is, Na, Nn, Ws, Qs, Rn, E, T;
|
|
2092
2100
|
const Ye = class Ye extends HTMLElement {
|
|
2093
2101
|
constructor() {
|
|
2094
2102
|
var s;
|
|
@@ -2103,11 +2111,11 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2103
2111
|
l(this, H);
|
|
2104
2112
|
l(this, re);
|
|
2105
2113
|
l(this, g);
|
|
2106
|
-
l(this, fi, e(Ye,
|
|
2114
|
+
l(this, fi, e(Ye, Bs));
|
|
2107
2115
|
l(this, ot);
|
|
2108
2116
|
l(this, ft);
|
|
2109
2117
|
l(this, Ft);
|
|
2110
|
-
l(this,
|
|
2118
|
+
l(this, $s);
|
|
2111
2119
|
l(this, K);
|
|
2112
2120
|
l(this, gt);
|
|
2113
2121
|
l(this, ae);
|
|
@@ -2120,58 +2128,58 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2120
2128
|
l(this, Ot, null);
|
|
2121
2129
|
l(this, Ht, !1);
|
|
2122
2130
|
// Store references to listener functions for removal
|
|
2123
|
-
l(this,
|
|
2131
|
+
l(this, Gs, (t) => {
|
|
2124
2132
|
const i = t.filter((s) => {
|
|
2125
2133
|
var o;
|
|
2126
2134
|
return (o = s.video) == null ? void 0 : o.width;
|
|
2127
2135
|
});
|
|
2128
2136
|
n(this, h, E).call(this, r.RENDITION_LEVELS, JSON.stringify(i));
|
|
2129
2137
|
});
|
|
2130
|
-
l(this,
|
|
2138
|
+
l(this, Ks, (t) => {
|
|
2131
2139
|
n(this, h, E).call(this, r.RENDITION_LEVEL, JSON.stringify(t));
|
|
2132
2140
|
});
|
|
2133
2141
|
l(this, Ai, (t) => {
|
|
2134
2142
|
switch (t) {
|
|
2135
2143
|
case "playing":
|
|
2136
|
-
n(this, h,
|
|
2144
|
+
n(this, h, T).call(this, r.PAUSED), n(this, h, T).call(this, r.BUFFERING);
|
|
2137
2145
|
break;
|
|
2138
2146
|
case "paused":
|
|
2139
|
-
n(this, h, E).call(this, r.PAUSED, ""), n(this, h,
|
|
2147
|
+
n(this, h, E).call(this, r.PAUSED, ""), n(this, h, T).call(this, r.BUFFERING);
|
|
2140
2148
|
break;
|
|
2141
2149
|
case "buffering":
|
|
2142
|
-
n(this, h,
|
|
2150
|
+
n(this, h, T).call(this, r.PAUSED), n(this, h, E).call(this, r.BUFFERING, "");
|
|
2143
2151
|
break;
|
|
2144
2152
|
}
|
|
2145
2153
|
});
|
|
2146
2154
|
l(this, yi, (t) => {
|
|
2147
|
-
n(this, h, E).call(this, r.VOLUME, t.volume.toString()), t.isMuted ? n(this, h, E).call(this, r.MUTED, "") : n(this, h,
|
|
2155
|
+
n(this, h, E).call(this, r.VOLUME, t.volume.toString()), t.isMuted ? n(this, h, E).call(this, r.MUTED, "") : n(this, h, T).call(this, r.MUTED);
|
|
2148
2156
|
});
|
|
2149
2157
|
l(this, ki, ({ channelId: t }) => {
|
|
2150
2158
|
var i;
|
|
2151
|
-
this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, h,
|
|
2159
|
+
this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, h, T).call(this, r.BUFFERING);
|
|
2152
2160
|
});
|
|
2153
2161
|
l(this, Ii, ({ channelId: t }) => {
|
|
2154
2162
|
var i;
|
|
2155
|
-
e(this, ot) !== t && this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, h,
|
|
2163
|
+
e(this, ot) !== t && this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, h, T).call(this, r.BUFFERING);
|
|
2156
2164
|
});
|
|
2157
|
-
l(this,
|
|
2165
|
+
l(this, wi, (t) => {
|
|
2158
2166
|
d(this, oe, Date.now()), n(this, h, E).call(this, r.CHANNELS, JSON.stringify(t));
|
|
2159
2167
|
});
|
|
2160
|
-
l(this,
|
|
2168
|
+
l(this, Ti, (t) => {
|
|
2161
2169
|
var i;
|
|
2162
2170
|
n(this, h, E).call(this, r.LANGUAGES, JSON.stringify(t)), (i = e(this, b)) != null && i.language && n(this, h, E).call(this, r.LANGUAGE, e(this, b).language);
|
|
2163
2171
|
});
|
|
2164
|
-
l(this,
|
|
2172
|
+
l(this, Li, (t) => {
|
|
2165
2173
|
var i, s, o;
|
|
2166
2174
|
n(this, h, E).call(this, r.TEXT_TRACKS, JSON.stringify(t)), (i = e(this, b)) != null && i.textTrack && n(this, h, E).call(this, r.TEXT_TRACK, (o = (s = e(this, b)) == null ? void 0 : s.textTrack) != null ? o : "");
|
|
2167
2175
|
});
|
|
2168
2176
|
l(this, Si, (t) => {
|
|
2169
|
-
t != null && t.forVideo ? (n(this, h, E).call(this, r.NEEDS_USER_INPUT_VIDEO, ""), n(this, h,
|
|
2177
|
+
t != null && t.forVideo ? (n(this, h, E).call(this, r.NEEDS_USER_INPUT_VIDEO, ""), n(this, h, T).call(this, r.NEEDS_USER_INPUT_AUDIO)) : t != null && t.forAudio && (n(this, h, E).call(this, r.NEEDS_USER_INPUT_AUDIO, ""), n(this, h, T).call(this, r.NEEDS_USER_INPUT_VIDEO));
|
|
2170
2178
|
});
|
|
2171
2179
|
l(this, Ci, (t) => {
|
|
2172
|
-
t || n(this, h,
|
|
2180
|
+
t || n(this, h, T).call(this, r.BUFFERING);
|
|
2173
2181
|
});
|
|
2174
|
-
l(this,
|
|
2182
|
+
l(this, qs, (t) => {
|
|
2175
2183
|
var z;
|
|
2176
2184
|
const { urls: i, duration: s } = t;
|
|
2177
2185
|
if (!i[0] || !e(this, g)) return;
|
|
@@ -2179,7 +2187,7 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2179
2187
|
o.searchParams.set("channelId", (z = e(this, ot)) != null ? z : "");
|
|
2180
2188
|
const u = this.getAttribute("authentication-token");
|
|
2181
2189
|
u && o.searchParams.set("authToken", u);
|
|
2182
|
-
const p =
|
|
2190
|
+
const p = cl(s);
|
|
2183
2191
|
if (isNaN(p)) {
|
|
2184
2192
|
e(this, F).error(`Invalid duration format: ${s}`);
|
|
2185
2193
|
return;
|
|
@@ -2188,15 +2196,15 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2188
2196
|
o.searchParams.set("from", A), e(this, g).setTimeshiftUrl(o.toString()), n(this, h, E).call(this, r.DURATION, p.toString());
|
|
2189
2197
|
});
|
|
2190
2198
|
l(this, xi, () => {
|
|
2191
|
-
n(this, h,
|
|
2199
|
+
n(this, h, T).call(this, r.PAUSED), n(this, h, T).call(this, r.BUFFERING);
|
|
2192
2200
|
});
|
|
2193
2201
|
l(this, Ni, () => {
|
|
2194
|
-
n(this, h, E).call(this, r.PAUSED, ""), n(this, h,
|
|
2202
|
+
n(this, h, E).call(this, r.PAUSED, ""), n(this, h, T).call(this, r.BUFFERING);
|
|
2195
2203
|
});
|
|
2196
2204
|
l(this, Ri, () => {
|
|
2197
|
-
e(this, Hi).call(this), n(this, h,
|
|
2205
|
+
e(this, Hi).call(this), n(this, h, T).call(this, r.BUFFERING);
|
|
2198
2206
|
});
|
|
2199
|
-
l(this,
|
|
2207
|
+
l(this, Vs, () => {
|
|
2200
2208
|
if (!e(this, g)) return;
|
|
2201
2209
|
const t = e(this, g).duration;
|
|
2202
2210
|
n(this, h, E).call(this, r.DURATION, isNaN(t) ? "0" : t.toString());
|
|
@@ -2209,13 +2217,13 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2209
2217
|
t != null && n(this, h, E).call(this, r.TIMESHIFT_POSITION, t.toString());
|
|
2210
2218
|
});
|
|
2211
2219
|
l(this, Pi, () => {
|
|
2212
|
-
e(this, g) && (n(this, h, E).call(this, r.VOLUME, e(this, g).volume.toString()), e(this, g).muted ? n(this, h, E).call(this, r.MUTED, "") : n(this, h,
|
|
2220
|
+
e(this, g) && (n(this, h, E).call(this, r.VOLUME, e(this, g).volume.toString()), e(this, g).muted ? n(this, h, E).call(this, r.MUTED, "") : n(this, h, T).call(this, r.MUTED));
|
|
2213
2221
|
});
|
|
2214
2222
|
l(this, _i, () => {
|
|
2215
2223
|
n(this, h, E).call(this, r.BUFFERING, "");
|
|
2216
2224
|
});
|
|
2217
2225
|
l(this, Mi, () => {
|
|
2218
|
-
n(this, h,
|
|
2226
|
+
n(this, h, T).call(this, r.BUFFERING);
|
|
2219
2227
|
});
|
|
2220
2228
|
l(this, Di, () => {
|
|
2221
2229
|
if (e(this, Ht)) {
|
|
@@ -2223,7 +2231,7 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2223
2231
|
d(this, Ht, !1);
|
|
2224
2232
|
return;
|
|
2225
2233
|
}
|
|
2226
|
-
d(this, Ht, !1), n(this, h,
|
|
2234
|
+
d(this, Ht, !1), n(this, h, ks).call(this);
|
|
2227
2235
|
}
|
|
2228
2236
|
});
|
|
2229
2237
|
l(this, Fi, 0);
|
|
@@ -2233,7 +2241,7 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2233
2241
|
d(this, Fi, t.timeStamp);
|
|
2234
2242
|
break;
|
|
2235
2243
|
case "pointermove":
|
|
2236
|
-
n(this, h,
|
|
2244
|
+
n(this, h, wa).call(this, t);
|
|
2237
2245
|
break;
|
|
2238
2246
|
case "pointerup":
|
|
2239
2247
|
n(this, h, Ta).call(this, t);
|
|
@@ -2245,13 +2253,13 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2245
2253
|
n(this, h, La).call(this, t);
|
|
2246
2254
|
break;
|
|
2247
2255
|
case "mousemove":
|
|
2248
|
-
n(this, h,
|
|
2256
|
+
n(this, h, Sa).call(this, t);
|
|
2249
2257
|
break;
|
|
2250
2258
|
case "keydown":
|
|
2251
|
-
e(this,
|
|
2259
|
+
e(this, js).call(this, t);
|
|
2252
2260
|
break;
|
|
2253
2261
|
case "keyup":
|
|
2254
|
-
n(this, h, xt).call(this), e(this,
|
|
2262
|
+
n(this, h, xt).call(this), e(this, Xs).call(this, t);
|
|
2255
2263
|
break;
|
|
2256
2264
|
}
|
|
2257
2265
|
});
|
|
@@ -2290,7 +2298,7 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2290
2298
|
}
|
|
2291
2299
|
break;
|
|
2292
2300
|
case k.CHANNEL_GRID_OPENED: {
|
|
2293
|
-
e(this, Ot) === null && n(this, h,
|
|
2301
|
+
e(this, Ot) === null && n(this, h, Cn).call(this);
|
|
2294
2302
|
break;
|
|
2295
2303
|
}
|
|
2296
2304
|
case k.CHANNEL_GRID_CLOSED: {
|
|
@@ -2329,45 +2337,45 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2329
2337
|
break;
|
|
2330
2338
|
}
|
|
2331
2339
|
});
|
|
2332
|
-
l(this,
|
|
2340
|
+
l(this, Xs, (t) => {
|
|
2333
2341
|
const { key: i } = t;
|
|
2334
|
-
if (!
|
|
2342
|
+
if (!on.includes(i)) {
|
|
2335
2343
|
this.removeEventListener("keyup", this);
|
|
2336
2344
|
return;
|
|
2337
2345
|
}
|
|
2338
|
-
n(this, h,
|
|
2346
|
+
n(this, h, Ca).call(this, t);
|
|
2339
2347
|
});
|
|
2340
|
-
l(this,
|
|
2348
|
+
l(this, js, (t) => {
|
|
2341
2349
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
2342
|
-
i || s || !
|
|
2350
|
+
i || s || !on.includes(o) || this.addEventListener("keyup", this, { once: !0 });
|
|
2343
2351
|
});
|
|
2344
2352
|
l(this, Hi, () => {
|
|
2345
2353
|
this.removeAttribute(r.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2346
2354
|
});
|
|
2347
|
-
l(this,
|
|
2355
|
+
l(this, Ys, (t) => {
|
|
2348
2356
|
var i;
|
|
2349
|
-
e(this, g) || n(this, h, Tn).call(this), e(this, H) !== e(this, g) && (t && n(this, h,
|
|
2357
|
+
e(this, g) || n(this, h, Tn).call(this), e(this, H) !== e(this, g) && (t && n(this, h, Is).call(this), d(this, H, e(this, g)), n(this, h, wn).call(this), n(this, h, va).call(this), n(this, h, Es).call(this), (i = e(this, b)) == null || i.pause(), d(this, Ht, t));
|
|
2350
2358
|
});
|
|
2351
|
-
l(this,
|
|
2359
|
+
l(this, Js, (t) => {
|
|
2352
2360
|
var i, s, o, u;
|
|
2353
|
-
t && n(this, h,
|
|
2354
|
-
n(this, h,
|
|
2361
|
+
t && n(this, h, Is).call(this), (i = e(this, g)) == null || i.hide(), d(this, H, e(this, re)), n(this, h, Es).call(this), this.hasAttribute(r.PAUSED) ? (s = e(this, H)) == null || s.pause() : (o = e(this, H)) == null || o.play(), n(this, h, Ln).call(this), n(this, h, In).call(this), (u = e(this, g)) == null || u.pause(), t && (d(this, Ht, !1), setTimeout(() => {
|
|
2362
|
+
n(this, h, ks).call(this);
|
|
2355
2363
|
}, 100));
|
|
2356
2364
|
});
|
|
2357
2365
|
m(this, "handleTimeShiftUpdate", (t) => {
|
|
2358
2366
|
var s;
|
|
2359
2367
|
const i = this.hasAttribute(r.IS_PIP);
|
|
2360
2368
|
if (t !== !1) {
|
|
2361
|
-
e(this,
|
|
2369
|
+
e(this, Ys).call(this, i), (s = e(this, g)) == null || s.seek({
|
|
2362
2370
|
time: parseFloat(t),
|
|
2363
2371
|
playWhenReady: !this.hasAttribute(r.PAUSED)
|
|
2364
2372
|
});
|
|
2365
2373
|
return;
|
|
2366
2374
|
}
|
|
2367
|
-
e(this, H) !== e(this, re) && e(this,
|
|
2375
|
+
e(this, H) !== e(this, re) && e(this, Js).call(this, i);
|
|
2368
2376
|
});
|
|
2369
2377
|
l(this, oe, null);
|
|
2370
|
-
l(this,
|
|
2378
|
+
l(this, Ws, () => {
|
|
2371
2379
|
var i, s, o;
|
|
2372
2380
|
if (!("orientation" in screen) || !screen.orientation.lock)
|
|
2373
2381
|
return;
|
|
@@ -2375,16 +2383,16 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2375
2383
|
t != null && t.video && screen.orientation.lock(((s = t == null ? void 0 : t.video) == null ? void 0 : s.width) > ((o = t == null ? void 0 : t.video) == null ? void 0 : o.height) ? "landscape-primary" : "portrait-primary").catch(() => {
|
|
2376
2384
|
});
|
|
2377
2385
|
});
|
|
2378
|
-
l(this,
|
|
2386
|
+
l(this, Qs, () => {
|
|
2379
2387
|
!("orientation" in screen) || !screen.orientation.unlock || screen.orientation.unlock();
|
|
2380
2388
|
});
|
|
2381
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
2382
|
-
const i =
|
|
2389
|
+
this.attachShadow({ mode: "open" }).appendChild(ma.content.cloneNode(!0));
|
|
2390
|
+
const i = an(this.getAttribute("log-level"));
|
|
2383
2391
|
d(this, F, Tr.get().createContext("VindralController")), e(this, F).setLevel(i), d(this, vi, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#time-shift-video"));
|
|
2384
2392
|
}
|
|
2385
2393
|
connectedCallback() {
|
|
2386
2394
|
return B(this, null, function* () {
|
|
2387
|
-
|
|
2395
|
+
P(this.getAttribute("auto-instance-enabled"), !0) && (yield n(this, h, kn).call(this));
|
|
2388
2396
|
for (const i of Object.values(k))
|
|
2389
2397
|
this.addEventListener(i, e(this, Oi));
|
|
2390
2398
|
window.PointerEvent ? (this.addEventListener("pointerdown", this), this.addEventListener("pointermove", this), this.addEventListener("pointerup", this)) : this.addEventListener("mousemove", this), this.addEventListener("mouseleave", this), this.addEventListener("keydown", this), this.addEventListener("resize", this), this.addEventListener("dblclick", this), this.connectListener(this), this.tabIndex = 0, this.focus({ preventScroll: !0 });
|
|
@@ -2395,100 +2403,106 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2395
2403
|
(t = e(this, b)) == null || t.unload(), (i = e(this, K)) == null || i.unload(), (s = e(this, gt)) == null || s.unload(), (o = e(this, ae)) == null || o.unload(), (u = e(this, j)) == null || u.unload(), (p = e(this, g)) == null || p.cleanup();
|
|
2396
2404
|
for (const v of Object.values(k))
|
|
2397
2405
|
this.removeEventListener(v, e(this, Oi));
|
|
2398
|
-
n(this, h, Ln).call(this), n(this, h,
|
|
2406
|
+
n(this, h, Ln).call(this), n(this, h, wn).call(this), this.disconnectListener(this);
|
|
2399
2407
|
}
|
|
2400
2408
|
attributeChangedCallback(t, i, s) {
|
|
2401
|
-
var
|
|
2402
|
-
if (i
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2409
|
+
var u, p, v, A, z, ut, at, jt, Yt, Jt, cs, us, ps, bs, ms;
|
|
2410
|
+
if (i == s)
|
|
2411
|
+
return;
|
|
2412
|
+
switch (e(this, F).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
2413
|
+
case "channel-id":
|
|
2414
|
+
d(this, ot, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), n(this, h, E).call(this, r.BUFFERING, ""), n(this, h, E).call(this, r.CHANNEL_ID, s), n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl()));
|
|
2415
|
+
break;
|
|
2416
|
+
case "channel-group-id":
|
|
2417
|
+
d(this, ft, s);
|
|
2418
|
+
break;
|
|
2419
|
+
case "url":
|
|
2420
|
+
s && d(this, fi, s);
|
|
2421
|
+
break;
|
|
2422
|
+
case "paused":
|
|
2423
|
+
x(s) ? ((u = e(this, H)) == null || u.pause(), n(this, h, E).call(this, r.PAUSED, "")) : (n(this, h, T).call(this, r.NEEDS_USER_INPUT_VIDEO), n(this, h, T).call(this, r.PAUSED), (p = e(this, H)) == null || p.play());
|
|
2424
|
+
break;
|
|
2425
|
+
case "target-buffer-time":
|
|
2426
|
+
if (e(this, b) && s) {
|
|
2427
|
+
const V = parseInt(s, 10);
|
|
2428
|
+
Number.isNaN(V) || (e(this, b).targetBufferTime = V);
|
|
2429
|
+
}
|
|
2430
|
+
break;
|
|
2431
|
+
case "user-interacting":
|
|
2432
|
+
x(s) ? n(this, h, E).call(this, r.USER_INTERACTING, "") : n(this, h, T).call(this, r.USER_INTERACTING);
|
|
2433
|
+
break;
|
|
2434
|
+
case "muted":
|
|
2435
|
+
e(this, b) && (x(s) ? (e(this, b).muted = !0, e(this, g) && (e(this, g).muted = !0), n(this, h, E).call(this, r.MUTED, ""), (v = e(this, j)) != null && v.isMediaElementSource && ((A = e(this, j)) == null || A.stop(), n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, e(this, g) && (e(this, g).muted = !1), n(this, h, T).call(this, r.MUTED), n(this, h, T).call(this, r.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (z = e(this, j)) == null || z.start()));
|
|
2436
|
+
break;
|
|
2437
|
+
case "ui-locked":
|
|
2438
|
+
x(s) ? n(this, h, ys).call(this) : n(this, h, xt).call(this);
|
|
2439
|
+
break;
|
|
2440
|
+
case "is-fullscreen":
|
|
2441
|
+
x(s) ? n(this, h, Na).call(this) : n(this, h, Nn).call(this);
|
|
2442
|
+
break;
|
|
2443
|
+
case "max-video-bit-rate":
|
|
2444
|
+
d(this, Ft, s), x(s) ? n(this, h, E).call(this, r.MAX_VIDEO_BITRATE, s) : n(this, h, T).call(this, r.MAX_VIDEO_BITRATE), e(this, g) && (e(this, g).maxVideoBitRate = s ? Wt(s) : void 0);
|
|
2445
|
+
break;
|
|
2446
|
+
case "max-initial-bit-rate":
|
|
2447
|
+
d(this, $s, s), x(s) ? n(this, h, E).call(this, r.MAX_INITIAL_BITRATE, s) : n(this, h, T).call(this, r.MAX_INITIAL_BITRATE);
|
|
2448
|
+
break;
|
|
2449
|
+
case "is-pip":
|
|
2450
|
+
x(s) ? n(this, h, ks).call(this) : n(this, h, Is).call(this);
|
|
2451
|
+
break;
|
|
2452
|
+
case "is-airplaying":
|
|
2453
|
+
x(s) ? ((ut = e(this, b)) != null && ut.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (at = e(this, b)) == null || at.pause()) : (jt = e(this, b)) != null && jt.mediaElement && (e(this, b).mediaElement.style.display = "block");
|
|
2454
|
+
break;
|
|
2455
|
+
case "is-casting":
|
|
2456
|
+
x(s) ? ((Yt = e(this, gt)) != null && Yt.isFullscreen() && n(this, h, Nn).call(this), (Jt = e(this, b)) == null || Jt.pause()) : document.hidden || (cs = e(this, b)) == null || cs.play();
|
|
2457
|
+
break;
|
|
2458
|
+
case "cast-receiver-id":
|
|
2459
|
+
d(this, gi, s);
|
|
2460
|
+
break;
|
|
2461
|
+
case "cast-background":
|
|
2462
|
+
d(this, Ei, s);
|
|
2463
|
+
break;
|
|
2464
|
+
case "language":
|
|
2465
|
+
e(this, b) && (e(this, b).language = s, x(s) ? n(this, h, E).call(this, r.LANGUAGE, s) : n(this, h, T).call(this, r.LANGUAGE));
|
|
2466
|
+
break;
|
|
2467
|
+
case "text-track":
|
|
2468
|
+
e(this, b) && (e(this, b).textTrack = s, x(s) ? n(this, h, E).call(this, r.TEXT_TRACK, s) : n(this, h, T).call(this, r.TEXT_TRACK));
|
|
2469
|
+
break;
|
|
2470
|
+
case "log-level":
|
|
2471
|
+
x(s) && e(this, F).setLevel(an(s));
|
|
2472
|
+
break;
|
|
2473
|
+
case "authentication-token":
|
|
2474
|
+
x(s) ? ((us = e(this, b)) == null || us.updateAuthenticationToken(s), (ps = e(this, it)) == null || ps.updateAuthenticationToken(s), n(this, h, E).call(this, r.AUTHENTICATION_TOKEN, s)) : n(this, h, T).call(this, r.AUTHENTICATION_TOKEN);
|
|
2475
|
+
break;
|
|
2476
|
+
case "volume":
|
|
2477
|
+
if (x(s)) {
|
|
2478
|
+
const V = parseFloat(s);
|
|
2479
|
+
e(this, g) && (e(this, g).volume = V), e(this, b) && (e(this, b).volume = V);
|
|
2480
|
+
}
|
|
2481
|
+
break;
|
|
2482
|
+
case "timeshift-position":
|
|
2483
|
+
x(s) ? n(this, h, E).call(this, r.TIMESHIFT_POSITION, s) : n(this, h, T).call(this, r.TIMESHIFT_POSITION);
|
|
2484
|
+
break;
|
|
2485
|
+
case "drm-headers":
|
|
2486
|
+
if (x(s)) {
|
|
2487
|
+
const V = vs(s);
|
|
2488
|
+
V ? (bs = e(this, b)) == null || bs.drm.setHeaders(V) : e(this, F).warn("Invalid DRM headers format:", s);
|
|
2489
|
+
}
|
|
2490
|
+
break;
|
|
2491
|
+
case "drm-queryparams":
|
|
2492
|
+
if (x(s)) {
|
|
2493
|
+
const V = vs(s);
|
|
2494
|
+
V ? (ms = e(this, b)) == null || ms.drm.setQueryParams(V) : e(this, F).warn("Invalid DRM query parameters format:", s);
|
|
2495
|
+
}
|
|
2496
|
+
break;
|
|
2497
|
+
}
|
|
2498
|
+
[
|
|
2499
|
+
r.USER_INTERACTING,
|
|
2500
|
+
r.PAUSED,
|
|
2501
|
+
r.HIDE_UI_ON_PAUSE
|
|
2502
|
+
].includes(t) && n(this, h, xa).call(this);
|
|
2489
2503
|
}
|
|
2490
2504
|
connectListener(t) {
|
|
2491
|
-
|
|
2505
|
+
kr(t).forEach((s) => {
|
|
2492
2506
|
var u, p;
|
|
2493
2507
|
const o = e(this, vt).get(s);
|
|
2494
2508
|
switch (o ? o.push(t) : e(this, vt).set(s, [t]), s) {
|
|
@@ -2516,7 +2530,7 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2516
2530
|
});
|
|
2517
2531
|
}
|
|
2518
2532
|
disconnectListener(t) {
|
|
2519
|
-
|
|
2533
|
+
kr(t).forEach((s) => {
|
|
2520
2534
|
const o = e(this, vt).get(s);
|
|
2521
2535
|
o && e(this, vt).set(
|
|
2522
2536
|
s,
|
|
@@ -2528,33 +2542,35 @@ const Ye = class Ye extends HTMLElement {
|
|
|
2528
2542
|
return e(this, b);
|
|
2529
2543
|
}
|
|
2530
2544
|
get fullscreen() {
|
|
2531
|
-
return n(this, h,
|
|
2545
|
+
return n(this, h, As).call(this);
|
|
2532
2546
|
}
|
|
2533
2547
|
get airPlay() {
|
|
2534
2548
|
return e(this, it);
|
|
2535
2549
|
}
|
|
2536
2550
|
connect() {
|
|
2537
|
-
n(this, h,
|
|
2551
|
+
n(this, h, kn).call(this);
|
|
2538
2552
|
}
|
|
2539
2553
|
};
|
|
2540
|
-
|
|
2554
|
+
Bs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(), Dt = new WeakMap(), vi = new WeakMap(), b = new WeakMap(), H = new WeakMap(), re = new WeakMap(), g = new WeakMap(), fi = new WeakMap(), ot = new WeakMap(), ft = new WeakMap(), Ft = new WeakMap(), $s = new WeakMap(), K = new WeakMap(), gt = new WeakMap(), ae = new WeakMap(), it = new WeakMap(), j = new WeakMap(), Et = new WeakMap(), gi = new WeakMap(), Ei = new WeakMap(), F = new WeakMap(), Ot = new WeakMap(), Ht = new WeakMap(), h = new WeakSet(), kn = function() {
|
|
2541
2555
|
return B(this, null, function* () {
|
|
2542
|
-
var
|
|
2556
|
+
var mr, vr;
|
|
2543
2557
|
if (!e(this, ot)) return;
|
|
2544
|
-
yield (
|
|
2545
|
-
const t = this.hasAttribute(r.PAUSED), i = this.hasAttribute(r.MUTED), s = Wt(this.getAttribute(r.VOLUME)), o = typeof s == "number" ? Math.max(0, Math.min(1, s)) : s, u =
|
|
2546
|
-
headers:
|
|
2547
|
-
queryParams:
|
|
2558
|
+
yield (mr = e(this, b)) == null ? void 0 : mr.unload();
|
|
2559
|
+
const t = this.hasAttribute(r.PAUSED), i = this.hasAttribute(r.MUTED), s = Wt(this.getAttribute(r.VOLUME)), o = typeof s == "number" ? Math.max(0, Math.min(1, s)) : s, u = Sr(this.getAttribute(r.MEDIA)), p = this.getAttribute(r.TEXT_TRACK) || void 0, v = this.getAttribute("edge-url") || void 0, A = this.getAttribute("authentication-token") || void 0, z = Wt(this.getAttribute("max-video-bit-rate")), ut = Wt(this.getAttribute("max-initial-bit-rate")), at = al(this.getAttribute("max-size")), jt = Wt(this.getAttribute("min-buffer-time")), Yt = Wt(this.getAttribute("max-buffer-time")), Jt = P(this.getAttribute("burst-enabled")), cs = P(this.getAttribute("mse-enabled")), us = P(this.getAttribute("mse-opus-enabled")), ps = P(this.getAttribute("ios-background-play-enabled")), bs = P(this.getAttribute("ios-wake-lock-enabled")), ms = P(this.getAttribute("ios-media-element-enabled")), V = P(this.getAttribute("abr-enabled")), wo = P(this.getAttribute("size-based-resolution-cap-enabled")), To = P(this.getAttribute("telemetry-enabled")), Lo = nl(this.getAttribute("video-codecs")), ur = Cr(this.getAttribute("poster")), So = ol(this.getAttribute("advanced")), Co = an(this.getAttribute("log-level")), xo = {
|
|
2560
|
+
headers: vs(this.getAttribute("drm-headers")),
|
|
2561
|
+
queryParams: vs(this.getAttribute("drm-queryparams")),
|
|
2548
2562
|
widevine: {
|
|
2549
|
-
videoRobustness:
|
|
2550
|
-
audioRobustness:
|
|
2563
|
+
videoRobustness: fs(this.getAttribute("drm-widevine-video-robustness")),
|
|
2564
|
+
audioRobustness: fs(this.getAttribute("drm-widevine-audio-robustness"))
|
|
2551
2565
|
},
|
|
2552
2566
|
playready: {
|
|
2553
|
-
videoRobustness:
|
|
2554
|
-
audioRobustness:
|
|
2567
|
+
videoRobustness: fs(this.getAttribute("drm-playready-video-robustness")),
|
|
2568
|
+
audioRobustness: fs(this.getAttribute("drm-playready-audio-robustness"))
|
|
2555
2569
|
}
|
|
2556
|
-
},
|
|
2557
|
-
|
|
2570
|
+
}, No = P(this.getAttribute("webcodecs-enabled")), Ro = rl(
|
|
2571
|
+
this.getAttribute("webcodecs-hardware-acceleration")
|
|
2572
|
+
), Uo = P(this.getAttribute("offscreen-canvas-enabled")), Po = P(this.getAttribute("webtransport-enabled")), pr = Wt(this.getAttribute("reconnect-retries")), _o = pr !== void 0 ? (Bo) => Bo.reconnectRetries < pr : void 0, Mo = this.getAttribute("language") || void 0;
|
|
2573
|
+
d(this, b, new Vo({
|
|
2558
2574
|
url: e(this, fi),
|
|
2559
2575
|
channelId: e(this, ot),
|
|
2560
2576
|
channelGroupId: e(this, ft),
|
|
@@ -2573,86 +2589,89 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
|
|
|
2573
2589
|
mseOpusEnabled: us,
|
|
2574
2590
|
iosBackgroundPlayEnabled: ps,
|
|
2575
2591
|
iosWakeLockEnabled: bs,
|
|
2576
|
-
iosMediaElementEnabled:
|
|
2577
|
-
abrEnabled:
|
|
2578
|
-
sizeBasedResolutionCapEnabled:
|
|
2592
|
+
iosMediaElementEnabled: ms,
|
|
2593
|
+
abrEnabled: V,
|
|
2594
|
+
sizeBasedResolutionCapEnabled: wo,
|
|
2579
2595
|
telemetryEnabled: To,
|
|
2580
2596
|
videoCodecs: Lo,
|
|
2581
|
-
poster:
|
|
2597
|
+
poster: ur,
|
|
2582
2598
|
textTrack: p,
|
|
2583
|
-
advanced:
|
|
2584
|
-
logLevel:
|
|
2585
|
-
language:
|
|
2586
|
-
drm:
|
|
2587
|
-
webtransportEnabled:
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2599
|
+
advanced: So,
|
|
2600
|
+
logLevel: Co,
|
|
2601
|
+
language: Mo,
|
|
2602
|
+
drm: xo,
|
|
2603
|
+
webtransportEnabled: Po,
|
|
2604
|
+
webcodecsEnabled: No,
|
|
2605
|
+
webcodecsHardwareAcceleration: Ro,
|
|
2606
|
+
offscreenCanvasEnabled: Uo,
|
|
2607
|
+
reconnectHandler: _o
|
|
2608
|
+
})), d(this, re, new pl(e(this, b))), e(this, H) || d(this, H, e(this, re)), n(this, h, In).call(this), d(this, Dt, (vr = this.shadowRoot) == null ? void 0 : vr.querySelector("#video")), e(this, Dt) && e(this, b).attach(e(this, Dt)), this.setAttribute(r.MEDIA, e(this, b).media), e(this, b).muted && n(this, h, E).call(this, r.MUTED, ""), n(this, h, E).call(this, r.VOLUME, e(this, b).volume.toString()), x(ur) || n(this, h, E).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
2609
|
+
const Do = P(this.getAttribute(r.AIRPLAY_ENABLED), !1), Fo = P(this.getAttribute(r.CAST_ENABLED), !0), br = P(this.getAttribute(r.FULLSCREEN_ENABLED), !0), Oo = P(this.getAttribute(r.PIP_ENABLED), !0), Ho = P(this.getAttribute(r.VU_METER_ENABLED), !1), zo = P(this.getAttribute(r.TIMESHIFT_ENABLED), !1);
|
|
2610
|
+
Do && n(this, h, ka).call(this, e(this, b)), Fo && n(this, h, Aa).call(this, e(this, b)), br && n(this, h, ga).call(this, e(this, b)), Oo && n(this, h, fa).call(this, e(this, b)), t || e(this, b).play(), Ho && n(this, h, Ia).call(this, e(this, b)), this.dispatchEvent(
|
|
2592
2611
|
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
2593
|
-
),
|
|
2612
|
+
), zo && (n(this, h, Tn).call(this), br && n(this, h, Ea).call(this));
|
|
2594
2613
|
});
|
|
2595
|
-
},
|
|
2596
|
-
e(this, b) && (e(this, b).on("rendition levels", e(this,
|
|
2597
|
-
},
|
|
2598
|
-
e(this, b) && (e(this, b).off("playback state", e(this, Ai)), e(this, b).off("volume state", e(this, yi)), e(this, b).off("channel switch failed", e(this, ki)), e(this, b).off("channel switch", e(this, Ii)), e(this, b).off("channels", e(this,
|
|
2599
|
-
}, xi = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(),
|
|
2614
|
+
}, Gs = new WeakMap(), Ks = new WeakMap(), Ai = new WeakMap(), yi = new WeakMap(), ki = new WeakMap(), Ii = new WeakMap(), wi = new WeakMap(), Ti = new WeakMap(), Li = new WeakMap(), Si = new WeakMap(), Ci = new WeakMap(), qs = new WeakMap(), In = function() {
|
|
2615
|
+
e(this, b) && (e(this, b).on("rendition levels", e(this, Gs)), e(this, b).on("rendition level", e(this, Ks)), e(this, b).on("playback state", e(this, Ai)), e(this, b).on("volume state", e(this, yi)), e(this, b).on("channel switch failed", e(this, ki)), e(this, b).on("channel switch", e(this, Ii)), e(this, b).on("channels", e(this, wi)), e(this, b).on("languages", e(this, Ti)), e(this, b).on("text tracks", e(this, Li)), e(this, b).on("needs user input", e(this, Si)), e(this, b).on("is live", e(this, Ci)), e(this, b).on("timeshift info", e(this, qs)));
|
|
2616
|
+
}, wn = function() {
|
|
2617
|
+
e(this, b) && (e(this, b).off("playback state", e(this, Ai)), e(this, b).off("volume state", e(this, yi)), e(this, b).off("channel switch failed", e(this, ki)), e(this, b).off("channel switch", e(this, Ii)), e(this, b).off("channels", e(this, wi)), e(this, b).off("languages", e(this, Ti)), e(this, b).off("text tracks", e(this, Li)), e(this, b).off("needs user input", e(this, Si)), e(this, b).off("is live", e(this, Ci)));
|
|
2618
|
+
}, xi = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(), Vs = new WeakMap(), Ui = new WeakMap(), Pi = new WeakMap(), _i = new WeakMap(), Mi = new WeakMap(), va = function() {
|
|
2600
2619
|
e(this, g) && (e(this, g).addEventListener("playing", e(this, xi)), e(this, g).addEventListener("pause", e(this, Ni)), e(this, g).addEventListener("ended", e(this, Ri)), e(this, g).addEventListener("timeupdate", e(this, Ui)), e(this, g).addEventListener("volumechange", e(this, Pi)), e(this, g).addEventListener("hlsbuffering", e(this, _i)), e(this, g).addEventListener("hlsnotbuffering", e(this, Mi)), e(this, g).addEventListener("timeshiftready", e(this, Di)));
|
|
2601
2620
|
}, Tn = function() {
|
|
2602
2621
|
var t, i, s, o;
|
|
2603
|
-
d(this, g, new
|
|
2622
|
+
d(this, g, new ul(e(this, vi), {
|
|
2604
2623
|
volume: (i = (t = e(this, H)) == null ? void 0 : t.volume) != null ? i : 1,
|
|
2605
2624
|
muted: (o = (s = e(this, H)) == null ? void 0 : s.muted) != null ? o : !1,
|
|
2606
2625
|
maxVideoBitRate: e(this, Ft) ? parseInt(e(this, Ft), 10) : void 0
|
|
2607
|
-
})), e(this, g).addEventListener("durationchange", e(this,
|
|
2626
|
+
})), e(this, g).addEventListener("durationchange", e(this, Vs));
|
|
2608
2627
|
}, Di = new WeakMap(), Ln = function() {
|
|
2609
2628
|
e(this, g) && (e(this, g).removeEventListener("playing", e(this, xi)), e(this, g).removeEventListener("pause", e(this, Ni)), e(this, g).removeEventListener("ended", e(this, Ri)), e(this, g).removeEventListener("timeupdate", e(this, Ui)), e(this, g).removeEventListener("volumechange", e(this, Pi)), e(this, g).removeEventListener("hlsbuffering", e(this, _i)), e(this, g).removeEventListener("hlsnotbuffering", e(this, Mi)), e(this, g).removeEventListener("timeshiftready", e(this, Di)));
|
|
2610
|
-
},
|
|
2611
|
-
t.mediaElement instanceof HTMLVideoElement && (d(this, K, new
|
|
2612
|
-
i ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h,
|
|
2629
|
+
}, fa = function(t) {
|
|
2630
|
+
t.mediaElement instanceof HTMLVideoElement && (d(this, K, new yr(t.mediaElement)), e(this, K).isSupported() && (e(this, F).debug("PIP is supported"), n(this, h, E).call(this, r.PIP_AVAILABLE, "")), e(this, K).on("on picture in picture change", (i) => {
|
|
2631
|
+
i ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h, T).call(this, r.IS_PIP);
|
|
2613
2632
|
}));
|
|
2614
|
-
},
|
|
2633
|
+
}, Es = function() {
|
|
2615
2634
|
var i;
|
|
2616
2635
|
if (!e(this, K)) return;
|
|
2617
2636
|
let t = null;
|
|
2618
|
-
e(this, H) === e(this, g) && e(this, g) ? t = e(this, g).videoElement : ((i = e(this, b)) == null ? void 0 : i.mediaElement) instanceof HTMLVideoElement && (t = e(this, b).mediaElement), t && t !== e(this, K).videoElement && (e(this, F).debug("Updating PIP target to", e(this, H) === e(this, g) ? "HLS" : "Vindral"), e(this, K).unload(), d(this, K, new
|
|
2619
|
-
s ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h,
|
|
2637
|
+
e(this, H) === e(this, g) && e(this, g) ? t = e(this, g).videoElement : ((i = e(this, b)) == null ? void 0 : i.mediaElement) instanceof HTMLVideoElement && (t = e(this, b).mediaElement), t && t !== e(this, K).videoElement && (e(this, F).debug("Updating PIP target to", e(this, H) === e(this, g) ? "HLS" : "Vindral"), e(this, K).unload(), d(this, K, new yr(t)), e(this, K).on("on picture in picture change", (s) => {
|
|
2638
|
+
s ? n(this, h, E).call(this, r.IS_PIP, "") : n(this, h, T).call(this, r.IS_PIP);
|
|
2620
2639
|
}));
|
|
2621
|
-
},
|
|
2640
|
+
}, ga = function(t) {
|
|
2622
2641
|
const i = !pt.isFullscreenApiSupported(this) && pt.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
|
|
2623
2642
|
d(this, gt, new pt(i)), e(this, gt).on("on fullscreen change", (s) => {
|
|
2624
|
-
s ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h,
|
|
2643
|
+
s ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h, T).call(this, r.FULLSCREEN);
|
|
2625
2644
|
});
|
|
2626
|
-
},
|
|
2645
|
+
}, Ea = function() {
|
|
2627
2646
|
var t;
|
|
2628
2647
|
e(this, g) && (d(this, ae, !pt.isFullscreenApiSupported(this) && pt.isFullscreenApiSupported((t = e(this, g)) == null ? void 0 : t.videoElement) ? new pt(e(this, g).videoElement) : new pt(this)), e(this, ae).on("on fullscreen change", (i) => {
|
|
2629
|
-
i ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h,
|
|
2648
|
+
i ? n(this, h, E).call(this, r.FULLSCREEN, "") : n(this, h, T).call(this, r.FULLSCREEN);
|
|
2630
2649
|
}));
|
|
2631
|
-
},
|
|
2650
|
+
}, As = function() {
|
|
2632
2651
|
return this.hasAttribute(r.TIMESHIFT_POSITION) ? e(this, ae) : e(this, gt);
|
|
2633
|
-
},
|
|
2634
|
-
d(this, Et, new
|
|
2652
|
+
}, Aa = function(t) {
|
|
2653
|
+
d(this, Et, new Qo({
|
|
2635
2654
|
background: e(this, Ei),
|
|
2636
2655
|
receiverApplicationId: e(this, gi),
|
|
2637
2656
|
options: t.getCastOptions()
|
|
2638
2657
|
})), e(this, Et).init().then(() => {
|
|
2639
2658
|
var i, s, o;
|
|
2640
|
-
n(this, h, E).call(this, r.CAST_AVAILABLE, ""), (i = e(this, Et)) == null || i.on("connected", n(this, h,
|
|
2659
|
+
n(this, h, E).call(this, r.CAST_AVAILABLE, ""), (i = e(this, Et)) == null || i.on("connected", n(this, h, Sn).bind(this)), (s = e(this, Et)) == null || s.on("resumed", n(this, h, Sn).bind(this)), (o = e(this, Et)) == null || o.on("disconnected", n(this, h, ya).bind(this));
|
|
2641
2660
|
}).catch((i) => {
|
|
2642
2661
|
e(this, F).warn("Failed to initialize CastSender", i);
|
|
2643
2662
|
});
|
|
2644
|
-
},
|
|
2663
|
+
}, Sn = function() {
|
|
2645
2664
|
var i, s;
|
|
2646
2665
|
n(this, h, E).call(this, r.IS_CASTING, "");
|
|
2647
2666
|
const t = (s = (i = e(this, Et)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
|
|
2648
2667
|
n(this, h, E).call(this, r.CAST_RECEIVER_NAME, t);
|
|
2649
|
-
},
|
|
2650
|
-
n(this, h,
|
|
2651
|
-
},
|
|
2668
|
+
}, ya = function() {
|
|
2669
|
+
n(this, h, T).call(this, r.IS_CASTING), n(this, h, T).call(this, r.CAST_RECEIVER_NAME);
|
|
2670
|
+
}, ka = function(t) {
|
|
2652
2671
|
var s;
|
|
2653
2672
|
(s = e(this, it)) == null || s.unload();
|
|
2654
2673
|
const i = t.getCastOptions();
|
|
2655
|
-
d(this, it, new
|
|
2674
|
+
d(this, it, new dl({
|
|
2656
2675
|
url: i.url,
|
|
2657
2676
|
channelId: i.channelId,
|
|
2658
2677
|
authenticationToken: i.authenticationToken,
|
|
@@ -2662,34 +2681,34 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
|
|
|
2662
2681
|
}), e(this, it).on("connected", () => {
|
|
2663
2682
|
n(this, h, E).call(this, r.IS_AIRPLAYING, "");
|
|
2664
2683
|
}), e(this, it).on("disconnected", () => {
|
|
2665
|
-
n(this, h,
|
|
2684
|
+
n(this, h, T).call(this, r.IS_AIRPLAYING);
|
|
2666
2685
|
});
|
|
2667
|
-
},
|
|
2686
|
+
}, Ia = function(t) {
|
|
2668
2687
|
var i;
|
|
2669
|
-
if ((i = e(this, j)) == null || i.unload(), !
|
|
2688
|
+
if ((i = e(this, j)) == null || i.unload(), !Xo()) {
|
|
2670
2689
|
if (t.audioNode)
|
|
2671
|
-
d(this, j, new
|
|
2690
|
+
d(this, j, new Ir(t.audioNode));
|
|
2672
2691
|
else if (t.mediaElement instanceof HTMLMediaElement)
|
|
2673
|
-
d(this, j, new
|
|
2692
|
+
d(this, j, new Ir(t.mediaElement));
|
|
2674
2693
|
else
|
|
2675
2694
|
return;
|
|
2676
2695
|
e(this, j).on("on decibel change", (s) => {
|
|
2677
2696
|
n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify(s));
|
|
2678
2697
|
}), n(this, h, E).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, j).isMediaElementSource || !this.hasAttribute(r.MUTED)) && e(this, j).start();
|
|
2679
2698
|
}
|
|
2680
|
-
}, Fi = new WeakMap(),
|
|
2681
|
-
t.pointerType !== "mouse" && t.timeStamp - e(this, Fi) < 250 || (n(this, h,
|
|
2699
|
+
}, Fi = new WeakMap(), wa = function(t) {
|
|
2700
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, Fi) < 250 || (n(this, h, ys).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), t.target instanceof HTMLElement && ([this, e(this, Dt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && n(this, h, xt).call(this));
|
|
2682
2701
|
}, Ta = function(t) {
|
|
2683
2702
|
const i = this.hasAttribute(r.USER_INTERACTING);
|
|
2684
|
-
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, Dt)].includes(t.target) && i ? n(this, h,
|
|
2703
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, Dt)].includes(t.target) && i ? n(this, h, xn).call(this) : n(this, h, xt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && n(this, h, xt).call(this);
|
|
2685
2704
|
}, La = function(t) {
|
|
2686
|
-
!e(this, gt) || t.target instanceof rt || t.target instanceof
|
|
2687
|
-
},
|
|
2705
|
+
!e(this, gt) || t.target instanceof rt || t.target instanceof cr || t.target instanceof ni || (this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, ""));
|
|
2706
|
+
}, Sa = function(t) {
|
|
2688
2707
|
this.hasAttribute(r.USER_INTERACTING) || n(this, h, xt).call(this);
|
|
2689
|
-
}, Oi = new WeakMap(),
|
|
2708
|
+
}, Oi = new WeakMap(), Xs = new WeakMap(), js = new WeakMap(), Ca = function(t) {
|
|
2690
2709
|
var p, v;
|
|
2691
2710
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
2692
|
-
if (!(i || s || !
|
|
2711
|
+
if (!(i || s || !on.includes(o) || (((p = t.target) == null ? void 0 : p.keysUsed) || []).includes(o)))
|
|
2693
2712
|
switch (o) {
|
|
2694
2713
|
case "f":
|
|
2695
2714
|
this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, "");
|
|
@@ -2701,7 +2720,7 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
|
|
|
2701
2720
|
(v = this.querySelector("vindral-scroll-overlay")) == null || v.setAttribute("open", "");
|
|
2702
2721
|
break;
|
|
2703
2722
|
}
|
|
2704
|
-
}, Hi = new WeakMap(),
|
|
2723
|
+
}, Hi = new WeakMap(), Ys = new WeakMap(), Js = new WeakMap(), oe = new WeakMap(), Cn = function() {
|
|
2705
2724
|
return B(this, null, function* () {
|
|
2706
2725
|
if (!e(this, b) || !e(this, ft))
|
|
2707
2726
|
return;
|
|
@@ -2714,58 +2733,63 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
|
|
|
2714
2733
|
n(this, h, E).call(this, r.CHANNELS, JSON.stringify(i));
|
|
2715
2734
|
}
|
|
2716
2735
|
d(this, Ot, window.setTimeout(() => {
|
|
2717
|
-
n(this, h,
|
|
2736
|
+
n(this, h, Cn).call(this);
|
|
2718
2737
|
}, 1e4));
|
|
2719
2738
|
});
|
|
2720
|
-
},
|
|
2739
|
+
}, xn = function() {
|
|
2721
2740
|
!this.hasAttribute(r.USER_INTERACTING) || this.hasAttribute(r.UI_LOCKED) || (this.dispatchEvent(
|
|
2722
2741
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
|
|
2723
2742
|
), this.removeAttribute(r.USER_INTERACTING));
|
|
2724
|
-
},
|
|
2743
|
+
}, ys = function() {
|
|
2725
2744
|
this.hasAttribute(r.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2726
2745
|
this.setAttribute(r.USER_INTERACTING, ""), this.dispatchEvent(
|
|
2727
2746
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !0 } })
|
|
2728
2747
|
);
|
|
2729
2748
|
});
|
|
2730
2749
|
}, xt = function() {
|
|
2731
|
-
n(this, h,
|
|
2732
|
-
n(this, h,
|
|
2750
|
+
n(this, h, ys).call(this), e(this, Mt) && clearTimeout(e(this, Mt)), e(this, mi) && d(this, Mt, self.setTimeout(() => {
|
|
2751
|
+
n(this, h, xn).call(this);
|
|
2733
2752
|
}, e(this, mi)));
|
|
2734
|
-
},
|
|
2753
|
+
}, /** Syncs subtitle offset from CSS to media element for canvas rendering */
|
|
2754
|
+
xa = function() {
|
|
2755
|
+
var i, s;
|
|
2756
|
+
const t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2757
|
+
(s = (i = e(this, b)) == null ? void 0 : i.mediaElement) == null || s.style.setProperty("--vindral-subtitle-offset", t);
|
|
2758
|
+
}, ks = function() {
|
|
2735
2759
|
var t;
|
|
2736
|
-
n(this, h,
|
|
2760
|
+
n(this, h, Es).call(this), n(this, h, Rn).call(this), (t = e(this, K)) == null || t.request().catch((i) => {
|
|
2737
2761
|
e(this, F).warn("Failed to enter picture in picture:", i);
|
|
2738
2762
|
});
|
|
2739
|
-
},
|
|
2763
|
+
}, Is = function() {
|
|
2740
2764
|
var t;
|
|
2741
2765
|
(t = e(this, K)) == null || t.exit().catch((i) => {
|
|
2742
2766
|
e(this, F).warn("Failed to exit picture in picture:", i);
|
|
2743
2767
|
});
|
|
2744
|
-
},
|
|
2745
|
-
const t = n(this, h,
|
|
2768
|
+
}, Na = function() {
|
|
2769
|
+
const t = n(this, h, As).call(this);
|
|
2746
2770
|
if (!t) {
|
|
2747
2771
|
console.warn("No fullscreen target available"), this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, h, E).call(this, r.FULLSCREEN, "");
|
|
2748
2772
|
return;
|
|
2749
2773
|
}
|
|
2750
|
-
t != null && t.isFullscreenApiSupported() ? (n(this, h,
|
|
2751
|
-
e(this,
|
|
2774
|
+
t != null && t.isFullscreenApiSupported() ? (n(this, h, Rn).call(this), t == null || t.request().then(() => {
|
|
2775
|
+
e(this, Ws).call(this);
|
|
2752
2776
|
}).catch((i) => {
|
|
2753
2777
|
e(this, F).warn("Failed to enter fullscreen:", i);
|
|
2754
2778
|
})) : (this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, h, E).call(this, r.FULLSCREEN, ""));
|
|
2755
|
-
},
|
|
2756
|
-
const t = n(this, h,
|
|
2779
|
+
}, Nn = function() {
|
|
2780
|
+
const t = n(this, h, As).call(this);
|
|
2757
2781
|
t != null && t.isFullscreenApiSupported() ? t == null || t.exit().then(() => {
|
|
2758
|
-
e(this,
|
|
2782
|
+
e(this, Qs).call(this);
|
|
2759
2783
|
}).catch((i) => {
|
|
2760
2784
|
e(this, F).warn("Failed to exit fullscreen:", i);
|
|
2761
|
-
}) : (this.removeAttribute(r.FULLSCREEN_FALLBACK), n(this, h,
|
|
2762
|
-
},
|
|
2785
|
+
}) : (this.removeAttribute(r.FULLSCREEN_FALLBACK), n(this, h, T).call(this, r.FULLSCREEN));
|
|
2786
|
+
}, Ws = new WeakMap(), Qs = new WeakMap(), Rn = function() {
|
|
2763
2787
|
if (!e(this, b)) return;
|
|
2764
2788
|
e(this, b).emitter.emit("ios-hack: reset size");
|
|
2765
2789
|
}, E = function(t, i) {
|
|
2766
2790
|
var s;
|
|
2767
2791
|
(s = e(this, vt).get(t)) == null || s.forEach((o) => o.setAttribute(t, i));
|
|
2768
|
-
},
|
|
2792
|
+
}, T = function(t) {
|
|
2769
2793
|
var i;
|
|
2770
2794
|
(i = e(this, vt).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
|
|
2771
2795
|
}, m(Ye, "observedAttributes", [
|
|
@@ -2800,23 +2824,26 @@ zs = new WeakMap(), vt = new WeakMap(), mi = new WeakMap(), Mt = new WeakMap(),
|
|
|
2800
2824
|
"drm-playready-video-robustness",
|
|
2801
2825
|
"drm-playready-audio-robustness",
|
|
2802
2826
|
"webtransport-enabled",
|
|
2827
|
+
"webcodecs-enabled",
|
|
2828
|
+
"webcodecs-hardware-acceleration",
|
|
2829
|
+
"offscreen-canvas-enabled",
|
|
2803
2830
|
"reconnect-retries",
|
|
2804
2831
|
"auto-instance-enabled",
|
|
2805
2832
|
"language"
|
|
2806
|
-
]), l(Ye,
|
|
2833
|
+
]), l(Ye, Bs, "https://lb.cdn.vindral.com");
|
|
2807
2834
|
let ri = Ye;
|
|
2808
|
-
const
|
|
2835
|
+
const Ra = document.createElement("template"), bl = (
|
|
2809
2836
|
/* SVG */
|
|
2810
2837
|
`
|
|
2811
2838
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-maximize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /></svg>
|
|
2812
2839
|
`
|
|
2813
|
-
),
|
|
2840
|
+
), ml = (
|
|
2814
2841
|
/* SVG */
|
|
2815
2842
|
`
|
|
2816
2843
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-minimize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 19v-2a2 2 0 0 1 2 -2h2" /><path d="M15 5v2a2 2 0 0 0 2 2h2" /><path d="M5 15h2a2 2 0 0 1 2 2v2" /><path d="M5 9h2a2 2 0 0 0 2 -2v-2" /></svg>
|
|
2817
2844
|
`
|
|
2818
2845
|
);
|
|
2819
|
-
|
|
2846
|
+
Ra.innerHTML = /* HTML */
|
|
2820
2847
|
`
|
|
2821
2848
|
<style>
|
|
2822
2849
|
:host {
|
|
@@ -2833,14 +2860,14 @@ xa.innerHTML = /* HTML */
|
|
|
2833
2860
|
</style>
|
|
2834
2861
|
|
|
2835
2862
|
<slot name="icon">
|
|
2836
|
-
<slot name="enter">${
|
|
2837
|
-
<slot name="exit">${
|
|
2863
|
+
<slot name="enter">${bl}</slot>
|
|
2864
|
+
<slot name="exit">${ml}</slot>
|
|
2838
2865
|
</slot>
|
|
2839
2866
|
`;
|
|
2840
2867
|
const Je = class Je extends rt {
|
|
2841
2868
|
constructor() {
|
|
2842
2869
|
var a;
|
|
2843
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2870
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Ra.content.cloneNode(!0));
|
|
2844
2871
|
}
|
|
2845
2872
|
connectedCallback() {
|
|
2846
2873
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2863,14 +2890,14 @@ const Je = class Je extends rt {
|
|
|
2863
2890
|
}
|
|
2864
2891
|
};
|
|
2865
2892
|
m(Je, "observedAttributes", [...J(Je, Je, "observedAttributes"), r.FULLSCREEN]);
|
|
2866
|
-
let
|
|
2867
|
-
const
|
|
2893
|
+
let Un = Je;
|
|
2894
|
+
const vl = (
|
|
2868
2895
|
/* SVG */
|
|
2869
2896
|
`
|
|
2870
2897
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 5h7" /><path d="M9 3v2c0 4.418 -2.239 8 -5 8" /><path d="M5 9c0 2.144 2.952 3.908 6.7 4" /><path d="M12 20l4 -9l4 9" /><path d="M19.1 18h-6.2" /></svg>
|
|
2871
2898
|
`
|
|
2872
|
-
),
|
|
2873
|
-
|
|
2899
|
+
), Ua = document.createElement("template");
|
|
2900
|
+
Ua.innerHTML = /* HTML */
|
|
2874
2901
|
`
|
|
2875
2902
|
<style>
|
|
2876
2903
|
:host(:not([hidden])) {
|
|
@@ -2878,38 +2905,38 @@ Na.innerHTML = /* HTML */
|
|
|
2878
2905
|
}
|
|
2879
2906
|
</style>
|
|
2880
2907
|
|
|
2881
|
-
<slot name="button">${
|
|
2908
|
+
<slot name="button">${vl}</slot>
|
|
2882
2909
|
<slot name="listbox" hidden>
|
|
2883
2910
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2884
2911
|
</slot>
|
|
2885
2912
|
`;
|
|
2886
|
-
var zi,
|
|
2887
|
-
const We = class We extends
|
|
2913
|
+
var zi, _n;
|
|
2914
|
+
const We = class We extends cr {
|
|
2888
2915
|
constructor() {
|
|
2889
2916
|
var t, i, s, o;
|
|
2890
2917
|
super();
|
|
2891
2918
|
l(this, zi);
|
|
2892
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
2919
|
+
(t = this.shadowRoot) == null || t.appendChild(Ua.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
|
|
2893
2920
|
}
|
|
2894
2921
|
connectedCallback() {
|
|
2895
|
-
super.connectedCallback(), n(this, zi,
|
|
2922
|
+
super.connectedCallback(), n(this, zi, _n).call(this), this.setAttribute("aria-label", "Languages");
|
|
2896
2923
|
}
|
|
2897
2924
|
attributeChangedCallback(t, i, s) {
|
|
2898
|
-
super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this, zi,
|
|
2925
|
+
super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this, zi, _n).call(this);
|
|
2899
2926
|
}
|
|
2900
2927
|
};
|
|
2901
|
-
zi = new WeakSet(),
|
|
2928
|
+
zi = new WeakSet(), _n = function() {
|
|
2902
2929
|
const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(r.LANGUAGES)), s = t(this.getAttribute(r.TEXT_TRACKS));
|
|
2903
2930
|
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2904
2931
|
}, m(We, "observedAttributes", [...J(We, We, "observedAttributes"), r.LANGUAGES, r.TEXT_TRACKS]);
|
|
2905
|
-
let
|
|
2906
|
-
const
|
|
2932
|
+
let Pn = We;
|
|
2933
|
+
const Pa = document.createElement("template"), fl = (
|
|
2907
2934
|
/* SVG */
|
|
2908
2935
|
`
|
|
2909
2936
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
|
|
2910
2937
|
`
|
|
2911
2938
|
);
|
|
2912
|
-
|
|
2939
|
+
Pa.innerHTML = /* HTML */
|
|
2913
2940
|
`
|
|
2914
2941
|
<style>
|
|
2915
2942
|
:host {
|
|
@@ -2985,7 +3012,7 @@ Ra.innerHTML = /* HTML */
|
|
|
2985
3012
|
}
|
|
2986
3013
|
|
|
2987
3014
|
[role="menuitem"][aria-selected="true"]::before {
|
|
2988
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3015
|
+
content: url("data:image/svg+xml,${encodeURIComponent(fl)}");
|
|
2989
3016
|
position: absolute;
|
|
2990
3017
|
left: var(--padding-3);
|
|
2991
3018
|
top: calc(50% - 8px);
|
|
@@ -3024,8 +3051,8 @@ Ra.innerHTML = /* HTML */
|
|
|
3024
3051
|
<div class="menu"></div>
|
|
3025
3052
|
</div>
|
|
3026
3053
|
`;
|
|
3027
|
-
var Bi, $i, Gi, Ki, lt, Q, le, zt, _e, qi, At, ht, I,
|
|
3028
|
-
class
|
|
3054
|
+
var Bi, $i, Gi, Ki, lt, Q, le, zt, _e, qi, At, ht, I, Ma, Da, Mn, Dn, ws, Ke, qe, Fa, Oa, Ha, Fn, On, za;
|
|
3055
|
+
class _a extends HTMLElement {
|
|
3029
3056
|
constructor() {
|
|
3030
3057
|
super();
|
|
3031
3058
|
l(this, I);
|
|
@@ -3042,14 +3069,14 @@ class Ua extends HTMLElement {
|
|
|
3042
3069
|
l(this, At, null);
|
|
3043
3070
|
l(this, ht, null);
|
|
3044
3071
|
m(this, "handleEvent", (t) => {
|
|
3045
|
-
t.type === "keydown" && n(this, I,
|
|
3072
|
+
t.type === "keydown" && n(this, I, Oa).call(this, t);
|
|
3046
3073
|
});
|
|
3047
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3074
|
+
this.attachShadow({ mode: "open" }).appendChild(Pa.content.cloneNode(!0));
|
|
3048
3075
|
}
|
|
3049
3076
|
connectedCallback() {
|
|
3050
3077
|
var i, s, o;
|
|
3051
3078
|
const t = this.getRootNode();
|
|
3052
|
-
t instanceof ShadowRoot && (d(this, _e, t.host.closest("vindral-controller")), (i = e(this, _e)) == null || i.connectListener(this), d(this, le, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), d(this, zt, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), n(this, I,
|
|
3079
|
+
t instanceof ShadowRoot && (d(this, _e, t.host.closest("vindral-controller")), (i = e(this, _e)) == null || i.connectListener(this), d(this, le, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), d(this, zt, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), n(this, I, Ma).call(this), n(this, I, Da).call(this), d(this, qi, t.host), this.addEventListener("keydown", this));
|
|
3053
3080
|
}
|
|
3054
3081
|
disconnectedCallback() {
|
|
3055
3082
|
this.removeEventListener("keydown", this);
|
|
@@ -3058,10 +3085,10 @@ class Ua extends HTMLElement {
|
|
|
3058
3085
|
i !== s && (t === r.LANGUAGES && s && (this.languages = JSON.parse(s)), t === r.TEXT_TRACKS && s && (this.textTracks = JSON.parse(s)), t === r.LANGUAGE && (this.language = s), t === r.TEXT_TRACK && (this.textTrack = s));
|
|
3059
3086
|
}
|
|
3060
3087
|
set languages(t) {
|
|
3061
|
-
d(this, Bi, t), n(this, I,
|
|
3088
|
+
d(this, Bi, t), n(this, I, Dn).call(this), n(this, I, Ke).call(this);
|
|
3062
3089
|
}
|
|
3063
3090
|
set textTracks(t) {
|
|
3064
|
-
d(this, $i, t), n(this, I,
|
|
3091
|
+
d(this, $i, t), n(this, I, Mn).call(this), n(this, I, qe).call(this);
|
|
3065
3092
|
}
|
|
3066
3093
|
set language(t) {
|
|
3067
3094
|
d(this, Gi, t), n(this, I, Ke).call(this);
|
|
@@ -3076,7 +3103,7 @@ class Ua extends HTMLElement {
|
|
|
3076
3103
|
e(this, At) ? e(this, At).focus() : e(this, ht) && e(this, ht).focus();
|
|
3077
3104
|
}
|
|
3078
3105
|
}
|
|
3079
|
-
Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(), lt = new WeakMap(), Q = new WeakMap(), le = new WeakMap(), zt = new WeakMap(), _e = new WeakMap(), qi = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), I = new WeakSet(),
|
|
3106
|
+
Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(), lt = new WeakMap(), Q = new WeakMap(), le = new WeakMap(), zt = new WeakMap(), _e = new WeakMap(), qi = new WeakMap(), At = new WeakMap(), ht = new WeakMap(), I = new WeakSet(), Ma = function() {
|
|
3080
3107
|
const t = (s) => {
|
|
3081
3108
|
s.forEach((o) => {
|
|
3082
3109
|
if (o.intersectionRatio !== 1)
|
|
@@ -3093,23 +3120,23 @@ Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(),
|
|
|
3093
3120
|
threshold: 0
|
|
3094
3121
|
// 0 means any intersection is enough to be considered "inside"
|
|
3095
3122
|
}).observe(this);
|
|
3096
|
-
},
|
|
3097
|
-
e(this, le) && (n(this, I,
|
|
3098
|
-
},
|
|
3123
|
+
}, Da = function() {
|
|
3124
|
+
e(this, le) && (n(this, I, Dn).call(this), n(this, I, Ke).call(this)), e(this, zt) && (n(this, I, Mn).call(this), n(this, I, qe).call(this));
|
|
3125
|
+
}, Mn = function() {
|
|
3099
3126
|
e(this, zt).innerHTML = "", d(this, Q, []);
|
|
3100
|
-
const t = n(this, I,
|
|
3127
|
+
const t = n(this, I, ws).call(this, "Off", "textTrack", void 0);
|
|
3101
3128
|
e(this, zt).appendChild(t), e(this, Q).push({ element: t, value: void 0 }), e(this, $i).forEach((i) => {
|
|
3102
|
-
const s = n(this, I,
|
|
3129
|
+
const s = n(this, I, ws).call(this, i, "textTrack", i);
|
|
3103
3130
|
e(this, zt).appendChild(s), e(this, Q).push({ element: s, value: i });
|
|
3104
3131
|
}), n(this, I, qe).call(this);
|
|
3105
|
-
},
|
|
3132
|
+
}, Dn = function() {
|
|
3106
3133
|
e(this, le).innerHTML = "", d(this, lt, []), e(this, Bi).forEach((t) => {
|
|
3107
|
-
const i = n(this, I,
|
|
3134
|
+
const i = n(this, I, ws).call(this, t, "language", t);
|
|
3108
3135
|
e(this, le).appendChild(i), e(this, lt).push({ element: i, value: t });
|
|
3109
3136
|
}), n(this, I, Ke).call(this);
|
|
3110
|
-
},
|
|
3137
|
+
}, ws = function(t, i, s) {
|
|
3111
3138
|
const o = document.createElement("div");
|
|
3112
|
-
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => n(this, I,
|
|
3139
|
+
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => n(this, I, Fa).call(this, s, i)), o;
|
|
3113
3140
|
}, Ke = function() {
|
|
3114
3141
|
e(this, At) && (e(this, At).removeAttribute("aria-selected"), e(this, At).tabIndex = -1);
|
|
3115
3142
|
const t = e(this, lt).find((i) => i.value === e(this, Gi));
|
|
@@ -3123,38 +3150,38 @@ Bi = new WeakMap(), $i = new WeakMap(), Gi = new WeakMap(), Ki = new WeakMap(),
|
|
|
3123
3150
|
const i = e(this, Q).find((s) => s.value === void 0);
|
|
3124
3151
|
i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, d(this, ht, i.element));
|
|
3125
3152
|
}
|
|
3126
|
-
},
|
|
3153
|
+
}, Fa = function(t, i) {
|
|
3127
3154
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
3128
3155
|
const s = i === "language" ? k.SET_LANGUAGE : k.SET_TEXT_TRACK;
|
|
3129
3156
|
this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
|
|
3130
|
-
},
|
|
3157
|
+
}, Oa = function(t) {
|
|
3131
3158
|
var p, v, A;
|
|
3132
3159
|
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
3133
|
-
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, qi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, I,
|
|
3134
|
-
},
|
|
3160
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, qi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, I, On).call(this)) == null ? void 0 : v.element) == null || A.click() : n(this, I, Ha).call(this, t));
|
|
3161
|
+
}, Ha = function(t) {
|
|
3135
3162
|
var A;
|
|
3136
|
-
const { key: i } = t, s = [...e(this, lt), ...e(this, Q)], o = (A = n(this, I,
|
|
3163
|
+
const { key: i } = t, s = [...e(this, lt), ...e(this, Q)], o = (A = n(this, I, On).call(this)) != null ? A : s[0];
|
|
3137
3164
|
if (!o) return;
|
|
3138
3165
|
const u = s.indexOf(o);
|
|
3139
3166
|
let p = Math.max(0, u);
|
|
3140
|
-
i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : i === "ArrowLeft" ? p = n(this, I,
|
|
3167
|
+
i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : i === "ArrowLeft" ? p = n(this, I, Fn).call(this, u, "left") : i === "ArrowRight" ? p = n(this, I, Fn).call(this, u, "right") : t.key === "Home" ? p = 0 : t.key === "End" && (p = s.length - 1), p < 0 && (p = s.length - 1), p > s.length - 1 && (p = 0);
|
|
3141
3168
|
const v = s[p];
|
|
3142
|
-
v && (n(this, I,
|
|
3143
|
-
},
|
|
3169
|
+
v && (n(this, I, za).call(this, v.value), v.element.focus());
|
|
3170
|
+
}, Fn = function(t, i) {
|
|
3144
3171
|
const s = e(this, lt).length, o = e(this, Q).length;
|
|
3145
3172
|
return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
|
|
3146
|
-
},
|
|
3173
|
+
}, On = function() {
|
|
3147
3174
|
return [...e(this, lt), ...e(this, Q)].find((t) => t.element.tabIndex === 0);
|
|
3148
|
-
},
|
|
3175
|
+
}, za = function(t) {
|
|
3149
3176
|
for (const i of [...e(this, lt), ...e(this, Q)])
|
|
3150
3177
|
i.element.tabIndex = i.value === t ? 0 : -1;
|
|
3151
|
-
}, m(
|
|
3178
|
+
}, m(_a, "observedAttributes", [
|
|
3152
3179
|
r.LANGUAGES,
|
|
3153
3180
|
r.TEXT_TRACKS,
|
|
3154
3181
|
r.LANGUAGE,
|
|
3155
3182
|
r.TEXT_TRACK
|
|
3156
3183
|
]);
|
|
3157
|
-
const
|
|
3184
|
+
const Ba = document.createElement("template"), gl = (
|
|
3158
3185
|
/* SVG */
|
|
3159
3186
|
`
|
|
3160
3187
|
<svg xmlns="http://www.w3.org/2000/svg" width="5" height="5" viewBox="0 0 5 5" fill="currentColor">
|
|
@@ -3162,7 +3189,7 @@ const Ha = document.createElement("template"), pl = (
|
|
|
3162
3189
|
</svg>
|
|
3163
3190
|
`
|
|
3164
3191
|
);
|
|
3165
|
-
|
|
3192
|
+
Ba.innerHTML = /* HTML */
|
|
3166
3193
|
`
|
|
3167
3194
|
<style>
|
|
3168
3195
|
:host {
|
|
@@ -3224,13 +3251,13 @@ Ha.innerHTML = /* HTML */
|
|
|
3224
3251
|
}
|
|
3225
3252
|
</style>
|
|
3226
3253
|
|
|
3227
|
-
<slot name="icon">${
|
|
3254
|
+
<slot name="icon">${gl}</slot>
|
|
3228
3255
|
<span class="live-text">LIVE</span>
|
|
3229
3256
|
`;
|
|
3230
3257
|
const Qe = class Qe extends rt {
|
|
3231
3258
|
constructor() {
|
|
3232
3259
|
var a;
|
|
3233
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
3260
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Ba.content.cloneNode(!0));
|
|
3234
3261
|
}
|
|
3235
3262
|
connectedCallback() {
|
|
3236
3263
|
super.connectedCallback(), this.updateState();
|
|
@@ -3258,9 +3285,13 @@ const Qe = class Qe extends rt {
|
|
|
3258
3285
|
this.isLive || this.dispatchEvent(new CustomEvent(k.GO_LIVE, { bubbles: !0, composed: !0 }));
|
|
3259
3286
|
}
|
|
3260
3287
|
};
|
|
3261
|
-
m(Qe, "observedAttributes", [
|
|
3262
|
-
|
|
3263
|
-
|
|
3288
|
+
m(Qe, "observedAttributes", [
|
|
3289
|
+
...J(Qe, Qe, "observedAttributes"),
|
|
3290
|
+
r.TIMESHIFT_POSITION,
|
|
3291
|
+
r.DURATION
|
|
3292
|
+
]);
|
|
3293
|
+
let Hn = Qe;
|
|
3294
|
+
const $a = document.createElement("template"), El = (
|
|
3264
3295
|
/* SVG */
|
|
3265
3296
|
`
|
|
3266
3297
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -3268,14 +3299,14 @@ const za = document.createElement("template"), bl = (
|
|
|
3268
3299
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
3269
3300
|
</g></svg>
|
|
3270
3301
|
`
|
|
3271
|
-
),
|
|
3302
|
+
), Al = (
|
|
3272
3303
|
/* SVG */
|
|
3273
3304
|
`
|
|
3274
3305
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
3275
3306
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" /></svg>
|
|
3276
3307
|
`
|
|
3277
3308
|
);
|
|
3278
|
-
|
|
3309
|
+
$a.innerHTML = /* HTML */
|
|
3279
3310
|
`
|
|
3280
3311
|
<style>
|
|
3281
3312
|
:host {
|
|
@@ -3292,14 +3323,14 @@ za.innerHTML = /* HTML */
|
|
|
3292
3323
|
</style>
|
|
3293
3324
|
|
|
3294
3325
|
<slot name="icon">
|
|
3295
|
-
<slot name="mute">${
|
|
3296
|
-
<slot name="unmute">${
|
|
3326
|
+
<slot name="mute">${El}</slot>
|
|
3327
|
+
<slot name="unmute">${Al}</slot>
|
|
3297
3328
|
</slot>
|
|
3298
3329
|
`;
|
|
3299
3330
|
const Ze = class Ze extends rt {
|
|
3300
3331
|
constructor() {
|
|
3301
3332
|
var a;
|
|
3302
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
3333
|
+
super(), (a = this.shadowRoot) == null || a.appendChild($a.content.cloneNode(!0));
|
|
3303
3334
|
}
|
|
3304
3335
|
connectedCallback() {
|
|
3305
3336
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3322,14 +3353,14 @@ const Ze = class Ze extends rt {
|
|
|
3322
3353
|
}
|
|
3323
3354
|
};
|
|
3324
3355
|
m(Ze, "observedAttributes", [...J(Ze, Ze, "observedAttributes"), r.MUTED]);
|
|
3325
|
-
let
|
|
3326
|
-
const
|
|
3356
|
+
let zn = Ze;
|
|
3357
|
+
const Ga = document.createElement("template"), yl = (
|
|
3327
3358
|
/* SVG */
|
|
3328
3359
|
`
|
|
3329
3360
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19 4a3 3 0 0 1 3 3v4a1 1 0 0 1 -2 0v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h6a1 1 0 0 1 0 2h-6a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3z" /><path d="M20 13a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-5a2 2 0 0 1 -2 -2v-3a2 2 0 0 1 2 -2z" /></svg>
|
|
3330
3361
|
`
|
|
3331
3362
|
);
|
|
3332
|
-
|
|
3363
|
+
Ga.innerHTML = /* HTML */
|
|
3333
3364
|
`
|
|
3334
3365
|
<style>
|
|
3335
3366
|
:host {
|
|
@@ -3340,12 +3371,12 @@ Ba.innerHTML = /* HTML */
|
|
|
3340
3371
|
display: none !important;
|
|
3341
3372
|
}
|
|
3342
3373
|
</style>
|
|
3343
|
-
<slot name="icon">${
|
|
3374
|
+
<slot name="icon">${yl}</slot>
|
|
3344
3375
|
`;
|
|
3345
3376
|
const ti = class ti extends rt {
|
|
3346
3377
|
constructor() {
|
|
3347
3378
|
var a;
|
|
3348
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
3379
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Ga.content.cloneNode(!0));
|
|
3349
3380
|
}
|
|
3350
3381
|
connectedCallback() {
|
|
3351
3382
|
super.connectedCallback(), this.setAttribute(
|
|
@@ -3374,19 +3405,19 @@ const ti = class ti extends rt {
|
|
|
3374
3405
|
}
|
|
3375
3406
|
};
|
|
3376
3407
|
m(ti, "observedAttributes", [...J(ti, ti, "observedAttributes"), r.IS_PIP, r.PIP_AVAILABLE]);
|
|
3377
|
-
let
|
|
3378
|
-
const
|
|
3408
|
+
let Bn = ti;
|
|
3409
|
+
const Ka = document.createElement("template"), kl = (
|
|
3379
3410
|
/* SVG */
|
|
3380
3411
|
`
|
|
3381
3412
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
|
|
3382
3413
|
`
|
|
3383
|
-
),
|
|
3414
|
+
), Il = (
|
|
3384
3415
|
/* SVG */
|
|
3385
3416
|
`
|
|
3386
3417
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>
|
|
3387
3418
|
`
|
|
3388
3419
|
);
|
|
3389
|
-
|
|
3420
|
+
Ka.innerHTML = /* HTML */
|
|
3390
3421
|
`
|
|
3391
3422
|
<style>
|
|
3392
3423
|
:host {
|
|
@@ -3403,14 +3434,14 @@ $a.innerHTML = /* HTML */
|
|
|
3403
3434
|
</style>
|
|
3404
3435
|
|
|
3405
3436
|
<slot name="icon">
|
|
3406
|
-
<slot name="play">${
|
|
3407
|
-
<slot name="pause">${
|
|
3437
|
+
<slot name="play">${kl}</slot>
|
|
3438
|
+
<slot name="pause">${Il}</slot>
|
|
3408
3439
|
</slot>
|
|
3409
3440
|
`;
|
|
3410
3441
|
const ei = class ei extends rt {
|
|
3411
3442
|
constructor() {
|
|
3412
3443
|
var a;
|
|
3413
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
3444
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Ka.content.cloneNode(!0));
|
|
3414
3445
|
}
|
|
3415
3446
|
connectedCallback() {
|
|
3416
3447
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3433,15 +3464,15 @@ const ei = class ei extends rt {
|
|
|
3433
3464
|
}
|
|
3434
3465
|
};
|
|
3435
3466
|
m(ei, "observedAttributes", [...J(ei, ei, "observedAttributes"), r.PAUSED]);
|
|
3436
|
-
let
|
|
3467
|
+
let $n = ei;
|
|
3437
3468
|
const Z = {
|
|
3438
3469
|
TITLE: "title",
|
|
3439
3470
|
OFFLINE: "offline",
|
|
3440
3471
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3441
3472
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3442
|
-
},
|
|
3443
|
-
var Vi, Me, Bt, he, $t, Gt, yt, Y,
|
|
3444
|
-
class
|
|
3473
|
+
}, wl = Object.values(Z);
|
|
3474
|
+
var Vi, Me, Bt, he, $t, Gt, yt, Y, Gn, qa, Kn, qn;
|
|
3475
|
+
class Tl extends ds {
|
|
3445
3476
|
constructor(t) {
|
|
3446
3477
|
super();
|
|
3447
3478
|
l(this, Y);
|
|
@@ -3452,21 +3483,21 @@ class Al extends ds {
|
|
|
3452
3483
|
l(this, $t, !0);
|
|
3453
3484
|
l(this, Gt, null);
|
|
3454
3485
|
l(this, yt, null);
|
|
3455
|
-
d(this, Me, t), d(this, Vi, new
|
|
3486
|
+
d(this, Me, t), d(this, Vi, new Zo({
|
|
3456
3487
|
publicEndpoint: t.url,
|
|
3457
3488
|
tokenFactory: () => t.authenticationToken
|
|
3458
3489
|
}));
|
|
3459
3490
|
}
|
|
3460
3491
|
start(t = 5e3) {
|
|
3461
|
-
e(this, yt) && clearInterval(e(this, yt)), d(this, Bt, !1), d(this, he, !1), n(this, Y,
|
|
3462
|
-
!e(this, he) && !e(this, Me).infiniteReconnect && !e(this, Gt) && e(this, $t) && d(this, Gt, window.setTimeout(() => n(this, Y,
|
|
3492
|
+
e(this, yt) && clearInterval(e(this, yt)), d(this, Bt, !1), d(this, he, !1), n(this, Y, qn).call(this), n(this, Y, Gn).call(this), d(this, yt, window.setInterval(() => {
|
|
3493
|
+
!e(this, he) && !e(this, Me).infiniteReconnect && !e(this, Gt) && e(this, $t) && d(this, Gt, window.setTimeout(() => n(this, Y, qa).call(this), 300 * 1e3)), !e(this, he) && e(this, $t) && n(this, Y, Gn).call(this);
|
|
3463
3494
|
}, t));
|
|
3464
3495
|
}
|
|
3465
3496
|
stop() {
|
|
3466
|
-
n(this, Y,
|
|
3497
|
+
n(this, Y, Kn).call(this), e(this, yt) && (window.clearInterval(e(this, yt)), d(this, yt, null));
|
|
3467
3498
|
}
|
|
3468
3499
|
}
|
|
3469
|
-
Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(), $t = new WeakMap(), Gt = new WeakMap(), yt = new WeakMap(), Y = new WeakSet(),
|
|
3500
|
+
Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(), $t = new WeakMap(), Gt = new WeakMap(), yt = new WeakMap(), Y = new WeakSet(), Gn = function() {
|
|
3470
3501
|
return B(this, null, function* () {
|
|
3471
3502
|
if (e(this, Bt))
|
|
3472
3503
|
return;
|
|
@@ -3475,22 +3506,22 @@ Vi = new WeakMap(), Me = new WeakMap(), Bt = new WeakMap(), he = new WeakMap(),
|
|
|
3475
3506
|
try {
|
|
3476
3507
|
const s = yield e(this, Vi).getChannel(e(this, Me).channelId);
|
|
3477
3508
|
if (s.isLive) {
|
|
3478
|
-
d(this, he, !0), n(this, Y,
|
|
3509
|
+
d(this, he, !0), n(this, Y, qn).call(this), this.emit("live", s), d(this, Bt, !1);
|
|
3479
3510
|
return;
|
|
3480
3511
|
}
|
|
3481
3512
|
} catch (s) {
|
|
3482
|
-
|
|
3513
|
+
tl(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
|
|
3483
3514
|
}
|
|
3484
3515
|
e(this, $t) && this.emit("error", { title: t, message: i }), d(this, Bt, !1);
|
|
3485
3516
|
});
|
|
3486
|
-
},
|
|
3517
|
+
}, qa = function() {
|
|
3487
3518
|
this.stop(), d(this, $t, !1), this.emit("timeout");
|
|
3488
|
-
}, Gn = function() {
|
|
3489
|
-
e(this, Gt) && (window.clearTimeout(e(this, Gt)), d(this, Gt, null));
|
|
3490
3519
|
}, Kn = function() {
|
|
3491
|
-
|
|
3520
|
+
e(this, Gt) && (window.clearTimeout(e(this, Gt)), d(this, Gt, null));
|
|
3521
|
+
}, qn = function() {
|
|
3522
|
+
n(this, Y, Kn).call(this), d(this, $t, !0);
|
|
3492
3523
|
};
|
|
3493
|
-
const
|
|
3524
|
+
const Ll = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, Sl = navigator.userAgent.toLowerCase(), Cl = Ll.test(Sl), xl = (c) => ri.observedAttributes.includes(c), Va = (
|
|
3494
3525
|
/* HTML */
|
|
3495
3526
|
`
|
|
3496
3527
|
<style>
|
|
@@ -3502,7 +3533,7 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
3502
3533
|
display: flex;
|
|
3503
3534
|
justify-content: center;
|
|
3504
3535
|
|
|
3505
|
-
--vindral-volume-range-display: ${
|
|
3536
|
+
--vindral-volume-range-display: ${Cl ? "none" : "flex"};
|
|
3506
3537
|
--vindral-airplay-button-display: none;
|
|
3507
3538
|
--vindral-play-overlay-display: none;
|
|
3508
3539
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3574,12 +3605,19 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
3574
3605
|
:host([${r.MEDIA}="video"]) vindral-volume-range {
|
|
3575
3606
|
display: none;
|
|
3576
3607
|
}
|
|
3608
|
+
|
|
3609
|
+
/* Apply subtitle offset when the UI is visible (e.g. during user interaction
|
|
3610
|
+
or when paused with the UI showing) so subtitles sit above the control bar. */
|
|
3611
|
+
vindral-controller[user-interacting],
|
|
3612
|
+
vindral-controller[paused]:not([hide-ui-on-pause]) {
|
|
3613
|
+
--vindral-subtitle-offset: -48px;
|
|
3614
|
+
}
|
|
3577
3615
|
</style>
|
|
3578
3616
|
`
|
|
3579
|
-
),
|
|
3617
|
+
), Nl = (
|
|
3580
3618
|
/* HTML */
|
|
3581
3619
|
`
|
|
3582
|
-
${
|
|
3620
|
+
${Va}
|
|
3583
3621
|
|
|
3584
3622
|
<vindral-controller>
|
|
3585
3623
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3613,10 +3651,10 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
3613
3651
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
3614
3652
|
</vindral-controller>
|
|
3615
3653
|
`
|
|
3616
|
-
),
|
|
3654
|
+
), Rl = (
|
|
3617
3655
|
/* HTML */
|
|
3618
3656
|
`
|
|
3619
|
-
${
|
|
3657
|
+
${Va}
|
|
3620
3658
|
|
|
3621
3659
|
<style>
|
|
3622
3660
|
#control-bar {
|
|
@@ -3639,47 +3677,47 @@ const yl = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
3639
3677
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
3640
3678
|
</vindral-controller>
|
|
3641
3679
|
`
|
|
3642
|
-
),
|
|
3643
|
-
var dt, O, q, kt, It,
|
|
3644
|
-
class
|
|
3680
|
+
), wr = document.createElement("template");
|
|
3681
|
+
var dt, O, q, kt, It, Zs, Xi, _, ja, Vn, Ya, ji, Ts, Nt;
|
|
3682
|
+
class Xa extends HTMLElement {
|
|
3645
3683
|
constructor() {
|
|
3646
3684
|
super();
|
|
3647
|
-
l(this,
|
|
3685
|
+
l(this, _);
|
|
3648
3686
|
l(this, dt);
|
|
3649
3687
|
l(this, O);
|
|
3650
3688
|
l(this, q);
|
|
3651
3689
|
l(this, kt);
|
|
3652
3690
|
l(this, It);
|
|
3653
|
-
l(this,
|
|
3691
|
+
l(this, Zs, () => {
|
|
3654
3692
|
Array.from(this.attributes).forEach((t) => {
|
|
3655
3693
|
e(this, Xi).call(this, t.name, t.value);
|
|
3656
3694
|
});
|
|
3657
3695
|
});
|
|
3658
3696
|
l(this, Xi, (t, i) => {
|
|
3659
|
-
|
|
3697
|
+
xl(t) && (x(i) ? e(this, O).setAttribute(t, i) : e(this, O).removeAttribute(t));
|
|
3660
3698
|
});
|
|
3661
3699
|
l(this, ji, () => {
|
|
3662
3700
|
const t = e(this, O).instance;
|
|
3663
3701
|
t && (t.on("is live", (i) => {
|
|
3664
|
-
i ? (this.removeAttribute(Z.OFFLINE), e(this, q).setAttribute("hidden", "")) : (this.setAttribute(Z.OFFLINE, ""), e(this, q).removeAttribute("hidden"), n(this,
|
|
3702
|
+
i ? (this.removeAttribute(Z.OFFLINE), e(this, q).setAttribute("hidden", "")) : (this.setAttribute(Z.OFFLINE, ""), e(this, q).removeAttribute("hidden"), n(this, _, Nt).call(this, "Stream is offline", "Please stand by"));
|
|
3665
3703
|
}), t.on("channels", (i) => {
|
|
3666
3704
|
const s = e(this, O).getAttribute("channel-id"), o = i.find((u) => u.channelId === s);
|
|
3667
|
-
o && n(this,
|
|
3705
|
+
o && n(this, _, Ts).call(this, o);
|
|
3668
3706
|
}), t.on("channel switch", ({ channelId: i }) => {
|
|
3669
3707
|
const s = t.channels.find((o) => o.channelId === i);
|
|
3670
|
-
s && n(this,
|
|
3708
|
+
s && n(this, _, Ts).call(this, s);
|
|
3671
3709
|
}), t.on("error", (i) => {
|
|
3672
|
-
if (i.code() ===
|
|
3673
|
-
n(this,
|
|
3710
|
+
if (i.code() === jo) {
|
|
3711
|
+
n(this, _, Nt).call(this, "Stream is offline", "Please stand by");
|
|
3674
3712
|
return;
|
|
3675
3713
|
}
|
|
3676
|
-
i.isFatal() && (i.code() ===
|
|
3714
|
+
i.isFatal() && (i.code() === Yo ? n(this, _, Nt).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === Jo ? n(this, _, Nt).call(this, "Stream is offline", "Please stand by") : n(this, _, Nt).call(this, "An error occurred", i.message), e(this, kt).removeAttribute("hidden"), this.setAttribute(Z.OFFLINE, ""), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_FULLSCREEN)), e(this, O).dispatchEvent(new CustomEvent(k.EXIT_PIP)));
|
|
3677
3715
|
}));
|
|
3678
3716
|
});
|
|
3679
|
-
d(this, dt, this.attachShadow({ mode: "open" })), n(this,
|
|
3717
|
+
d(this, dt, this.attachShadow({ mode: "open" })), n(this, _, Vn).call(this), d(this, O, e(this, dt).querySelector("vindral-controller")), d(this, q, e(this, dt).querySelector("#vindral-message")), d(this, kt, e(this, dt).querySelector("#play-overlay"));
|
|
3680
3718
|
}
|
|
3681
3719
|
connectedCallback() {
|
|
3682
|
-
this.setAttribute(Z.OFFLINE, ""), e(this, O).addEventListener("vindral-instance-ready", e(this, ji)), n(this,
|
|
3720
|
+
this.setAttribute(Z.OFFLINE, ""), e(this, O).addEventListener("vindral-instance-ready", e(this, ji)), n(this, _, Ya).call(this);
|
|
3683
3721
|
}
|
|
3684
3722
|
disconnectedCallback() {
|
|
3685
3723
|
var t;
|
|
@@ -3688,10 +3726,10 @@ class qa extends HTMLElement {
|
|
|
3688
3726
|
attributeChangedCallback(t, i, s) {
|
|
3689
3727
|
if (i !== s)
|
|
3690
3728
|
if (t === r.MEDIA)
|
|
3691
|
-
n(this,
|
|
3729
|
+
n(this, _, Vn).call(this);
|
|
3692
3730
|
else if (t === Z.REFRESH_POSTER_ENABLED) {
|
|
3693
3731
|
const o = e(this, dt).querySelector("vindral-poster-overlay");
|
|
3694
|
-
o && (o.disabled =
|
|
3732
|
+
o && (o.disabled = P(this.getAttribute(Z.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3695
3733
|
} else
|
|
3696
3734
|
e(this, Xi).call(this, t, s);
|
|
3697
3735
|
}
|
|
@@ -3702,44 +3740,44 @@ class qa extends HTMLElement {
|
|
|
3702
3740
|
return e(this, O).airPlay;
|
|
3703
3741
|
}
|
|
3704
3742
|
}
|
|
3705
|
-
dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It = new WeakMap(),
|
|
3706
|
-
return
|
|
3707
|
-
},
|
|
3708
|
-
|
|
3709
|
-
const t =
|
|
3743
|
+
dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Zs = new WeakMap(), Xi = new WeakMap(), _ = new WeakSet(), ja = function() {
|
|
3744
|
+
return Sr(this.getAttribute(r.MEDIA)) === "audio" ? Rl : Nl;
|
|
3745
|
+
}, Vn = function() {
|
|
3746
|
+
wr.innerHTML = n(this, _, ja).call(this);
|
|
3747
|
+
const t = wr.content.cloneNode(!0);
|
|
3710
3748
|
d(this, O, t.querySelector("vindral-controller")), d(this, q, t.querySelector("#vindral-message")), d(this, kt, t.querySelector("#play-overlay")), this.children.length > 0 && Array.from(this.children).forEach((i) => {
|
|
3711
3749
|
e(this, O).appendChild(i);
|
|
3712
|
-
}), e(this,
|
|
3713
|
-
},
|
|
3750
|
+
}), e(this, Zs).call(this), e(this, dt).innerHTML = "", e(this, dt).appendChild(t);
|
|
3751
|
+
}, Ya = function() {
|
|
3714
3752
|
var u;
|
|
3715
|
-
if (
|
|
3753
|
+
if (P(this.getAttribute(Z.STREAM_POLL_ENABLED), !0) === !1)
|
|
3716
3754
|
return;
|
|
3717
3755
|
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (u = this.getAttribute("authentication-token")) != null ? u : void 0, o = this.hasAttribute("infinite-reconnect");
|
|
3718
3756
|
if (!t || !i) {
|
|
3719
|
-
this.setAttribute(Z.OFFLINE, ""), n(this,
|
|
3757
|
+
this.setAttribute(Z.OFFLINE, ""), n(this, _, Nt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3720
3758
|
return;
|
|
3721
3759
|
}
|
|
3722
|
-
d(this, It, new
|
|
3760
|
+
d(this, It, new Tl({
|
|
3723
3761
|
url: t,
|
|
3724
3762
|
channelId: i,
|
|
3725
3763
|
authenticationToken: s,
|
|
3726
3764
|
infiniteReconnect: o
|
|
3727
3765
|
})), e(this, It).on("live", (p) => {
|
|
3728
|
-
e(this, O).connect(), this.removeAttribute("offline"), e(this, q).setAttribute("hidden", ""), n(this,
|
|
3766
|
+
e(this, O).connect(), this.removeAttribute("offline"), e(this, q).setAttribute("hidden", ""), n(this, _, Ts).call(this, p);
|
|
3729
3767
|
}), e(this, It).on("timeout", () => {
|
|
3730
3768
|
e(this, q).setAttribute("hidden", ""), e(this, kt).removeAttribute("hidden");
|
|
3731
3769
|
}), e(this, It).on("error", (p) => {
|
|
3732
|
-
this.setAttribute(Z.OFFLINE, ""), n(this,
|
|
3770
|
+
this.setAttribute(Z.OFFLINE, ""), n(this, _, Nt).call(this, p.title, p.message);
|
|
3733
3771
|
}), e(this, kt).addEventListener("click", () => {
|
|
3734
3772
|
e(this, O).connect(), e(this, kt).setAttribute("hidden", ""), e(this, q).setAttribute("hidden", ""), e(this, O).focus();
|
|
3735
3773
|
}), this.hasAttribute("paused") && e(this, It).start();
|
|
3736
3774
|
}, ji = new WeakMap(), Ts = function(t) {
|
|
3737
3775
|
var p, v;
|
|
3738
|
-
const i =
|
|
3776
|
+
const i = Cr(this.getAttribute("title"), !1);
|
|
3739
3777
|
if (!i) return;
|
|
3740
3778
|
const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
|
|
3741
3779
|
let u;
|
|
3742
|
-
typeof s == "string" ? u = s : u = (v = (p = this.instance) == null ? void 0 : p.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0,
|
|
3780
|
+
typeof s == "string" ? u = s : u = (v = (p = this.instance) == null ? void 0 : p.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, sl({
|
|
3743
3781
|
title: o,
|
|
3744
3782
|
poster: u
|
|
3745
3783
|
});
|
|
@@ -3747,9 +3785,9 @@ dt = new WeakMap(), O = new WeakMap(), q = new WeakMap(), kt = new WeakMap(), It
|
|
|
3747
3785
|
e(this, q).setAttribute("title", t), e(this, q).setAttribute("description", i);
|
|
3748
3786
|
const s = this.getAttribute("poster");
|
|
3749
3787
|
s && e(this, q).setAttribute("background-image", s), e(this, q).removeAttribute("hidden");
|
|
3750
|
-
}, m(
|
|
3751
|
-
const
|
|
3752
|
-
|
|
3788
|
+
}, m(Xa, "observedAttributes", [...ri.observedAttributes, ...wl]);
|
|
3789
|
+
const Ja = document.createElement("template");
|
|
3790
|
+
Ja.innerHTML = /* HTML */
|
|
3753
3791
|
`
|
|
3754
3792
|
<style>
|
|
3755
3793
|
:host {
|
|
@@ -3785,9 +3823,9 @@ ja.innerHTML = /* HTML */
|
|
|
3785
3823
|
}
|
|
3786
3824
|
</style>
|
|
3787
3825
|
`;
|
|
3788
|
-
const
|
|
3789
|
-
var De, Kt, de, Fe, nt,
|
|
3790
|
-
class
|
|
3826
|
+
const Ul = 6e3;
|
|
3827
|
+
var De, Kt, de, Fe, nt, Qa, Ls, Xn, tn;
|
|
3828
|
+
class Wa extends HTMLElement {
|
|
3791
3829
|
constructor() {
|
|
3792
3830
|
super();
|
|
3793
3831
|
l(this, nt);
|
|
@@ -3795,25 +3833,25 @@ class Ya extends HTMLElement {
|
|
|
3795
3833
|
l(this, Kt, null);
|
|
3796
3834
|
l(this, de, null);
|
|
3797
3835
|
l(this, Fe, () => {
|
|
3798
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, nt,
|
|
3836
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, nt, Qa).call(this) : n(this, nt, Ls).call(this);
|
|
3799
3837
|
});
|
|
3800
|
-
l(this,
|
|
3838
|
+
l(this, tn, (t) => {
|
|
3801
3839
|
t.forEach((i) => {
|
|
3802
3840
|
i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3803
3841
|
});
|
|
3804
3842
|
});
|
|
3805
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3843
|
+
this.attachShadow({ mode: "open" }).appendChild(Ja.content.cloneNode(!0));
|
|
3806
3844
|
}
|
|
3807
3845
|
connectedCallback() {
|
|
3808
3846
|
var t;
|
|
3809
|
-
d(this, De, this.closest("vindral-controller")), (t = e(this, De)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, Fe)), d(this, de, new IntersectionObserver(e(this,
|
|
3847
|
+
d(this, De, this.closest("vindral-controller")), (t = e(this, De)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, Fe)), d(this, de, new IntersectionObserver(e(this, tn))), e(this, de).observe(this);
|
|
3810
3848
|
}
|
|
3811
3849
|
disconnectedCallback() {
|
|
3812
3850
|
var t, i;
|
|
3813
3851
|
(t = e(this, De)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, Fe)), (i = e(this, de)) == null || i.disconnect(), d(this, de, null), n(this, nt, Ls).call(this);
|
|
3814
3852
|
}
|
|
3815
3853
|
attributeChangedCallback(t, i, s) {
|
|
3816
|
-
i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, nt,
|
|
3854
|
+
i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, nt, Xn).call(this), (t === r.PAUSED || t === "disabled" || t === "intersecting") && e(this, Fe).call(this));
|
|
3817
3855
|
}
|
|
3818
3856
|
get disabled() {
|
|
3819
3857
|
return this.hasAttribute("disabled");
|
|
@@ -3828,21 +3866,21 @@ class Ya extends HTMLElement {
|
|
|
3828
3866
|
return this.hasAttribute(r.PAUSED);
|
|
3829
3867
|
}
|
|
3830
3868
|
}
|
|
3831
|
-
De = new WeakMap(), Kt = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), nt = new WeakSet(),
|
|
3832
|
-
e(this, Kt) === null && (n(this, nt, Ls).call(this), d(this, Kt, window.setInterval(() => n(this, nt,
|
|
3869
|
+
De = new WeakMap(), Kt = new WeakMap(), de = new WeakMap(), Fe = new WeakMap(), nt = new WeakSet(), Qa = function() {
|
|
3870
|
+
e(this, Kt) === null && (n(this, nt, Ls).call(this), d(this, Kt, window.setInterval(() => n(this, nt, Xn).call(this), Ul)));
|
|
3833
3871
|
}, Ls = function() {
|
|
3834
3872
|
e(this, Kt) !== null && (clearInterval(e(this, Kt)), d(this, Kt, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3835
|
-
},
|
|
3873
|
+
}, Xn = function() {
|
|
3836
3874
|
if (!this.posterSrc) return;
|
|
3837
3875
|
const t = new URL(this.posterSrc), i = new Image();
|
|
3838
3876
|
t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
|
|
3839
|
-
},
|
|
3877
|
+
}, tn = new WeakMap(), m(Wa, "observedAttributes", [
|
|
3840
3878
|
r.POSTER_SRC,
|
|
3841
3879
|
r.PAUSED,
|
|
3842
3880
|
"disabled",
|
|
3843
3881
|
"intersecting"
|
|
3844
3882
|
]);
|
|
3845
|
-
const
|
|
3883
|
+
const Pl = (
|
|
3846
3884
|
/* SVG */
|
|
3847
3885
|
`
|
|
3848
3886
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -3850,8 +3888,8 @@ const Cl = (
|
|
|
3850
3888
|
<path d="M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z" stroke-width="0" fill="currentColor" />
|
|
3851
3889
|
</svg>
|
|
3852
3890
|
`
|
|
3853
|
-
),
|
|
3854
|
-
|
|
3891
|
+
), Za = document.createElement("template");
|
|
3892
|
+
Za.innerHTML = /* HTML */
|
|
3855
3893
|
`
|
|
3856
3894
|
<style>
|
|
3857
3895
|
:host {
|
|
@@ -3859,38 +3897,38 @@ Wa.innerHTML = /* HTML */
|
|
|
3859
3897
|
}
|
|
3860
3898
|
</style>
|
|
3861
3899
|
|
|
3862
|
-
<slot name="button">${
|
|
3900
|
+
<slot name="button">${Pl}</slot>
|
|
3863
3901
|
<slot name="listbox" hidden>
|
|
3864
3902
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3865
3903
|
</slot>
|
|
3866
3904
|
`;
|
|
3867
|
-
var Yi,
|
|
3868
|
-
const ii = class ii extends
|
|
3905
|
+
var Yi, Yn;
|
|
3906
|
+
const ii = class ii extends cr {
|
|
3869
3907
|
constructor() {
|
|
3870
3908
|
var t, i, s, o;
|
|
3871
3909
|
super();
|
|
3872
3910
|
l(this, Yi);
|
|
3873
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3911
|
+
(t = this.shadowRoot) == null || t.appendChild(Za.content.cloneNode(!0)), this.button = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"), this.listbox = (s = this.shadowRoot) == null ? void 0 : s.querySelector("[part=listbox]"), this.listboxSlot = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=listbox]");
|
|
3874
3912
|
}
|
|
3875
3913
|
connectedCallback() {
|
|
3876
|
-
super.connectedCallback(), n(this, Yi,
|
|
3914
|
+
super.connectedCallback(), n(this, Yi, Yn).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3877
3915
|
}
|
|
3878
3916
|
attributeChangedCallback(t, i, s) {
|
|
3879
|
-
super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this, Yi,
|
|
3917
|
+
super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this, Yi, Yn).call(this);
|
|
3880
3918
|
}
|
|
3881
3919
|
};
|
|
3882
|
-
Yi = new WeakSet(),
|
|
3920
|
+
Yi = new WeakSet(), Yn = function() {
|
|
3883
3921
|
const t = this.getAttribute(r.RENDITION_LEVELS);
|
|
3884
3922
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3885
3923
|
}, m(ii, "observedAttributes", [...J(ii, ii, "observedAttributes"), r.RENDITION_LEVELS]);
|
|
3886
|
-
let
|
|
3887
|
-
const
|
|
3924
|
+
let jn = ii;
|
|
3925
|
+
const to = document.createElement("template"), _l = (
|
|
3888
3926
|
/* SVG */
|
|
3889
3927
|
`
|
|
3890
3928
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
|
|
3891
3929
|
`
|
|
3892
3930
|
);
|
|
3893
|
-
|
|
3931
|
+
to.innerHTML = /* HTML */
|
|
3894
3932
|
`
|
|
3895
3933
|
<style>
|
|
3896
3934
|
:host {
|
|
@@ -3963,7 +4001,7 @@ Qa.innerHTML = /* HTML */
|
|
|
3963
4001
|
}
|
|
3964
4002
|
|
|
3965
4003
|
[role="menuitem"][aria-selected="true"]::before {
|
|
3966
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
4004
|
+
content: url("data:image/svg+xml,${encodeURIComponent(_l)}");
|
|
3967
4005
|
position: absolute;
|
|
3968
4006
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
3969
4007
|
top: calc(50% - 8px);
|
|
@@ -3993,26 +4031,26 @@ Qa.innerHTML = /* HTML */
|
|
|
3993
4031
|
<div class="menu"></div>
|
|
3994
4032
|
</slot>
|
|
3995
4033
|
`;
|
|
3996
|
-
var ce, Ji, qt,
|
|
3997
|
-
class
|
|
4034
|
+
var ce, Ji, qt, wt, ue, Wi, U, io, Jn, so, Wn, no, ro, ao, Qn, oo;
|
|
4035
|
+
class eo extends HTMLElement {
|
|
3998
4036
|
constructor() {
|
|
3999
4037
|
super();
|
|
4000
4038
|
l(this, U);
|
|
4001
4039
|
l(this, ce, []);
|
|
4002
4040
|
l(this, Ji, Number.MAX_SAFE_INTEGER);
|
|
4003
4041
|
l(this, qt, null);
|
|
4004
|
-
l(this,
|
|
4042
|
+
l(this, wt, []);
|
|
4005
4043
|
l(this, ue, null);
|
|
4006
4044
|
l(this, Wi, null);
|
|
4007
4045
|
m(this, "handleEvent", (t) => {
|
|
4008
|
-
t.type === "keydown" && n(this, U,
|
|
4046
|
+
t.type === "keydown" && n(this, U, ro).call(this, t);
|
|
4009
4047
|
});
|
|
4010
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4048
|
+
this.attachShadow({ mode: "open" }).appendChild(to.content.cloneNode(!0));
|
|
4011
4049
|
}
|
|
4012
4050
|
connectedCallback() {
|
|
4013
4051
|
var i;
|
|
4014
4052
|
const t = this.getRootNode();
|
|
4015
|
-
t instanceof ShadowRoot && (d(this, ue, t.host.closest("vindral-controller")), (i = e(this, ue)) == null || i.connectListener(this), n(this, U,
|
|
4053
|
+
t instanceof ShadowRoot && (d(this, ue, t.host.closest("vindral-controller")), (i = e(this, ue)) == null || i.connectListener(this), n(this, U, io).call(this), n(this, U, Jn).call(this), d(this, Wi, t.host), this.addEventListener("keydown", this));
|
|
4016
4054
|
}
|
|
4017
4055
|
disconnectedCallback() {
|
|
4018
4056
|
var t;
|
|
@@ -4022,10 +4060,10 @@ class Za extends HTMLElement {
|
|
|
4022
4060
|
i !== s && (t === r.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === r.MAX_VIDEO_BITRATE && s && (this.maxVideoBitrate = s ? parseInt(s) : Number.MAX_SAFE_INTEGER));
|
|
4023
4061
|
}
|
|
4024
4062
|
set list(t) {
|
|
4025
|
-
d(this, ce, t), n(this, U,
|
|
4063
|
+
d(this, ce, t), n(this, U, Jn).call(this);
|
|
4026
4064
|
}
|
|
4027
4065
|
set maxVideoBitrate(t) {
|
|
4028
|
-
d(this, Ji, t), n(this, U,
|
|
4066
|
+
d(this, Ji, t), n(this, U, Wn).call(this);
|
|
4029
4067
|
}
|
|
4030
4068
|
get keysUsed() {
|
|
4031
4069
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
@@ -4035,7 +4073,7 @@ class Za extends HTMLElement {
|
|
|
4035
4073
|
(t = e(this, qt)) == null || t.focus();
|
|
4036
4074
|
}
|
|
4037
4075
|
}
|
|
4038
|
-
ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(),
|
|
4076
|
+
ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), wt = new WeakMap(), ue = new WeakMap(), Wi = new WeakMap(), U = new WeakSet(), io = function() {
|
|
4039
4077
|
const t = (s) => {
|
|
4040
4078
|
s.forEach((o) => {
|
|
4041
4079
|
if (o.intersectionRatio !== 1)
|
|
@@ -4052,24 +4090,24 @@ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(),
|
|
|
4052
4090
|
threshold: 0
|
|
4053
4091
|
// 0 means any intersection is enough to be considered "inside"
|
|
4054
4092
|
}).observe(this);
|
|
4055
|
-
},
|
|
4093
|
+
}, Jn = function() {
|
|
4056
4094
|
var i;
|
|
4057
4095
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
4058
|
-
t && (d(this,
|
|
4096
|
+
t && (d(this, wt, []), t.innerHTML = "", e(this, ce).sort((s, o) => {
|
|
4059
4097
|
var u, p;
|
|
4060
4098
|
return (u = s.video) != null && u.bitRate && ((p = o.video) != null && p.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
4061
4099
|
}).forEach((s) => {
|
|
4062
4100
|
var v, A, z, ut, at, jt, Yt, Jt;
|
|
4063
4101
|
const o = document.createElement("div");
|
|
4064
4102
|
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
4065
|
-
const u = n(this, U,
|
|
4066
|
-
o.textContent = s.video ?
|
|
4103
|
+
const u = n(this, U, so).call(this, (A = s.video) == null ? void 0 : A.frameRate);
|
|
4104
|
+
o.textContent = s.video ? il(s.video) : "";
|
|
4067
4105
|
const p = document.createElement("span");
|
|
4068
|
-
p.classList.add("menu-item-subtitle"), p.textContent = `${
|
|
4069
|
-
}), n(this, U,
|
|
4070
|
-
},
|
|
4106
|
+
p.classList.add("menu-item-subtitle"), p.textContent = `${el(((ut = (z = s.video) == null ? void 0 : z.bitRate) != null ? ut : 0) + ((jt = (at = s.audio) == null ? void 0 : at.bitRate) != null ? jt : 0))}, ${u}p`, o.appendChild(p), o.addEventListener("click", () => n(this, U, no).call(this, s)), e(this, wt).push({ el: o, id: (Jt = (Yt = s.video) == null ? void 0 : Yt.id) != null ? Jt : -1 }), t.appendChild(o);
|
|
4107
|
+
}), n(this, U, Wn).call(this));
|
|
4108
|
+
}, so = function(t) {
|
|
4071
4109
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
4072
|
-
},
|
|
4110
|
+
}, Wn = function() {
|
|
4073
4111
|
e(this, qt) && (e(this, qt).removeAttribute("aria-selected"), e(this, qt).tabIndex = -1);
|
|
4074
4112
|
const t = e(this, ce).sort(
|
|
4075
4113
|
(s, o) => {
|
|
@@ -4083,37 +4121,37 @@ ce = new WeakMap(), Ji = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(),
|
|
|
4083
4121
|
}
|
|
4084
4122
|
)[0] || t[t.length - 1];
|
|
4085
4123
|
if (i) {
|
|
4086
|
-
const s = e(this,
|
|
4124
|
+
const s = e(this, wt).find((o) => {
|
|
4087
4125
|
var u;
|
|
4088
4126
|
return o.id === ((u = i.video) == null ? void 0 : u.id);
|
|
4089
4127
|
});
|
|
4090
4128
|
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), d(this, qt, s.el));
|
|
4091
4129
|
}
|
|
4092
|
-
},
|
|
4130
|
+
}, no = function(t) {
|
|
4093
4131
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
4094
4132
|
new CustomEvent(k.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
4095
4133
|
);
|
|
4096
|
-
},
|
|
4134
|
+
}, ro = function(t) {
|
|
4097
4135
|
var p, v, A;
|
|
4098
4136
|
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
4099
|
-
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, Wi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, U,
|
|
4100
|
-
},
|
|
4137
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (p = e(this, Wi)) == null || p.hide() : i === "Enter" || i === " " ? (A = (v = n(this, U, Qn).call(this)) == null ? void 0 : v.el) == null || A.click() : n(this, U, ao).call(this, t));
|
|
4138
|
+
}, ao = function(t) {
|
|
4101
4139
|
var A;
|
|
4102
|
-
const { key: i } = t, s = e(this,
|
|
4140
|
+
const { key: i } = t, s = e(this, wt), o = (A = n(this, U, Qn).call(this)) != null ? A : s[0];
|
|
4103
4141
|
if (!o) return;
|
|
4104
4142
|
const u = s.indexOf(o);
|
|
4105
4143
|
let p = Math.max(0, u);
|
|
4106
4144
|
i === "ArrowDown" ? p++ : i === "ArrowUp" ? p-- : t.key === "Home" ? p = 0 : t.key === "End" && (p = s.length - 1), p < 0 && (p = s.length - 1), p > s.length - 1 && (p = 0);
|
|
4107
4145
|
const v = s[p];
|
|
4108
|
-
v && (n(this, U,
|
|
4109
|
-
},
|
|
4110
|
-
return e(this,
|
|
4111
|
-
},
|
|
4112
|
-
for (const i of e(this,
|
|
4146
|
+
v && (n(this, U, oo).call(this, v.id), v.el.focus());
|
|
4147
|
+
}, Qn = function() {
|
|
4148
|
+
return e(this, wt).find((t) => t.el.tabIndex === 0);
|
|
4149
|
+
}, oo = function(t) {
|
|
4150
|
+
for (const i of e(this, wt))
|
|
4113
4151
|
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
4114
|
-
}, m(
|
|
4115
|
-
const
|
|
4116
|
-
|
|
4152
|
+
}, m(eo, "observedAttributes", [r.RENDITION_LEVELS, r.MAX_VIDEO_BITRATE]);
|
|
4153
|
+
const lo = document.createElement("template");
|
|
4154
|
+
lo.innerHTML = /* HTML */
|
|
4117
4155
|
`
|
|
4118
4156
|
<style>
|
|
4119
4157
|
:host {
|
|
@@ -4182,66 +4220,66 @@ ao.innerHTML = /* HTML */
|
|
|
4182
4220
|
<div id="scroll-area"></div>
|
|
4183
4221
|
<slot id="content"></slot>
|
|
4184
4222
|
`;
|
|
4185
|
-
var
|
|
4186
|
-
class
|
|
4223
|
+
var Tt, pe, Oe, Qi, R, co, uo, po, en, sn, Ss, Zn, tr, er, ir;
|
|
4224
|
+
class ho extends HTMLElement {
|
|
4187
4225
|
constructor() {
|
|
4188
4226
|
super();
|
|
4189
4227
|
l(this, R);
|
|
4190
|
-
l(this,
|
|
4228
|
+
l(this, Tt, null);
|
|
4191
4229
|
l(this, pe, null);
|
|
4192
4230
|
l(this, Oe, null);
|
|
4193
4231
|
l(this, Qi, 0);
|
|
4194
4232
|
m(this, "handleEvent", (t) => {
|
|
4195
4233
|
switch (t.type) {
|
|
4196
4234
|
case "touchstart":
|
|
4197
|
-
n(this, R,
|
|
4235
|
+
n(this, R, co).call(this, t);
|
|
4198
4236
|
break;
|
|
4199
4237
|
case "touchmove":
|
|
4200
|
-
n(this, R,
|
|
4238
|
+
n(this, R, uo).call(this, t);
|
|
4201
4239
|
break;
|
|
4202
4240
|
case "touchend":
|
|
4203
|
-
n(this, R,
|
|
4241
|
+
n(this, R, po).call(this, t);
|
|
4204
4242
|
break;
|
|
4205
4243
|
}
|
|
4206
4244
|
});
|
|
4207
|
-
l(this,
|
|
4208
|
-
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), n(this, R,
|
|
4245
|
+
l(this, en, () => {
|
|
4246
|
+
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), n(this, R, ir).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, er).call(this) : (
|
|
4209
4247
|
// fully open
|
|
4210
|
-
!this.hasAttribute("snap-touch") && n(this, R,
|
|
4248
|
+
!this.hasAttribute("snap-touch") && n(this, R, tr).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
|
|
4211
4249
|
);
|
|
4212
4250
|
});
|
|
4213
|
-
l(this,
|
|
4251
|
+
l(this, sn, () => {
|
|
4214
4252
|
const t = e(this, Qi);
|
|
4215
|
-
if (d(this, Qi, this.scrollTop), !n(this, R,
|
|
4253
|
+
if (d(this, Qi, this.scrollTop), !n(this, R, Ss).call(this)) {
|
|
4216
4254
|
this.scrollTop = 0;
|
|
4217
4255
|
return;
|
|
4218
4256
|
}
|
|
4219
|
-
this.scrollTop === 0 ? (this.open = !1, n(this, R,
|
|
4257
|
+
this.scrollTop === 0 ? (this.open = !1, n(this, R, ir).call(this)) : !this.visible && this.scrollTop > 0 ? n(this, R, er).call(this) : n(this, R, tr).call(this) && t <= this.scrollTop && (this.open = !0);
|
|
4220
4258
|
});
|
|
4221
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4259
|
+
this.attachShadow({ mode: "open" }).appendChild(lo.content.cloneNode(!0));
|
|
4222
4260
|
}
|
|
4223
4261
|
connectedCallback() {
|
|
4224
4262
|
var i, s, o, u, p, v;
|
|
4225
4263
|
const t = this.getRootNode();
|
|
4226
4264
|
if (t instanceof Document || t instanceof ShadowRoot) {
|
|
4227
|
-
d(this,
|
|
4265
|
+
d(this, Tt, t.querySelector("vindral-controller")), (i = e(this, Tt)) == null || i.connectListener(this), d(this, pe, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#scroll-area")), (o = e(this, pe)) == null || o.addEventListener("click", () => {
|
|
4228
4266
|
this.open && (this.open = !1);
|
|
4229
4267
|
});
|
|
4230
4268
|
const A = this.hasAttribute("touch-enabled");
|
|
4231
|
-
if (!
|
|
4232
|
-
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this,
|
|
4269
|
+
if (!Wo() || !A) {
|
|
4270
|
+
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, sn));
|
|
4233
4271
|
return;
|
|
4234
4272
|
}
|
|
4235
|
-
this.addEventListener("scroll", e(this,
|
|
4273
|
+
this.addEventListener("scroll", e(this, en)), (u = e(this, Tt)) == null || u.addEventListener("touchstart", this, { passive: !0 }), (p = e(this, Tt)) == null || p.addEventListener("touchmove", this, { passive: !1 }), (v = e(this, Tt)) == null || v.addEventListener("touchend", this, { passive: !0 });
|
|
4236
4274
|
}
|
|
4237
4275
|
}
|
|
4238
4276
|
disconnectedCallback() {
|
|
4239
4277
|
var t;
|
|
4240
|
-
(t = e(this,
|
|
4278
|
+
(t = e(this, Tt)) == null || t.disconnectListener(this);
|
|
4241
4279
|
}
|
|
4242
4280
|
attributeChangedCallback(t, i, s) {
|
|
4243
4281
|
var o;
|
|
4244
|
-
i !== s && (t === r.USER_INTERACTING && s === null && n(this, R,
|
|
4282
|
+
i !== s && (t === r.USER_INTERACTING && s === null && n(this, R, Zn).call(this) && setTimeout(() => {
|
|
4245
4283
|
this.open = !1;
|
|
4246
4284
|
}, 300), t === "open" && this.scrollTo({ top: s === null ? 0 : (o = e(this, pe)) == null ? void 0 : o.clientHeight, behavior: "smooth" }));
|
|
4247
4285
|
}
|
|
@@ -4258,29 +4296,29 @@ class oo extends HTMLElement {
|
|
|
4258
4296
|
return this.hasAttribute("visible");
|
|
4259
4297
|
}
|
|
4260
4298
|
}
|
|
4261
|
-
|
|
4262
|
-
n(this, R,
|
|
4263
|
-
},
|
|
4264
|
-
if (!(!n(this, R,
|
|
4299
|
+
Tt = new WeakMap(), pe = new WeakMap(), Oe = new WeakMap(), Qi = new WeakMap(), R = new WeakSet(), co = function(t) {
|
|
4300
|
+
n(this, R, Ss).call(this) && t.touches[0] && d(this, Oe, t.touches[0].clientY);
|
|
4301
|
+
}, uo = function(t) {
|
|
4302
|
+
if (!(!n(this, R, Ss).call(this) || !e(this, Oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
|
|
4265
4303
|
const i = t.touches[0].clientY, s = e(this, Oe) - i;
|
|
4266
4304
|
this.scrollTop = s;
|
|
4267
4305
|
}
|
|
4268
|
-
},
|
|
4269
|
-
n(this, R,
|
|
4270
|
-
},
|
|
4306
|
+
}, po = function(t) {
|
|
4307
|
+
n(this, R, Zn).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
|
|
4308
|
+
}, en = new WeakMap(), sn = new WeakMap(), Ss = function() {
|
|
4271
4309
|
return this.hasAttribute(r.USER_INTERACTING);
|
|
4272
|
-
}, Qn = function() {
|
|
4273
|
-
return this.scrollTop > 0;
|
|
4274
4310
|
}, Zn = function() {
|
|
4311
|
+
return this.scrollTop > 0;
|
|
4312
|
+
}, tr = function() {
|
|
4275
4313
|
var t;
|
|
4276
4314
|
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, pe)) == null ? void 0 : t.clientHeight);
|
|
4277
|
-
}, tr = function() {
|
|
4278
|
-
this.visible = !0, this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 }));
|
|
4279
4315
|
}, er = function() {
|
|
4316
|
+
this.visible = !0, this.dispatchEvent(new CustomEvent(k.LOCK_UI, { bubbles: !0, composed: !0 }));
|
|
4317
|
+
}, ir = function() {
|
|
4280
4318
|
this.visible = !1, this.dispatchEvent(new CustomEvent(k.UNLOCK_UI, { bubbles: !0, composed: !0 }));
|
|
4281
|
-
}, m(
|
|
4282
|
-
const
|
|
4283
|
-
|
|
4319
|
+
}, m(ho, "observedAttributes", [r.USER_INTERACTING, "open", "touch-enabled"]);
|
|
4320
|
+
const bo = document.createElement("template");
|
|
4321
|
+
bo.innerHTML = /* HTML */
|
|
4284
4322
|
`
|
|
4285
4323
|
<style>
|
|
4286
4324
|
:host {
|
|
@@ -4340,22 +4378,22 @@ uo.innerHTML = /* HTML */
|
|
|
4340
4378
|
<div id="hover-preview"></div>
|
|
4341
4379
|
<div id="time-tooltip"></div>
|
|
4342
4380
|
`;
|
|
4343
|
-
var N, ct,
|
|
4344
|
-
class
|
|
4381
|
+
var N, ct, Lt, st, St, Vt, Xt, Ct, y, Cs, sr, Zt, fe, Zi, ts, be, es, is, nr, rr, ar, or, vo, lr, te, xs, ss;
|
|
4382
|
+
class mo extends ni {
|
|
4345
4383
|
constructor() {
|
|
4346
4384
|
var t, i, s;
|
|
4347
4385
|
super();
|
|
4348
4386
|
l(this, y);
|
|
4349
4387
|
l(this, N);
|
|
4350
4388
|
l(this, ct);
|
|
4351
|
-
l(this,
|
|
4389
|
+
l(this, Lt);
|
|
4352
4390
|
l(this, st, !1);
|
|
4353
4391
|
l(this, St, null);
|
|
4354
4392
|
l(this, Vt, null);
|
|
4355
4393
|
l(this, Xt, !1);
|
|
4356
4394
|
l(this, Ct, !1);
|
|
4357
4395
|
l(this, Zi, (t) => {
|
|
4358
|
-
if (!n(this, y,
|
|
4396
|
+
if (!n(this, y, sr).call(this) || n(this, y, Zt).call(this)) {
|
|
4359
4397
|
t.preventDefault();
|
|
4360
4398
|
return;
|
|
4361
4399
|
}
|
|
@@ -4364,25 +4402,25 @@ class po extends ni {
|
|
|
4364
4402
|
this.setPointerCapture(t.pointerId);
|
|
4365
4403
|
} catch (i) {
|
|
4366
4404
|
}
|
|
4367
|
-
n(this, y,
|
|
4405
|
+
n(this, y, rr).call(this, t);
|
|
4368
4406
|
});
|
|
4369
4407
|
l(this, ts, (t) => {
|
|
4370
|
-
if (!(!n(this, y,
|
|
4408
|
+
if (!(!n(this, y, sr).call(this) || n(this, y, Zt).call(this))) {
|
|
4371
4409
|
if (e(this, St) && (cancelAnimationFrame(e(this, St)), d(this, St, null)), e(this, st) && t.pointerId === e(this, Vt)) {
|
|
4372
|
-
t.preventDefault(), n(this, y,
|
|
4410
|
+
t.preventDefault(), n(this, y, rr).call(this, t);
|
|
4373
4411
|
return;
|
|
4374
4412
|
}
|
|
4375
4413
|
d(this, St, requestAnimationFrame(() => {
|
|
4376
4414
|
if (t.pointerType !== "mouse" || e(this, st) || !this.duration) {
|
|
4377
|
-
e(this,
|
|
4415
|
+
e(this, Lt).style.opacity = "0", d(this, St, null);
|
|
4378
4416
|
return;
|
|
4379
4417
|
}
|
|
4380
|
-
const i = n(this, y,
|
|
4381
|
-
if (n(this, y,
|
|
4418
|
+
const i = n(this, y, nr).call(this, t.clientX);
|
|
4419
|
+
if (n(this, y, or).call(this, i, t.clientX), i > this.range.valueAsNumber) {
|
|
4382
4420
|
const s = this.range.valueAsNumber * 100, o = (i - this.range.valueAsNumber) * 100;
|
|
4383
|
-
e(this,
|
|
4421
|
+
e(this, Lt).style.transform = `translateX(${s}%) scaleX(${o / 100})`, e(this, Lt).style.opacity = "1";
|
|
4384
4422
|
} else
|
|
4385
|
-
e(this,
|
|
4423
|
+
e(this, Lt).style.opacity = "0";
|
|
4386
4424
|
d(this, St, null);
|
|
4387
4425
|
}));
|
|
4388
4426
|
}
|
|
@@ -4400,12 +4438,12 @@ class po extends ni {
|
|
|
4400
4438
|
this.duration && !n(this, y, Zt).call(this) && (e(this, ct).style.opacity = "1");
|
|
4401
4439
|
});
|
|
4402
4440
|
l(this, is, () => {
|
|
4403
|
-
e(this, ct).style.opacity = "0", e(this,
|
|
4441
|
+
e(this, ct).style.opacity = "0", e(this, Lt).style.opacity = "0";
|
|
4404
4442
|
});
|
|
4405
4443
|
l(this, ss, (t) => {
|
|
4406
4444
|
if (n(this, y, Zt).call(this) || !e(this, N) || e(this, N) <= 0 || !isFinite(e(this, N)))
|
|
4407
4445
|
return;
|
|
4408
|
-
const i = n(this, y,
|
|
4446
|
+
const i = n(this, y, Cs).call(this);
|
|
4409
4447
|
if (i <= 0) return;
|
|
4410
4448
|
const s = this.range.valueAsNumber * i;
|
|
4411
4449
|
let o = s;
|
|
@@ -4431,9 +4469,9 @@ class po extends ni {
|
|
|
4431
4469
|
return;
|
|
4432
4470
|
}
|
|
4433
4471
|
const p = Math.min(o / i, 1);
|
|
4434
|
-
n(this, y,
|
|
4472
|
+
n(this, y, ar).call(this, p);
|
|
4435
4473
|
});
|
|
4436
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
4474
|
+
(t = this.shadowRoot) == null || t.appendChild(bo.content.cloneNode(!0)), d(this, ct, (i = this.shadowRoot) == null ? void 0 : i.getElementById("time-tooltip")), d(this, Lt, (s = this.shadowRoot) == null ? void 0 : s.getElementById("hover-preview")), this.addEventListener("pointerdown", e(this, Zi)), this.addEventListener("pointermove", e(this, ts)), this.addEventListener("pointerup", e(this, be)), this.addEventListener("pointercancel", e(this, be)), this.addEventListener("mouseenter", e(this, es)), this.addEventListener("mouseleave", e(this, is));
|
|
4437
4475
|
}
|
|
4438
4476
|
connectedCallback() {
|
|
4439
4477
|
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), n(this, y, fe).call(this), this.addEventListener("keydown", e(this, ss)), n(this, y, te).call(this) && (this.range.value = "1", n(this, y, fe).call(this));
|
|
@@ -4472,37 +4510,37 @@ class po extends ni {
|
|
|
4472
4510
|
this.setAttribute(r.DURATION, t.toString());
|
|
4473
4511
|
}
|
|
4474
4512
|
}
|
|
4475
|
-
N = new WeakMap(), ct = new WeakMap(),
|
|
4513
|
+
N = new WeakMap(), ct = new WeakMap(), Lt = new WeakMap(), st = new WeakMap(), St = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), Ct = new WeakMap(), y = new WeakSet(), Cs = function() {
|
|
4476
4514
|
return e(this, N) ? e(this, N) : 1;
|
|
4477
|
-
},
|
|
4515
|
+
}, sr = function() {
|
|
4478
4516
|
return !!e(this, N) && e(this, N) > 0 && isFinite(e(this, N));
|
|
4479
4517
|
}, Zt = function() {
|
|
4480
4518
|
return e(this, Xt);
|
|
4481
4519
|
}, fe = function() {
|
|
4482
|
-
const t = n(this, y,
|
|
4520
|
+
const t = n(this, y, Cs).call(this);
|
|
4483
4521
|
!e(this, N) || e(this, N) <= 0 || !isFinite(e(this, N)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), e(this, st) || (this.updateBar(), this.setAttribute(
|
|
4484
4522
|
"aria-valuetext",
|
|
4485
|
-
`${n(this, y,
|
|
4486
|
-
), !e(this, st) && !n(this, y, Zt).call(this) && n(this, y,
|
|
4487
|
-
}, Zi = new WeakMap(), ts = new WeakMap(), be = new WeakMap(), es = new WeakMap(), is = new WeakMap(),
|
|
4523
|
+
`${n(this, y, xs).call(this, this.range.valueAsNumber * t)} of ${n(this, y, xs).call(this, t)}`
|
|
4524
|
+
), !e(this, st) && !n(this, y, Zt).call(this) && n(this, y, lr).call(this, this.range.valueAsNumber));
|
|
4525
|
+
}, Zi = new WeakMap(), ts = new WeakMap(), be = new WeakMap(), es = new WeakMap(), is = new WeakMap(), nr = function(t) {
|
|
4488
4526
|
const i = this.getBoundingClientRect(), s = (t - i.left) / i.width;
|
|
4489
4527
|
return Math.max(0, Math.min(1, s));
|
|
4490
|
-
}, nr = function(t) {
|
|
4491
|
-
const i = n(this, y, sr).call(this, t.clientX);
|
|
4492
|
-
n(this, y, ar).call(this, i, t.clientX), e(this, st) || (e(this, ct).style.opacity = "1"), n(this, y, rr).call(this, i);
|
|
4493
4528
|
}, rr = function(t) {
|
|
4494
|
-
|
|
4529
|
+
const i = n(this, y, nr).call(this, t.clientX);
|
|
4530
|
+
n(this, y, or).call(this, i, t.clientX), e(this, st) || (e(this, ct).style.opacity = "1"), n(this, y, ar).call(this, i);
|
|
4531
|
+
}, ar = function(t) {
|
|
4532
|
+
if (n(this, y, Zt).call(this) || n(this, y, lr).call(this, t))
|
|
4495
4533
|
return;
|
|
4496
|
-
const i = n(this, y,
|
|
4497
|
-
this.range.value = t.toString(), this.updateBar(), n(this, y,
|
|
4498
|
-
},
|
|
4534
|
+
const i = n(this, y, Cs).call(this), s = t * i;
|
|
4535
|
+
this.range.value = t.toString(), this.updateBar(), n(this, y, vo).call(this, s);
|
|
4536
|
+
}, or = function(t, i) {
|
|
4499
4537
|
if (!e(this, N) || !isFinite(e(this, N)))
|
|
4500
4538
|
return;
|
|
4501
4539
|
const s = t * e(this, N), o = e(this, N) - s;
|
|
4502
|
-
e(this, ct).textContent = `-${n(this, y,
|
|
4540
|
+
e(this, ct).textContent = `-${n(this, y, xs).call(this, o)}`;
|
|
4503
4541
|
const u = this.getBoundingClientRect(), p = (i - u.left) / u.width * 100;
|
|
4504
4542
|
e(this, ct).style.left = `${Math.min(Math.max(p, 2), 98)}%`;
|
|
4505
|
-
},
|
|
4543
|
+
}, vo = function(t) {
|
|
4506
4544
|
this.dispatchEvent(
|
|
4507
4545
|
new CustomEvent("seek", {
|
|
4508
4546
|
bubbles: !0,
|
|
@@ -4510,30 +4548,30 @@ N = new WeakMap(), ct = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), S
|
|
|
4510
4548
|
detail: t
|
|
4511
4549
|
})
|
|
4512
4550
|
);
|
|
4513
|
-
},
|
|
4551
|
+
}, lr = function(t) {
|
|
4514
4552
|
return e(this, Xt) || n(this, y, te).call(this) || t < 0.999 ? !1 : (d(this, Xt, !0), d(this, Ct, !1), this.dispatchEvent(new CustomEvent(k.GO_LIVE, { bubbles: !0, composed: !0 })), !0);
|
|
4515
4553
|
}, te = function() {
|
|
4516
4554
|
return !this.hasAttribute(r.TIMESHIFT_POSITION);
|
|
4517
|
-
},
|
|
4555
|
+
}, xs = function(t) {
|
|
4518
4556
|
const i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60), o = Math.floor(t % 60);
|
|
4519
4557
|
return e(this, N) && e(this, N) >= 3600 ? `${i}:${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}` : `${s}:${o.toString().padStart(2, "0")}`;
|
|
4520
|
-
}, ss = new WeakMap(), m(
|
|
4558
|
+
}, ss = new WeakMap(), m(mo, "observedAttributes", [
|
|
4521
4559
|
...ni.observedAttributes,
|
|
4522
4560
|
r.TIMESHIFT_POSITION,
|
|
4523
4561
|
r.DURATION
|
|
4524
4562
|
]);
|
|
4525
|
-
const
|
|
4563
|
+
const fo = document.createElement("template"), Ml = (
|
|
4526
4564
|
/* SVG */
|
|
4527
4565
|
`
|
|
4528
4566
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
|
|
4529
4567
|
`
|
|
4530
|
-
),
|
|
4568
|
+
), Dl = (
|
|
4531
4569
|
/* SVG */
|
|
4532
4570
|
`
|
|
4533
4571
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" clip-rule="evenodd" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" /></g></svg>
|
|
4534
4572
|
`
|
|
4535
4573
|
);
|
|
4536
|
-
|
|
4574
|
+
fo.innerHTML = /* HTML */
|
|
4537
4575
|
`
|
|
4538
4576
|
<style>
|
|
4539
4577
|
:host {
|
|
@@ -4586,12 +4624,12 @@ mo.innerHTML = /* HTML */
|
|
|
4586
4624
|
</style>
|
|
4587
4625
|
|
|
4588
4626
|
<slot name="icon">
|
|
4589
|
-
<slot name="play">${
|
|
4590
|
-
<slot name="unmute">${
|
|
4627
|
+
<slot name="play">${Ml}</slot>
|
|
4628
|
+
<slot name="unmute">${Dl}</slot>
|
|
4591
4629
|
</slot>
|
|
4592
4630
|
`;
|
|
4593
4631
|
var He, ns, me, rs;
|
|
4594
|
-
class
|
|
4632
|
+
class go extends HTMLElement {
|
|
4595
4633
|
constructor() {
|
|
4596
4634
|
super();
|
|
4597
4635
|
l(this, He, null);
|
|
@@ -4614,7 +4652,7 @@ class vo extends HTMLElement {
|
|
|
4614
4652
|
}
|
|
4615
4653
|
this.addEventListener("keyup", e(this, me), { once: !0 });
|
|
4616
4654
|
});
|
|
4617
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4655
|
+
this.attachShadow({ mode: "open" }).appendChild(fo.content.cloneNode(!0));
|
|
4618
4656
|
}
|
|
4619
4657
|
get keysUsed() {
|
|
4620
4658
|
return ["Enter", " "];
|
|
@@ -4634,14 +4672,14 @@ class vo extends HTMLElement {
|
|
|
4634
4672
|
(t = e(this, He)) == null || t.disconnectListener(this), this.disable();
|
|
4635
4673
|
}
|
|
4636
4674
|
}
|
|
4637
|
-
He = new WeakMap(), ns = new WeakMap(), me = new WeakMap(), rs = new WeakMap(), m(
|
|
4675
|
+
He = new WeakMap(), ns = new WeakMap(), me = new WeakMap(), rs = new WeakMap(), m(go, "observedAttributes", [
|
|
4638
4676
|
"hidden",
|
|
4639
4677
|
r.NEEDS_USER_INPUT_VIDEO,
|
|
4640
4678
|
r.NEEDS_USER_INPUT_AUDIO,
|
|
4641
4679
|
r.PAUSED
|
|
4642
4680
|
]);
|
|
4643
|
-
const
|
|
4644
|
-
|
|
4681
|
+
const Eo = document.createElement("template");
|
|
4682
|
+
Eo.innerHTML = /* HTML */
|
|
4645
4683
|
`
|
|
4646
4684
|
<style>
|
|
4647
4685
|
:host,
|
|
@@ -4730,14 +4768,14 @@ fo.innerHTML = /* HTML */
|
|
|
4730
4768
|
</div>
|
|
4731
4769
|
`;
|
|
4732
4770
|
var as, os, ls;
|
|
4733
|
-
class
|
|
4771
|
+
class Ao extends HTMLElement {
|
|
4734
4772
|
constructor() {
|
|
4735
4773
|
super();
|
|
4736
4774
|
l(this, as);
|
|
4737
4775
|
l(this, os);
|
|
4738
4776
|
l(this, ls);
|
|
4739
4777
|
const t = this.attachShadow({ mode: "open" });
|
|
4740
|
-
t.appendChild(
|
|
4778
|
+
t.appendChild(Eo.content.cloneNode(!0)), d(this, as, t.querySelector("#title")), d(this, os, t.querySelector("#description")), d(this, ls, t.querySelector("#background"));
|
|
4741
4779
|
}
|
|
4742
4780
|
connectedCallback() {
|
|
4743
4781
|
}
|
|
@@ -4747,14 +4785,14 @@ class go extends HTMLElement {
|
|
|
4747
4785
|
i !== s && (t === "title" ? e(this, as).textContent = s : t === "description" ? e(this, os).textContent = s : t === "background-image" && (e(this, ls).style.backgroundImage = `url(${s})`));
|
|
4748
4786
|
}
|
|
4749
4787
|
}
|
|
4750
|
-
as = new WeakMap(), os = new WeakMap(), ls = new WeakMap(), m(
|
|
4751
|
-
const
|
|
4788
|
+
as = new WeakMap(), os = new WeakMap(), ls = new WeakMap(), m(Ao, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
4789
|
+
const yo = document.createElement("template"), Fl = (
|
|
4752
4790
|
/* SVG */
|
|
4753
4791
|
`
|
|
4754
4792
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z" /></svg>
|
|
4755
4793
|
`
|
|
4756
4794
|
);
|
|
4757
|
-
|
|
4795
|
+
yo.innerHTML = /* HTML */
|
|
4758
4796
|
`
|
|
4759
4797
|
<style>
|
|
4760
4798
|
:host {
|
|
@@ -4804,14 +4842,14 @@ Eo.innerHTML = /* HTML */
|
|
|
4804
4842
|
}
|
|
4805
4843
|
</style>
|
|
4806
4844
|
|
|
4807
|
-
<slot id="play" name="icon">${
|
|
4845
|
+
<slot id="play" name="icon">${Fl}</slot>
|
|
4808
4846
|
`;
|
|
4809
4847
|
var ze;
|
|
4810
|
-
class
|
|
4848
|
+
class ko extends HTMLElement {
|
|
4811
4849
|
constructor() {
|
|
4812
4850
|
super();
|
|
4813
4851
|
l(this, ze, null);
|
|
4814
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4852
|
+
this.attachShadow({ mode: "open" }).appendChild(yo.content.cloneNode(!0));
|
|
4815
4853
|
}
|
|
4816
4854
|
connectedCallback() {
|
|
4817
4855
|
var t;
|
|
@@ -4825,9 +4863,9 @@ class Ao extends HTMLElement {
|
|
|
4825
4863
|
i !== s && t === "hidden" && !x(s) && this.focus();
|
|
4826
4864
|
}
|
|
4827
4865
|
}
|
|
4828
|
-
ze = new WeakMap(), m(
|
|
4829
|
-
const
|
|
4830
|
-
|
|
4866
|
+
ze = new WeakMap(), m(ko, "observedAttributes", ["hidden"]);
|
|
4867
|
+
const Io = document.createElement("template");
|
|
4868
|
+
Io.innerHTML = /* HTML */
|
|
4831
4869
|
`
|
|
4832
4870
|
<style>
|
|
4833
4871
|
:host {
|
|
@@ -4846,7 +4884,7 @@ yo.innerHTML = /* HTML */
|
|
|
4846
4884
|
}
|
|
4847
4885
|
</style>
|
|
4848
4886
|
`;
|
|
4849
|
-
const
|
|
4887
|
+
const Ol = (c) => `${Math.round(c * 100)}%`;
|
|
4850
4888
|
var hs;
|
|
4851
4889
|
const si = class si extends ni {
|
|
4852
4890
|
constructor() {
|
|
@@ -4856,7 +4894,7 @@ const si = class si extends ni {
|
|
|
4856
4894
|
const t = this.range.valueAsNumber;
|
|
4857
4895
|
this.dispatchEvent(new CustomEvent(k.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
4858
4896
|
});
|
|
4859
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
4897
|
+
(t = this.shadowRoot) == null || t.appendChild(Io.content.cloneNode(!0));
|
|
4860
4898
|
}
|
|
4861
4899
|
connectedCallback() {
|
|
4862
4900
|
super.connectedCallback(), this.range.addEventListener("input", e(this, hs)), this.range.setAttribute("aria-label", "volume");
|
|
@@ -4865,7 +4903,7 @@ const si = class si extends ni {
|
|
|
4865
4903
|
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, hs));
|
|
4866
4904
|
}
|
|
4867
4905
|
attributeChangedCallback(t, i, s) {
|
|
4868
|
-
super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4906
|
+
super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Ol(this.range.valueAsNumber)), this.updateBar());
|
|
4869
4907
|
}
|
|
4870
4908
|
get volume() {
|
|
4871
4909
|
var t;
|
|
@@ -4876,10 +4914,10 @@ const si = class si extends ni {
|
|
|
4876
4914
|
}
|
|
4877
4915
|
};
|
|
4878
4916
|
hs = new WeakMap(), m(si, "observedAttributes", [...J(si, si, "observedAttributes"), r.MUTED, r.VOLUME]);
|
|
4879
|
-
let
|
|
4880
|
-
function
|
|
4881
|
-
customElements.define("vindral-controller", ri), customElements.define("vindral-control-bar",
|
|
4917
|
+
let hr = si;
|
|
4918
|
+
function Kl() {
|
|
4919
|
+
customElements.define("vindral-controller", ri), customElements.define("vindral-control-bar", ia), customElements.define("vindral-play-button", $n), customElements.define("vindral-mute-button", zn), customElements.define("vindral-buffering-overlay", _r), customElements.define("vindral-scroll-overlay", ho), customElements.define("vindral-play-overlay", ko), customElements.define("vindral-user-input-play-overlay", go), customElements.define("vindral-fullscreen-button", Un), customElements.define("vindral-rendition-levels-menu", jn), customElements.define("vindral-rendition-levels-menu-list", eo), customElements.define("vindral-channel-grid-button", mn), customElements.define("vindral-channel-grid", $r), customElements.define("vindral-channel-grid-item", dr), customElements.define("vindral-pip-button", Bn), customElements.define("vindral-airplay-button", dn), customElements.define("vindral-cast-button", un), customElements.define("vindral-cast-overlay", Or), customElements.define("vindral-buffering-icon", Ur), customElements.define("vindral-language-menu", Pn), customElements.define("vindral-language-menu-list", _a), customElements.define("vindral-message", Ao), customElements.define("vindral-volume-range", hr), customElements.define("vindral-poster-overlay", Wa), customElements.define("vindral-player", Xa), customElements.define("vindral-seek-bar", mo), customElements.define("vindral-live-button", Hn);
|
|
4882
4920
|
}
|
|
4883
4921
|
export {
|
|
4884
|
-
|
|
4922
|
+
Kl as registerComponents
|
|
4885
4923
|
};
|