@vindral/web-sdk 4.1.1 → 4.1.2
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/{Cx0ZKpcT.js → C-MEaX21.js} +1 -1
- package/{DWjXKRl8.js → CI-d-Lzb.js} +1 -1
- package/{B3oxL4M1.js → ZD9OGvpf.js} +3074 -3020
- package/cast-sender.d.ts +14 -0
- package/core.d.ts +14 -0
- package/core.js +1 -1
- package/legacy.d.ts +18 -1
- package/legacy.es.js +2950 -2886
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.d.ts +23 -2
- package/player.js +540 -502
- package/react.d.ts +23 -2
package/player.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var Br = Object.defineProperty;
|
|
2
2
|
var Kr = Object.getPrototypeOf;
|
|
3
3
|
var qr = Reflect.get;
|
|
4
|
-
var
|
|
4
|
+
var Gs = (d) => {
|
|
5
5
|
throw TypeError(d);
|
|
6
6
|
};
|
|
7
7
|
var Xr = (d, a, t) => a in d ? Br(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
|
|
8
|
-
var m = (d, a, t) => Xr(d, typeof a != "symbol" ? a + "" : a, t),
|
|
9
|
-
var e = (d, a, t) => (
|
|
8
|
+
var m = (d, a, t) => Xr(d, typeof a != "symbol" ? a + "" : a, t), $i = (d, a, t) => a.has(d) || Gs("Cannot " + t);
|
|
9
|
+
var e = (d, a, t) => ($i(d, a, "read from private field"), t ? t.call(d) : a.get(d)), l = (d, a, t) => a.has(d) ? Gs("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(d) : a.set(d, t), c = (d, a, t, i) => ($i(d, a, "write to private field"), i ? i.call(d, t) : a.set(d, t), t), r = (d, a, t) => ($i(d, a, "access private method"), t);
|
|
10
10
|
var q = (d, a, t) => qr(Kr(d), t, a);
|
|
11
11
|
var G = (d, a, t) => new Promise((i, s) => {
|
|
12
12
|
var o = (v) => {
|
|
@@ -24,11 +24,11 @@ var G = (d, a, t) => new Promise((i, s) => {
|
|
|
24
24
|
}, u = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, p);
|
|
25
25
|
u((t = t.apply(d, a)).next());
|
|
26
26
|
});
|
|
27
|
-
import { L as
|
|
27
|
+
import { L as jr, V as Vr, i as Yr, A as Jr, C as Qr, a as Wr } from "./ZD9OGvpf.js";
|
|
28
28
|
import { E as li } from "./Bx7s5QdT.js";
|
|
29
29
|
import { CastSender as Zr } from "./cast-sender.js";
|
|
30
30
|
import { A as to, d as eo } from "./hRzek83o.js";
|
|
31
|
-
const
|
|
31
|
+
const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d / a : (d / a).toFixed(t), io = (d, a = 1) => d >= $s ? `${Bi(d, $s, a)} Gbit/s` : d >= ji ? `${Bi(d, ji, a)} Mbit/s` : d >= Xi ? `${Bi(d, Xi, a)} Kbit/s` : `${d} bit/s`, so = ({ width: d, height: a }) => `${d}x${a}`, no = ({
|
|
32
32
|
title: d,
|
|
33
33
|
subTitle: a = "Live stream",
|
|
34
34
|
poster: t
|
|
@@ -76,7 +76,7 @@ const Bi = 1e3, Ki = Bi * 1e3, Hs = Ki * 1e3, zi = (d, a, t) => d % a === 0 ? d
|
|
|
76
76
|
FULLSCREEN_ENABLED: "fullscreen",
|
|
77
77
|
VU_METER_ENABLED: "vu-meter",
|
|
78
78
|
POSTER_SRC: "poster-src"
|
|
79
|
-
},
|
|
79
|
+
}, js = Object.values(n), f = {
|
|
80
80
|
PLAY: "play",
|
|
81
81
|
PAUSE: "pause",
|
|
82
82
|
MUTE: "mute",
|
|
@@ -96,10 +96,10 @@ const Bi = 1e3, Ki = Bi * 1e3, Hs = Ki * 1e3, zi = (d, a, t) => d % a === 0 ? d
|
|
|
96
96
|
REQUEST_USER_INPUT: "request-user-input",
|
|
97
97
|
SET_VOLUME: "set-volume"
|
|
98
98
|
};
|
|
99
|
-
function
|
|
99
|
+
function Vs(d) {
|
|
100
100
|
return d === "audio" || d === "video" || d === "audio+video" ? d : "audio+video";
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ki(d) {
|
|
103
103
|
return d === "trace" || d === "debug" || d === "info" || d === "warn" || d === "error" || d === "off" ? d : "off";
|
|
104
104
|
}
|
|
105
105
|
function ro(d) {
|
|
@@ -109,10 +109,6 @@ function ro(d) {
|
|
|
109
109
|
if (a.length !== 0)
|
|
110
110
|
return a;
|
|
111
111
|
}
|
|
112
|
-
function Xs(d) {
|
|
113
|
-
if (d !== null)
|
|
114
|
-
return d === "" ? !0 : d;
|
|
115
|
-
}
|
|
116
112
|
function oo(d) {
|
|
117
113
|
if (d !== null)
|
|
118
114
|
try {
|
|
@@ -143,7 +139,7 @@ function ao(d) {
|
|
|
143
139
|
return;
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
|
-
function
|
|
142
|
+
function bi(d) {
|
|
147
143
|
if (d === null)
|
|
148
144
|
return;
|
|
149
145
|
const a = parseInt(d, 10);
|
|
@@ -152,13 +148,16 @@ function ui(d) {
|
|
|
152
148
|
function L(d) {
|
|
153
149
|
return typeof d == "string";
|
|
154
150
|
}
|
|
155
|
-
function
|
|
151
|
+
function S(d, a) {
|
|
156
152
|
if (d === null)
|
|
157
153
|
return a != null ? a : void 0;
|
|
158
154
|
const t = d.toLowerCase();
|
|
159
155
|
return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
|
|
160
156
|
}
|
|
161
|
-
function
|
|
157
|
+
function Ys(d, a) {
|
|
158
|
+
return d === null ? a != null ? a : void 0 : d === "" || d.toLowerCase() === "true" ? !0 : d.toLowerCase() === "false" ? !1 : d;
|
|
159
|
+
}
|
|
160
|
+
function mi(d) {
|
|
162
161
|
if (d === null)
|
|
163
162
|
return;
|
|
164
163
|
const a = {}, t = d.split(",");
|
|
@@ -168,8 +167,14 @@ function pi(d) {
|
|
|
168
167
|
}
|
|
169
168
|
return Object.keys(a).length > 0 ? a : void 0;
|
|
170
169
|
}
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
function vi(d) {
|
|
171
|
+
if (d === null)
|
|
172
|
+
return;
|
|
173
|
+
const a = d.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
174
|
+
return a.length > 0 ? a : void 0;
|
|
175
|
+
}
|
|
176
|
+
const Js = document.createElement("template");
|
|
177
|
+
Js.innerHTML = /* HTML */
|
|
173
178
|
`
|
|
174
179
|
<style>
|
|
175
180
|
:host {
|
|
@@ -241,7 +246,7 @@ class tt extends HTMLElement {
|
|
|
241
246
|
}
|
|
242
247
|
this.addEventListener("keyup", e(this, Nt), { once: !0 });
|
|
243
248
|
});
|
|
244
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
249
|
+
this.attachShadow({ mode: "open" }).appendChild(Js.content.cloneNode(!0));
|
|
245
250
|
}
|
|
246
251
|
get keysUsed() {
|
|
247
252
|
return ["Enter", " "];
|
|
@@ -265,13 +270,13 @@ class tt extends HTMLElement {
|
|
|
265
270
|
}
|
|
266
271
|
}
|
|
267
272
|
Gt = new WeakMap(), Te = new WeakMap(), Nt = new WeakMap(), xe = new WeakMap(), m(tt, "observedAttributes", ["disabled"]);
|
|
268
|
-
const
|
|
273
|
+
const Qs = document.createElement("template"), Bs = (
|
|
269
274
|
/* SVG */
|
|
270
275
|
`
|
|
271
276
|
<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>
|
|
272
277
|
`
|
|
273
278
|
);
|
|
274
|
-
|
|
279
|
+
Qs.innerHTML = /* HTML */
|
|
275
280
|
`
|
|
276
281
|
<style>
|
|
277
282
|
:host {
|
|
@@ -292,26 +297,26 @@ js.innerHTML = /* HTML */
|
|
|
292
297
|
</style>
|
|
293
298
|
|
|
294
299
|
<slot name="icon">
|
|
295
|
-
<slot name="enter">${
|
|
296
|
-
<slot name="exit">${
|
|
300
|
+
<slot name="enter">${Bs}</slot>
|
|
301
|
+
<slot name="exit">${Bs}</slot>
|
|
297
302
|
</slot>
|
|
298
303
|
`;
|
|
299
|
-
var Se,
|
|
304
|
+
var Se, Yi;
|
|
300
305
|
const me = class me extends tt {
|
|
301
306
|
constructor() {
|
|
302
307
|
var t;
|
|
303
308
|
super();
|
|
304
309
|
l(this, Se);
|
|
305
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
310
|
+
(t = this.shadowRoot) == null || t.appendChild(Qs.content.cloneNode(!0));
|
|
306
311
|
}
|
|
307
312
|
connectedCallback() {
|
|
308
|
-
super.connectedCallback(), r(this, Se,
|
|
313
|
+
super.connectedCallback(), r(this, Se, Yi).call(this);
|
|
309
314
|
}
|
|
310
315
|
disconnectedCallback() {
|
|
311
316
|
super.disconnectedCallback();
|
|
312
317
|
}
|
|
313
318
|
attributeChangedCallback(t, i, s) {
|
|
314
|
-
super.attributeChangedCallback(t, i, s), t === n.IS_AIRPLAYING && r(this, Se,
|
|
319
|
+
super.attributeChangedCallback(t, i, s), t === n.IS_AIRPLAYING && r(this, Se, Yi).call(this);
|
|
315
320
|
}
|
|
316
321
|
set isAirPlaying(t) {
|
|
317
322
|
t ? this.setAttribute(n.IS_AIRPLAYING, "") : this.removeAttribute(n.IS_AIRPLAYING);
|
|
@@ -323,15 +328,15 @@ const me = class me extends tt {
|
|
|
323
328
|
this.dispatchEvent(new CustomEvent(f.REQUEST_AIRPLAY, { bubbles: !0, composed: !0 }));
|
|
324
329
|
}
|
|
325
330
|
};
|
|
326
|
-
Se = new WeakSet(),
|
|
331
|
+
Se = new WeakSet(), Yi = function() {
|
|
327
332
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
328
333
|
}, m(me, "observedAttributes", [
|
|
329
334
|
...q(me, me, "observedAttributes"),
|
|
330
335
|
n.AIRPLAY_AVAILABLE,
|
|
331
336
|
n.IS_AIRPLAYING
|
|
332
337
|
]);
|
|
333
|
-
let
|
|
334
|
-
const
|
|
338
|
+
let Vi = me;
|
|
339
|
+
const Ws = document.createElement("template"), lo = (
|
|
335
340
|
/* SVG */
|
|
336
341
|
`
|
|
337
342
|
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -370,7 +375,7 @@ const Ys = document.createElement("template"), lo = (
|
|
|
370
375
|
</svg>
|
|
371
376
|
`
|
|
372
377
|
);
|
|
373
|
-
|
|
378
|
+
Ws.innerHTML = /* HTML */
|
|
374
379
|
`
|
|
375
380
|
<style>
|
|
376
381
|
:host {
|
|
@@ -389,11 +394,11 @@ Ys.innerHTML = /* HTML */
|
|
|
389
394
|
<slot name="icon">${lo}</slot>
|
|
390
395
|
`;
|
|
391
396
|
var $t;
|
|
392
|
-
class
|
|
397
|
+
class Zs extends HTMLElement {
|
|
393
398
|
constructor() {
|
|
394
399
|
super();
|
|
395
400
|
l(this, $t, null);
|
|
396
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
401
|
+
this.attachShadow({ mode: "open" }).appendChild(Ws.content.cloneNode(!0));
|
|
397
402
|
}
|
|
398
403
|
connectedCallback() {
|
|
399
404
|
var t;
|
|
@@ -404,9 +409,9 @@ class Js extends HTMLElement {
|
|
|
404
409
|
(t = e(this, $t)) == null || t.disconnectListener(this);
|
|
405
410
|
}
|
|
406
411
|
}
|
|
407
|
-
$t = new WeakMap(), m(
|
|
408
|
-
const
|
|
409
|
-
|
|
412
|
+
$t = new WeakMap(), m(Zs, "observedAttributes", [n.BUFFERING]);
|
|
413
|
+
const tn = document.createElement("template");
|
|
414
|
+
tn.innerHTML = /* HTML */
|
|
410
415
|
`
|
|
411
416
|
<style>
|
|
412
417
|
:host {
|
|
@@ -465,11 +470,11 @@ Qs.innerHTML = /* HTML */
|
|
|
465
470
|
<div id="buffering-indicator"></div>
|
|
466
471
|
`;
|
|
467
472
|
var Bt;
|
|
468
|
-
class
|
|
473
|
+
class en extends HTMLElement {
|
|
469
474
|
constructor() {
|
|
470
475
|
super();
|
|
471
476
|
l(this, Bt, null);
|
|
472
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
477
|
+
this.attachShadow({ mode: "open" }).appendChild(tn.content.cloneNode(!0));
|
|
473
478
|
}
|
|
474
479
|
connectedCallback() {
|
|
475
480
|
var t;
|
|
@@ -480,9 +485,9 @@ class Ws extends HTMLElement {
|
|
|
480
485
|
(t = e(this, Bt)) == null || t.disconnectListener(this);
|
|
481
486
|
}
|
|
482
487
|
}
|
|
483
|
-
Bt = new WeakMap(), m(
|
|
484
|
-
const
|
|
485
|
-
|
|
488
|
+
Bt = new WeakMap(), m(en, "observedAttributes", [n.BUFFERING]);
|
|
489
|
+
const sn = document.createElement("template");
|
|
490
|
+
sn.innerHTML = /* HTML */
|
|
486
491
|
`
|
|
487
492
|
<style>
|
|
488
493
|
:host {
|
|
@@ -507,22 +512,22 @@ Zs.innerHTML = /* HTML */
|
|
|
507
512
|
}
|
|
508
513
|
</style>
|
|
509
514
|
`;
|
|
510
|
-
var zt,
|
|
515
|
+
var zt, Qi, nn;
|
|
511
516
|
const ve = class ve extends tt {
|
|
512
517
|
constructor() {
|
|
513
518
|
var t;
|
|
514
519
|
super();
|
|
515
520
|
l(this, zt);
|
|
516
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
521
|
+
(t = this.shadowRoot) == null || t.appendChild(sn.content.cloneNode(!0));
|
|
517
522
|
}
|
|
518
523
|
connectedCallback() {
|
|
519
|
-
super.connectedCallback(), r(this, zt,
|
|
524
|
+
super.connectedCallback(), r(this, zt, Qi).call(this);
|
|
520
525
|
}
|
|
521
526
|
disconnectedCallback() {
|
|
522
527
|
super.disconnectedCallback();
|
|
523
528
|
}
|
|
524
529
|
attributeChangedCallback(t, i, s) {
|
|
525
|
-
super.attributeChangedCallback(t, i, s), t === n.CAST_AVAILABLE && r(this, zt,
|
|
530
|
+
super.attributeChangedCallback(t, i, s), t === n.CAST_AVAILABLE && r(this, zt, nn).call(this), t === n.IS_CASTING && r(this, zt, Qi).call(this);
|
|
526
531
|
}
|
|
527
532
|
set isCasting(t) {
|
|
528
533
|
t ? this.setAttribute(n.IS_CASTING, "") : this.removeAttribute(n.IS_CASTING);
|
|
@@ -533,9 +538,9 @@ const ve = class ve extends tt {
|
|
|
533
538
|
handleClick(t) {
|
|
534
539
|
}
|
|
535
540
|
};
|
|
536
|
-
zt = new WeakSet(),
|
|
541
|
+
zt = new WeakSet(), Qi = function() {
|
|
537
542
|
this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
|
|
538
|
-
},
|
|
543
|
+
}, nn = function() {
|
|
539
544
|
var t, i;
|
|
540
545
|
if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
|
|
541
546
|
const s = document.createElement("google-cast-launcher");
|
|
@@ -546,9 +551,9 @@ zt = new WeakSet(), ji = function() {
|
|
|
546
551
|
n.CAST_AVAILABLE,
|
|
547
552
|
n.IS_CASTING
|
|
548
553
|
]);
|
|
549
|
-
let
|
|
550
|
-
const
|
|
551
|
-
|
|
554
|
+
let Ji = ve;
|
|
555
|
+
const rn = document.createElement("template");
|
|
556
|
+
rn.innerHTML = /* HTML */
|
|
552
557
|
`
|
|
553
558
|
<style>
|
|
554
559
|
:host {
|
|
@@ -585,12 +590,12 @@ en.innerHTML = /* HTML */
|
|
|
585
590
|
<span id="text"></span>
|
|
586
591
|
`;
|
|
587
592
|
var Kt, qt;
|
|
588
|
-
class
|
|
593
|
+
class on extends HTMLElement {
|
|
589
594
|
constructor() {
|
|
590
595
|
super();
|
|
591
596
|
l(this, Kt, null);
|
|
592
597
|
l(this, qt, null);
|
|
593
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
598
|
+
this.attachShadow({ mode: "open" }).appendChild(rn.content.cloneNode(!0));
|
|
594
599
|
}
|
|
595
600
|
connectedCallback() {
|
|
596
601
|
var t, i;
|
|
@@ -604,18 +609,18 @@ class sn extends HTMLElement {
|
|
|
604
609
|
i === s || !e(this, qt) || t === "cast-receiver-name" && typeof s == "string" && (e(this, qt).innerText = `Casting to ${s || "device"}`);
|
|
605
610
|
}
|
|
606
611
|
}
|
|
607
|
-
Kt = new WeakMap(), qt = new WeakMap(), m(
|
|
608
|
-
function
|
|
612
|
+
Kt = new WeakMap(), qt = new WeakMap(), m(on, "observedAttributes", [n.IS_CASTING, n.CAST_RECEIVER_NAME]);
|
|
613
|
+
function an(d = document) {
|
|
609
614
|
const a = d == null ? void 0 : d.activeElement;
|
|
610
615
|
if (!a) return null;
|
|
611
616
|
if (a.shadowRoot) {
|
|
612
|
-
const t =
|
|
617
|
+
const t = an(a.shadowRoot);
|
|
613
618
|
return t != null ? t : a;
|
|
614
619
|
}
|
|
615
620
|
return a;
|
|
616
621
|
}
|
|
617
|
-
const
|
|
618
|
-
|
|
622
|
+
const ln = document.createElement("template");
|
|
623
|
+
ln.innerHTML = /* HTML */
|
|
619
624
|
`
|
|
620
625
|
<style>
|
|
621
626
|
:host {
|
|
@@ -682,14 +687,14 @@ rn.innerHTML = /* HTML */
|
|
|
682
687
|
</style>
|
|
683
688
|
<slot></slot>
|
|
684
689
|
`;
|
|
685
|
-
var
|
|
686
|
-
class
|
|
690
|
+
var Ut;
|
|
691
|
+
class Ps extends HTMLElement {
|
|
687
692
|
constructor() {
|
|
688
693
|
super();
|
|
689
|
-
l(this,
|
|
694
|
+
l(this, Ut);
|
|
690
695
|
m(this, "lastThumbnailUpdate");
|
|
691
696
|
const t = this.attachShadow({ mode: "open" });
|
|
692
|
-
c(this,
|
|
697
|
+
c(this, Ut, document.createElement("span")), e(this, Ut).className = "channel-title", t.appendChild(e(this, Ut)), t.appendChild(ln.content.cloneNode(!0));
|
|
693
698
|
}
|
|
694
699
|
attributeChangedCallback(t, i, s) {
|
|
695
700
|
if (i !== s)
|
|
@@ -698,7 +703,7 @@ class Rs extends HTMLElement {
|
|
|
698
703
|
this.updateThumbnail();
|
|
699
704
|
break;
|
|
700
705
|
case "title":
|
|
701
|
-
e(this,
|
|
706
|
+
e(this, Ut).textContent = s;
|
|
702
707
|
break;
|
|
703
708
|
}
|
|
704
709
|
}
|
|
@@ -709,9 +714,9 @@ class Rs extends HTMLElement {
|
|
|
709
714
|
u && o.searchParams.set("auth.token", u), o.searchParams.set("t", Date.now().toString()), p.src = o.toString(), p.onload = () => this.style.backgroundImage = `url(${o.toString()})`;
|
|
710
715
|
}
|
|
711
716
|
}
|
|
712
|
-
|
|
713
|
-
const
|
|
714
|
-
|
|
717
|
+
Ut = new WeakMap(), m(Ps, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
|
|
718
|
+
const hn = document.createElement("template");
|
|
719
|
+
hn.innerHTML = /* HTML */
|
|
715
720
|
`
|
|
716
721
|
<style>
|
|
717
722
|
:host {
|
|
@@ -779,8 +784,8 @@ on.innerHTML = /* HTML */
|
|
|
779
784
|
<slot name="grid" id="grid"></slot>
|
|
780
785
|
</div>
|
|
781
786
|
`;
|
|
782
|
-
var bt, mt, Xt, O, T,
|
|
783
|
-
class
|
|
787
|
+
var bt, mt, Xt, O, T, jt, Ne, Ue, Re, k, cn, un, pn, Wi, bn, mn, vn, gn, fn, En, An, ce;
|
|
788
|
+
class dn extends HTMLElement {
|
|
784
789
|
constructor() {
|
|
785
790
|
super();
|
|
786
791
|
l(this, k);
|
|
@@ -789,23 +794,23 @@ class an extends HTMLElement {
|
|
|
789
794
|
l(this, Xt, []);
|
|
790
795
|
l(this, O, []);
|
|
791
796
|
l(this, T);
|
|
792
|
-
l(this,
|
|
797
|
+
l(this, jt);
|
|
793
798
|
l(this, Ne);
|
|
794
|
-
l(this, Re);
|
|
795
799
|
l(this, Ue);
|
|
800
|
+
l(this, Re);
|
|
796
801
|
m(this, "handleEvent", (t) => {
|
|
797
802
|
switch (t.type) {
|
|
798
803
|
case "keydown":
|
|
799
|
-
r(this, k,
|
|
804
|
+
r(this, k, En).call(this, t);
|
|
800
805
|
break;
|
|
801
806
|
}
|
|
802
807
|
});
|
|
803
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
808
|
+
this.attachShadow({ mode: "open" }).appendChild(hn.content.cloneNode(!0));
|
|
804
809
|
}
|
|
805
810
|
connectedCallback() {
|
|
806
811
|
var t, i, s;
|
|
807
|
-
c(this, mt, this.closest("vindral-controller")), (t = e(this, mt)) == null || t.connectListener(this), r(this, k,
|
|
808
|
-
r(this, k,
|
|
812
|
+
c(this, mt, this.closest("vindral-controller")), (t = e(this, mt)) == null || t.connectListener(this), r(this, k, cn).call(this), (s = e(this, bt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), r(this, k, Wi).call(this), c(this, Ne, window.setInterval(() => {
|
|
813
|
+
r(this, k, gn).call(this);
|
|
809
814
|
}, 1e4));
|
|
810
815
|
}
|
|
811
816
|
disconnectedCallback() {
|
|
@@ -816,14 +821,14 @@ class an extends HTMLElement {
|
|
|
816
821
|
if (i !== s)
|
|
817
822
|
switch (t) {
|
|
818
823
|
case n.CHANNEL_ID: {
|
|
819
|
-
r(this, k,
|
|
824
|
+
r(this, k, vn).call(this, s);
|
|
820
825
|
break;
|
|
821
826
|
}
|
|
822
827
|
case n.CHANNELS:
|
|
823
|
-
c(this, Xt, JSON.parse(s)), r(this, k,
|
|
828
|
+
c(this, Xt, JSON.parse(s)), r(this, k, Wi).call(this);
|
|
824
829
|
break;
|
|
825
830
|
case "authentication-token":
|
|
826
|
-
c(this,
|
|
831
|
+
c(this, jt, s);
|
|
827
832
|
break;
|
|
828
833
|
}
|
|
829
834
|
}
|
|
@@ -832,45 +837,45 @@ class an extends HTMLElement {
|
|
|
832
837
|
}
|
|
833
838
|
focus() {
|
|
834
839
|
var t;
|
|
835
|
-
c(this,
|
|
840
|
+
c(this, Ue, an()), (t = e(this, T)) == null || t.focus();
|
|
836
841
|
}
|
|
837
842
|
}
|
|
838
|
-
bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T = new WeakMap(),
|
|
843
|
+
bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T = new WeakMap(), jt = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), Re = new WeakMap(), k = new WeakSet(), cn = function() {
|
|
839
844
|
c(this, bt, new IntersectionObserver(
|
|
840
845
|
(t) => {
|
|
841
846
|
t.forEach((i) => {
|
|
842
847
|
const { target: s, isIntersecting: o } = i;
|
|
843
|
-
s instanceof
|
|
848
|
+
s instanceof Ps ? r(this, k, pn).call(this, s, o) : r(this, k, un).call(this, o);
|
|
844
849
|
});
|
|
845
850
|
},
|
|
846
851
|
{
|
|
847
852
|
root: e(this, mt)
|
|
848
853
|
}
|
|
849
854
|
));
|
|
850
|
-
},
|
|
855
|
+
}, un = function(t) {
|
|
851
856
|
var i, s;
|
|
852
857
|
if (t) {
|
|
853
858
|
this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 }));
|
|
854
859
|
const o = () => {
|
|
855
|
-
window.clearTimeout(e(this,
|
|
860
|
+
window.clearTimeout(e(this, Re)), c(this, Re, window.setTimeout(() => {
|
|
856
861
|
var p;
|
|
857
862
|
this.focus(), (p = this.parentElement) == null || p.removeEventListener("scroll", o);
|
|
858
863
|
}, 100));
|
|
859
864
|
};
|
|
860
865
|
(i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this, T) && (e(this, T).tabIndex = 0);
|
|
861
866
|
} else
|
|
862
|
-
e(this, T) && (e(this, T).tabIndex = -1), this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), (s = e(this,
|
|
863
|
-
},
|
|
867
|
+
e(this, T) && (e(this, T).tabIndex = -1), this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), (s = e(this, Ue)) == null || s.focus(), this.removeEventListener("keydown", this);
|
|
868
|
+
}, pn = function(t, i) {
|
|
864
869
|
i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
|
|
865
|
-
},
|
|
870
|
+
}, Wi = function() {
|
|
866
871
|
var o;
|
|
867
872
|
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=grid]"), i = new Map(e(this, O).map((p) => [p.id, p])), s = this.getAttribute("channel-id");
|
|
868
873
|
c(this, O, e(this, Xt).map((p) => {
|
|
869
874
|
var g;
|
|
870
875
|
const u = i.get(p.channelId);
|
|
871
876
|
if (u)
|
|
872
|
-
return r(this, k,
|
|
873
|
-
const v = r(this, k,
|
|
877
|
+
return r(this, k, bn).call(this, u.element, p), u;
|
|
878
|
+
const v = r(this, k, mn).call(this, p, s);
|
|
874
879
|
return (g = e(this, bt)) == null || g.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
|
|
875
880
|
})), i.forEach((p, u) => {
|
|
876
881
|
var v;
|
|
@@ -878,25 +883,25 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
878
883
|
}), e(this, O).sort((p, u) => p.element.hasAttribute("offline") && !u.element.hasAttribute("offline") ? 1 : -1).forEach((p) => {
|
|
879
884
|
t.contains(p.element) || t.appendChild(p.element);
|
|
880
885
|
});
|
|
881
|
-
},
|
|
886
|
+
}, bn = function(t, i) {
|
|
882
887
|
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
883
|
-
},
|
|
888
|
+
}, mn = function(t, i) {
|
|
884
889
|
const s = document.createElement("vindral-channel-grid-item");
|
|
885
|
-
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this,
|
|
886
|
-
},
|
|
890
|
+
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, jt) && s.setAttribute("authentication-token", e(this, jt)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), c(this, T, s)), s.tabIndex = -1, s.onclick = () => r(this, k, fn).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
|
|
891
|
+
}, vn = function(t) {
|
|
887
892
|
e(this, O).forEach((i) => {
|
|
888
893
|
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, c(this, T, i.element)) : (i.element.tabIndex = -1, i.element.setAttribute("aria-selected", "false"));
|
|
889
894
|
});
|
|
890
|
-
},
|
|
895
|
+
}, gn = function() {
|
|
891
896
|
this.hasAttribute("hidden") || e(this, O).forEach((t) => t.element.updateThumbnail());
|
|
892
|
-
},
|
|
897
|
+
}, fn = function(t) {
|
|
893
898
|
var i;
|
|
894
899
|
(i = e(this, mt)) == null || i.setAttribute("channel-id", t.channelId);
|
|
895
|
-
},
|
|
900
|
+
}, En = function(t) {
|
|
896
901
|
var u, v, g;
|
|
897
902
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
898
|
-
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((u = this.parentElement) == null || u.removeAttribute("open"), (v = e(this, mt)) == null || v.focus()) : i === "Enter" || i === " " ? (g = e(this, T)) == null || g.click() : r(this, k,
|
|
899
|
-
},
|
|
903
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((u = this.parentElement) == null || u.removeAttribute("open"), (v = e(this, mt)) == null || v.focus()) : i === "Enter" || i === " " ? (g = e(this, T)) == null || g.click() : r(this, k, An).call(this, t));
|
|
904
|
+
}, An = function(t) {
|
|
900
905
|
var u;
|
|
901
906
|
if (!e(this, T)) return;
|
|
902
907
|
const { key: i } = t;
|
|
@@ -935,13 +940,13 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
935
940
|
return e(this, O).filter((u) => u.element.getBoundingClientRect().width > 0).forEach((u, v) => {
|
|
936
941
|
const g = u.element.getBoundingClientRect(), P = i === 0 || i < 0 && g.top < t.top || i > 0 && g.top > t.top, et = s === 0 || s < 0 && g.left < t.left || s > 0 && g.left > t.left;
|
|
937
942
|
if (P && et) {
|
|
938
|
-
const
|
|
943
|
+
const J = Math.sqrt(
|
|
939
944
|
Math.pow(g.top - t.top, 2) + Math.pow(g.left - t.left, 2)
|
|
940
945
|
);
|
|
941
|
-
|
|
946
|
+
J < p && (p = J, o = v);
|
|
942
947
|
}
|
|
943
948
|
}), o;
|
|
944
|
-
}, m(
|
|
949
|
+
}, m(dn, "observedAttributes", [
|
|
945
950
|
n.CHANNELS,
|
|
946
951
|
n.CHANNEL_ID,
|
|
947
952
|
n.AUTHENTICATION_TOKEN,
|
|
@@ -959,8 +964,8 @@ const ho = (
|
|
|
959
964
|
<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" />
|
|
960
965
|
</svg>
|
|
961
966
|
`
|
|
962
|
-
),
|
|
963
|
-
|
|
967
|
+
), yn = document.createElement("template");
|
|
968
|
+
yn.innerHTML = /* HTML */
|
|
964
969
|
`
|
|
965
970
|
<style>
|
|
966
971
|
:host {
|
|
@@ -976,65 +981,65 @@ fn.innerHTML = /* HTML */
|
|
|
976
981
|
</style>
|
|
977
982
|
<slot name="button">${ho}</slot>
|
|
978
983
|
`;
|
|
979
|
-
var
|
|
984
|
+
var Vt, _, j, wi, R, kn, ts, gi, es, is;
|
|
980
985
|
const ge = class ge extends tt {
|
|
981
986
|
constructor() {
|
|
982
987
|
var t, i;
|
|
983
988
|
super();
|
|
984
|
-
l(this,
|
|
985
|
-
l(this,
|
|
989
|
+
l(this, R);
|
|
990
|
+
l(this, Vt);
|
|
986
991
|
l(this, _);
|
|
987
|
-
l(this,
|
|
988
|
-
l(this,
|
|
989
|
-
t.composedPath().includes(this) || r(this,
|
|
992
|
+
l(this, j);
|
|
993
|
+
l(this, wi, (t) => {
|
|
994
|
+
t.composedPath().includes(this) || r(this, R, gi).call(this);
|
|
990
995
|
});
|
|
991
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
996
|
+
(t = this.shadowRoot) == null || t.appendChild(yn.content.cloneNode(!0)), c(this, Vt, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
|
|
992
997
|
}
|
|
993
998
|
connectedCallback() {
|
|
994
999
|
var i;
|
|
995
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), r(this,
|
|
1000
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), r(this, R, es).call(this);
|
|
996
1001
|
const t = this.getRootNode();
|
|
997
|
-
(t instanceof Document || t instanceof ShadowRoot) && (c(this, _, t.querySelector("vindral-channel-grid")), ((i = e(this, _).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, _).hidden = !1, e(this, _).style.position = "relative", c(this,
|
|
1002
|
+
(t instanceof Document || t instanceof ShadowRoot) && (c(this, _, t.querySelector("vindral-channel-grid")), ((i = e(this, _).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, _).hidden = !1, e(this, _).style.position = "relative", c(this, j, e(this, _).parentElement))), r(this, R, is).call(this);
|
|
998
1003
|
}
|
|
999
1004
|
disconnectedCallback() {
|
|
1000
1005
|
}
|
|
1001
1006
|
attributeChangedCallback(t, i, s) {
|
|
1002
|
-
super.attributeChangedCallback(t, i, s), (t === n.CHANNEL_GROUP_ID || t === n.CHANNELS) && r(this,
|
|
1007
|
+
super.attributeChangedCallback(t, i, s), (t === n.CHANNEL_GROUP_ID || t === n.CHANNELS) && r(this, R, es).call(this);
|
|
1003
1008
|
}
|
|
1004
1009
|
enable() {
|
|
1005
|
-
super.enable(), document.addEventListener("click", e(this,
|
|
1010
|
+
super.enable(), document.addEventListener("click", e(this, wi));
|
|
1006
1011
|
}
|
|
1007
1012
|
handleClick(t) {
|
|
1008
|
-
r(this,
|
|
1013
|
+
r(this, R, kn).call(this);
|
|
1009
1014
|
}
|
|
1010
1015
|
get isOpen() {
|
|
1011
1016
|
var t, i;
|
|
1012
|
-
return ((t = e(this,
|
|
1017
|
+
return ((t = e(this, j)) == null ? void 0 : t.hasAttribute("open")) || !((i = e(this, _)) != null && i.hidden);
|
|
1013
1018
|
}
|
|
1014
1019
|
};
|
|
1015
|
-
|
|
1020
|
+
Vt = new WeakMap(), _ = new WeakMap(), j = new WeakMap(), wi = new WeakMap(), R = new WeakSet(), kn = function() {
|
|
1016
1021
|
var t;
|
|
1017
|
-
e(this,
|
|
1018
|
-
},
|
|
1022
|
+
e(this, j) ? e(this, j).hasAttribute("open") ? r(this, R, gi).call(this) : r(this, R, ts).call(this) : (t = e(this, _)) != null && t.hidden ? r(this, R, ts).call(this) : r(this, R, gi).call(this), r(this, R, is).call(this);
|
|
1023
|
+
}, ts = function() {
|
|
1019
1024
|
var t;
|
|
1020
|
-
if (e(this,
|
|
1021
|
-
e(this,
|
|
1025
|
+
if (e(this, j))
|
|
1026
|
+
e(this, j).setAttribute("open", "");
|
|
1022
1027
|
else {
|
|
1023
1028
|
if (!((t = e(this, _)) != null && t.hidden)) return;
|
|
1024
1029
|
e(this, _).hidden = !1, e(this, _).focus();
|
|
1025
1030
|
}
|
|
1026
|
-
e(this,
|
|
1027
|
-
},
|
|
1028
|
-
if (e(this,
|
|
1029
|
-
e(this,
|
|
1031
|
+
e(this, Vt).setAttribute("aria-expanded", "true");
|
|
1032
|
+
}, gi = function() {
|
|
1033
|
+
if (e(this, j))
|
|
1034
|
+
e(this, j).removeAttribute("open");
|
|
1030
1035
|
else {
|
|
1031
1036
|
if (!e(this, _) || e(this, _).hidden) return;
|
|
1032
1037
|
e(this, _).hidden = !0;
|
|
1033
1038
|
}
|
|
1034
|
-
e(this,
|
|
1035
|
-
},
|
|
1039
|
+
e(this, Vt).setAttribute("aria-expanded", "false");
|
|
1040
|
+
}, es = function() {
|
|
1036
1041
|
this.getAttribute(n.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(n.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1037
|
-
},
|
|
1042
|
+
}, is = function() {
|
|
1038
1043
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
1039
1044
|
}, m(ge, "observedAttributes", [
|
|
1040
1045
|
...q(ge, ge, "observedAttributes"),
|
|
@@ -1042,9 +1047,9 @@ jt = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), Ai = new WeakMap(), U
|
|
|
1042
1047
|
n.CHANNELS,
|
|
1043
1048
|
"hidden"
|
|
1044
1049
|
]);
|
|
1045
|
-
let
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1050
|
+
let Zi = ge;
|
|
1051
|
+
const wn = document.createElement("template");
|
|
1052
|
+
wn.innerHTML = /* HTML */
|
|
1048
1053
|
`
|
|
1049
1054
|
<style>
|
|
1050
1055
|
:host {
|
|
@@ -1073,16 +1078,16 @@ An.innerHTML = /* HTML */
|
|
|
1073
1078
|
<slot name="right"></slot>
|
|
1074
1079
|
</slot>
|
|
1075
1080
|
`;
|
|
1076
|
-
class
|
|
1081
|
+
class In extends HTMLElement {
|
|
1077
1082
|
constructor() {
|
|
1078
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1083
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(wn.content.cloneNode(!0));
|
|
1079
1084
|
}
|
|
1080
1085
|
connectedCallback() {
|
|
1081
1086
|
}
|
|
1082
1087
|
disconnectedCallback() {
|
|
1083
1088
|
}
|
|
1084
1089
|
}
|
|
1085
|
-
m(
|
|
1090
|
+
m(In, "observedAttributes", []);
|
|
1086
1091
|
class co extends li {
|
|
1087
1092
|
constructor(t) {
|
|
1088
1093
|
super();
|
|
@@ -1090,10 +1095,13 @@ class co extends li {
|
|
|
1090
1095
|
m(this, "hlsUrl");
|
|
1091
1096
|
m(this, "element");
|
|
1092
1097
|
m(this, "connectingTimeout");
|
|
1098
|
+
m(this, "castingAvailable", !1);
|
|
1093
1099
|
/**
|
|
1094
1100
|
* Update authentication token on an already established and authenticated connection.
|
|
1101
|
+
* Note: When casting to AirPlay, this will interrupt the current session to apply the new token.
|
|
1095
1102
|
*/
|
|
1096
1103
|
m(this, "updateAuthenticationToken", (t) => {
|
|
1104
|
+
this.config.authenticationToken = t, this.hlsUrl = this.getHlsUrl(), this.castingAvailable && (this.element.src = this.hlsUrl);
|
|
1097
1105
|
});
|
|
1098
1106
|
/**
|
|
1099
1107
|
* Fully unloads the instance. This disconnects the current listeners.
|
|
@@ -1104,17 +1112,20 @@ class co extends li {
|
|
|
1104
1112
|
m(this, "onAirPlayAvailable", (t) => {
|
|
1105
1113
|
switch (t.availability) {
|
|
1106
1114
|
case "available": {
|
|
1107
|
-
this.element.src !== this.hlsUrl && this.checkHlsUrl(this.hlsUrl).then((s) => {
|
|
1115
|
+
this.castingAvailable = !0, this.element.src !== this.hlsUrl && this.checkHlsUrl(this.hlsUrl).then((s) => {
|
|
1108
1116
|
s && (this.element.src = this.hlsUrl, this.emit("available"));
|
|
1109
1117
|
});
|
|
1110
1118
|
break;
|
|
1111
1119
|
}
|
|
1120
|
+
case "not-available":
|
|
1121
|
+
this.castingAvailable = !1;
|
|
1122
|
+
break;
|
|
1112
1123
|
}
|
|
1113
1124
|
});
|
|
1114
1125
|
m(this, "onAirPlayPlaybackChanged", () => {
|
|
1115
1126
|
window.clearTimeout(this.connectingTimeout), this.element.webkitCurrentPlaybackTargetIsWireless ? (this.emit("connected"), this.element.style.display = "block", this.element.paused && this.element.play()) : (this.emit("disconnected"), this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl, this.element.style.display = "none");
|
|
1116
1127
|
});
|
|
1117
|
-
this.
|
|
1128
|
+
this.config = t, this.hlsUrl = this.getHlsUrl(), this.element = document.createElement("video"), this.element.style.position = "absolute", this.element.style.top = "0", this.element.style.bottom = "0", this.element.style.left = "0", this.element.style.right = "0", this.element.style.width = "100%", this.element.style.height = "100%", this.element.style.zIndex = "1001", this.element.style.display = "none", this.element.id = "vindral-airplay-element", this.element.slot = "overlay", this.element.playsInline = !0, this.element.controls = !0, this.element.preload = "metadata", this.element.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.config.container.appendChild(this.element);
|
|
1118
1129
|
}
|
|
1119
1130
|
/**
|
|
1120
1131
|
* True if the instance is casting right now.
|
|
@@ -1133,7 +1144,7 @@ class co extends li {
|
|
|
1133
1144
|
*/
|
|
1134
1145
|
showPlaybackTargetPicker() {
|
|
1135
1146
|
this.element.paused && (this.element.play(), this.connectingTimeout = window.setTimeout(() => {
|
|
1136
|
-
this.
|
|
1147
|
+
this.casting || (this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl);
|
|
1137
1148
|
}, 3e4)), this.element.webkitShowPlaybackTargetPicker();
|
|
1138
1149
|
}
|
|
1139
1150
|
/**
|
|
@@ -1142,6 +1153,10 @@ class co extends li {
|
|
|
1142
1153
|
static isAirPlaySupported() {
|
|
1143
1154
|
return !!window.WebKitPlaybackTargetAvailabilityEvent;
|
|
1144
1155
|
}
|
|
1156
|
+
getHlsUrl() {
|
|
1157
|
+
const t = new URL(`/api/hls?channelId=${this.config.channelId}`, this.config.url);
|
|
1158
|
+
return this.config.authenticationToken && t.searchParams.set("authenticationToken", this.config.authenticationToken), t.toString();
|
|
1159
|
+
}
|
|
1145
1160
|
checkHlsUrl(t) {
|
|
1146
1161
|
return G(this, null, function* () {
|
|
1147
1162
|
try {
|
|
@@ -1201,7 +1216,7 @@ const St = class St extends li {
|
|
|
1201
1216
|
};
|
|
1202
1217
|
m(St, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
|
|
1203
1218
|
let be = St;
|
|
1204
|
-
var
|
|
1219
|
+
var Ii, Ci, Li, Ti, Yt, xi, Si, _e, Jt;
|
|
1205
1220
|
class uo extends li {
|
|
1206
1221
|
constructor(t) {
|
|
1207
1222
|
super();
|
|
@@ -1210,14 +1225,14 @@ class uo extends li {
|
|
|
1210
1225
|
});
|
|
1211
1226
|
m(this, "request", () => G(this, null, function* () {
|
|
1212
1227
|
try {
|
|
1213
|
-
return yield e(this,
|
|
1228
|
+
return yield e(this, Ii).call(this);
|
|
1214
1229
|
} catch (t) {
|
|
1215
1230
|
throw this.onChange(), t;
|
|
1216
1231
|
}
|
|
1217
1232
|
}));
|
|
1218
1233
|
m(this, "exit", () => G(this, null, function* () {
|
|
1219
1234
|
try {
|
|
1220
|
-
return yield e(this,
|
|
1235
|
+
return yield e(this, Ci).call(this);
|
|
1221
1236
|
} catch (t) {
|
|
1222
1237
|
throw this.onChange(), t;
|
|
1223
1238
|
}
|
|
@@ -1225,26 +1240,26 @@ class uo extends li {
|
|
|
1225
1240
|
m(this, "onChange", () => {
|
|
1226
1241
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1227
1242
|
});
|
|
1228
|
-
m(this, "isPictureInPictureActive", () => e(this,
|
|
1243
|
+
m(this, "isPictureInPictureActive", () => e(this, Si).call(this) || e(this, xi).call(this));
|
|
1229
1244
|
m(this, "isSupported", () => e(this, Jt).call(this) || e(this, Yt).call(this));
|
|
1230
|
-
l(this,
|
|
1231
|
-
l(this,
|
|
1232
|
-
l(this,
|
|
1245
|
+
l(this, Ii, () => e(this, Yt).call(this) ? e(this, Li).call(this) : e(this, Jt).call(this) ? e(this, _e).call(this, "picture-in-picture") : Promise.resolve());
|
|
1246
|
+
l(this, Ci, () => this.isPictureInPictureActive() ? e(this, Yt).call(this) ? e(this, Ti).call(this) : e(this, Jt).call(this) ? e(this, _e).call(this, "inline") : Promise.resolve() : Promise.resolve());
|
|
1247
|
+
l(this, Li, () => G(this, null, function* () {
|
|
1233
1248
|
yield this.element.requestPictureInPicture();
|
|
1234
1249
|
}));
|
|
1235
|
-
l(this,
|
|
1250
|
+
l(this, Ti, () => G(this, null, function* () {
|
|
1236
1251
|
yield document.exitPictureInPicture();
|
|
1237
1252
|
}));
|
|
1238
1253
|
l(this, Yt, () => !!this.element.requestPictureInPicture && !!document.pictureInPictureEnabled);
|
|
1239
|
-
l(this,
|
|
1240
|
-
l(this,
|
|
1254
|
+
l(this, xi, () => !!document.pictureInPictureElement);
|
|
1255
|
+
l(this, Si, () => this.element.webkitPresentationMode === "picture-in-picture");
|
|
1241
1256
|
l(this, _e, (t) => (this.element.webkitSetPresentationMode && this.element.webkitSetPresentationMode(t), Promise.resolve()));
|
|
1242
1257
|
l(this, Jt, () => !!this.element.webkitSetPresentationMode);
|
|
1243
1258
|
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.setAttribute("autopictureinpicture", "");
|
|
1244
1259
|
}
|
|
1245
1260
|
}
|
|
1246
|
-
|
|
1247
|
-
class
|
|
1261
|
+
Ii = new WeakMap(), Ci = new WeakMap(), Li = new WeakMap(), Ti = new WeakMap(), Yt = new WeakMap(), xi = new WeakMap(), Si = new WeakMap(), _e = new WeakMap(), Jt = new WeakMap();
|
|
1262
|
+
class Ks extends li {
|
|
1248
1263
|
constructor(t) {
|
|
1249
1264
|
super();
|
|
1250
1265
|
m(this, "audioContext");
|
|
@@ -1307,12 +1322,12 @@ class Gs extends li {
|
|
|
1307
1322
|
return this.source instanceof HTMLMediaElement;
|
|
1308
1323
|
}
|
|
1309
1324
|
}
|
|
1310
|
-
const
|
|
1325
|
+
const qs = (d) => {
|
|
1311
1326
|
var t;
|
|
1312
1327
|
let a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0;
|
|
1313
|
-
return !a && ((t = d.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(d), a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) =>
|
|
1314
|
-
},
|
|
1315
|
-
|
|
1328
|
+
return !a && ((t = d.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(d), a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => js.includes(i)) : [];
|
|
1329
|
+
}, Cn = document.createElement("template");
|
|
1330
|
+
Cn.innerHTML = /* HTML */
|
|
1316
1331
|
`
|
|
1317
1332
|
<style>
|
|
1318
1333
|
:host {
|
|
@@ -1324,8 +1339,8 @@ kn.innerHTML = /* HTML */
|
|
|
1324
1339
|
}
|
|
1325
1340
|
</style>
|
|
1326
1341
|
`;
|
|
1327
|
-
var Qt, Wt, $, Pe,
|
|
1328
|
-
class
|
|
1342
|
+
var Qt, Wt, $, Pe, Ni, Ui, he, Ln, Tn;
|
|
1343
|
+
class Ms extends tt {
|
|
1329
1344
|
constructor() {
|
|
1330
1345
|
var t;
|
|
1331
1346
|
super();
|
|
@@ -1334,13 +1349,13 @@ class Us extends tt {
|
|
|
1334
1349
|
l(this, Wt);
|
|
1335
1350
|
l(this, $);
|
|
1336
1351
|
l(this, Pe, null);
|
|
1337
|
-
l(this,
|
|
1352
|
+
l(this, Ni, (t) => {
|
|
1338
1353
|
t.composedPath().includes(this) || this.hide();
|
|
1339
1354
|
});
|
|
1340
|
-
l(this,
|
|
1355
|
+
l(this, Ui, () => {
|
|
1341
1356
|
this.hide();
|
|
1342
1357
|
});
|
|
1343
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1358
|
+
(t = this.shadowRoot) == null || t.appendChild(Cn.content.cloneNode(!0));
|
|
1344
1359
|
}
|
|
1345
1360
|
connectedCallback() {
|
|
1346
1361
|
var p, u, v, g;
|
|
@@ -1363,25 +1378,25 @@ class Us extends tt {
|
|
|
1363
1378
|
c(this, $, t);
|
|
1364
1379
|
}
|
|
1365
1380
|
enable() {
|
|
1366
|
-
super.enable(), this.addEventListener("change", e(this,
|
|
1381
|
+
super.enable(), this.addEventListener("change", e(this, Ui)), document.addEventListener("click", e(this, Ni));
|
|
1367
1382
|
}
|
|
1368
1383
|
hide() {
|
|
1369
1384
|
var t, i;
|
|
1370
1385
|
!e(this, $) || (t = e(this, $)) != null && t.hidden || (e(this, $).hidden = !0, (i = e(this, Qt)) == null || i.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 })), this.focus());
|
|
1371
1386
|
}
|
|
1372
1387
|
handleClick(t) {
|
|
1373
|
-
e(this, $) && !t.composedPath().includes(e(this, $)) && r(this, he,
|
|
1388
|
+
e(this, $) && !t.composedPath().includes(e(this, $)) && r(this, he, Ln).call(this);
|
|
1374
1389
|
}
|
|
1375
1390
|
}
|
|
1376
|
-
Qt = new WeakMap(), Wt = new WeakMap(), $ = new WeakMap(), Pe = new WeakMap(),
|
|
1391
|
+
Qt = new WeakMap(), Wt = new WeakMap(), $ = new WeakMap(), Pe = new WeakMap(), Ni = new WeakMap(), Ui = new WeakMap(), he = new WeakSet(), Ln = function() {
|
|
1377
1392
|
var t;
|
|
1378
|
-
(t = e(this, $)) != null && t.hidden ? r(this, he,
|
|
1379
|
-
},
|
|
1393
|
+
(t = e(this, $)) != null && t.hidden ? r(this, he, Tn).call(this) : this.hide();
|
|
1394
|
+
}, Tn = function() {
|
|
1380
1395
|
var t, i, s;
|
|
1381
1396
|
(t = e(this, $)) != null && t.hidden && (e(this, $).hidden = !1, (i = e(this, Qt)) == null || i.setAttribute("aria-expanded", "true"), (s = e(this, Wt)) == null || s.focus(), this.dispatchEvent(new CustomEvent(f.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
1382
1397
|
};
|
|
1383
|
-
const
|
|
1384
|
-
|
|
1398
|
+
const xn = document.createElement("template");
|
|
1399
|
+
xn.innerHTML = /* HTML */
|
|
1385
1400
|
`
|
|
1386
1401
|
<style>
|
|
1387
1402
|
:host {
|
|
@@ -1485,7 +1500,7 @@ Cn.innerHTML = /* HTML */
|
|
|
1485
1500
|
<div id="range-track"></div>
|
|
1486
1501
|
`;
|
|
1487
1502
|
var Zt, te, Me, De;
|
|
1488
|
-
class
|
|
1503
|
+
class Ds extends HTMLElement {
|
|
1489
1504
|
constructor() {
|
|
1490
1505
|
super();
|
|
1491
1506
|
l(this, Zt, null);
|
|
@@ -1497,7 +1512,7 @@ class _s extends HTMLElement {
|
|
|
1497
1512
|
l(this, De, () => {
|
|
1498
1513
|
this.style.removeProperty("--_focus-visible-box-shadow");
|
|
1499
1514
|
});
|
|
1500
|
-
c(this, te, this.attachShadow({ mode: "open" })), e(this, te).appendChild(
|
|
1515
|
+
c(this, te, this.attachShadow({ mode: "open" })), e(this, te).appendChild(xn.content.cloneNode(!0)), this.range = e(this, te).getElementById("range");
|
|
1501
1516
|
}
|
|
1502
1517
|
connectedCallback() {
|
|
1503
1518
|
var t;
|
|
@@ -1526,9 +1541,9 @@ class _s extends HTMLElement {
|
|
|
1526
1541
|
return ["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"];
|
|
1527
1542
|
}
|
|
1528
1543
|
}
|
|
1529
|
-
Zt = new WeakMap(), te = new WeakMap(), Me = new WeakMap(), De = new WeakMap(), m(
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1544
|
+
Zt = new WeakMap(), te = new WeakMap(), Me = new WeakMap(), De = new WeakMap(), m(Ds, "observedAttributes", ["disabled"]);
|
|
1545
|
+
const Sn = document.createElement("template");
|
|
1546
|
+
Sn.innerHTML = /* HTML */
|
|
1532
1547
|
`
|
|
1533
1548
|
<style>
|
|
1534
1549
|
:host {
|
|
@@ -1706,8 +1721,8 @@ Ln.innerHTML = /* HTML */
|
|
|
1706
1721
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1707
1722
|
</div>
|
|
1708
1723
|
`;
|
|
1709
|
-
const
|
|
1710
|
-
var
|
|
1724
|
+
const qi = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
1725
|
+
var Ri, it, Oe, vt, gt, b, Fe, st, nt, ee, rt, B, V, F, ot, He, ze, U, ft, h, ss, Nn, Un, Rn, ns, _n, Pn, Mn, Ge, Dn, On, Fn, Hn, $e, _i, Pi, zn, Rt, rs, os, fi, pt, Gn, $n, Bn, as, Mi, Di, ls, A, w;
|
|
1711
1726
|
const fe = class fe extends HTMLElement {
|
|
1712
1727
|
constructor() {
|
|
1713
1728
|
super();
|
|
@@ -1717,18 +1732,18 @@ const fe = class fe extends HTMLElement {
|
|
|
1717
1732
|
l(this, vt, null);
|
|
1718
1733
|
l(this, gt, null);
|
|
1719
1734
|
l(this, b);
|
|
1720
|
-
l(this, Fe, e(fe,
|
|
1735
|
+
l(this, Fe, e(fe, Ri));
|
|
1721
1736
|
l(this, st);
|
|
1722
1737
|
l(this, nt);
|
|
1723
1738
|
l(this, ee);
|
|
1724
1739
|
l(this, rt);
|
|
1725
1740
|
l(this, B);
|
|
1726
|
-
l(this,
|
|
1741
|
+
l(this, V);
|
|
1727
1742
|
l(this, F);
|
|
1728
1743
|
l(this, ot);
|
|
1729
1744
|
l(this, He);
|
|
1730
1745
|
l(this, ze);
|
|
1731
|
-
l(this,
|
|
1746
|
+
l(this, U);
|
|
1732
1747
|
l(this, ft, null);
|
|
1733
1748
|
l(this, Ge, 0);
|
|
1734
1749
|
m(this, "handleEvent", (t) => {
|
|
@@ -1737,31 +1752,31 @@ const fe = class fe extends HTMLElement {
|
|
|
1737
1752
|
c(this, Ge, t.timeStamp);
|
|
1738
1753
|
break;
|
|
1739
1754
|
case "pointermove":
|
|
1740
|
-
r(this, h,
|
|
1755
|
+
r(this, h, Dn).call(this, t);
|
|
1741
1756
|
break;
|
|
1742
1757
|
case "pointerup":
|
|
1743
|
-
r(this, h,
|
|
1758
|
+
r(this, h, On).call(this, t);
|
|
1744
1759
|
break;
|
|
1745
1760
|
case "mouseleave":
|
|
1746
1761
|
r(this, h, pt).call(this);
|
|
1747
1762
|
break;
|
|
1748
1763
|
case "dblclick":
|
|
1749
|
-
r(this, h,
|
|
1764
|
+
r(this, h, Fn).call(this, t);
|
|
1750
1765
|
break;
|
|
1751
1766
|
case "mousemove":
|
|
1752
|
-
r(this, h,
|
|
1767
|
+
r(this, h, Hn).call(this, t);
|
|
1753
1768
|
break;
|
|
1754
1769
|
case "keydown":
|
|
1755
|
-
e(this,
|
|
1770
|
+
e(this, Pi).call(this, t);
|
|
1756
1771
|
break;
|
|
1757
1772
|
case "keyup":
|
|
1758
|
-
r(this, h, pt).call(this), e(this,
|
|
1773
|
+
r(this, h, pt).call(this), e(this, _i).call(this, t);
|
|
1759
1774
|
break;
|
|
1760
1775
|
}
|
|
1761
1776
|
});
|
|
1762
1777
|
l(this, $e, (t) => {
|
|
1763
1778
|
var i;
|
|
1764
|
-
if (e(this, b) && (e(this,
|
|
1779
|
+
if (e(this, b) && (e(this, U).debug("Vindral event", { type: t.type }), t instanceof CustomEvent))
|
|
1765
1780
|
switch (t.type) {
|
|
1766
1781
|
case f.PLAY:
|
|
1767
1782
|
this.removeAttribute(n.PAUSED);
|
|
@@ -1794,7 +1809,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1794
1809
|
}
|
|
1795
1810
|
break;
|
|
1796
1811
|
case f.CHANNEL_GRID_OPENED: {
|
|
1797
|
-
e(this, ft) === null && r(this, h,
|
|
1812
|
+
e(this, ft) === null && r(this, h, rs).call(this);
|
|
1798
1813
|
break;
|
|
1799
1814
|
}
|
|
1800
1815
|
case f.CHANNEL_GRID_CLOSED: {
|
|
@@ -1808,7 +1823,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1808
1823
|
this.removeAttribute(n.IS_PIP);
|
|
1809
1824
|
break;
|
|
1810
1825
|
case f.REQUEST_AIRPLAY:
|
|
1811
|
-
(i = e(this,
|
|
1826
|
+
(i = e(this, V)) == null || i.showPlaybackTargetPicker();
|
|
1812
1827
|
break;
|
|
1813
1828
|
case f.SET_LANGUAGE:
|
|
1814
1829
|
L(t.detail) ? this.setAttribute(n.LANGUAGE, t.detail) : this.removeAttribute(n.LANGUAGE);
|
|
@@ -1827,20 +1842,20 @@ const fe = class fe extends HTMLElement {
|
|
|
1827
1842
|
break;
|
|
1828
1843
|
}
|
|
1829
1844
|
});
|
|
1830
|
-
l(this,
|
|
1845
|
+
l(this, _i, (t) => {
|
|
1831
1846
|
const { key: i } = t;
|
|
1832
|
-
if (
|
|
1847
|
+
if (!qi.includes(i)) {
|
|
1833
1848
|
this.removeEventListener("keyup", this);
|
|
1834
1849
|
return;
|
|
1835
1850
|
}
|
|
1836
|
-
r(this, h,
|
|
1851
|
+
r(this, h, zn).call(this, t);
|
|
1837
1852
|
});
|
|
1838
|
-
l(this,
|
|
1853
|
+
l(this, Pi, (t) => {
|
|
1839
1854
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
1840
|
-
i || s ||
|
|
1855
|
+
i || s || !qi.includes(o) || this.addEventListener("keyup", this, { once: !0 });
|
|
1841
1856
|
});
|
|
1842
|
-
l(this,
|
|
1843
|
-
l(this,
|
|
1857
|
+
l(this, Rt, null);
|
|
1858
|
+
l(this, Mi, () => {
|
|
1844
1859
|
var i, s, o;
|
|
1845
1860
|
if (!("orientation" in screen) || !screen.orientation.lock)
|
|
1846
1861
|
return;
|
|
@@ -1848,19 +1863,19 @@ const fe = class fe extends HTMLElement {
|
|
|
1848
1863
|
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(() => {
|
|
1849
1864
|
});
|
|
1850
1865
|
});
|
|
1851
|
-
l(this,
|
|
1866
|
+
l(this, Di, () => {
|
|
1852
1867
|
!("orientation" in screen) || !screen.orientation.unlock || screen.orientation.unlock();
|
|
1853
1868
|
});
|
|
1854
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
1855
|
-
const i =
|
|
1856
|
-
c(this,
|
|
1869
|
+
this.attachShadow({ mode: "open" }).appendChild(Sn.content.cloneNode(!0));
|
|
1870
|
+
const i = Ki(this.getAttribute("log-level"));
|
|
1871
|
+
c(this, U, jr.get().createContext("VindralController")), e(this, U).setLevel(i);
|
|
1857
1872
|
}
|
|
1858
1873
|
connectedCallback() {
|
|
1859
1874
|
return G(this, null, function* () {
|
|
1860
|
-
|
|
1875
|
+
S(this.getAttribute("auto-instance-enabled"), !0) && (yield r(this, h, ss).call(this));
|
|
1861
1876
|
for (const i of Object.values(f))
|
|
1862
1877
|
this.addEventListener(i, e(this, $e));
|
|
1863
|
-
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);
|
|
1878
|
+
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 });
|
|
1864
1879
|
});
|
|
1865
1880
|
}
|
|
1866
1881
|
disconnectedCallback() {
|
|
@@ -1871,9 +1886,9 @@ const fe = class fe extends HTMLElement {
|
|
|
1871
1886
|
this.disconnectListener(this);
|
|
1872
1887
|
}
|
|
1873
1888
|
attributeChangedCallback(t, i, s) {
|
|
1874
|
-
var o, p, u, v, g, P, et,
|
|
1889
|
+
var o, p, u, v, g, P, et, J, Ct, Lt, Tt, hi, di, ci, ui;
|
|
1875
1890
|
if (i != s)
|
|
1876
|
-
switch (e(this,
|
|
1891
|
+
switch (e(this, U).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
1877
1892
|
case "channel-id":
|
|
1878
1893
|
c(this, st, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), r(this, h, A).call(this, n.BUFFERING, ""), r(this, h, A).call(this, n.CHANNEL_ID, s), r(this, h, A).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl()));
|
|
1879
1894
|
break;
|
|
@@ -1899,22 +1914,22 @@ const fe = class fe extends HTMLElement {
|
|
|
1899
1914
|
e(this, b) && (L(s) ? (e(this, b).muted = !0, r(this, h, A).call(this, n.MUTED, ""), (u = e(this, F)) != null && u.isMediaElementSource && ((v = e(this, F)) == null || v.stop(), r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, r(this, h, w).call(this, n.MUTED), r(this, h, w).call(this, n.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (g = e(this, F)) == null || g.start()));
|
|
1900
1915
|
break;
|
|
1901
1916
|
case "ui-locked":
|
|
1902
|
-
L(s) ? r(this, h,
|
|
1917
|
+
L(s) ? r(this, h, fi).call(this) : r(this, h, pt).call(this);
|
|
1903
1918
|
break;
|
|
1904
1919
|
case "is-fullscreen":
|
|
1905
|
-
L(s) ? r(this, h,
|
|
1920
|
+
L(s) ? r(this, h, Bn).call(this) : r(this, h, as).call(this);
|
|
1906
1921
|
break;
|
|
1907
1922
|
case "max-video-bit-rate":
|
|
1908
1923
|
c(this, ee, s), L(s) ? r(this, h, A).call(this, n.MAX_VIDEO_BITRATE, s) : r(this, h, w).call(this, n.MAX_VIDEO_BITRATE);
|
|
1909
1924
|
break;
|
|
1910
1925
|
case "is-pip":
|
|
1911
|
-
L(s) ? r(this, h,
|
|
1926
|
+
L(s) ? r(this, h, Gn).call(this) : r(this, h, $n).call(this);
|
|
1912
1927
|
break;
|
|
1913
1928
|
case "is-airplaying":
|
|
1914
|
-
L(s) ? ((P = e(this, b)) != null && P.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (et = e(this, b)) == null || et.pause()) : (
|
|
1929
|
+
L(s) ? ((P = e(this, b)) != null && P.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (et = e(this, b)) == null || et.pause()) : (J = e(this, b)) != null && J.mediaElement && (e(this, b).mediaElement.style.display = "block");
|
|
1915
1930
|
break;
|
|
1916
1931
|
case "is-casting":
|
|
1917
|
-
L(s) ? ((Ct = e(this, B)) != null && Ct.isFullscreen() && r(this, h,
|
|
1932
|
+
L(s) ? ((Ct = e(this, B)) != null && Ct.isFullscreen() && r(this, h, as).call(this), (Lt = e(this, b)) == null || Lt.pause()) : document.hidden || (Tt = e(this, b)) == null || Tt.play();
|
|
1918
1933
|
break;
|
|
1919
1934
|
case "cast-receiver-id":
|
|
1920
1935
|
c(this, He, s);
|
|
@@ -1929,10 +1944,10 @@ const fe = class fe extends HTMLElement {
|
|
|
1929
1944
|
e(this, b) && (e(this, b).textTrack = s, L(s) ? r(this, h, A).call(this, n.TEXT_TRACK, s) : r(this, h, w).call(this, n.TEXT_TRACK));
|
|
1930
1945
|
break;
|
|
1931
1946
|
case "log-level":
|
|
1932
|
-
L(s) && e(this,
|
|
1947
|
+
L(s) && e(this, U).setLevel(Ki(s));
|
|
1933
1948
|
break;
|
|
1934
1949
|
case "authentication-token":
|
|
1935
|
-
L(s) ? r(this, h, A).call(this, n.AUTHENTICATION_TOKEN, s) : r(this, h, w).call(this, n.AUTHENTICATION_TOKEN);
|
|
1950
|
+
L(s) ? ((hi = e(this, b)) == null || hi.updateAuthenticationToken(s), (di = e(this, V)) == null || di.updateAuthenticationToken(s), r(this, h, A).call(this, n.AUTHENTICATION_TOKEN, s)) : r(this, h, w).call(this, n.AUTHENTICATION_TOKEN);
|
|
1936
1951
|
break;
|
|
1937
1952
|
case "volume":
|
|
1938
1953
|
if (e(this, b) && L(s)) {
|
|
@@ -1942,20 +1957,20 @@ const fe = class fe extends HTMLElement {
|
|
|
1942
1957
|
break;
|
|
1943
1958
|
case "drm-headers":
|
|
1944
1959
|
if (L(s)) {
|
|
1945
|
-
const z =
|
|
1946
|
-
z ? (
|
|
1960
|
+
const z = mi(s);
|
|
1961
|
+
z ? (ci = e(this, b)) == null || ci.drm.setHeaders(z) : e(this, U).warn("Invalid DRM headers format:", s);
|
|
1947
1962
|
}
|
|
1948
1963
|
break;
|
|
1949
1964
|
case "drm-queryparams":
|
|
1950
1965
|
if (L(s)) {
|
|
1951
|
-
const z =
|
|
1952
|
-
z ? (
|
|
1966
|
+
const z = mi(s);
|
|
1967
|
+
z ? (ui = e(this, b)) == null || ui.drm.setQueryParams(z) : e(this, U).warn("Invalid DRM query parameters format:", s);
|
|
1953
1968
|
}
|
|
1954
1969
|
break;
|
|
1955
1970
|
}
|
|
1956
1971
|
}
|
|
1957
1972
|
connectListener(t) {
|
|
1958
|
-
|
|
1973
|
+
qs(t).forEach((s) => {
|
|
1959
1974
|
var p, u;
|
|
1960
1975
|
const o = e(this, it).get(s);
|
|
1961
1976
|
switch (o ? o.push(t) : e(this, it).set(s, [t]), s) {
|
|
@@ -1983,7 +1998,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1983
1998
|
});
|
|
1984
1999
|
}
|
|
1985
2000
|
disconnectListener(t) {
|
|
1986
|
-
|
|
2001
|
+
qs(t).forEach((s) => {
|
|
1987
2002
|
const o = e(this, it).get(s);
|
|
1988
2003
|
o && e(this, it).set(
|
|
1989
2004
|
s,
|
|
@@ -1995,19 +2010,30 @@ const fe = class fe extends HTMLElement {
|
|
|
1995
2010
|
return e(this, b);
|
|
1996
2011
|
}
|
|
1997
2012
|
get airPlay() {
|
|
1998
|
-
return e(this,
|
|
2013
|
+
return e(this, V);
|
|
1999
2014
|
}
|
|
2000
2015
|
connect() {
|
|
2001
|
-
r(this, h,
|
|
2016
|
+
r(this, h, ss).call(this);
|
|
2002
2017
|
}
|
|
2003
2018
|
};
|
|
2004
|
-
|
|
2019
|
+
Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(), gt = new WeakMap(), b = new WeakMap(), Fe = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), ee = new WeakMap(), rt = new WeakMap(), B = new WeakMap(), V = new WeakMap(), F = new WeakMap(), ot = new WeakMap(), He = new WeakMap(), ze = new WeakMap(), U = new WeakMap(), ft = new WeakMap(), h = new WeakSet(), ss = function() {
|
|
2005
2020
|
return G(this, null, function* () {
|
|
2006
|
-
var
|
|
2021
|
+
var Hs, zs;
|
|
2007
2022
|
if (!e(this, st)) return;
|
|
2008
|
-
yield (
|
|
2009
|
-
const t = this.hasAttribute(n.PAUSED), i = this.hasAttribute(n.MUTED), s =
|
|
2010
|
-
|
|
2023
|
+
yield (Hs = e(this, b)) == null ? void 0 : Hs.unload();
|
|
2024
|
+
const t = this.hasAttribute(n.PAUSED), i = this.hasAttribute(n.MUTED), s = Vs(this.getAttribute(n.MEDIA)), o = this.getAttribute(n.TEXT_TRACK) || void 0, p = this.getAttribute("edge-url") || void 0, u = this.getAttribute("authentication-token") || void 0, v = bi(this.getAttribute("max-video-bit-rate")), g = oo(this.getAttribute("max-size")), P = bi(this.getAttribute("min-buffer-time")), et = bi(this.getAttribute("max-buffer-time")), J = S(this.getAttribute("burst-enabled")), Ct = S(this.getAttribute("mse-enabled")), Lt = S(this.getAttribute("mse-opus-enabled")), Tt = S(this.getAttribute("ios-background-play-enabled")), hi = S(this.getAttribute("ios-wake-lock-enabled")), di = S(this.getAttribute("ios-media-element-enabled")), ci = S(this.getAttribute("abr-enabled")), ui = S(this.getAttribute("size-based-resolution-cap-enabled")), z = S(this.getAttribute("telemetry-enabled")), Ur = ro(this.getAttribute("video-codecs")), Os = Ys(this.getAttribute("poster")), Rr = ao(this.getAttribute("advanced")), _r = Ki(this.getAttribute("log-level")), Pr = {
|
|
2025
|
+
headers: mi(this.getAttribute("drm-headers")),
|
|
2026
|
+
queryParams: mi(this.getAttribute("drm-queryparams")),
|
|
2027
|
+
widevine: {
|
|
2028
|
+
videoRobustness: vi(this.getAttribute("drm-widevine-video-robustness")),
|
|
2029
|
+
audioRobustness: vi(this.getAttribute("drm-widevine-audio-robustness"))
|
|
2030
|
+
},
|
|
2031
|
+
playready: {
|
|
2032
|
+
videoRobustness: vi(this.getAttribute("drm-playready-video-robustness")),
|
|
2033
|
+
audioRobustness: vi(this.getAttribute("drm-playready-audio-robustness"))
|
|
2034
|
+
}
|
|
2035
|
+
}, Mr = S(this.getAttribute("webtransport-enabled")), Fs = bi(this.getAttribute("reconnect-retries")), Dr = Fs !== void 0 ? (y) => y.reconnectRetries < Fs : void 0, Or = this.getAttribute("language") || void 0;
|
|
2036
|
+
c(this, b, new Vr({
|
|
2011
2037
|
url: e(this, Fe),
|
|
2012
2038
|
channelId: e(this, st),
|
|
2013
2039
|
channelGroupId: e(this, nt),
|
|
@@ -2019,28 +2045,28 @@ Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2019
2045
|
maxVideoBitRate: v,
|
|
2020
2046
|
minBufferTime: P,
|
|
2021
2047
|
maxBufferTime: et,
|
|
2022
|
-
burstEnabled:
|
|
2048
|
+
burstEnabled: J,
|
|
2023
2049
|
mseEnabled: Ct,
|
|
2024
2050
|
mseOpusEnabled: Lt,
|
|
2025
2051
|
iosBackgroundPlayEnabled: Tt,
|
|
2026
2052
|
iosWakeLockEnabled: hi,
|
|
2027
2053
|
iosMediaElementEnabled: di,
|
|
2028
|
-
abrEnabled:
|
|
2029
|
-
sizeBasedResolutionCapEnabled:
|
|
2030
|
-
telemetryEnabled:
|
|
2031
|
-
videoCodecs:
|
|
2032
|
-
poster:
|
|
2054
|
+
abrEnabled: ci,
|
|
2055
|
+
sizeBasedResolutionCapEnabled: ui,
|
|
2056
|
+
telemetryEnabled: z,
|
|
2057
|
+
videoCodecs: Ur,
|
|
2058
|
+
poster: Os,
|
|
2033
2059
|
textTrack: o,
|
|
2034
2060
|
advanced: Rr,
|
|
2035
|
-
logLevel:
|
|
2061
|
+
logLevel: _r,
|
|
2036
2062
|
language: Or,
|
|
2037
|
-
drm:
|
|
2063
|
+
drm: Pr,
|
|
2038
2064
|
webtransportEnabled: Mr,
|
|
2039
2065
|
reconnectHandler: Dr
|
|
2040
2066
|
})), e(this, b).on("rendition levels", (y) => {
|
|
2041
|
-
const D = y.filter((
|
|
2067
|
+
const D = y.filter((pi) => {
|
|
2042
2068
|
var de;
|
|
2043
|
-
return (de =
|
|
2069
|
+
return (de = pi.video) == null ? void 0 : de.width;
|
|
2044
2070
|
});
|
|
2045
2071
|
r(this, h, A).call(this, n.RENDITION_LEVELS, JSON.stringify(D));
|
|
2046
2072
|
}), e(this, b).on("rendition level", (y) => {
|
|
@@ -2066,92 +2092,92 @@ Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2066
2092
|
var D;
|
|
2067
2093
|
e(this, st) !== y && this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h, w).call(this, n.BUFFERING);
|
|
2068
2094
|
}), e(this, b).on("channels", (y) => {
|
|
2069
|
-
c(this,
|
|
2095
|
+
c(this, Rt, Date.now()), r(this, h, A).call(this, n.CHANNELS, JSON.stringify(y));
|
|
2070
2096
|
}), e(this, b).on("languages", (y) => {
|
|
2071
2097
|
var D;
|
|
2072
2098
|
r(this, h, A).call(this, n.LANGUAGES, JSON.stringify(y)), (D = e(this, b)) != null && D.language && r(this, h, A).call(this, n.LANGUAGE, e(this, b).language);
|
|
2073
2099
|
}), e(this, b).on("text tracks", (y) => {
|
|
2074
|
-
var D,
|
|
2075
|
-
r(this, h, A).call(this, n.TEXT_TRACKS, JSON.stringify(y)), (D = e(this, b)) != null && D.textTrack && r(this, h, A).call(this, n.TEXT_TRACK, (de = (
|
|
2100
|
+
var D, pi, de;
|
|
2101
|
+
r(this, h, A).call(this, n.TEXT_TRACKS, JSON.stringify(y)), (D = e(this, b)) != null && D.textTrack && r(this, h, A).call(this, n.TEXT_TRACK, (de = (pi = e(this, b)) == null ? void 0 : pi.textTrack) != null ? de : "");
|
|
2076
2102
|
}), e(this, b).on("needs user input", (y) => {
|
|
2077
2103
|
y != null && y.forVideo ? (r(this, h, A).call(this, n.NEEDS_USER_INPUT_VIDEO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_AUDIO)) : y != null && y.forAudio && (r(this, h, A).call(this, n.NEEDS_USER_INPUT_AUDIO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_VIDEO));
|
|
2078
2104
|
}), e(this, b).on("is live", (y) => {
|
|
2079
2105
|
y || r(this, h, w).call(this, n.BUFFERING);
|
|
2080
|
-
}), c(this, gt, (
|
|
2081
|
-
const Fr =
|
|
2082
|
-
Fr && r(this, h,
|
|
2106
|
+
}), c(this, gt, (zs = this.shadowRoot) == null ? void 0 : zs.querySelector("#video")), e(this, gt) && e(this, b).attach(e(this, gt)), this.setAttribute(n.MEDIA, e(this, b).media), e(this, b).muted && r(this, h, A).call(this, n.MUTED, ""), r(this, h, A).call(this, n.VOLUME, e(this, b).volume.toString()), L(Os) || r(this, h, A).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
2107
|
+
const Fr = S(this.getAttribute(n.AIRPLAY_ENABLED), !1), Hr = S(this.getAttribute(n.CAST_ENABLED), !0), zr = S(this.getAttribute(n.FULLSCREEN_ENABLED), !0), Gr = S(this.getAttribute(n.PIP_ENABLED), !0), $r = S(this.getAttribute(n.VU_METER_ENABLED), !1);
|
|
2108
|
+
Fr && r(this, h, Pn).call(this, e(this, b)), Hr && r(this, h, Rn).call(this, e(this, b)), zr && r(this, h, Un).call(this, e(this, b)), Gr && r(this, h, Nn).call(this, e(this, b)), t || e(this, b).play(), $r && r(this, h, Mn).call(this, e(this, b)), this.dispatchEvent(
|
|
2083
2109
|
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
2084
2110
|
);
|
|
2085
2111
|
});
|
|
2086
|
-
},
|
|
2087
|
-
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new uo(t.mediaElement)), e(this, rt).isSupported() && (e(this,
|
|
2112
|
+
}, Nn = function(t) {
|
|
2113
|
+
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new uo(t.mediaElement)), e(this, rt).isSupported() && (e(this, U).debug("PIP is supported"), r(this, h, A).call(this, n.PIP_AVAILABLE, "")), e(this, rt).on("on picture in picture change", (i) => {
|
|
2088
2114
|
i ? r(this, h, A).call(this, n.IS_PIP, "") : r(this, h, w).call(this, n.IS_PIP);
|
|
2089
2115
|
}));
|
|
2090
|
-
},
|
|
2116
|
+
}, Un = function(t) {
|
|
2091
2117
|
const i = !be.isFullscreenApiSupported(this) && be.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
|
|
2092
2118
|
c(this, B, new be(i)), e(this, B).on("on fullscreen change", (s) => {
|
|
2093
2119
|
s ? r(this, h, A).call(this, n.FULLSCREEN, "") : r(this, h, w).call(this, n.FULLSCREEN);
|
|
2094
2120
|
});
|
|
2095
|
-
},
|
|
2121
|
+
}, Rn = function(t) {
|
|
2096
2122
|
c(this, ot, new Zr({
|
|
2097
2123
|
background: e(this, ze),
|
|
2098
2124
|
receiverApplicationId: e(this, He),
|
|
2099
2125
|
options: t.getCastOptions()
|
|
2100
2126
|
})), e(this, ot).init().then(() => {
|
|
2101
2127
|
var i, s, o;
|
|
2102
|
-
r(this, h, A).call(this, n.CAST_AVAILABLE, ""), (i = e(this, ot)) == null || i.on("connected", r(this, h,
|
|
2128
|
+
r(this, h, A).call(this, n.CAST_AVAILABLE, ""), (i = e(this, ot)) == null || i.on("connected", r(this, h, ns).bind(this)), (s = e(this, ot)) == null || s.on("resumed", r(this, h, ns).bind(this)), (o = e(this, ot)) == null || o.on("disconnected", r(this, h, _n).bind(this));
|
|
2103
2129
|
}).catch((i) => {
|
|
2104
|
-
e(this,
|
|
2130
|
+
e(this, U).warn("Failed to initialize CastSender", i);
|
|
2105
2131
|
});
|
|
2106
|
-
},
|
|
2132
|
+
}, ns = function() {
|
|
2107
2133
|
var i, s;
|
|
2108
2134
|
r(this, h, A).call(this, n.IS_CASTING, "");
|
|
2109
2135
|
const t = (s = (i = e(this, ot)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
|
|
2110
2136
|
r(this, h, A).call(this, n.CAST_RECEIVER_NAME, t);
|
|
2111
|
-
},
|
|
2137
|
+
}, _n = function() {
|
|
2112
2138
|
r(this, h, w).call(this, n.IS_CASTING), r(this, h, w).call(this, n.CAST_RECEIVER_NAME);
|
|
2113
|
-
},
|
|
2139
|
+
}, Pn = function(t) {
|
|
2114
2140
|
var s;
|
|
2115
|
-
(s = e(this,
|
|
2141
|
+
(s = e(this, V)) == null || s.unload();
|
|
2116
2142
|
const i = t.getCastOptions();
|
|
2117
|
-
c(this,
|
|
2143
|
+
c(this, V, new co({
|
|
2118
2144
|
url: i.url,
|
|
2119
2145
|
channelId: i.channelId,
|
|
2120
2146
|
authenticationToken: i.authenticationToken,
|
|
2121
2147
|
container: this
|
|
2122
|
-
})), e(this,
|
|
2148
|
+
})), e(this, V).once("available", () => {
|
|
2123
2149
|
r(this, h, A).call(this, n.AIRPLAY_AVAILABLE, "");
|
|
2124
|
-
}), e(this,
|
|
2150
|
+
}), e(this, V).on("connected", () => {
|
|
2125
2151
|
r(this, h, A).call(this, n.IS_AIRPLAYING, "");
|
|
2126
|
-
}), e(this,
|
|
2152
|
+
}), e(this, V).on("disconnected", () => {
|
|
2127
2153
|
r(this, h, w).call(this, n.IS_AIRPLAYING);
|
|
2128
2154
|
});
|
|
2129
|
-
},
|
|
2155
|
+
}, Mn = function(t) {
|
|
2130
2156
|
var i;
|
|
2131
2157
|
if ((i = e(this, F)) == null || i.unload(), !Yr()) {
|
|
2132
2158
|
if (t.audioNode)
|
|
2133
|
-
c(this, F, new
|
|
2159
|
+
c(this, F, new Ks(t.audioNode));
|
|
2134
2160
|
else if (t.mediaElement instanceof HTMLMediaElement)
|
|
2135
|
-
c(this, F, new
|
|
2161
|
+
c(this, F, new Ks(t.mediaElement));
|
|
2136
2162
|
else
|
|
2137
2163
|
return;
|
|
2138
2164
|
e(this, F).on("on decibel change", (s) => {
|
|
2139
2165
|
r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify(s));
|
|
2140
2166
|
}), r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, F).isMediaElementSource || !this.hasAttribute(n.MUTED)) && e(this, F).start();
|
|
2141
2167
|
}
|
|
2142
|
-
}, Ge = new WeakMap(),
|
|
2143
|
-
t.pointerType !== "mouse" && t.timeStamp - e(this, Ge) < 250 || (r(this, h,
|
|
2144
|
-
},
|
|
2168
|
+
}, Ge = new WeakMap(), Dn = function(t) {
|
|
2169
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, Ge) < 250 || (r(this, h, fi).call(this), e(this, vt) && clearTimeout(e(this, vt)), t.target instanceof HTMLElement && ([this, e(this, gt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && r(this, h, pt).call(this));
|
|
2170
|
+
}, On = function(t) {
|
|
2145
2171
|
const i = this.hasAttribute(n.USER_INTERACTING);
|
|
2146
|
-
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, gt)].includes(t.target) && i ? r(this, h,
|
|
2147
|
-
},
|
|
2148
|
-
!e(this, B) || t.target instanceof tt || t.target instanceof
|
|
2149
|
-
},
|
|
2172
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, gt)].includes(t.target) && i ? r(this, h, os).call(this) : r(this, h, pt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && r(this, h, pt).call(this);
|
|
2173
|
+
}, Fn = function(t) {
|
|
2174
|
+
!e(this, B) || t.target instanceof tt || t.target instanceof Ms || t.target instanceof Ds || (this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, ""));
|
|
2175
|
+
}, Hn = function(t) {
|
|
2150
2176
|
this.hasAttribute(n.USER_INTERACTING) || r(this, h, pt).call(this);
|
|
2151
|
-
}, $e = new WeakMap(),
|
|
2177
|
+
}, $e = new WeakMap(), _i = new WeakMap(), Pi = new WeakMap(), zn = function(t) {
|
|
2152
2178
|
var u, v;
|
|
2153
2179
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
2154
|
-
if (!(i || s ||
|
|
2180
|
+
if (!(i || s || !qi.includes(o) || (((u = t.target) == null ? void 0 : u.keysUsed) || []).includes(o)))
|
|
2155
2181
|
switch (o) {
|
|
2156
2182
|
case "f":
|
|
2157
2183
|
this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, "");
|
|
@@ -2163,59 +2189,59 @@ Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2163
2189
|
(v = this.querySelector("vindral-scroll-overlay")) == null || v.setAttribute("open", "");
|
|
2164
2190
|
break;
|
|
2165
2191
|
}
|
|
2166
|
-
},
|
|
2192
|
+
}, Rt = new WeakMap(), rs = function() {
|
|
2167
2193
|
return G(this, null, function* () {
|
|
2168
2194
|
if (!e(this, b) || !e(this, nt))
|
|
2169
2195
|
return;
|
|
2170
2196
|
const t = Date.now();
|
|
2171
|
-
if (e(this,
|
|
2172
|
-
e(this,
|
|
2197
|
+
if (e(this, Rt) && t - e(this, Rt) < 1e4)
|
|
2198
|
+
e(this, U).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2173
2199
|
else {
|
|
2174
|
-
c(this,
|
|
2200
|
+
c(this, Rt, t);
|
|
2175
2201
|
const i = yield e(this, b).getApiClient().getChannels(e(this, nt));
|
|
2176
2202
|
r(this, h, A).call(this, n.CHANNELS, JSON.stringify(i));
|
|
2177
2203
|
}
|
|
2178
|
-
c(this, ft, window.setTimeout(() => void r(this, h,
|
|
2204
|
+
c(this, ft, window.setTimeout(() => void r(this, h, rs).call(this), 1e4));
|
|
2179
2205
|
});
|
|
2180
|
-
},
|
|
2206
|
+
}, os = function() {
|
|
2181
2207
|
!this.hasAttribute(n.USER_INTERACTING) || this.hasAttribute(n.UI_LOCKED) || (this.dispatchEvent(
|
|
2182
2208
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
|
|
2183
2209
|
), this.removeAttribute(n.USER_INTERACTING));
|
|
2184
|
-
},
|
|
2210
|
+
}, fi = function() {
|
|
2185
2211
|
this.hasAttribute(n.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2186
2212
|
this.setAttribute(n.USER_INTERACTING, ""), this.dispatchEvent(
|
|
2187
2213
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !0 } })
|
|
2188
2214
|
);
|
|
2189
2215
|
});
|
|
2190
2216
|
}, pt = function() {
|
|
2191
|
-
r(this, h,
|
|
2192
|
-
r(this, h,
|
|
2217
|
+
r(this, h, fi).call(this), e(this, vt) && clearTimeout(e(this, vt)), e(this, Oe) && c(this, vt, self.setTimeout(() => {
|
|
2218
|
+
r(this, h, os).call(this);
|
|
2193
2219
|
}, e(this, Oe)));
|
|
2194
|
-
},
|
|
2220
|
+
}, Gn = function() {
|
|
2195
2221
|
var t;
|
|
2196
|
-
r(this, h,
|
|
2197
|
-
e(this,
|
|
2222
|
+
r(this, h, ls).call(this), (t = e(this, rt)) == null || t.request().catch((i) => {
|
|
2223
|
+
e(this, U).warn("Failed to enter picture in picture:", i);
|
|
2198
2224
|
});
|
|
2199
|
-
},
|
|
2225
|
+
}, $n = function() {
|
|
2200
2226
|
var t;
|
|
2201
2227
|
(t = e(this, rt)) == null || t.exit().catch((i) => {
|
|
2202
|
-
e(this,
|
|
2228
|
+
e(this, U).warn("Failed to exit picture in picture:", i);
|
|
2203
2229
|
});
|
|
2204
|
-
},
|
|
2230
|
+
}, Bn = function() {
|
|
2205
2231
|
var t, i;
|
|
2206
|
-
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (r(this, h,
|
|
2207
|
-
e(this,
|
|
2232
|
+
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (r(this, h, ls).call(this), (i = e(this, B)) == null || i.request().then(() => {
|
|
2233
|
+
e(this, Mi).call(this);
|
|
2208
2234
|
}).catch((s) => {
|
|
2209
|
-
e(this,
|
|
2235
|
+
e(this, U).warn("Failed to enter fullscreen:", s);
|
|
2210
2236
|
})) : (this.setAttribute(n.FULLSCREEN_FALLBACK, ""), r(this, h, A).call(this, n.FULLSCREEN, ""));
|
|
2211
|
-
},
|
|
2237
|
+
}, as = function() {
|
|
2212
2238
|
var t, i;
|
|
2213
2239
|
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (i = e(this, B)) == null || i.exit().then(() => {
|
|
2214
|
-
e(this,
|
|
2240
|
+
e(this, Di).call(this);
|
|
2215
2241
|
}).catch((s) => {
|
|
2216
|
-
e(this,
|
|
2242
|
+
e(this, U).warn("Failed to exit fullscreen:", s);
|
|
2217
2243
|
}) : (this.removeAttribute(n.FULLSCREEN_FALLBACK), r(this, h, w).call(this, n.FULLSCREEN));
|
|
2218
|
-
},
|
|
2244
|
+
}, Mi = new WeakMap(), Di = new WeakMap(), ls = function() {
|
|
2219
2245
|
if (!e(this, b)) return;
|
|
2220
2246
|
e(this, b).emitter.emit("ios-hack: reset size");
|
|
2221
2247
|
}, A = function(t, i) {
|
|
@@ -2225,7 +2251,7 @@ Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2225
2251
|
var i;
|
|
2226
2252
|
(i = e(this, it).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
|
|
2227
2253
|
}, m(fe, "observedAttributes", [
|
|
2228
|
-
...
|
|
2254
|
+
...js,
|
|
2229
2255
|
"url",
|
|
2230
2256
|
"edge-url",
|
|
2231
2257
|
"target-buffer-time",
|
|
@@ -2250,13 +2276,17 @@ Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2250
2276
|
"advanced",
|
|
2251
2277
|
"drm-headers",
|
|
2252
2278
|
"drm-queryparams",
|
|
2279
|
+
"drm-widevine-video-robustness",
|
|
2280
|
+
"drm-widevine-audio-robustness",
|
|
2281
|
+
"drm-playready-video-robustness",
|
|
2282
|
+
"drm-playready-audio-robustness",
|
|
2253
2283
|
"webtransport-enabled",
|
|
2254
2284
|
"reconnect-retries",
|
|
2255
2285
|
"auto-instance-enabled",
|
|
2256
2286
|
"language"
|
|
2257
|
-
]), l(fe,
|
|
2287
|
+
]), l(fe, Ri, "https://lb.cdn.vindral.com");
|
|
2258
2288
|
let Le = fe;
|
|
2259
|
-
const
|
|
2289
|
+
const Kn = document.createElement("template"), po = (
|
|
2260
2290
|
/* SVG */
|
|
2261
2291
|
`
|
|
2262
2292
|
<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>
|
|
@@ -2267,7 +2297,7 @@ const Gn = document.createElement("template"), po = (
|
|
|
2267
2297
|
<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>
|
|
2268
2298
|
`
|
|
2269
2299
|
);
|
|
2270
|
-
|
|
2300
|
+
Kn.innerHTML = /* HTML */
|
|
2271
2301
|
`
|
|
2272
2302
|
<style>
|
|
2273
2303
|
:host {
|
|
@@ -2291,7 +2321,7 @@ Gn.innerHTML = /* HTML */
|
|
|
2291
2321
|
const Ee = class Ee extends tt {
|
|
2292
2322
|
constructor() {
|
|
2293
2323
|
var a;
|
|
2294
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2324
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Kn.content.cloneNode(!0));
|
|
2295
2325
|
}
|
|
2296
2326
|
connectedCallback() {
|
|
2297
2327
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2314,14 +2344,14 @@ const Ee = class Ee extends tt {
|
|
|
2314
2344
|
}
|
|
2315
2345
|
};
|
|
2316
2346
|
m(Ee, "observedAttributes", [...q(Ee, Ee, "observedAttributes"), n.FULLSCREEN]);
|
|
2317
|
-
let
|
|
2347
|
+
let hs = Ee;
|
|
2318
2348
|
const mo = (
|
|
2319
2349
|
/* SVG */
|
|
2320
2350
|
`
|
|
2321
2351
|
<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>
|
|
2322
2352
|
`
|
|
2323
|
-
),
|
|
2324
|
-
|
|
2353
|
+
), qn = document.createElement("template");
|
|
2354
|
+
qn.innerHTML = /* HTML */
|
|
2325
2355
|
`
|
|
2326
2356
|
<style>
|
|
2327
2357
|
:host(:not([hidden])) {
|
|
@@ -2334,33 +2364,33 @@ $n.innerHTML = /* HTML */
|
|
|
2334
2364
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2335
2365
|
</slot>
|
|
2336
2366
|
`;
|
|
2337
|
-
var Be,
|
|
2338
|
-
const Ae = class Ae extends
|
|
2367
|
+
var Be, cs;
|
|
2368
|
+
const Ae = class Ae extends Ms {
|
|
2339
2369
|
constructor() {
|
|
2340
2370
|
var t, i, s, o;
|
|
2341
2371
|
super();
|
|
2342
2372
|
l(this, Be);
|
|
2343
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
2373
|
+
(t = this.shadowRoot) == null || t.appendChild(qn.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]");
|
|
2344
2374
|
}
|
|
2345
2375
|
connectedCallback() {
|
|
2346
|
-
super.connectedCallback(), r(this, Be,
|
|
2376
|
+
super.connectedCallback(), r(this, Be, cs).call(this), this.setAttribute("aria-label", "Languages");
|
|
2347
2377
|
}
|
|
2348
2378
|
attributeChangedCallback(t, i, s) {
|
|
2349
|
-
super.attributeChangedCallback(t, i, s), (t === n.LANGUAGES || t === n.TEXT_TRACKS) && r(this, Be,
|
|
2379
|
+
super.attributeChangedCallback(t, i, s), (t === n.LANGUAGES || t === n.TEXT_TRACKS) && r(this, Be, cs).call(this);
|
|
2350
2380
|
}
|
|
2351
2381
|
};
|
|
2352
|
-
Be = new WeakSet(),
|
|
2382
|
+
Be = new WeakSet(), cs = function() {
|
|
2353
2383
|
const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(n.LANGUAGES)), s = t(this.getAttribute(n.TEXT_TRACKS));
|
|
2354
2384
|
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2355
2385
|
}, m(Ae, "observedAttributes", [...q(Ae, Ae, "observedAttributes"), n.LANGUAGES, n.TEXT_TRACKS]);
|
|
2356
|
-
let
|
|
2357
|
-
const
|
|
2386
|
+
let ds = Ae;
|
|
2387
|
+
const Xn = document.createElement("template"), vo = (
|
|
2358
2388
|
/* SVG */
|
|
2359
2389
|
`
|
|
2360
2390
|
<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>
|
|
2361
2391
|
`
|
|
2362
2392
|
);
|
|
2363
|
-
|
|
2393
|
+
Xn.innerHTML = /* HTML */
|
|
2364
2394
|
`
|
|
2365
2395
|
<style>
|
|
2366
2396
|
:host {
|
|
@@ -2475,36 +2505,36 @@ Bn.innerHTML = /* HTML */
|
|
|
2475
2505
|
<div class="menu"></div>
|
|
2476
2506
|
</div>
|
|
2477
2507
|
`;
|
|
2478
|
-
var Ke, qe, Xe,
|
|
2479
|
-
class
|
|
2508
|
+
var Ke, qe, Xe, je, Q, K, _t, Et, ie, Ve, at, W, E, Vn, Yn, us, ps, Ei, ue, pe, Jn, Qn, Wn, bs, ms, Zn;
|
|
2509
|
+
class jn extends HTMLElement {
|
|
2480
2510
|
constructor() {
|
|
2481
2511
|
super();
|
|
2482
2512
|
l(this, E);
|
|
2483
2513
|
l(this, Ke, []);
|
|
2484
2514
|
l(this, qe, []);
|
|
2485
2515
|
l(this, Xe);
|
|
2486
|
-
l(this,
|
|
2516
|
+
l(this, je);
|
|
2487
2517
|
l(this, Q, []);
|
|
2488
2518
|
l(this, K, []);
|
|
2489
2519
|
l(this, _t, null);
|
|
2490
2520
|
l(this, Et, null);
|
|
2491
2521
|
l(this, ie, null);
|
|
2492
|
-
l(this,
|
|
2522
|
+
l(this, Ve, null);
|
|
2493
2523
|
l(this, at, null);
|
|
2494
2524
|
l(this, W, null);
|
|
2495
2525
|
m(this, "handleEvent", (t) => {
|
|
2496
2526
|
switch (t.type) {
|
|
2497
2527
|
case "keydown":
|
|
2498
|
-
r(this, E,
|
|
2528
|
+
r(this, E, Qn).call(this, t);
|
|
2499
2529
|
break;
|
|
2500
2530
|
}
|
|
2501
2531
|
});
|
|
2502
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
2532
|
+
this.attachShadow({ mode: "open" }).appendChild(Xn.content.cloneNode(!0));
|
|
2503
2533
|
}
|
|
2504
2534
|
connectedCallback() {
|
|
2505
2535
|
var i, s, o;
|
|
2506
2536
|
const t = this.getRootNode();
|
|
2507
|
-
t instanceof ShadowRoot && (c(this, ie, t.host.closest("vindral-controller")), (i = e(this, ie)) == null || i.connectListener(this), c(this, _t, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), c(this, Et, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), r(this, E,
|
|
2537
|
+
t instanceof ShadowRoot && (c(this, ie, t.host.closest("vindral-controller")), (i = e(this, ie)) == null || i.connectListener(this), c(this, _t, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), c(this, Et, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), r(this, E, Vn).call(this), r(this, E, Yn).call(this), c(this, Ve, t.host), this.addEventListener("keydown", this));
|
|
2508
2538
|
}
|
|
2509
2539
|
disconnectedCallback() {
|
|
2510
2540
|
this.removeEventListener("keydown", this);
|
|
@@ -2513,16 +2543,16 @@ class Kn extends HTMLElement {
|
|
|
2513
2543
|
i !== s && (t === n.LANGUAGES && s && (this.languages = JSON.parse(s)), t === n.TEXT_TRACKS && s && (this.textTracks = JSON.parse(s)), t === n.LANGUAGE && (this.language = s), t === n.TEXT_TRACK && (this.textTrack = s));
|
|
2514
2544
|
}
|
|
2515
2545
|
set languages(t) {
|
|
2516
|
-
c(this, Ke, t), r(this, E,
|
|
2546
|
+
c(this, Ke, t), r(this, E, ps).call(this), r(this, E, ue).call(this);
|
|
2517
2547
|
}
|
|
2518
2548
|
set textTracks(t) {
|
|
2519
|
-
c(this, qe, t), r(this, E,
|
|
2549
|
+
c(this, qe, t), r(this, E, us).call(this), r(this, E, pe).call(this);
|
|
2520
2550
|
}
|
|
2521
2551
|
set language(t) {
|
|
2522
2552
|
c(this, Xe, t), r(this, E, ue).call(this);
|
|
2523
2553
|
}
|
|
2524
2554
|
set textTrack(t) {
|
|
2525
|
-
c(this,
|
|
2555
|
+
c(this, je, t), r(this, E, pe).call(this);
|
|
2526
2556
|
}
|
|
2527
2557
|
get keysUsed() {
|
|
2528
2558
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End"];
|
|
@@ -2531,7 +2561,7 @@ class Kn extends HTMLElement {
|
|
|
2531
2561
|
e(this, at) ? e(this, at).focus() : e(this, W) && e(this, W).focus();
|
|
2532
2562
|
}
|
|
2533
2563
|
}
|
|
2534
|
-
Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(),
|
|
2564
|
+
Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(), Q = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), Et = new WeakMap(), ie = new WeakMap(), Ve = new WeakMap(), at = new WeakMap(), W = new WeakMap(), E = new WeakSet(), Vn = function() {
|
|
2535
2565
|
const t = (s) => {
|
|
2536
2566
|
s.forEach((o) => {
|
|
2537
2567
|
if (o.intersectionRatio !== 1)
|
|
@@ -2548,68 +2578,68 @@ Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), Ve = new WeakMap(),
|
|
|
2548
2578
|
threshold: 0
|
|
2549
2579
|
// 0 means any intersection is enough to be considered "inside"
|
|
2550
2580
|
}).observe(this);
|
|
2551
|
-
},
|
|
2552
|
-
e(this, _t) && (r(this, E,
|
|
2553
|
-
},
|
|
2581
|
+
}, Yn = function() {
|
|
2582
|
+
e(this, _t) && (r(this, E, ps).call(this), r(this, E, ue).call(this)), e(this, Et) && (r(this, E, us).call(this), r(this, E, pe).call(this));
|
|
2583
|
+
}, us = function() {
|
|
2554
2584
|
e(this, Et).innerHTML = "", c(this, K, []);
|
|
2555
|
-
const t = r(this, E,
|
|
2585
|
+
const t = r(this, E, Ei).call(this, "Off", "textTrack", void 0);
|
|
2556
2586
|
e(this, Et).appendChild(t), e(this, K).push({ element: t, value: void 0 }), e(this, qe).forEach((i) => {
|
|
2557
|
-
const s = r(this, E,
|
|
2587
|
+
const s = r(this, E, Ei).call(this, i, "textTrack", i);
|
|
2558
2588
|
e(this, Et).appendChild(s), e(this, K).push({ element: s, value: i });
|
|
2559
2589
|
}), r(this, E, pe).call(this);
|
|
2560
|
-
},
|
|
2590
|
+
}, ps = function() {
|
|
2561
2591
|
e(this, _t).innerHTML = "", c(this, Q, []), e(this, Ke).forEach((t) => {
|
|
2562
|
-
const i = r(this, E,
|
|
2592
|
+
const i = r(this, E, Ei).call(this, t, "language", t);
|
|
2563
2593
|
e(this, _t).appendChild(i), e(this, Q).push({ element: i, value: t });
|
|
2564
2594
|
}), r(this, E, ue).call(this);
|
|
2565
|
-
},
|
|
2595
|
+
}, Ei = function(t, i, s) {
|
|
2566
2596
|
const o = document.createElement("div");
|
|
2567
|
-
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => r(this, E,
|
|
2597
|
+
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => r(this, E, Jn).call(this, s, i)), o;
|
|
2568
2598
|
}, ue = function() {
|
|
2569
2599
|
e(this, at) && (e(this, at).removeAttribute("aria-selected"), e(this, at).tabIndex = -1);
|
|
2570
2600
|
const t = e(this, Q).find((i) => i.value === e(this, Xe));
|
|
2571
2601
|
t && (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, at, t.element));
|
|
2572
2602
|
}, pe = function() {
|
|
2573
2603
|
e(this, W) && (e(this, W).removeAttribute("aria-selected"), e(this, W).tabIndex = -1);
|
|
2574
|
-
const t = e(this, K).find((i) => i.value === e(this,
|
|
2604
|
+
const t = e(this, K).find((i) => i.value === e(this, je));
|
|
2575
2605
|
if (t)
|
|
2576
2606
|
t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, W, t.element);
|
|
2577
2607
|
else {
|
|
2578
2608
|
const i = e(this, K).find((s) => s.value === void 0);
|
|
2579
2609
|
i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, c(this, W, i.element));
|
|
2580
2610
|
}
|
|
2581
|
-
},
|
|
2611
|
+
}, Jn = function(t, i) {
|
|
2582
2612
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
2583
2613
|
const s = i === "language" ? f.SET_LANGUAGE : f.SET_TEXT_TRACK;
|
|
2584
2614
|
this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
|
|
2585
|
-
},
|
|
2615
|
+
}, Qn = function(t) {
|
|
2586
2616
|
var u, v, g;
|
|
2587
2617
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
2588
|
-
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this,
|
|
2589
|
-
},
|
|
2618
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, Ve)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, E, ms).call(this)) == null ? void 0 : v.element) == null || g.click() : r(this, E, Wn).call(this, t));
|
|
2619
|
+
}, Wn = function(t) {
|
|
2590
2620
|
var g;
|
|
2591
|
-
const { key: i } = t, s = [...e(this, Q), ...e(this, K)], o = (g = r(this, E,
|
|
2621
|
+
const { key: i } = t, s = [...e(this, Q), ...e(this, K)], o = (g = r(this, E, ms).call(this)) != null ? g : s[0];
|
|
2592
2622
|
if (!o) return;
|
|
2593
2623
|
const p = s.indexOf(o);
|
|
2594
2624
|
let u = Math.max(0, p);
|
|
2595
|
-
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : i === "ArrowLeft" ? u = r(this, E,
|
|
2625
|
+
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : i === "ArrowLeft" ? u = r(this, E, bs).call(this, p, "left") : i === "ArrowRight" ? u = r(this, E, bs).call(this, p, "right") : t.key === "Home" ? u = 0 : t.key === "End" && (u = s.length - 1), u < 0 && (u = s.length - 1), u > s.length - 1 && (u = 0);
|
|
2596
2626
|
const v = s[u];
|
|
2597
|
-
v && (r(this, E,
|
|
2598
|
-
},
|
|
2627
|
+
v && (r(this, E, Zn).call(this, v.value), v.element.focus());
|
|
2628
|
+
}, bs = function(t, i) {
|
|
2599
2629
|
const s = e(this, Q).length, o = e(this, K).length;
|
|
2600
2630
|
return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
|
|
2601
|
-
},
|
|
2631
|
+
}, ms = function() {
|
|
2602
2632
|
return [...e(this, Q), ...e(this, K)].find((t) => t.element.tabIndex === 0);
|
|
2603
|
-
},
|
|
2633
|
+
}, Zn = function(t) {
|
|
2604
2634
|
for (const i of [...e(this, Q), ...e(this, K)])
|
|
2605
2635
|
i.element.tabIndex = i.value === t ? 0 : -1;
|
|
2606
|
-
}, m(
|
|
2636
|
+
}, m(jn, "observedAttributes", [
|
|
2607
2637
|
n.LANGUAGES,
|
|
2608
2638
|
n.TEXT_TRACKS,
|
|
2609
2639
|
n.LANGUAGE,
|
|
2610
2640
|
n.TEXT_TRACK
|
|
2611
2641
|
]);
|
|
2612
|
-
const
|
|
2642
|
+
const tr = document.createElement("template"), go = (
|
|
2613
2643
|
/* SVG */
|
|
2614
2644
|
`
|
|
2615
2645
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -2624,7 +2654,7 @@ const Qn = document.createElement("template"), go = (
|
|
|
2624
2654
|
<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>
|
|
2625
2655
|
`
|
|
2626
2656
|
);
|
|
2627
|
-
|
|
2657
|
+
tr.innerHTML = /* HTML */
|
|
2628
2658
|
`
|
|
2629
2659
|
<style>
|
|
2630
2660
|
:host {
|
|
@@ -2648,7 +2678,7 @@ Qn.innerHTML = /* HTML */
|
|
|
2648
2678
|
const ye = class ye extends tt {
|
|
2649
2679
|
constructor() {
|
|
2650
2680
|
var a;
|
|
2651
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2681
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(tr.content.cloneNode(!0));
|
|
2652
2682
|
}
|
|
2653
2683
|
connectedCallback() {
|
|
2654
2684
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -2671,14 +2701,14 @@ const ye = class ye extends tt {
|
|
|
2671
2701
|
}
|
|
2672
2702
|
};
|
|
2673
2703
|
m(ye, "observedAttributes", [...q(ye, ye, "observedAttributes"), n.MUTED]);
|
|
2674
|
-
let
|
|
2675
|
-
const
|
|
2704
|
+
let vs = ye;
|
|
2705
|
+
const er = document.createElement("template"), Eo = (
|
|
2676
2706
|
/* SVG */
|
|
2677
2707
|
`
|
|
2678
2708
|
<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>
|
|
2679
2709
|
`
|
|
2680
2710
|
);
|
|
2681
|
-
|
|
2711
|
+
er.innerHTML = /* HTML */
|
|
2682
2712
|
`
|
|
2683
2713
|
<style>
|
|
2684
2714
|
:host {
|
|
@@ -2694,7 +2724,7 @@ Wn.innerHTML = /* HTML */
|
|
|
2694
2724
|
const ke = class ke extends tt {
|
|
2695
2725
|
constructor() {
|
|
2696
2726
|
var a;
|
|
2697
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2727
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(er.content.cloneNode(!0));
|
|
2698
2728
|
}
|
|
2699
2729
|
connectedCallback() {
|
|
2700
2730
|
super.connectedCallback(), this.setAttribute(
|
|
@@ -2723,8 +2753,8 @@ const ke = class ke extends tt {
|
|
|
2723
2753
|
}
|
|
2724
2754
|
};
|
|
2725
2755
|
m(ke, "observedAttributes", [...q(ke, ke, "observedAttributes"), n.IS_PIP, n.PIP_AVAILABLE]);
|
|
2726
|
-
let
|
|
2727
|
-
const
|
|
2756
|
+
let gs = ke;
|
|
2757
|
+
const ir = document.createElement("template"), Ao = (
|
|
2728
2758
|
/* SVG */
|
|
2729
2759
|
`
|
|
2730
2760
|
<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>
|
|
@@ -2735,7 +2765,7 @@ const Zn = document.createElement("template"), Ao = (
|
|
|
2735
2765
|
<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>
|
|
2736
2766
|
`
|
|
2737
2767
|
);
|
|
2738
|
-
|
|
2768
|
+
ir.innerHTML = /* HTML */
|
|
2739
2769
|
`
|
|
2740
2770
|
<style>
|
|
2741
2771
|
:host {
|
|
@@ -2759,7 +2789,7 @@ Zn.innerHTML = /* HTML */
|
|
|
2759
2789
|
const we = class we extends tt {
|
|
2760
2790
|
constructor() {
|
|
2761
2791
|
var a;
|
|
2762
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2792
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(ir.content.cloneNode(!0));
|
|
2763
2793
|
}
|
|
2764
2794
|
connectedCallback() {
|
|
2765
2795
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -2782,14 +2812,14 @@ const we = class we extends tt {
|
|
|
2782
2812
|
}
|
|
2783
2813
|
};
|
|
2784
2814
|
m(we, "observedAttributes", [...q(we, we, "observedAttributes"), n.PAUSED]);
|
|
2785
|
-
let
|
|
2815
|
+
let fs = we;
|
|
2786
2816
|
const X = {
|
|
2787
2817
|
TITLE: "title",
|
|
2788
2818
|
OFFLINE: "offline",
|
|
2789
2819
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
2790
2820
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
2791
2821
|
}, ko = Object.values(X);
|
|
2792
|
-
var Ye, se, At, Pt, yt, kt, lt, H,
|
|
2822
|
+
var Ye, se, At, Pt, yt, kt, lt, H, Es, sr, As, ys;
|
|
2793
2823
|
class wo extends li {
|
|
2794
2824
|
constructor(t) {
|
|
2795
2825
|
super();
|
|
@@ -2807,15 +2837,15 @@ class wo extends li {
|
|
|
2807
2837
|
}));
|
|
2808
2838
|
}
|
|
2809
2839
|
start(t = 5e3) {
|
|
2810
|
-
e(this, lt) && clearInterval(e(this, lt)), c(this, At, !1), c(this, Pt, !1), r(this, H,
|
|
2811
|
-
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this, kt) && e(this, yt) && c(this, kt, window.setTimeout(() => r(this, H,
|
|
2840
|
+
e(this, lt) && clearInterval(e(this, lt)), c(this, At, !1), c(this, Pt, !1), r(this, H, ys).call(this), r(this, H, Es).call(this), c(this, lt, window.setInterval(() => {
|
|
2841
|
+
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this, kt) && e(this, yt) && c(this, kt, window.setTimeout(() => r(this, H, sr).call(this), 5 * 60 * 1e3)), !e(this, Pt) && e(this, yt) && r(this, H, Es).call(this);
|
|
2812
2842
|
}, t));
|
|
2813
2843
|
}
|
|
2814
2844
|
stop() {
|
|
2815
|
-
r(this, H,
|
|
2845
|
+
r(this, H, As).call(this), e(this, lt) && (window.clearInterval(e(this, lt)), c(this, lt, null));
|
|
2816
2846
|
}
|
|
2817
2847
|
}
|
|
2818
|
-
Ye = new WeakMap(), se = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(), yt = new WeakMap(), kt = new WeakMap(), lt = new WeakMap(), H = new WeakSet(),
|
|
2848
|
+
Ye = new WeakMap(), se = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(), yt = new WeakMap(), kt = new WeakMap(), lt = new WeakMap(), H = new WeakSet(), Es = function() {
|
|
2819
2849
|
return G(this, null, function* () {
|
|
2820
2850
|
if (e(this, At))
|
|
2821
2851
|
return;
|
|
@@ -2824,7 +2854,7 @@ Ye = new WeakMap(), se = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(),
|
|
|
2824
2854
|
try {
|
|
2825
2855
|
const s = yield e(this, Ye).getChannel(e(this, se).channelId);
|
|
2826
2856
|
if (s.isLive) {
|
|
2827
|
-
c(this, Pt, !0), r(this, H,
|
|
2857
|
+
c(this, Pt, !0), r(this, H, ys).call(this), this.emit("live", s), c(this, At, !1);
|
|
2828
2858
|
return;
|
|
2829
2859
|
}
|
|
2830
2860
|
} catch (s) {
|
|
@@ -2832,17 +2862,17 @@ Ye = new WeakMap(), se = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(),
|
|
|
2832
2862
|
}
|
|
2833
2863
|
e(this, yt) && this.emit("error", { title: t, message: i }), c(this, At, !1);
|
|
2834
2864
|
});
|
|
2835
|
-
},
|
|
2865
|
+
}, sr = function() {
|
|
2836
2866
|
this.stop(), c(this, yt, !1), this.emit("timeout");
|
|
2837
|
-
},
|
|
2867
|
+
}, As = function() {
|
|
2838
2868
|
e(this, kt) && (window.clearTimeout(e(this, kt)), c(this, kt, null));
|
|
2839
|
-
},
|
|
2840
|
-
r(this, H,
|
|
2869
|
+
}, ys = function() {
|
|
2870
|
+
r(this, H, As).call(this), c(this, yt, !0);
|
|
2841
2871
|
};
|
|
2842
2872
|
const Io = new RegExp(
|
|
2843
2873
|
"/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/",
|
|
2844
2874
|
"i"
|
|
2845
|
-
), Co = navigator.userAgent.toLowerCase(), Lo = Io.test(Co), To = (d) => Le.observedAttributes.includes(d),
|
|
2875
|
+
), Co = navigator.userAgent.toLowerCase(), Lo = Io.test(Co), To = (d) => Le.observedAttributes.includes(d), nr = (
|
|
2846
2876
|
/* HTML */
|
|
2847
2877
|
`
|
|
2848
2878
|
<style>
|
|
@@ -2920,7 +2950,7 @@ const Io = new RegExp(
|
|
|
2920
2950
|
), xo = (
|
|
2921
2951
|
/* HTML */
|
|
2922
2952
|
`
|
|
2923
|
-
${
|
|
2953
|
+
${nr}
|
|
2924
2954
|
|
|
2925
2955
|
<vindral-controller>
|
|
2926
2956
|
<vindral-control-bar slot="top-bar">
|
|
@@ -2955,7 +2985,7 @@ const Io = new RegExp(
|
|
|
2955
2985
|
), So = (
|
|
2956
2986
|
/* HTML */
|
|
2957
2987
|
`
|
|
2958
|
-
${
|
|
2988
|
+
${nr}
|
|
2959
2989
|
|
|
2960
2990
|
<style>
|
|
2961
2991
|
#control-bar {
|
|
@@ -2978,80 +3008,80 @@ const Io = new RegExp(
|
|
|
2978
3008
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
2979
3009
|
</vindral-controller>
|
|
2980
3010
|
`
|
|
2981
|
-
),
|
|
2982
|
-
var Z,
|
|
2983
|
-
class
|
|
3011
|
+
), Xs = document.createElement("template");
|
|
3012
|
+
var Z, x, M, ht, dt, Oi, Je, Fi, N, ks, or, Qe, Ai, xt;
|
|
3013
|
+
class rr extends HTMLElement {
|
|
2984
3014
|
constructor() {
|
|
2985
3015
|
super();
|
|
2986
|
-
l(this,
|
|
3016
|
+
l(this, N);
|
|
2987
3017
|
l(this, Z);
|
|
2988
|
-
l(this,
|
|
3018
|
+
l(this, x);
|
|
2989
3019
|
l(this, M);
|
|
2990
3020
|
l(this, ht);
|
|
2991
3021
|
l(this, dt);
|
|
2992
|
-
l(this,
|
|
3022
|
+
l(this, Oi, () => {
|
|
2993
3023
|
Array.from(this.attributes).forEach((t) => {
|
|
2994
3024
|
e(this, Je).call(this, t.name, t.value);
|
|
2995
3025
|
});
|
|
2996
3026
|
});
|
|
2997
3027
|
l(this, Je, (t, i) => {
|
|
2998
|
-
To(t) && (L(i) ? e(this,
|
|
3028
|
+
To(t) && (L(i) ? e(this, x).setAttribute(t, i) : e(this, x).removeAttribute(t));
|
|
2999
3029
|
});
|
|
3000
|
-
l(this,
|
|
3030
|
+
l(this, Fi, () => Vs(this.getAttribute(n.MEDIA)) === "audio" ? So : xo);
|
|
3001
3031
|
l(this, Qe, () => {
|
|
3002
|
-
const t = e(this,
|
|
3032
|
+
const t = e(this, x).instance;
|
|
3003
3033
|
t && (t.on("is live", (i) => {
|
|
3004
|
-
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this,
|
|
3034
|
+
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this, N, xt).call(this, "Stream is offline", "Please stand by"));
|
|
3005
3035
|
}), t.on("channels", (i) => {
|
|
3006
|
-
const s = e(this,
|
|
3007
|
-
o && r(this,
|
|
3036
|
+
const s = e(this, x).getAttribute("channel-id"), o = i.find((p) => p.channelId === s);
|
|
3037
|
+
o && r(this, N, Ai).call(this, o);
|
|
3008
3038
|
}), t.on("channel switch", ({ channelId: i }) => {
|
|
3009
3039
|
const s = t.channels.find((o) => o.channelId === i);
|
|
3010
|
-
s && r(this,
|
|
3040
|
+
s && r(this, N, Ai).call(this, s);
|
|
3011
3041
|
}), t.on("error", (i) => {
|
|
3012
3042
|
let s = "Stream is offline", o = "Please stand by";
|
|
3013
|
-
i.isFatal() ? (i.code() === Jr ? (s = "Forbidden", o = "You do not have permission to view this stream", r(this,
|
|
3043
|
+
i.isFatal() ? (i.code() === Jr ? (s = "Forbidden", o = "You do not have permission to view this stream", r(this, N, xt).call(this, s, o)) : r(this, N, xt).call(this, "An error occurred", i.message), e(this, ht).removeAttribute("hidden"), this.setAttribute(X.OFFLINE, ""), e(this, x).dispatchEvent(new CustomEvent(f.EXIT_FULLSCREEN)), e(this, x).dispatchEvent(new CustomEvent(f.EXIT_PIP))) : i.code() === Qr && r(this, N, xt).call(this, s, o);
|
|
3014
3044
|
}));
|
|
3015
3045
|
});
|
|
3016
|
-
c(this, Z, this.attachShadow({ mode: "open" })), r(this,
|
|
3046
|
+
c(this, Z, this.attachShadow({ mode: "open" })), r(this, N, ks).call(this), c(this, x, e(this, Z).querySelector("vindral-controller")), c(this, M, e(this, Z).querySelector("#vindral-message")), c(this, ht, e(this, Z).querySelector("#play-overlay"));
|
|
3017
3047
|
}
|
|
3018
3048
|
connectedCallback() {
|
|
3019
|
-
this.setAttribute(X.OFFLINE, ""), e(this,
|
|
3049
|
+
this.setAttribute(X.OFFLINE, ""), e(this, x).addEventListener("vindral-instance-ready", e(this, Qe)), r(this, N, or).call(this);
|
|
3020
3050
|
}
|
|
3021
3051
|
disconnectedCallback() {
|
|
3022
3052
|
var t;
|
|
3023
|
-
e(this,
|
|
3053
|
+
e(this, x).removeEventListener("vindral-instance-ready", e(this, Qe)), (t = e(this, dt)) == null || t.stop();
|
|
3024
3054
|
}
|
|
3025
3055
|
attributeChangedCallback(t, i, s) {
|
|
3026
3056
|
if (i !== s)
|
|
3027
3057
|
if (t === n.MEDIA)
|
|
3028
|
-
r(this,
|
|
3058
|
+
r(this, N, ks).call(this);
|
|
3029
3059
|
else if (t === X.REFRESH_POSTER_ENABLED) {
|
|
3030
3060
|
const o = e(this, Z).querySelector("vindral-poster-overlay");
|
|
3031
|
-
o && (o.disabled =
|
|
3061
|
+
o && (o.disabled = S(this.getAttribute(X.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3032
3062
|
} else
|
|
3033
3063
|
e(this, Je).call(this, t, s);
|
|
3034
3064
|
}
|
|
3035
3065
|
get instance() {
|
|
3036
|
-
return e(this,
|
|
3066
|
+
return e(this, x).instance;
|
|
3037
3067
|
}
|
|
3038
3068
|
get airPlay() {
|
|
3039
|
-
return e(this,
|
|
3069
|
+
return e(this, x).airPlay;
|
|
3040
3070
|
}
|
|
3041
3071
|
}
|
|
3042
|
-
Z = new WeakMap(),
|
|
3043
|
-
|
|
3044
|
-
const t =
|
|
3045
|
-
c(this,
|
|
3046
|
-
e(this,
|
|
3047
|
-
}), e(this,
|
|
3048
|
-
},
|
|
3049
|
-
var
|
|
3050
|
-
if (
|
|
3072
|
+
Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Oi = new WeakMap(), Je = new WeakMap(), Fi = new WeakMap(), N = new WeakSet(), ks = function() {
|
|
3073
|
+
Xs.innerHTML = e(this, Fi).call(this);
|
|
3074
|
+
const t = Xs.content.cloneNode(!0);
|
|
3075
|
+
c(this, x, t.querySelector("vindral-controller")), c(this, M, t.querySelector("#vindral-message")), c(this, ht, t.querySelector("#play-overlay")), this.children.length > 0 && Array.from(this.children).forEach((i) => {
|
|
3076
|
+
e(this, x).appendChild(i);
|
|
3077
|
+
}), e(this, Oi).call(this), e(this, Z).innerHTML = "", e(this, Z).appendChild(t);
|
|
3078
|
+
}, or = function() {
|
|
3079
|
+
var p;
|
|
3080
|
+
if (S(this.getAttribute(X.STREAM_POLL_ENABLED), !0) === !1)
|
|
3051
3081
|
return;
|
|
3052
|
-
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (
|
|
3082
|
+
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (p = this.getAttribute("authentication-token")) != null ? p : void 0, o = this.hasAttribute("infinite-reconnect");
|
|
3053
3083
|
if (!t || !i) {
|
|
3054
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3084
|
+
this.setAttribute(X.OFFLINE, ""), r(this, N, xt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3055
3085
|
return;
|
|
3056
3086
|
}
|
|
3057
3087
|
c(this, dt, new wo({
|
|
@@ -3059,29 +3089,32 @@ Z = new WeakMap(), R = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt
|
|
|
3059
3089
|
channelId: i,
|
|
3060
3090
|
authenticationToken: s,
|
|
3061
3091
|
infiniteReconnect: o
|
|
3062
|
-
})), e(this, dt).on("live", (
|
|
3063
|
-
e(this,
|
|
3092
|
+
})), e(this, dt).on("live", (u) => {
|
|
3093
|
+
e(this, x).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), r(this, N, Ai).call(this, u);
|
|
3064
3094
|
}), e(this, dt).on("timeout", () => {
|
|
3065
3095
|
e(this, M).setAttribute("hidden", ""), e(this, ht).removeAttribute("hidden");
|
|
3066
|
-
}), e(this, dt).on("error", (
|
|
3067
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3096
|
+
}), e(this, dt).on("error", (u) => {
|
|
3097
|
+
this.setAttribute(X.OFFLINE, ""), r(this, N, xt).call(this, u.title, u.message);
|
|
3068
3098
|
}), e(this, ht).addEventListener("click", () => {
|
|
3069
|
-
e(this,
|
|
3099
|
+
e(this, x).connect(), e(this, ht).setAttribute("hidden", ""), e(this, M).setAttribute("hidden", ""), e(this, x).focus();
|
|
3070
3100
|
}), this.hasAttribute("paused") && e(this, dt).start();
|
|
3071
|
-
}, Qe = new WeakMap(),
|
|
3072
|
-
|
|
3073
|
-
const i =
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3101
|
+
}, Qe = new WeakMap(), Ai = function(t) {
|
|
3102
|
+
var u, v;
|
|
3103
|
+
const i = Ys(this.getAttribute("title"), !1);
|
|
3104
|
+
if (!i) return;
|
|
3105
|
+
const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
|
|
3106
|
+
let p;
|
|
3107
|
+
typeof s == "string" ? p = s : p = (v = (u = this.instance) == null ? void 0 : u.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, no({
|
|
3108
|
+
title: o,
|
|
3109
|
+
poster: p
|
|
3077
3110
|
});
|
|
3078
3111
|
}, xt = function(t, i) {
|
|
3079
3112
|
e(this, M).setAttribute("title", t), e(this, M).setAttribute("description", i);
|
|
3080
3113
|
const s = this.getAttribute("poster");
|
|
3081
3114
|
s && e(this, M).setAttribute("background-image", s), e(this, M).removeAttribute("hidden");
|
|
3082
|
-
}, m(
|
|
3083
|
-
const
|
|
3084
|
-
|
|
3115
|
+
}, m(rr, "observedAttributes", [...Le.observedAttributes, ...ko]);
|
|
3116
|
+
const ar = document.createElement("template");
|
|
3117
|
+
ar.innerHTML = /* HTML */
|
|
3085
3118
|
`
|
|
3086
3119
|
<style>
|
|
3087
3120
|
:host {
|
|
@@ -3118,34 +3151,34 @@ nr.innerHTML = /* HTML */
|
|
|
3118
3151
|
</style>
|
|
3119
3152
|
`;
|
|
3120
3153
|
const No = 6e3;
|
|
3121
|
-
var ne, wt, Mt, re,
|
|
3122
|
-
class
|
|
3154
|
+
var ne, wt, Mt, re, Y, hr, yi, ws, Hi;
|
|
3155
|
+
class lr extends HTMLElement {
|
|
3123
3156
|
constructor() {
|
|
3124
3157
|
super();
|
|
3125
|
-
l(this,
|
|
3158
|
+
l(this, Y);
|
|
3126
3159
|
l(this, ne, null);
|
|
3127
3160
|
l(this, wt, null);
|
|
3128
3161
|
l(this, Mt, null);
|
|
3129
3162
|
l(this, re, () => {
|
|
3130
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this,
|
|
3163
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this, Y, hr).call(this) : r(this, Y, yi).call(this);
|
|
3131
3164
|
});
|
|
3132
|
-
l(this,
|
|
3165
|
+
l(this, Hi, (t) => {
|
|
3133
3166
|
t.forEach((i) => {
|
|
3134
3167
|
i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3135
3168
|
});
|
|
3136
3169
|
});
|
|
3137
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3170
|
+
this.attachShadow({ mode: "open" }).appendChild(ar.content.cloneNode(!0));
|
|
3138
3171
|
}
|
|
3139
3172
|
connectedCallback() {
|
|
3140
3173
|
var t;
|
|
3141
|
-
c(this, ne, this.closest("vindral-controller")), (t = e(this, ne)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, re)), c(this, Mt, new IntersectionObserver(e(this,
|
|
3174
|
+
c(this, ne, this.closest("vindral-controller")), (t = e(this, ne)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, re)), c(this, Mt, new IntersectionObserver(e(this, Hi))), e(this, Mt).observe(this);
|
|
3142
3175
|
}
|
|
3143
3176
|
disconnectedCallback() {
|
|
3144
3177
|
var t, i;
|
|
3145
|
-
(t = e(this, ne)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, re)), (i = e(this, Mt)) == null || i.disconnect(), c(this, Mt, null), r(this,
|
|
3178
|
+
(t = e(this, ne)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, re)), (i = e(this, Mt)) == null || i.disconnect(), c(this, Mt, null), r(this, Y, yi).call(this);
|
|
3146
3179
|
}
|
|
3147
3180
|
attributeChangedCallback(t, i, s) {
|
|
3148
|
-
i !== s && (t === n.POSTER_SRC && this.paused && !this.disabled && r(this,
|
|
3181
|
+
i !== s && (t === n.POSTER_SRC && this.paused && !this.disabled && r(this, Y, ws).call(this), (t === n.PAUSED || t === "disabled" || t === "intersecting") && e(this, re).call(this));
|
|
3149
3182
|
}
|
|
3150
3183
|
get disabled() {
|
|
3151
3184
|
return this.hasAttribute("disabled");
|
|
@@ -3160,21 +3193,21 @@ class rr extends HTMLElement {
|
|
|
3160
3193
|
return this.hasAttribute(n.PAUSED);
|
|
3161
3194
|
}
|
|
3162
3195
|
}
|
|
3163
|
-
ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(),
|
|
3164
|
-
e(this, wt) === null && (r(this,
|
|
3165
|
-
},
|
|
3196
|
+
ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(), Y = new WeakSet(), hr = function() {
|
|
3197
|
+
e(this, wt) === null && (r(this, Y, yi).call(this), c(this, wt, window.setInterval(() => r(this, Y, ws).call(this), No)));
|
|
3198
|
+
}, yi = function() {
|
|
3166
3199
|
e(this, wt) !== null && (clearInterval(e(this, wt)), c(this, wt, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3167
|
-
},
|
|
3200
|
+
}, ws = function() {
|
|
3168
3201
|
if (!this.posterSrc) return;
|
|
3169
3202
|
const t = new URL(this.posterSrc), i = new Image();
|
|
3170
3203
|
t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
|
|
3171
|
-
},
|
|
3204
|
+
}, Hi = new WeakMap(), m(lr, "observedAttributes", [
|
|
3172
3205
|
n.POSTER_SRC,
|
|
3173
3206
|
n.PAUSED,
|
|
3174
3207
|
"disabled",
|
|
3175
3208
|
"intersecting"
|
|
3176
3209
|
]);
|
|
3177
|
-
const
|
|
3210
|
+
const Uo = (
|
|
3178
3211
|
/* SVG */
|
|
3179
3212
|
`
|
|
3180
3213
|
<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">
|
|
@@ -3182,8 +3215,8 @@ const Ro = (
|
|
|
3182
3215
|
<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" />
|
|
3183
3216
|
</svg>
|
|
3184
3217
|
`
|
|
3185
|
-
),
|
|
3186
|
-
|
|
3218
|
+
), dr = document.createElement("template");
|
|
3219
|
+
dr.innerHTML = /* HTML */
|
|
3187
3220
|
`
|
|
3188
3221
|
<style>
|
|
3189
3222
|
:host {
|
|
@@ -3191,38 +3224,38 @@ ar.innerHTML = /* HTML */
|
|
|
3191
3224
|
}
|
|
3192
3225
|
</style>
|
|
3193
3226
|
|
|
3194
|
-
<slot name="button">${
|
|
3227
|
+
<slot name="button">${Uo}</slot>
|
|
3195
3228
|
<slot name="listbox" hidden>
|
|
3196
3229
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3197
3230
|
</slot>
|
|
3198
3231
|
`;
|
|
3199
|
-
var We,
|
|
3200
|
-
const Ie = class Ie extends
|
|
3232
|
+
var We, Cs;
|
|
3233
|
+
const Ie = class Ie extends Ms {
|
|
3201
3234
|
constructor() {
|
|
3202
3235
|
var t, i, s, o;
|
|
3203
3236
|
super();
|
|
3204
3237
|
l(this, We);
|
|
3205
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3238
|
+
(t = this.shadowRoot) == null || t.appendChild(dr.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]");
|
|
3206
3239
|
}
|
|
3207
3240
|
connectedCallback() {
|
|
3208
|
-
super.connectedCallback(), r(this, We,
|
|
3241
|
+
super.connectedCallback(), r(this, We, Cs).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3209
3242
|
}
|
|
3210
3243
|
attributeChangedCallback(t, i, s) {
|
|
3211
|
-
super.attributeChangedCallback(t, i, s), t === n.RENDITION_LEVELS && r(this, We,
|
|
3244
|
+
super.attributeChangedCallback(t, i, s), t === n.RENDITION_LEVELS && r(this, We, Cs).call(this);
|
|
3212
3245
|
}
|
|
3213
3246
|
};
|
|
3214
|
-
We = new WeakSet(),
|
|
3247
|
+
We = new WeakSet(), Cs = function() {
|
|
3215
3248
|
const t = this.getAttribute(n.RENDITION_LEVELS);
|
|
3216
3249
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3217
3250
|
}, m(Ie, "observedAttributes", [...q(Ie, Ie, "observedAttributes"), n.RENDITION_LEVELS]);
|
|
3218
|
-
let
|
|
3219
|
-
const
|
|
3251
|
+
let Is = Ie;
|
|
3252
|
+
const cr = document.createElement("template"), Ro = (
|
|
3220
3253
|
/* SVG */
|
|
3221
3254
|
`
|
|
3222
3255
|
<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>
|
|
3223
3256
|
`
|
|
3224
3257
|
);
|
|
3225
|
-
|
|
3258
|
+
cr.innerHTML = /* HTML */
|
|
3226
3259
|
`
|
|
3227
3260
|
<style>
|
|
3228
3261
|
:host {
|
|
@@ -3295,7 +3328,7 @@ lr.innerHTML = /* HTML */
|
|
|
3295
3328
|
}
|
|
3296
3329
|
|
|
3297
3330
|
[role="menuitem"][aria-selected="true"]::before {
|
|
3298
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3331
|
+
content: url("data:image/svg+xml,${encodeURIComponent(Ro)}");
|
|
3299
3332
|
position: absolute;
|
|
3300
3333
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
3301
3334
|
top: calc(50% - 8px);
|
|
@@ -3325,8 +3358,8 @@ lr.innerHTML = /* HTML */
|
|
|
3325
3358
|
<div class="menu"></div>
|
|
3326
3359
|
</slot>
|
|
3327
3360
|
`;
|
|
3328
|
-
var Dt, Ze, It, ct, Ot, ti, C,
|
|
3329
|
-
class
|
|
3361
|
+
var Dt, Ze, It, ct, Ot, ti, C, pr, Ls, br, Ts, mr, vr, gr, xs, fr;
|
|
3362
|
+
class ur extends HTMLElement {
|
|
3330
3363
|
constructor() {
|
|
3331
3364
|
super();
|
|
3332
3365
|
l(this, C);
|
|
@@ -3339,16 +3372,16 @@ class hr extends HTMLElement {
|
|
|
3339
3372
|
m(this, "handleEvent", (t) => {
|
|
3340
3373
|
switch (t.type) {
|
|
3341
3374
|
case "keydown":
|
|
3342
|
-
r(this, C,
|
|
3375
|
+
r(this, C, vr).call(this, t);
|
|
3343
3376
|
break;
|
|
3344
3377
|
}
|
|
3345
3378
|
});
|
|
3346
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3379
|
+
this.attachShadow({ mode: "open" }).appendChild(cr.content.cloneNode(!0));
|
|
3347
3380
|
}
|
|
3348
3381
|
connectedCallback() {
|
|
3349
3382
|
var i;
|
|
3350
3383
|
const t = this.getRootNode();
|
|
3351
|
-
t instanceof ShadowRoot && (c(this, Ot, t.host.closest("vindral-controller")), (i = e(this, Ot)) == null || i.connectListener(this), r(this, C,
|
|
3384
|
+
t instanceof ShadowRoot && (c(this, Ot, t.host.closest("vindral-controller")), (i = e(this, Ot)) == null || i.connectListener(this), r(this, C, pr).call(this), r(this, C, Ls).call(this), c(this, ti, t.host), this.addEventListener("keydown", this));
|
|
3352
3385
|
}
|
|
3353
3386
|
disconnectedCallback() {
|
|
3354
3387
|
var t;
|
|
@@ -3358,10 +3391,10 @@ class hr extends HTMLElement {
|
|
|
3358
3391
|
i !== s && (t === n.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === n.MAX_VIDEO_BITRATE && s && (this.maxVideoBitrate = s ? parseInt(s) : Number.MAX_SAFE_INTEGER));
|
|
3359
3392
|
}
|
|
3360
3393
|
set list(t) {
|
|
3361
|
-
c(this, Dt, t), r(this, C,
|
|
3394
|
+
c(this, Dt, t), r(this, C, Ls).call(this);
|
|
3362
3395
|
}
|
|
3363
3396
|
set maxVideoBitrate(t) {
|
|
3364
|
-
c(this, Ze, t), r(this, C,
|
|
3397
|
+
c(this, Ze, t), r(this, C, Ts).call(this);
|
|
3365
3398
|
}
|
|
3366
3399
|
get keysUsed() {
|
|
3367
3400
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
@@ -3371,7 +3404,7 @@ class hr extends HTMLElement {
|
|
|
3371
3404
|
(t = e(this, It)) == null || t.focus();
|
|
3372
3405
|
}
|
|
3373
3406
|
}
|
|
3374
|
-
Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(), Ot = new WeakMap(), ti = new WeakMap(), C = new WeakSet(),
|
|
3407
|
+
Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(), Ot = new WeakMap(), ti = new WeakMap(), C = new WeakSet(), pr = function() {
|
|
3375
3408
|
const t = (s) => {
|
|
3376
3409
|
s.forEach((o) => {
|
|
3377
3410
|
if (o.intersectionRatio !== 1)
|
|
@@ -3388,24 +3421,24 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3388
3421
|
threshold: 0
|
|
3389
3422
|
// 0 means any intersection is enough to be considered "inside"
|
|
3390
3423
|
}).observe(this);
|
|
3391
|
-
},
|
|
3424
|
+
}, Ls = function() {
|
|
3392
3425
|
var i;
|
|
3393
3426
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
3394
3427
|
t && (c(this, ct, []), t.innerHTML = "", e(this, Dt).sort((s, o) => {
|
|
3395
3428
|
var p, u;
|
|
3396
3429
|
return (p = s.video) != null && p.bitRate && ((u = o.video) != null && u.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
3397
3430
|
}).forEach((s) => {
|
|
3398
|
-
var v, g, P, et,
|
|
3431
|
+
var v, g, P, et, J, Ct, Lt, Tt;
|
|
3399
3432
|
const o = document.createElement("div");
|
|
3400
3433
|
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
3401
|
-
const p = r(this, C,
|
|
3434
|
+
const p = r(this, C, br).call(this, (g = s.video) == null ? void 0 : g.frameRate);
|
|
3402
3435
|
o.textContent = s.video ? so(s.video) : "";
|
|
3403
3436
|
const u = document.createElement("span");
|
|
3404
|
-
u.classList.add("menu-item-subtitle"), u.textContent = `${io(((et = (P = s.video) == null ? void 0 : P.bitRate) != null ? et : 0) + ((Ct = (
|
|
3405
|
-
}), r(this, C,
|
|
3406
|
-
},
|
|
3437
|
+
u.classList.add("menu-item-subtitle"), u.textContent = `${io(((et = (P = s.video) == null ? void 0 : P.bitRate) != null ? et : 0) + ((Ct = (J = s.audio) == null ? void 0 : J.bitRate) != null ? Ct : 0))}, ${p}p`, o.appendChild(u), o.addEventListener("click", () => r(this, C, mr).call(this, s)), e(this, ct).push({ el: o, id: (Tt = (Lt = s.video) == null ? void 0 : Lt.id) != null ? Tt : -1 }), t.appendChild(o);
|
|
3438
|
+
}), r(this, C, Ts).call(this));
|
|
3439
|
+
}, br = function(t) {
|
|
3407
3440
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
3408
|
-
},
|
|
3441
|
+
}, Ts = function() {
|
|
3409
3442
|
e(this, It) && (e(this, It).removeAttribute("aria-selected"), e(this, It).tabIndex = -1);
|
|
3410
3443
|
const t = e(this, Dt).sort(
|
|
3411
3444
|
(s, o) => {
|
|
@@ -3425,31 +3458,31 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3425
3458
|
});
|
|
3426
3459
|
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this, It, s.el));
|
|
3427
3460
|
}
|
|
3428
|
-
},
|
|
3461
|
+
}, mr = function(t) {
|
|
3429
3462
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
3430
3463
|
new CustomEvent(f.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
3431
3464
|
);
|
|
3432
|
-
},
|
|
3465
|
+
}, vr = function(t) {
|
|
3433
3466
|
var u, v, g;
|
|
3434
3467
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
3435
|
-
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, ti)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, C,
|
|
3436
|
-
},
|
|
3468
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, ti)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, C, xs).call(this)) == null ? void 0 : v.el) == null || g.click() : r(this, C, gr).call(this, t));
|
|
3469
|
+
}, gr = function(t) {
|
|
3437
3470
|
var g;
|
|
3438
|
-
const { key: i } = t, s = e(this, ct), o = (g = r(this, C,
|
|
3471
|
+
const { key: i } = t, s = e(this, ct), o = (g = r(this, C, xs).call(this)) != null ? g : s[0];
|
|
3439
3472
|
if (!o) return;
|
|
3440
3473
|
const p = s.indexOf(o);
|
|
3441
3474
|
let u = Math.max(0, p);
|
|
3442
3475
|
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : t.key === "Home" ? u = 0 : t.key === "End" && (u = s.length - 1), u < 0 && (u = s.length - 1), u > s.length - 1 && (u = 0);
|
|
3443
3476
|
const v = s[u];
|
|
3444
|
-
v && (r(this, C,
|
|
3445
|
-
},
|
|
3477
|
+
v && (r(this, C, fr).call(this, v.id), v.el.focus());
|
|
3478
|
+
}, xs = function() {
|
|
3446
3479
|
return e(this, ct).find((t) => t.el.tabIndex === 0);
|
|
3447
|
-
},
|
|
3480
|
+
}, fr = function(t) {
|
|
3448
3481
|
for (const i of e(this, ct))
|
|
3449
3482
|
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
3450
|
-
}, m(
|
|
3451
|
-
const
|
|
3452
|
-
|
|
3483
|
+
}, m(ur, "observedAttributes", [n.RENDITION_LEVELS, n.MAX_VIDEO_BITRATE]);
|
|
3484
|
+
const Er = document.createElement("template");
|
|
3485
|
+
Er.innerHTML = /* HTML */
|
|
3453
3486
|
`
|
|
3454
3487
|
<style>
|
|
3455
3488
|
:host {
|
|
@@ -3517,8 +3550,8 @@ vr.innerHTML = /* HTML */
|
|
|
3517
3550
|
<div id="scroll-area"></div>
|
|
3518
3551
|
<slot id="content"></slot>
|
|
3519
3552
|
`;
|
|
3520
|
-
var ut, Ft, oe, ei, I,
|
|
3521
|
-
class
|
|
3553
|
+
var ut, Ft, oe, ei, I, yr, kr, wr, zi, Gi, ki, Ss, Ns, Us, Rs;
|
|
3554
|
+
class Ar extends HTMLElement {
|
|
3522
3555
|
constructor() {
|
|
3523
3556
|
super();
|
|
3524
3557
|
l(this, I);
|
|
@@ -3529,31 +3562,31 @@ class gr extends HTMLElement {
|
|
|
3529
3562
|
m(this, "handleEvent", (t) => {
|
|
3530
3563
|
switch (t.type) {
|
|
3531
3564
|
case "touchstart":
|
|
3532
|
-
r(this, I,
|
|
3565
|
+
r(this, I, yr).call(this, t);
|
|
3533
3566
|
break;
|
|
3534
3567
|
case "touchmove":
|
|
3535
|
-
r(this, I,
|
|
3568
|
+
r(this, I, kr).call(this, t);
|
|
3536
3569
|
break;
|
|
3537
3570
|
case "touchend":
|
|
3538
|
-
r(this, I,
|
|
3571
|
+
r(this, I, wr).call(this, t);
|
|
3539
3572
|
break;
|
|
3540
3573
|
}
|
|
3541
3574
|
});
|
|
3542
|
-
l(this,
|
|
3543
|
-
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), r(this, I,
|
|
3575
|
+
l(this, zi, () => {
|
|
3576
|
+
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), r(this, I, Rs).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, I, Us).call(this) : (
|
|
3544
3577
|
// fully open
|
|
3545
|
-
!this.hasAttribute("snap-touch") && r(this, I,
|
|
3578
|
+
!this.hasAttribute("snap-touch") && r(this, I, Ns).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
|
|
3546
3579
|
);
|
|
3547
3580
|
});
|
|
3548
|
-
l(this,
|
|
3581
|
+
l(this, Gi, () => {
|
|
3549
3582
|
const t = e(this, ei);
|
|
3550
|
-
if (c(this, ei, this.scrollTop), !r(this, I,
|
|
3583
|
+
if (c(this, ei, this.scrollTop), !r(this, I, ki).call(this)) {
|
|
3551
3584
|
this.scrollTop = 0;
|
|
3552
3585
|
return;
|
|
3553
3586
|
}
|
|
3554
|
-
this.scrollTop === 0 ? (this.open = !1, r(this, I,
|
|
3587
|
+
this.scrollTop === 0 ? (this.open = !1, r(this, I, Rs).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, I, Us).call(this) : r(this, I, Ns).call(this) && t <= this.scrollTop && (this.open = !0);
|
|
3555
3588
|
});
|
|
3556
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3589
|
+
this.attachShadow({ mode: "open" }).appendChild(Er.content.cloneNode(!0));
|
|
3557
3590
|
}
|
|
3558
3591
|
connectedCallback() {
|
|
3559
3592
|
var i, s, o, p, u, v;
|
|
@@ -3564,10 +3597,10 @@ class gr extends HTMLElement {
|
|
|
3564
3597
|
});
|
|
3565
3598
|
const g = this.hasAttribute("touch-enabled");
|
|
3566
3599
|
if (!Wr() || !g) {
|
|
3567
|
-
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this,
|
|
3600
|
+
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, Gi));
|
|
3568
3601
|
return;
|
|
3569
3602
|
}
|
|
3570
|
-
this.addEventListener("scroll", e(this,
|
|
3603
|
+
this.addEventListener("scroll", e(this, zi)), (p = e(this, ut)) == null || p.addEventListener("touchstart", this, { passive: !0 }), (u = e(this, ut)) == null || u.addEventListener("touchmove", this, { passive: !1 }), (v = e(this, ut)) == null || v.addEventListener("touchend", this, { passive: !0 });
|
|
3571
3604
|
}
|
|
3572
3605
|
}
|
|
3573
3606
|
disconnectedCallback() {
|
|
@@ -3576,7 +3609,7 @@ class gr extends HTMLElement {
|
|
|
3576
3609
|
}
|
|
3577
3610
|
attributeChangedCallback(t, i, s) {
|
|
3578
3611
|
var o;
|
|
3579
|
-
i !== s && (t === n.USER_INTERACTING && s === null && r(this, I,
|
|
3612
|
+
i !== s && (t === n.USER_INTERACTING && s === null && r(this, I, Ss).call(this) && setTimeout(() => {
|
|
3580
3613
|
this.open = !1;
|
|
3581
3614
|
}, 300), t === "open" && this.scrollTo({ top: s === null ? 0 : (o = e(this, Ft)) == null ? void 0 : o.clientHeight, behavior: "smooth" }));
|
|
3582
3615
|
}
|
|
@@ -3593,28 +3626,28 @@ class gr extends HTMLElement {
|
|
|
3593
3626
|
return this.hasAttribute("visible");
|
|
3594
3627
|
}
|
|
3595
3628
|
}
|
|
3596
|
-
ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(), ei = new WeakMap(), I = new WeakSet(),
|
|
3597
|
-
r(this, I,
|
|
3598
|
-
},
|
|
3599
|
-
if (!(!r(this, I,
|
|
3629
|
+
ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(), ei = new WeakMap(), I = new WeakSet(), yr = function(t) {
|
|
3630
|
+
r(this, I, ki).call(this) && t.touches[0] && c(this, oe, t.touches[0].clientY);
|
|
3631
|
+
}, kr = function(t) {
|
|
3632
|
+
if (!(!r(this, I, ki).call(this) || !e(this, oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
|
|
3600
3633
|
const i = t.touches[0].clientY, s = e(this, oe) - i;
|
|
3601
3634
|
this.scrollTop = s;
|
|
3602
3635
|
}
|
|
3603
|
-
},
|
|
3604
|
-
r(this, I,
|
|
3605
|
-
},
|
|
3636
|
+
}, wr = function(t) {
|
|
3637
|
+
r(this, I, Ss).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
|
|
3638
|
+
}, zi = new WeakMap(), Gi = new WeakMap(), ki = function() {
|
|
3606
3639
|
return this.hasAttribute(n.USER_INTERACTING);
|
|
3607
|
-
},
|
|
3640
|
+
}, Ss = function() {
|
|
3608
3641
|
return this.scrollTop > 0;
|
|
3609
|
-
},
|
|
3642
|
+
}, Ns = function() {
|
|
3610
3643
|
var t;
|
|
3611
3644
|
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, Ft)) == null ? void 0 : t.clientHeight);
|
|
3612
|
-
},
|
|
3645
|
+
}, Us = function() {
|
|
3613
3646
|
this.visible = !0, this.dispatchEvent(new CustomEvent(f.LOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3614
|
-
},
|
|
3647
|
+
}, Rs = function() {
|
|
3615
3648
|
this.visible = !1, this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3616
|
-
}, m(
|
|
3617
|
-
const
|
|
3649
|
+
}, m(Ar, "observedAttributes", [n.USER_INTERACTING, "open", "touch-enabled"]);
|
|
3650
|
+
const Ir = document.createElement("template"), _o = (
|
|
3618
3651
|
/* SVG */
|
|
3619
3652
|
`
|
|
3620
3653
|
<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>
|
|
@@ -3625,7 +3658,7 @@ const yr = document.createElement("template"), _o = (
|
|
|
3625
3658
|
<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>
|
|
3626
3659
|
`
|
|
3627
3660
|
);
|
|
3628
|
-
|
|
3661
|
+
Ir.innerHTML = /* HTML */
|
|
3629
3662
|
`
|
|
3630
3663
|
<style>
|
|
3631
3664
|
:host {
|
|
@@ -3683,7 +3716,7 @@ yr.innerHTML = /* HTML */
|
|
|
3683
3716
|
</slot>
|
|
3684
3717
|
`;
|
|
3685
3718
|
var ae, ii, Ht, si;
|
|
3686
|
-
class
|
|
3719
|
+
class Cr extends HTMLElement {
|
|
3687
3720
|
constructor() {
|
|
3688
3721
|
super();
|
|
3689
3722
|
l(this, ae, null);
|
|
@@ -3706,7 +3739,7 @@ class kr extends HTMLElement {
|
|
|
3706
3739
|
}
|
|
3707
3740
|
this.addEventListener("keyup", e(this, Ht), { once: !0 });
|
|
3708
3741
|
});
|
|
3709
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3742
|
+
this.attachShadow({ mode: "open" }).appendChild(Ir.content.cloneNode(!0));
|
|
3710
3743
|
}
|
|
3711
3744
|
get keysUsed() {
|
|
3712
3745
|
return ["Enter", " "];
|
|
@@ -3726,14 +3759,14 @@ class kr extends HTMLElement {
|
|
|
3726
3759
|
(t = e(this, ae)) == null || t.disconnectListener(this), this.disable();
|
|
3727
3760
|
}
|
|
3728
3761
|
}
|
|
3729
|
-
ae = new WeakMap(), ii = new WeakMap(), Ht = new WeakMap(), si = new WeakMap(), m(
|
|
3762
|
+
ae = new WeakMap(), ii = new WeakMap(), Ht = new WeakMap(), si = new WeakMap(), m(Cr, "observedAttributes", [
|
|
3730
3763
|
"hidden",
|
|
3731
3764
|
n.NEEDS_USER_INPUT_VIDEO,
|
|
3732
3765
|
n.NEEDS_USER_INPUT_AUDIO,
|
|
3733
3766
|
n.PAUSED
|
|
3734
3767
|
]);
|
|
3735
|
-
const
|
|
3736
|
-
|
|
3768
|
+
const Lr = document.createElement("template");
|
|
3769
|
+
Lr.innerHTML = /* HTML */
|
|
3737
3770
|
`
|
|
3738
3771
|
<style>
|
|
3739
3772
|
:host,
|
|
@@ -3827,14 +3860,14 @@ wr.innerHTML = /* HTML */
|
|
|
3827
3860
|
</div>
|
|
3828
3861
|
`;
|
|
3829
3862
|
var ni, ri, oi;
|
|
3830
|
-
class
|
|
3863
|
+
class Tr extends HTMLElement {
|
|
3831
3864
|
constructor() {
|
|
3832
3865
|
super();
|
|
3833
3866
|
l(this, ni);
|
|
3834
3867
|
l(this, ri);
|
|
3835
3868
|
l(this, oi);
|
|
3836
3869
|
const t = this.attachShadow({ mode: "open" });
|
|
3837
|
-
t.appendChild(
|
|
3870
|
+
t.appendChild(Lr.content.cloneNode(!0)), c(this, ni, t.querySelector("#title")), c(this, ri, t.querySelector("#description")), c(this, oi, t.querySelector("#background"));
|
|
3838
3871
|
}
|
|
3839
3872
|
connectedCallback() {
|
|
3840
3873
|
}
|
|
@@ -3844,14 +3877,14 @@ class Ir extends HTMLElement {
|
|
|
3844
3877
|
i !== s && (t === "title" ? e(this, ni).textContent = s : t === "description" ? e(this, ri).textContent = s : t === "background-image" && (e(this, oi).style.backgroundImage = `url(${s})`));
|
|
3845
3878
|
}
|
|
3846
3879
|
}
|
|
3847
|
-
ni = new WeakMap(), ri = new WeakMap(), oi = new WeakMap(), m(
|
|
3848
|
-
const
|
|
3880
|
+
ni = new WeakMap(), ri = new WeakMap(), oi = new WeakMap(), m(Tr, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
3881
|
+
const xr = document.createElement("template"), Mo = (
|
|
3849
3882
|
/* SVG */
|
|
3850
3883
|
`
|
|
3851
3884
|
<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>
|
|
3852
3885
|
`
|
|
3853
3886
|
);
|
|
3854
|
-
|
|
3887
|
+
xr.innerHTML = /* HTML */
|
|
3855
3888
|
`
|
|
3856
3889
|
<style>
|
|
3857
3890
|
:host {
|
|
@@ -3873,10 +3906,15 @@ Cr.innerHTML = /* HTML */
|
|
|
3873
3906
|
|
|
3874
3907
|
:host(:focus-visible) {
|
|
3875
3908
|
outline: none;
|
|
3909
|
+
outline: 0;
|
|
3876
3910
|
}
|
|
3877
3911
|
|
|
3878
3912
|
:host(:focus-visible) svg {
|
|
3879
|
-
|
|
3913
|
+
outline: 0;
|
|
3914
|
+
}
|
|
3915
|
+
|
|
3916
|
+
:host(:where(:focus)) svg {
|
|
3917
|
+
box-shadow: none;
|
|
3880
3918
|
outline: 0;
|
|
3881
3919
|
}
|
|
3882
3920
|
|
|
@@ -3899,11 +3937,11 @@ Cr.innerHTML = /* HTML */
|
|
|
3899
3937
|
<slot id="play" name="icon">${Mo}</slot>
|
|
3900
3938
|
`;
|
|
3901
3939
|
var le;
|
|
3902
|
-
class
|
|
3940
|
+
class Sr extends HTMLElement {
|
|
3903
3941
|
constructor() {
|
|
3904
3942
|
super();
|
|
3905
3943
|
l(this, le, null);
|
|
3906
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3944
|
+
this.attachShadow({ mode: "open" }).appendChild(xr.content.cloneNode(!0));
|
|
3907
3945
|
}
|
|
3908
3946
|
connectedCallback() {
|
|
3909
3947
|
var t;
|
|
@@ -3917,9 +3955,9 @@ class Lr extends HTMLElement {
|
|
|
3917
3955
|
i !== s && t === "hidden" && !L(s) && this.focus();
|
|
3918
3956
|
}
|
|
3919
3957
|
}
|
|
3920
|
-
le = new WeakMap(), m(
|
|
3921
|
-
const
|
|
3922
|
-
|
|
3958
|
+
le = new WeakMap(), m(Sr, "observedAttributes", ["hidden"]);
|
|
3959
|
+
const Nr = document.createElement("template");
|
|
3960
|
+
Nr.innerHTML = /* HTML */
|
|
3923
3961
|
`
|
|
3924
3962
|
<style>
|
|
3925
3963
|
:host {
|
|
@@ -3930,7 +3968,7 @@ Tr.innerHTML = /* HTML */
|
|
|
3930
3968
|
`;
|
|
3931
3969
|
const Do = (d) => `${Math.round(d * 100)}%`;
|
|
3932
3970
|
var ai;
|
|
3933
|
-
const Ce = class Ce extends
|
|
3971
|
+
const Ce = class Ce extends Ds {
|
|
3934
3972
|
constructor() {
|
|
3935
3973
|
var t;
|
|
3936
3974
|
super();
|
|
@@ -3938,7 +3976,7 @@ const Ce = class Ce extends _s {
|
|
|
3938
3976
|
const t = this.range.valueAsNumber;
|
|
3939
3977
|
this.dispatchEvent(new CustomEvent(f.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
3940
3978
|
});
|
|
3941
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3979
|
+
(t = this.shadowRoot) == null || t.appendChild(Nr.content.cloneNode(!0));
|
|
3942
3980
|
}
|
|
3943
3981
|
connectedCallback() {
|
|
3944
3982
|
super.connectedCallback(), this.range.addEventListener("input", e(this, ai)), this.range.setAttribute("aria-label", "volume");
|
|
@@ -3958,9 +3996,9 @@ const Ce = class Ce extends _s {
|
|
|
3958
3996
|
}
|
|
3959
3997
|
};
|
|
3960
3998
|
ai = new WeakMap(), m(Ce, "observedAttributes", [...q(Ce, Ce, "observedAttributes"), n.MUTED, n.VOLUME]);
|
|
3961
|
-
let
|
|
3999
|
+
let _s = Ce;
|
|
3962
4000
|
function $o() {
|
|
3963
|
-
customElements.define("vindral-controller", Le), customElements.define("vindral-control-bar",
|
|
4001
|
+
customElements.define("vindral-controller", Le), customElements.define("vindral-control-bar", In), customElements.define("vindral-play-button", fs), customElements.define("vindral-mute-button", vs), customElements.define("vindral-buffering-overlay", en), customElements.define("vindral-scroll-overlay", Ar), customElements.define("vindral-play-overlay", Sr), customElements.define("vindral-user-input-play-overlay", Cr), customElements.define("vindral-fullscreen-button", hs), customElements.define("vindral-rendition-levels-menu", Is), customElements.define("vindral-rendition-levels-menu-list", ur), customElements.define("vindral-channel-grid-button", Zi), customElements.define("vindral-channel-grid", dn), customElements.define("vindral-channel-grid-item", Ps), customElements.define("vindral-pip-button", gs), customElements.define("vindral-airplay-button", Vi), customElements.define("vindral-cast-button", Ji), customElements.define("vindral-cast-overlay", on), customElements.define("vindral-buffering-icon", Zs), customElements.define("vindral-language-menu", ds), customElements.define("vindral-language-menu-list", jn), customElements.define("vindral-message", Tr), customElements.define("vindral-volume-range", _s), customElements.define("vindral-poster-overlay", lr), customElements.define("vindral-player", rr);
|
|
3964
4002
|
}
|
|
3965
4003
|
export {
|
|
3966
4004
|
$o as registerComponents
|