@vindral/web-sdk 4.1.3 → 4.1.4-10-g067921a2
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/{CvnFcokQ.js → BpO0OlSd.js} +1 -1
- package/{ypJV-2eL.js → CvC888uF.js} +1 -1
- package/{DykhWWFG.js → HFu6nUfb.js} +2738 -2746
- package/README.md +6 -0
- package/cast-sender.d.ts +8 -0
- package/core.d.ts +8 -1
- package/core.js +1 -1
- package/legacy.d.ts +8 -1
- package/legacy.es.js +3272 -3281
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.d.ts +11 -3
- package/player.js +687 -690
- package/react.d.ts +13 -5
package/player.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var qr = Object.defineProperty;
|
|
2
|
+
var Xr = Object.getPrototypeOf;
|
|
3
|
+
var jr = Reflect.get;
|
|
4
|
+
var $s = (d) => {
|
|
5
5
|
throw TypeError(d);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
var m = (d, a, t) =>
|
|
9
|
-
var e = (d, a, t) => (
|
|
10
|
-
var q = (d, a, t) =>
|
|
7
|
+
var Yr = (d, a, t) => a in d ? qr(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
|
|
8
|
+
var m = (d, a, t) => Yr(d, typeof a != "symbol" ? a + "" : a, t), Bi = (d, a, t) => a.has(d) || $s("Cannot " + t);
|
|
9
|
+
var e = (d, a, t) => (Bi(d, a, "read from private field"), t ? t.call(d) : a.get(d)), l = (d, a, t) => a.has(d) ? $s("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(d) : a.set(d, t), c = (d, a, t, i) => (Bi(d, a, "write to private field"), i ? i.call(d, t) : a.set(d, t), t), r = (d, a, t) => (Bi(d, a, "access private method"), t);
|
|
10
|
+
var q = (d, a, t) => jr(Xr(d), t, a);
|
|
11
11
|
var G = (d, a, t) => new Promise((i, s) => {
|
|
12
12
|
var o = (v) => {
|
|
13
13
|
try {
|
|
@@ -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
|
|
28
|
-
import { E as
|
|
29
|
-
import { CastSender as
|
|
30
|
-
import { A as
|
|
31
|
-
const
|
|
27
|
+
import { L as Vr, V as Jr, i as Qr, C as Wr, A as Zr, a as to, b as eo } from "./HFu6nUfb.js";
|
|
28
|
+
import { E as hi } from "./Bx7s5QdT.js";
|
|
29
|
+
import { CastSender as io } from "./cast-sender.js";
|
|
30
|
+
import { A as so, d as no } from "./Bs3ZbgIy.js";
|
|
31
|
+
const ji = 1e3, Yi = ji * 1e3, Bs = Yi * 1e3, Ki = (d, a, t) => d % a === 0 ? d / a : (d / a).toFixed(t), ro = (d, a = 1) => d >= Bs ? `${Ki(d, Bs, a)} Gbit/s` : d >= Yi ? `${Ki(d, Yi, a)} Mbit/s` : d >= ji ? `${Ki(d, ji, a)} Kbit/s` : `${d} bit/s`, oo = ({ width: d, height: a }) => `${d}x${a}`, ao = ({
|
|
32
32
|
title: d,
|
|
33
33
|
subTitle: a = "Live stream",
|
|
34
34
|
poster: t
|
|
@@ -53,6 +53,7 @@ const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d
|
|
|
53
53
|
RENDITION_LEVELS: "rendition-levels",
|
|
54
54
|
RENDITION_LEVEL: "rendition-level",
|
|
55
55
|
MAX_VIDEO_BITRATE: "max-video-bit-rate",
|
|
56
|
+
MAX_INITIAL_BITRATE: "max-initial-bit-rate",
|
|
56
57
|
CHANNELS: "channels",
|
|
57
58
|
CHANNEL_ID: "channel-id",
|
|
58
59
|
CHANNEL_GROUP_ID: "channel-group-id",
|
|
@@ -76,7 +77,7 @@ const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d
|
|
|
76
77
|
FULLSCREEN_ENABLED: "fullscreen",
|
|
77
78
|
VU_METER_ENABLED: "vu-meter",
|
|
78
79
|
POSTER_SRC: "poster-src"
|
|
79
|
-
},
|
|
80
|
+
}, Ys = Object.values(n), f = {
|
|
80
81
|
PLAY: "play",
|
|
81
82
|
PAUSE: "pause",
|
|
82
83
|
MUTE: "mute",
|
|
@@ -99,17 +100,17 @@ const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d
|
|
|
99
100
|
function Vs(d) {
|
|
100
101
|
return d === "audio" || d === "video" || d === "audio+video" ? d : "audio+video";
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
+
function qi(d) {
|
|
103
104
|
return d === "trace" || d === "debug" || d === "info" || d === "warn" || d === "error" || d === "off" ? d : "off";
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function lo(d) {
|
|
106
107
|
if (d === null)
|
|
107
108
|
return;
|
|
108
109
|
const a = d.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
|
|
109
110
|
if (a.length !== 0)
|
|
110
111
|
return a;
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function ho(d) {
|
|
113
114
|
if (d !== null)
|
|
114
115
|
try {
|
|
115
116
|
const a = JSON.parse(d);
|
|
@@ -122,7 +123,7 @@ function oo(d) {
|
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function co(d) {
|
|
126
127
|
if (d !== null)
|
|
127
128
|
try {
|
|
128
129
|
const a = JSON.parse(d);
|
|
@@ -139,22 +140,22 @@ function ao(d) {
|
|
|
139
140
|
return;
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function ce(d) {
|
|
143
144
|
if (d === null)
|
|
144
145
|
return;
|
|
145
146
|
const a = parseInt(d, 10);
|
|
146
147
|
return isNaN(a) ? void 0 : a;
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function C(d) {
|
|
149
150
|
return typeof d == "string";
|
|
150
151
|
}
|
|
151
|
-
function
|
|
152
|
+
function N(d, a) {
|
|
152
153
|
if (d === null)
|
|
153
154
|
return a != null ? a : void 0;
|
|
154
155
|
const t = d.toLowerCase();
|
|
155
156
|
return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function Js(d, a) {
|
|
158
159
|
return d === null ? a != null ? a : void 0 : d === "" || d.toLowerCase() === "true" ? !0 : d.toLowerCase() === "false" ? !1 : d;
|
|
159
160
|
}
|
|
160
161
|
function mi(d) {
|
|
@@ -173,8 +174,8 @@ function vi(d) {
|
|
|
173
174
|
const a = d.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
174
175
|
return a.length > 0 ? a : void 0;
|
|
175
176
|
}
|
|
176
|
-
const
|
|
177
|
-
|
|
177
|
+
const Qs = document.createElement("template");
|
|
178
|
+
Qs.innerHTML = /* HTML */
|
|
178
179
|
`
|
|
179
180
|
<style>
|
|
180
181
|
:host {
|
|
@@ -222,12 +223,12 @@ Js.innerHTML = /* HTML */
|
|
|
222
223
|
}
|
|
223
224
|
</style>
|
|
224
225
|
`;
|
|
225
|
-
var Gt,
|
|
226
|
+
var Gt, xe, Nt, Se;
|
|
226
227
|
class tt extends HTMLElement {
|
|
227
228
|
constructor() {
|
|
228
229
|
super();
|
|
229
230
|
l(this, Gt, null);
|
|
230
|
-
l(this,
|
|
231
|
+
l(this, xe, (t) => {
|
|
231
232
|
this.handleClick(t);
|
|
232
233
|
});
|
|
233
234
|
l(this, Nt, (t) => {
|
|
@@ -238,7 +239,7 @@ class tt extends HTMLElement {
|
|
|
238
239
|
}
|
|
239
240
|
this.handleClick(t);
|
|
240
241
|
});
|
|
241
|
-
l(this,
|
|
242
|
+
l(this, Se, (t) => {
|
|
242
243
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
243
244
|
if (i || s || !this.keysUsed.includes(o)) {
|
|
244
245
|
this.removeEventListener("keyup", e(this, Nt));
|
|
@@ -246,7 +247,7 @@ class tt extends HTMLElement {
|
|
|
246
247
|
}
|
|
247
248
|
this.addEventListener("keyup", e(this, Nt), { once: !0 });
|
|
248
249
|
});
|
|
249
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
250
|
+
this.attachShadow({ mode: "open" }).appendChild(Qs.content.cloneNode(!0));
|
|
250
251
|
}
|
|
251
252
|
get keysUsed() {
|
|
252
253
|
return ["Enter", " "];
|
|
@@ -256,27 +257,27 @@ class tt extends HTMLElement {
|
|
|
256
257
|
c(this, Gt, this.closest("vindral-controller")), (t = e(this, Gt)) == null || t.connectListener(this), this.hasAttribute("disabled") || this.enable(), this.setAttribute("role", "button");
|
|
257
258
|
}
|
|
258
259
|
enable() {
|
|
259
|
-
this.addEventListener("click", e(this,
|
|
260
|
+
this.addEventListener("click", e(this, xe)), this.addEventListener("keydown", e(this, Se)), this.tabIndex = 0;
|
|
260
261
|
}
|
|
261
262
|
disable() {
|
|
262
|
-
this.removeEventListener("click", e(this,
|
|
263
|
+
this.removeEventListener("click", e(this, xe)), this.removeEventListener("keydown", e(this, Se)), this.removeEventListener("keyup", e(this, Nt)), this.tabIndex = -1;
|
|
263
264
|
}
|
|
264
265
|
disconnectedCallback() {
|
|
265
266
|
var t;
|
|
266
267
|
(t = e(this, Gt)) == null || t.disconnectListener(this);
|
|
267
268
|
}
|
|
268
269
|
attributeChangedCallback(t, i, s) {
|
|
269
|
-
t === "disabled" && (
|
|
270
|
+
t === "disabled" && (C(s) ? this.disable() : this.enable());
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
|
-
Gt = new WeakMap(),
|
|
273
|
-
const
|
|
273
|
+
Gt = new WeakMap(), xe = new WeakMap(), Nt = new WeakMap(), Se = new WeakMap(), m(tt, "observedAttributes", ["disabled"]);
|
|
274
|
+
const Ws = document.createElement("template"), Ks = (
|
|
274
275
|
/* SVG */
|
|
275
276
|
`
|
|
276
277
|
<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>
|
|
277
278
|
`
|
|
278
279
|
);
|
|
279
|
-
|
|
280
|
+
Ws.innerHTML = /* HTML */
|
|
280
281
|
`
|
|
281
282
|
<style>
|
|
282
283
|
:host {
|
|
@@ -297,26 +298,26 @@ Qs.innerHTML = /* HTML */
|
|
|
297
298
|
</style>
|
|
298
299
|
|
|
299
300
|
<slot name="icon">
|
|
300
|
-
<slot name="enter">${
|
|
301
|
-
<slot name="exit">${
|
|
301
|
+
<slot name="enter">${Ks}</slot>
|
|
302
|
+
<slot name="exit">${Ks}</slot>
|
|
302
303
|
</slot>
|
|
303
304
|
`;
|
|
304
|
-
var
|
|
305
|
-
const
|
|
305
|
+
var Ne, Ji;
|
|
306
|
+
const ve = class ve extends tt {
|
|
306
307
|
constructor() {
|
|
307
308
|
var t;
|
|
308
309
|
super();
|
|
309
|
-
l(this,
|
|
310
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
310
|
+
l(this, Ne);
|
|
311
|
+
(t = this.shadowRoot) == null || t.appendChild(Ws.content.cloneNode(!0));
|
|
311
312
|
}
|
|
312
313
|
connectedCallback() {
|
|
313
|
-
super.connectedCallback(), r(this,
|
|
314
|
+
super.connectedCallback(), r(this, Ne, Ji).call(this);
|
|
314
315
|
}
|
|
315
316
|
disconnectedCallback() {
|
|
316
317
|
super.disconnectedCallback();
|
|
317
318
|
}
|
|
318
319
|
attributeChangedCallback(t, i, s) {
|
|
319
|
-
super.attributeChangedCallback(t, i, s), t === n.IS_AIRPLAYING && r(this,
|
|
320
|
+
super.attributeChangedCallback(t, i, s), t === n.IS_AIRPLAYING && r(this, Ne, Ji).call(this);
|
|
320
321
|
}
|
|
321
322
|
set isAirPlaying(t) {
|
|
322
323
|
t ? this.setAttribute(n.IS_AIRPLAYING, "") : this.removeAttribute(n.IS_AIRPLAYING);
|
|
@@ -328,15 +329,15 @@ const me = class me extends tt {
|
|
|
328
329
|
this.dispatchEvent(new CustomEvent(f.REQUEST_AIRPLAY, { bubbles: !0, composed: !0 }));
|
|
329
330
|
}
|
|
330
331
|
};
|
|
331
|
-
|
|
332
|
+
Ne = new WeakSet(), Ji = function() {
|
|
332
333
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
333
|
-
}, m(
|
|
334
|
-
...q(
|
|
334
|
+
}, m(ve, "observedAttributes", [
|
|
335
|
+
...q(ve, ve, "observedAttributes"),
|
|
335
336
|
n.AIRPLAY_AVAILABLE,
|
|
336
337
|
n.IS_AIRPLAYING
|
|
337
338
|
]);
|
|
338
|
-
let Vi =
|
|
339
|
-
const
|
|
339
|
+
let Vi = ve;
|
|
340
|
+
const Zs = document.createElement("template"), uo = (
|
|
340
341
|
/* SVG */
|
|
341
342
|
`
|
|
342
343
|
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -375,7 +376,7 @@ const Ws = document.createElement("template"), lo = (
|
|
|
375
376
|
</svg>
|
|
376
377
|
`
|
|
377
378
|
);
|
|
378
|
-
|
|
379
|
+
Zs.innerHTML = /* HTML */
|
|
379
380
|
`
|
|
380
381
|
<style>
|
|
381
382
|
:host {
|
|
@@ -391,14 +392,14 @@ Ws.innerHTML = /* HTML */
|
|
|
391
392
|
}
|
|
392
393
|
</style>
|
|
393
394
|
|
|
394
|
-
<slot name="icon">${
|
|
395
|
+
<slot name="icon">${uo}</slot>
|
|
395
396
|
`;
|
|
396
397
|
var $t;
|
|
397
|
-
class
|
|
398
|
+
class tn extends HTMLElement {
|
|
398
399
|
constructor() {
|
|
399
400
|
super();
|
|
400
401
|
l(this, $t, null);
|
|
401
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
402
|
+
this.attachShadow({ mode: "open" }).appendChild(Zs.content.cloneNode(!0));
|
|
402
403
|
}
|
|
403
404
|
connectedCallback() {
|
|
404
405
|
var t;
|
|
@@ -409,9 +410,9 @@ class Zs extends HTMLElement {
|
|
|
409
410
|
(t = e(this, $t)) == null || t.disconnectListener(this);
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
|
-
$t = new WeakMap(), m(
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
$t = new WeakMap(), m(tn, "observedAttributes", [n.BUFFERING]);
|
|
414
|
+
const en = document.createElement("template");
|
|
415
|
+
en.innerHTML = /* HTML */
|
|
415
416
|
`
|
|
416
417
|
<style>
|
|
417
418
|
:host {
|
|
@@ -470,11 +471,11 @@ tn.innerHTML = /* HTML */
|
|
|
470
471
|
<div id="buffering-indicator"></div>
|
|
471
472
|
`;
|
|
472
473
|
var Bt;
|
|
473
|
-
class
|
|
474
|
+
class sn extends HTMLElement {
|
|
474
475
|
constructor() {
|
|
475
476
|
super();
|
|
476
477
|
l(this, Bt, null);
|
|
477
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
478
|
+
this.attachShadow({ mode: "open" }).appendChild(en.content.cloneNode(!0));
|
|
478
479
|
}
|
|
479
480
|
connectedCallback() {
|
|
480
481
|
var t;
|
|
@@ -485,9 +486,9 @@ class en extends HTMLElement {
|
|
|
485
486
|
(t = e(this, Bt)) == null || t.disconnectListener(this);
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
|
-
Bt = new WeakMap(), m(
|
|
489
|
-
const
|
|
490
|
-
|
|
489
|
+
Bt = new WeakMap(), m(sn, "observedAttributes", [n.BUFFERING]);
|
|
490
|
+
const nn = document.createElement("template");
|
|
491
|
+
nn.innerHTML = /* HTML */
|
|
491
492
|
`
|
|
492
493
|
<style>
|
|
493
494
|
:host {
|
|
@@ -512,22 +513,22 @@ sn.innerHTML = /* HTML */
|
|
|
512
513
|
}
|
|
513
514
|
</style>
|
|
514
515
|
`;
|
|
515
|
-
var zt,
|
|
516
|
-
const
|
|
516
|
+
var zt, Wi, rn;
|
|
517
|
+
const ge = class ge extends tt {
|
|
517
518
|
constructor() {
|
|
518
519
|
var t;
|
|
519
520
|
super();
|
|
520
521
|
l(this, zt);
|
|
521
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
522
|
+
(t = this.shadowRoot) == null || t.appendChild(nn.content.cloneNode(!0));
|
|
522
523
|
}
|
|
523
524
|
connectedCallback() {
|
|
524
|
-
super.connectedCallback(), r(this, zt,
|
|
525
|
+
super.connectedCallback(), r(this, zt, Wi).call(this);
|
|
525
526
|
}
|
|
526
527
|
disconnectedCallback() {
|
|
527
528
|
super.disconnectedCallback();
|
|
528
529
|
}
|
|
529
530
|
attributeChangedCallback(t, i, s) {
|
|
530
|
-
super.attributeChangedCallback(t, i, s), t === n.CAST_AVAILABLE && r(this, zt,
|
|
531
|
+
super.attributeChangedCallback(t, i, s), t === n.CAST_AVAILABLE && r(this, zt, rn).call(this), t === n.IS_CASTING && r(this, zt, Wi).call(this);
|
|
531
532
|
}
|
|
532
533
|
set isCasting(t) {
|
|
533
534
|
t ? this.setAttribute(n.IS_CASTING, "") : this.removeAttribute(n.IS_CASTING);
|
|
@@ -538,22 +539,22 @@ const ve = class ve extends tt {
|
|
|
538
539
|
handleClick(t) {
|
|
539
540
|
}
|
|
540
541
|
};
|
|
541
|
-
zt = new WeakSet(),
|
|
542
|
+
zt = new WeakSet(), Wi = function() {
|
|
542
543
|
this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
|
|
543
|
-
},
|
|
544
|
+
}, rn = function() {
|
|
544
545
|
var t, i;
|
|
545
546
|
if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
|
|
546
547
|
const s = document.createElement("google-cast-launcher");
|
|
547
548
|
(i = this.shadowRoot) == null || i.appendChild(s);
|
|
548
549
|
}
|
|
549
|
-
}, m(
|
|
550
|
-
...q(
|
|
550
|
+
}, m(ge, "observedAttributes", [
|
|
551
|
+
...q(ge, ge, "observedAttributes"),
|
|
551
552
|
n.CAST_AVAILABLE,
|
|
552
553
|
n.IS_CASTING
|
|
553
554
|
]);
|
|
554
|
-
let
|
|
555
|
-
const
|
|
556
|
-
|
|
555
|
+
let Qi = ge;
|
|
556
|
+
const on = document.createElement("template");
|
|
557
|
+
on.innerHTML = /* HTML */
|
|
557
558
|
`
|
|
558
559
|
<style>
|
|
559
560
|
:host {
|
|
@@ -590,12 +591,12 @@ rn.innerHTML = /* HTML */
|
|
|
590
591
|
<span id="text"></span>
|
|
591
592
|
`;
|
|
592
593
|
var Kt, qt;
|
|
593
|
-
class
|
|
594
|
+
class an extends HTMLElement {
|
|
594
595
|
constructor() {
|
|
595
596
|
super();
|
|
596
597
|
l(this, Kt, null);
|
|
597
598
|
l(this, qt, null);
|
|
598
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
599
|
+
this.attachShadow({ mode: "open" }).appendChild(on.content.cloneNode(!0));
|
|
599
600
|
}
|
|
600
601
|
connectedCallback() {
|
|
601
602
|
var t, i;
|
|
@@ -609,18 +610,18 @@ class on extends HTMLElement {
|
|
|
609
610
|
i === s || !e(this, qt) || t === "cast-receiver-name" && typeof s == "string" && (e(this, qt).innerText = `Casting to ${s || "device"}`);
|
|
610
611
|
}
|
|
611
612
|
}
|
|
612
|
-
Kt = new WeakMap(), qt = new WeakMap(), m(
|
|
613
|
-
function
|
|
613
|
+
Kt = new WeakMap(), qt = new WeakMap(), m(an, "observedAttributes", [n.IS_CASTING, n.CAST_RECEIVER_NAME]);
|
|
614
|
+
function ln(d = document) {
|
|
614
615
|
const a = d == null ? void 0 : d.activeElement;
|
|
615
616
|
if (!a) return null;
|
|
616
617
|
if (a.shadowRoot) {
|
|
617
|
-
const t =
|
|
618
|
+
const t = ln(a.shadowRoot);
|
|
618
619
|
return t != null ? t : a;
|
|
619
620
|
}
|
|
620
621
|
return a;
|
|
621
622
|
}
|
|
622
|
-
const
|
|
623
|
-
|
|
623
|
+
const hn = document.createElement("template");
|
|
624
|
+
hn.innerHTML = /* HTML */
|
|
624
625
|
`
|
|
625
626
|
<style>
|
|
626
627
|
:host {
|
|
@@ -687,14 +688,14 @@ ln.innerHTML = /* HTML */
|
|
|
687
688
|
</style>
|
|
688
689
|
<slot></slot>
|
|
689
690
|
`;
|
|
690
|
-
var
|
|
691
|
-
class
|
|
691
|
+
var Rt;
|
|
692
|
+
class Ms extends HTMLElement {
|
|
692
693
|
constructor() {
|
|
693
694
|
super();
|
|
694
|
-
l(this,
|
|
695
|
+
l(this, Rt);
|
|
695
696
|
m(this, "lastThumbnailUpdate");
|
|
696
697
|
const t = this.attachShadow({ mode: "open" });
|
|
697
|
-
c(this,
|
|
698
|
+
c(this, Rt, document.createElement("span")), e(this, Rt).className = "channel-title", t.appendChild(e(this, Rt)), t.appendChild(hn.content.cloneNode(!0));
|
|
698
699
|
}
|
|
699
700
|
attributeChangedCallback(t, i, s) {
|
|
700
701
|
if (i !== s)
|
|
@@ -703,7 +704,7 @@ class Ps extends HTMLElement {
|
|
|
703
704
|
this.updateThumbnail();
|
|
704
705
|
break;
|
|
705
706
|
case "title":
|
|
706
|
-
e(this,
|
|
707
|
+
e(this, Rt).textContent = s;
|
|
707
708
|
break;
|
|
708
709
|
}
|
|
709
710
|
}
|
|
@@ -714,9 +715,9 @@ class Ps extends HTMLElement {
|
|
|
714
715
|
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()})`;
|
|
715
716
|
}
|
|
716
717
|
}
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
|
|
718
|
+
Rt = new WeakMap(), m(Ms, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
|
|
719
|
+
const dn = document.createElement("template");
|
|
720
|
+
dn.innerHTML = /* HTML */
|
|
720
721
|
`
|
|
721
722
|
<style>
|
|
722
723
|
:host {
|
|
@@ -784,48 +785,48 @@ hn.innerHTML = /* HTML */
|
|
|
784
785
|
<slot name="grid" id="grid"></slot>
|
|
785
786
|
</div>
|
|
786
787
|
`;
|
|
787
|
-
var
|
|
788
|
-
class
|
|
788
|
+
var mt, vt, Xt, O, T, jt, Re, Ue, _e, k, un, pn, bn, Zi, mn, vn, gn, fn, En, An, yn, ue;
|
|
789
|
+
class cn extends HTMLElement {
|
|
789
790
|
constructor() {
|
|
790
791
|
super();
|
|
791
792
|
l(this, k);
|
|
792
|
-
l(this, bt, null);
|
|
793
793
|
l(this, mt, null);
|
|
794
|
+
l(this, vt, null);
|
|
794
795
|
l(this, Xt, []);
|
|
795
796
|
l(this, O, []);
|
|
796
797
|
l(this, T);
|
|
797
798
|
l(this, jt);
|
|
798
|
-
l(this, Ne);
|
|
799
|
-
l(this, Ue);
|
|
800
799
|
l(this, Re);
|
|
800
|
+
l(this, Ue);
|
|
801
|
+
l(this, _e);
|
|
801
802
|
m(this, "handleEvent", (t) => {
|
|
802
803
|
switch (t.type) {
|
|
803
804
|
case "keydown":
|
|
804
|
-
r(this, k,
|
|
805
|
+
r(this, k, An).call(this, t);
|
|
805
806
|
break;
|
|
806
807
|
}
|
|
807
808
|
});
|
|
808
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
809
|
+
this.attachShadow({ mode: "open" }).appendChild(dn.content.cloneNode(!0));
|
|
809
810
|
}
|
|
810
811
|
connectedCallback() {
|
|
811
812
|
var t, i, s;
|
|
812
|
-
c(this,
|
|
813
|
-
r(this, k,
|
|
813
|
+
c(this, vt, this.closest("vindral-controller")), (t = e(this, vt)) == null || t.connectListener(this), r(this, k, un).call(this), (s = e(this, mt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), r(this, k, Zi).call(this), c(this, Re, window.setInterval(() => {
|
|
814
|
+
r(this, k, fn).call(this);
|
|
814
815
|
}, 1e4));
|
|
815
816
|
}
|
|
816
817
|
disconnectedCallback() {
|
|
817
818
|
var t;
|
|
818
|
-
clearInterval(e(this,
|
|
819
|
+
clearInterval(e(this, Re)), this.removeEventListener("keydown", this), (t = e(this, mt)) == null || t.disconnect();
|
|
819
820
|
}
|
|
820
821
|
attributeChangedCallback(t, i, s) {
|
|
821
822
|
if (i !== s)
|
|
822
823
|
switch (t) {
|
|
823
824
|
case n.CHANNEL_ID: {
|
|
824
|
-
r(this, k,
|
|
825
|
+
r(this, k, gn).call(this, s);
|
|
825
826
|
break;
|
|
826
827
|
}
|
|
827
828
|
case n.CHANNELS:
|
|
828
|
-
c(this, Xt, JSON.parse(s)), r(this, k,
|
|
829
|
+
c(this, Xt, JSON.parse(s)), r(this, k, Zi).call(this);
|
|
829
830
|
break;
|
|
830
831
|
case "authentication-token":
|
|
831
832
|
c(this, jt, s);
|
|
@@ -837,27 +838,27 @@ class dn extends HTMLElement {
|
|
|
837
838
|
}
|
|
838
839
|
focus() {
|
|
839
840
|
var t;
|
|
840
|
-
c(this, Ue,
|
|
841
|
+
c(this, Ue, ln()), (t = e(this, T)) == null || t.focus();
|
|
841
842
|
}
|
|
842
843
|
}
|
|
843
|
-
|
|
844
|
-
c(this,
|
|
844
|
+
mt = new WeakMap(), vt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T = new WeakMap(), jt = new WeakMap(), Re = new WeakMap(), Ue = new WeakMap(), _e = new WeakMap(), k = new WeakSet(), un = function() {
|
|
845
|
+
c(this, mt, new IntersectionObserver(
|
|
845
846
|
(t) => {
|
|
846
847
|
t.forEach((i) => {
|
|
847
848
|
const { target: s, isIntersecting: o } = i;
|
|
848
|
-
s instanceof
|
|
849
|
+
s instanceof Ms ? r(this, k, bn).call(this, s, o) : r(this, k, pn).call(this, o);
|
|
849
850
|
});
|
|
850
851
|
},
|
|
851
852
|
{
|
|
852
|
-
root: e(this,
|
|
853
|
+
root: e(this, vt)
|
|
853
854
|
}
|
|
854
855
|
));
|
|
855
|
-
},
|
|
856
|
+
}, pn = function(t) {
|
|
856
857
|
var i, s;
|
|
857
858
|
if (t) {
|
|
858
859
|
this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 }));
|
|
859
860
|
const o = () => {
|
|
860
|
-
window.clearTimeout(e(this,
|
|
861
|
+
window.clearTimeout(e(this, _e)), c(this, _e, window.setTimeout(() => {
|
|
861
862
|
var p;
|
|
862
863
|
this.focus(), (p = this.parentElement) == null || p.removeEventListener("scroll", o);
|
|
863
864
|
}, 100));
|
|
@@ -865,43 +866,43 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
865
866
|
(i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this, T) && (e(this, T).tabIndex = 0);
|
|
866
867
|
} else
|
|
867
868
|
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
|
-
},
|
|
869
|
+
}, bn = function(t, i) {
|
|
869
870
|
i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
|
|
870
|
-
},
|
|
871
|
+
}, Zi = function() {
|
|
871
872
|
var o;
|
|
872
873
|
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");
|
|
873
874
|
c(this, O, e(this, Xt).map((p) => {
|
|
874
875
|
var g;
|
|
875
876
|
const u = i.get(p.channelId);
|
|
876
877
|
if (u)
|
|
877
|
-
return r(this, k,
|
|
878
|
-
const v = r(this, k,
|
|
879
|
-
return (g = e(this,
|
|
878
|
+
return r(this, k, mn).call(this, u.element, p), u;
|
|
879
|
+
const v = r(this, k, vn).call(this, p, s);
|
|
880
|
+
return (g = e(this, mt)) == null || g.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
|
|
880
881
|
})), i.forEach((p, u) => {
|
|
881
882
|
var v;
|
|
882
|
-
e(this, Xt).some((g) => g.channelId === u) || ((v = e(this,
|
|
883
|
+
e(this, Xt).some((g) => g.channelId === u) || ((v = e(this, mt)) == null || v.unobserve(p.element), p.element.remove());
|
|
883
884
|
}), e(this, O).sort((p, u) => p.element.hasAttribute("offline") && !u.element.hasAttribute("offline") ? 1 : -1).forEach((p) => {
|
|
884
885
|
t.contains(p.element) || t.appendChild(p.element);
|
|
885
886
|
});
|
|
886
|
-
}, bn = function(t, i) {
|
|
887
|
-
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
888
887
|
}, mn = function(t, i) {
|
|
888
|
+
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
889
|
+
}, vn = function(t, i) {
|
|
889
890
|
const s = document.createElement("vindral-channel-grid-item");
|
|
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,
|
|
891
|
-
},
|
|
891
|
+
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, En).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
|
|
892
|
+
}, gn = function(t) {
|
|
892
893
|
e(this, O).forEach((i) => {
|
|
893
894
|
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"));
|
|
894
895
|
});
|
|
895
|
-
},
|
|
896
|
+
}, fn = function() {
|
|
896
897
|
this.hasAttribute("hidden") || e(this, O).forEach((t) => t.element.updateThumbnail());
|
|
897
|
-
}, fn = function(t) {
|
|
898
|
-
var i;
|
|
899
|
-
(i = e(this, mt)) == null || i.setAttribute("channel-id", t.channelId);
|
|
900
898
|
}, En = function(t) {
|
|
899
|
+
var i;
|
|
900
|
+
(i = e(this, vt)) == null || i.setAttribute("channel-id", t.channelId);
|
|
901
|
+
}, An = function(t) {
|
|
901
902
|
var u, v, g;
|
|
902
903
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
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,
|
|
904
|
-
},
|
|
904
|
+
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, vt)) == null || v.focus()) : i === "Enter" || i === " " ? (g = e(this, T)) == null || g.click() : r(this, k, yn).call(this, t));
|
|
905
|
+
}, yn = function(t) {
|
|
905
906
|
var u;
|
|
906
907
|
if (!e(this, T)) return;
|
|
907
908
|
const { key: i } = t;
|
|
@@ -909,19 +910,19 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
909
910
|
const p = e(this, T).getBoundingClientRect();
|
|
910
911
|
switch (i) {
|
|
911
912
|
case "ArrowUp":
|
|
912
|
-
if (o = r(this, k,
|
|
913
|
+
if (o = r(this, k, ue).call(this, p, -1, 0), o < 0) {
|
|
913
914
|
(u = this.parentElement) == null || u.removeAttribute("open");
|
|
914
915
|
return;
|
|
915
916
|
}
|
|
916
917
|
break;
|
|
917
918
|
case "ArrowDown":
|
|
918
|
-
o = r(this, k,
|
|
919
|
+
o = r(this, k, ue).call(this, p, 1, 0);
|
|
919
920
|
break;
|
|
920
921
|
case "ArrowLeft":
|
|
921
|
-
o = r(this, k,
|
|
922
|
+
o = r(this, k, ue).call(this, p, 0, -1);
|
|
922
923
|
break;
|
|
923
924
|
case "ArrowRight":
|
|
924
|
-
o = r(this, k,
|
|
925
|
+
o = r(this, k, ue).call(this, p, 0, 1);
|
|
925
926
|
break;
|
|
926
927
|
case "Home":
|
|
927
928
|
o = 0;
|
|
@@ -935,25 +936,23 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
935
936
|
if (!v) return;
|
|
936
937
|
e(this, T).setAttribute("aria-selected", "false"), e(this, T).tabIndex = -1, c(this, T, v.element), e(this, T).setAttribute("aria-selected", "true"), e(this, T).tabIndex = 0, e(this, T).focus();
|
|
937
938
|
}
|
|
938
|
-
},
|
|
939
|
+
}, ue = function(t, i, s) {
|
|
939
940
|
let o = -1, p = 1 / 0;
|
|
940
941
|
return e(this, O).filter((u) => u.element.getBoundingClientRect().width > 0).forEach((u, v) => {
|
|
941
942
|
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;
|
|
942
943
|
if (P && et) {
|
|
943
|
-
const J = Math.sqrt(
|
|
944
|
-
Math.pow(g.top - t.top, 2) + Math.pow(g.left - t.left, 2)
|
|
945
|
-
);
|
|
944
|
+
const J = Math.sqrt((g.top - t.top) ** 2 + (g.left - t.left) ** 2);
|
|
946
945
|
J < p && (p = J, o = v);
|
|
947
946
|
}
|
|
948
947
|
}), o;
|
|
949
|
-
}, m(
|
|
948
|
+
}, m(cn, "observedAttributes", [
|
|
950
949
|
n.CHANNELS,
|
|
951
950
|
n.CHANNEL_ID,
|
|
952
951
|
n.AUTHENTICATION_TOKEN,
|
|
953
952
|
"mode",
|
|
954
953
|
"hidden"
|
|
955
954
|
]);
|
|
956
|
-
const
|
|
955
|
+
const po = (
|
|
957
956
|
/* SVG */
|
|
958
957
|
`
|
|
959
958
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -964,8 +963,8 @@ const ho = (
|
|
|
964
963
|
<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" />
|
|
965
964
|
</svg>
|
|
966
965
|
`
|
|
967
|
-
),
|
|
968
|
-
|
|
966
|
+
), kn = document.createElement("template");
|
|
967
|
+
kn.innerHTML = /* HTML */
|
|
969
968
|
`
|
|
970
969
|
<style>
|
|
971
970
|
:host {
|
|
@@ -979,48 +978,48 @@ yn.innerHTML = /* HTML */
|
|
|
979
978
|
display: none;
|
|
980
979
|
}
|
|
981
980
|
</style>
|
|
982
|
-
<slot name="button">${
|
|
981
|
+
<slot name="button">${po}</slot>
|
|
983
982
|
`;
|
|
984
|
-
var
|
|
985
|
-
const
|
|
983
|
+
var Yt, _, j, Ii, U, In, es, gi, is, ss;
|
|
984
|
+
const fe = class fe extends tt {
|
|
986
985
|
constructor() {
|
|
987
986
|
var t, i;
|
|
988
987
|
super();
|
|
989
|
-
l(this,
|
|
990
|
-
l(this,
|
|
988
|
+
l(this, U);
|
|
989
|
+
l(this, Yt);
|
|
991
990
|
l(this, _);
|
|
992
991
|
l(this, j);
|
|
993
|
-
l(this,
|
|
994
|
-
t.composedPath().includes(this) || r(this,
|
|
992
|
+
l(this, Ii, (t) => {
|
|
993
|
+
t.composedPath().includes(this) || r(this, U, gi).call(this);
|
|
995
994
|
});
|
|
996
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
995
|
+
(t = this.shadowRoot) == null || t.appendChild(kn.content.cloneNode(!0)), c(this, Yt, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
|
|
997
996
|
}
|
|
998
997
|
connectedCallback() {
|
|
999
998
|
var i;
|
|
1000
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), r(this,
|
|
999
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), r(this, U, is).call(this);
|
|
1001
1000
|
const t = this.getRootNode();
|
|
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,
|
|
1001
|
+
(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, U, ss).call(this);
|
|
1003
1002
|
}
|
|
1004
1003
|
disconnectedCallback() {
|
|
1005
1004
|
}
|
|
1006
1005
|
attributeChangedCallback(t, i, s) {
|
|
1007
|
-
super.attributeChangedCallback(t, i, s), (t === n.CHANNEL_GROUP_ID || t === n.CHANNELS) && r(this,
|
|
1006
|
+
super.attributeChangedCallback(t, i, s), (t === n.CHANNEL_GROUP_ID || t === n.CHANNELS) && r(this, U, is).call(this);
|
|
1008
1007
|
}
|
|
1009
1008
|
enable() {
|
|
1010
|
-
super.enable(), document.addEventListener("click", e(this,
|
|
1009
|
+
super.enable(), document.addEventListener("click", e(this, Ii));
|
|
1011
1010
|
}
|
|
1012
1011
|
handleClick(t) {
|
|
1013
|
-
r(this,
|
|
1012
|
+
r(this, U, In).call(this);
|
|
1014
1013
|
}
|
|
1015
1014
|
get isOpen() {
|
|
1016
1015
|
var t, i;
|
|
1017
1016
|
return ((t = e(this, j)) == null ? void 0 : t.hasAttribute("open")) || !((i = e(this, _)) != null && i.hidden);
|
|
1018
1017
|
}
|
|
1019
1018
|
};
|
|
1020
|
-
|
|
1019
|
+
Yt = new WeakMap(), _ = new WeakMap(), j = new WeakMap(), Ii = new WeakMap(), U = new WeakSet(), In = function() {
|
|
1021
1020
|
var t;
|
|
1022
|
-
e(this, j) ? e(this, j).hasAttribute("open") ? r(this,
|
|
1023
|
-
},
|
|
1021
|
+
e(this, j) ? e(this, j).hasAttribute("open") ? r(this, U, gi).call(this) : r(this, U, es).call(this) : (t = e(this, _)) != null && t.hidden ? r(this, U, es).call(this) : r(this, U, gi).call(this), r(this, U, ss).call(this);
|
|
1022
|
+
}, es = function() {
|
|
1024
1023
|
var t;
|
|
1025
1024
|
if (e(this, j))
|
|
1026
1025
|
e(this, j).setAttribute("open", "");
|
|
@@ -1028,7 +1027,7 @@ Vt = new WeakMap(), _ = new WeakMap(), j = new WeakMap(), wi = new WeakMap(), R
|
|
|
1028
1027
|
if (!((t = e(this, _)) != null && t.hidden)) return;
|
|
1029
1028
|
e(this, _).hidden = !1, e(this, _).focus();
|
|
1030
1029
|
}
|
|
1031
|
-
e(this,
|
|
1030
|
+
e(this, Yt).setAttribute("aria-expanded", "true");
|
|
1032
1031
|
}, gi = function() {
|
|
1033
1032
|
if (e(this, j))
|
|
1034
1033
|
e(this, j).removeAttribute("open");
|
|
@@ -1036,18 +1035,18 @@ Vt = new WeakMap(), _ = new WeakMap(), j = new WeakMap(), wi = new WeakMap(), R
|
|
|
1036
1035
|
if (!e(this, _) || e(this, _).hidden) return;
|
|
1037
1036
|
e(this, _).hidden = !0;
|
|
1038
1037
|
}
|
|
1039
|
-
e(this,
|
|
1040
|
-
}, es = function() {
|
|
1041
|
-
this.getAttribute(n.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(n.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1038
|
+
e(this, Yt).setAttribute("aria-expanded", "false");
|
|
1042
1039
|
}, is = function() {
|
|
1040
|
+
this.getAttribute(n.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(n.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1041
|
+
}, ss = function() {
|
|
1043
1042
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
1044
|
-
}, m(
|
|
1045
|
-
...q(
|
|
1043
|
+
}, m(fe, "observedAttributes", [
|
|
1044
|
+
...q(fe, fe, "observedAttributes"),
|
|
1046
1045
|
n.CHANNEL_GROUP_ID,
|
|
1047
1046
|
n.CHANNELS,
|
|
1048
1047
|
"hidden"
|
|
1049
1048
|
]);
|
|
1050
|
-
let
|
|
1049
|
+
let ts = fe;
|
|
1051
1050
|
const wn = document.createElement("template");
|
|
1052
1051
|
wn.innerHTML = /* HTML */
|
|
1053
1052
|
`
|
|
@@ -1078,7 +1077,7 @@ wn.innerHTML = /* HTML */
|
|
|
1078
1077
|
<slot name="right"></slot>
|
|
1079
1078
|
</slot>
|
|
1080
1079
|
`;
|
|
1081
|
-
class
|
|
1080
|
+
class Cn extends HTMLElement {
|
|
1082
1081
|
constructor() {
|
|
1083
1082
|
super(), this.attachShadow({ mode: "open" }).appendChild(wn.content.cloneNode(!0));
|
|
1084
1083
|
}
|
|
@@ -1087,8 +1086,8 @@ class In extends HTMLElement {
|
|
|
1087
1086
|
disconnectedCallback() {
|
|
1088
1087
|
}
|
|
1089
1088
|
}
|
|
1090
|
-
m(
|
|
1091
|
-
class
|
|
1089
|
+
m(Cn, "observedAttributes", []);
|
|
1090
|
+
class bo extends hi {
|
|
1092
1091
|
constructor(t) {
|
|
1093
1092
|
super();
|
|
1094
1093
|
m(this, "config");
|
|
@@ -1138,7 +1137,6 @@ class co extends li {
|
|
|
1138
1137
|
*/
|
|
1139
1138
|
set channelId(t) {
|
|
1140
1139
|
}
|
|
1141
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-call */
|
|
1142
1140
|
/**
|
|
1143
1141
|
* Show the AirPlay picker.
|
|
1144
1142
|
*/
|
|
@@ -1166,9 +1164,8 @@ class co extends li {
|
|
|
1166
1164
|
}
|
|
1167
1165
|
});
|
|
1168
1166
|
}
|
|
1169
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-call */
|
|
1170
1167
|
}
|
|
1171
|
-
const St = class St extends
|
|
1168
|
+
const St = class St extends hi {
|
|
1172
1169
|
constructor(t) {
|
|
1173
1170
|
super();
|
|
1174
1171
|
m(this, "container");
|
|
@@ -1191,7 +1188,6 @@ const St = class St extends li {
|
|
|
1191
1188
|
}));
|
|
1192
1189
|
m(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen()));
|
|
1193
1190
|
// into the yolo zone
|
|
1194
|
-
/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/unbound-method */
|
|
1195
1191
|
m(this, "isFullscreen", () => !!(document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen));
|
|
1196
1192
|
m(this, "isSupported", () => St.isFullscreenApiSupported(this.container) || !this.isInIframe());
|
|
1197
1193
|
m(this, "isFullscreenApiSupported", () => St.isFullscreenApiSupported(this.container));
|
|
@@ -1212,12 +1208,11 @@ const St = class St extends li {
|
|
|
1212
1208
|
t();
|
|
1213
1209
|
});
|
|
1214
1210
|
}
|
|
1215
|
-
/* eslint-enable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/unbound-method */
|
|
1216
1211
|
};
|
|
1217
1212
|
m(St, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
|
|
1218
|
-
let
|
|
1219
|
-
var
|
|
1220
|
-
class
|
|
1213
|
+
let me = St;
|
|
1214
|
+
var wi, Ci, Li, Ti, Vt, xi, Si, Pe, Jt;
|
|
1215
|
+
class mo extends hi {
|
|
1221
1216
|
constructor(t) {
|
|
1222
1217
|
super();
|
|
1223
1218
|
m(this, "unload", () => {
|
|
@@ -1225,7 +1220,7 @@ class uo extends li {
|
|
|
1225
1220
|
});
|
|
1226
1221
|
m(this, "request", () => G(this, null, function* () {
|
|
1227
1222
|
try {
|
|
1228
|
-
return yield e(this,
|
|
1223
|
+
return yield e(this, wi).call(this);
|
|
1229
1224
|
} catch (t) {
|
|
1230
1225
|
throw this.onChange(), t;
|
|
1231
1226
|
}
|
|
@@ -1241,25 +1236,30 @@ class uo extends li {
|
|
|
1241
1236
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1242
1237
|
});
|
|
1243
1238
|
m(this, "isPictureInPictureActive", () => e(this, Si).call(this) || e(this, xi).call(this));
|
|
1244
|
-
m(this, "isSupported", () => e(this, Jt).call(this) || e(this,
|
|
1245
|
-
l(this,
|
|
1246
|
-
l(this, Ci, () => this.isPictureInPictureActive() ? e(this,
|
|
1239
|
+
m(this, "isSupported", () => e(this, Jt).call(this) || e(this, Vt).call(this));
|
|
1240
|
+
l(this, wi, () => e(this, Vt).call(this) ? e(this, Li).call(this) : e(this, Jt).call(this) ? e(this, Pe).call(this, "picture-in-picture") : Promise.resolve());
|
|
1241
|
+
l(this, Ci, () => this.isPictureInPictureActive() ? e(this, Vt).call(this) ? e(this, Ti).call(this) : e(this, Jt).call(this) ? e(this, Pe).call(this, "inline") : Promise.resolve() : Promise.resolve());
|
|
1247
1242
|
l(this, Li, () => G(this, null, function* () {
|
|
1248
1243
|
yield this.element.requestPictureInPicture();
|
|
1249
1244
|
}));
|
|
1250
1245
|
l(this, Ti, () => G(null, null, function* () {
|
|
1251
1246
|
yield document.exitPictureInPicture();
|
|
1252
1247
|
}));
|
|
1253
|
-
l(this,
|
|
1248
|
+
l(this, Vt, () => !!this.element.requestPictureInPicture && !!document.pictureInPictureEnabled);
|
|
1254
1249
|
l(this, xi, () => !!document.pictureInPictureElement);
|
|
1255
1250
|
l(this, Si, () => this.element.webkitPresentationMode === "picture-in-picture");
|
|
1256
|
-
l(this,
|
|
1251
|
+
l(this, Pe, (t) => (this.element.webkitSetPresentationMode && this.element.webkitSetPresentationMode(t), Promise.resolve()));
|
|
1257
1252
|
l(this, Jt, () => !!this.element.webkitSetPresentationMode);
|
|
1258
1253
|
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.setAttribute("autopictureinpicture", "");
|
|
1259
1254
|
}
|
|
1260
1255
|
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1256
|
+
wi = new WeakMap(), Ci = new WeakMap(), Li = new WeakMap(), Ti = new WeakMap(), Vt = new WeakMap(), xi = new WeakMap(), Si = new WeakMap(), Pe = new WeakMap(), Jt = new WeakMap();
|
|
1257
|
+
const qs = (d) => {
|
|
1258
|
+
var t;
|
|
1259
|
+
let a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0;
|
|
1260
|
+
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) => Ys.includes(i)) : [];
|
|
1261
|
+
};
|
|
1262
|
+
class Xs extends hi {
|
|
1263
1263
|
constructor(t) {
|
|
1264
1264
|
super();
|
|
1265
1265
|
m(this, "audioContext");
|
|
@@ -1322,12 +1322,8 @@ class Ks extends li {
|
|
|
1322
1322
|
return this.source instanceof HTMLMediaElement;
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
let a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0;
|
|
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 */
|
|
1325
|
+
const Ln = document.createElement("template");
|
|
1326
|
+
Ln.innerHTML = /* HTML */
|
|
1331
1327
|
`
|
|
1332
1328
|
<style>
|
|
1333
1329
|
:host {
|
|
@@ -1339,8 +1335,8 @@ Cn.innerHTML = /* HTML */
|
|
|
1339
1335
|
}
|
|
1340
1336
|
</style>
|
|
1341
1337
|
`;
|
|
1342
|
-
var Qt, Wt, $,
|
|
1343
|
-
class
|
|
1338
|
+
var Qt, Wt, $, Me, Ni, Ri, he, Tn, xn;
|
|
1339
|
+
class Ds extends tt {
|
|
1344
1340
|
constructor() {
|
|
1345
1341
|
var t;
|
|
1346
1342
|
super();
|
|
@@ -1348,14 +1344,14 @@ class Ms extends tt {
|
|
|
1348
1344
|
l(this, Qt);
|
|
1349
1345
|
l(this, Wt);
|
|
1350
1346
|
l(this, $);
|
|
1351
|
-
l(this,
|
|
1347
|
+
l(this, Me, null);
|
|
1352
1348
|
l(this, Ni, (t) => {
|
|
1353
1349
|
t.composedPath().includes(this) || this.hide();
|
|
1354
1350
|
});
|
|
1355
|
-
l(this,
|
|
1351
|
+
l(this, Ri, () => {
|
|
1356
1352
|
this.hide();
|
|
1357
1353
|
});
|
|
1358
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1354
|
+
(t = this.shadowRoot) == null || t.appendChild(Ln.content.cloneNode(!0));
|
|
1359
1355
|
}
|
|
1360
1356
|
connectedCallback() {
|
|
1361
1357
|
var p, u, v, g;
|
|
@@ -1365,7 +1361,7 @@ class Ms extends tt {
|
|
|
1365
1361
|
const i = this.getRootNode(), o = [...(g = (v = this.shadowRoot) == null ? void 0 : v.querySelectorAll(":not(:defined)")) != null ? g : []].map((P) => customElements.whenDefined(P.localName));
|
|
1366
1362
|
Promise.all(o).then(() => {
|
|
1367
1363
|
var P;
|
|
1368
|
-
(i instanceof Document || i instanceof ShadowRoot) && (c(this,
|
|
1364
|
+
(i instanceof Document || i instanceof ShadowRoot) && (c(this, Me, i.querySelector("vindral-controller")), (P = e(this, Me)) == null || P.connectListener(this));
|
|
1369
1365
|
});
|
|
1370
1366
|
}
|
|
1371
1367
|
set button(t) {
|
|
@@ -1378,25 +1374,25 @@ class Ms extends tt {
|
|
|
1378
1374
|
c(this, $, t);
|
|
1379
1375
|
}
|
|
1380
1376
|
enable() {
|
|
1381
|
-
super.enable(), this.addEventListener("change", e(this,
|
|
1377
|
+
super.enable(), this.addEventListener("change", e(this, Ri)), document.addEventListener("click", e(this, Ni));
|
|
1382
1378
|
}
|
|
1383
1379
|
hide() {
|
|
1384
1380
|
var t, i;
|
|
1385
1381
|
!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());
|
|
1386
1382
|
}
|
|
1387
1383
|
handleClick(t) {
|
|
1388
|
-
e(this, $) && !t.composedPath().includes(e(this, $)) && r(this, he,
|
|
1384
|
+
e(this, $) && !t.composedPath().includes(e(this, $)) && r(this, he, Tn).call(this);
|
|
1389
1385
|
}
|
|
1390
1386
|
}
|
|
1391
|
-
Qt = new WeakMap(), Wt = new WeakMap(), $ = new WeakMap(),
|
|
1387
|
+
Qt = new WeakMap(), Wt = new WeakMap(), $ = new WeakMap(), Me = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(), he = new WeakSet(), Tn = function() {
|
|
1392
1388
|
var t;
|
|
1393
|
-
(t = e(this, $)) != null && t.hidden ? r(this, he,
|
|
1394
|
-
},
|
|
1389
|
+
(t = e(this, $)) != null && t.hidden ? r(this, he, xn).call(this) : this.hide();
|
|
1390
|
+
}, xn = function() {
|
|
1395
1391
|
var t, i, s;
|
|
1396
1392
|
(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 })));
|
|
1397
1393
|
};
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1394
|
+
const Sn = document.createElement("template");
|
|
1395
|
+
Sn.innerHTML = /* HTML */
|
|
1400
1396
|
`
|
|
1401
1397
|
<style>
|
|
1402
1398
|
:host {
|
|
@@ -1499,28 +1495,28 @@ xn.innerHTML = /* HTML */
|
|
|
1499
1495
|
<input type="range" id="range" min="0" max="1" step="any" value="0" />
|
|
1500
1496
|
<div id="range-track"></div>
|
|
1501
1497
|
`;
|
|
1502
|
-
var Zt, te,
|
|
1503
|
-
class
|
|
1498
|
+
var Zt, te, De, Oe;
|
|
1499
|
+
class Os extends HTMLElement {
|
|
1504
1500
|
constructor() {
|
|
1505
1501
|
super();
|
|
1506
1502
|
l(this, Zt, null);
|
|
1507
1503
|
l(this, te);
|
|
1508
1504
|
m(this, "range");
|
|
1509
|
-
l(this,
|
|
1505
|
+
l(this, De, () => {
|
|
1510
1506
|
this.range.matches(":focus-visible") && this.style.setProperty("--_focus-visible-box-shadow", "inset 0 0 0 2px var(--fg-strong)");
|
|
1511
1507
|
});
|
|
1512
|
-
l(this,
|
|
1508
|
+
l(this, Oe, () => {
|
|
1513
1509
|
this.style.removeProperty("--_focus-visible-box-shadow");
|
|
1514
1510
|
});
|
|
1515
|
-
c(this, te, this.attachShadow({ mode: "open" })), e(this, te).appendChild(
|
|
1511
|
+
c(this, te, this.attachShadow({ mode: "open" })), e(this, te).appendChild(Sn.content.cloneNode(!0)), this.range = e(this, te).getElementById("range");
|
|
1516
1512
|
}
|
|
1517
1513
|
connectedCallback() {
|
|
1518
1514
|
var t;
|
|
1519
|
-
c(this, Zt, this.closest("vindral-controller")), (t = e(this, Zt)) == null || t.connectListener(this), this.hasAttribute("disabled") || this.enable(), this.range.addEventListener("focusin", e(this,
|
|
1515
|
+
c(this, Zt, this.closest("vindral-controller")), (t = e(this, Zt)) == null || t.connectListener(this), this.hasAttribute("disabled") || this.enable(), this.range.addEventListener("focusin", e(this, De)), this.range.addEventListener("focusout", e(this, Oe));
|
|
1520
1516
|
}
|
|
1521
1517
|
disconnectedCallback() {
|
|
1522
1518
|
var t;
|
|
1523
|
-
(t = e(this, Zt)) == null || t.disconnectListener(this), this.range.removeEventListener("focusin", e(this,
|
|
1519
|
+
(t = e(this, Zt)) == null || t.disconnectListener(this), this.range.removeEventListener("focusin", e(this, De)), this.range.removeEventListener("focusout", e(this, Oe));
|
|
1524
1520
|
}
|
|
1525
1521
|
attributeChangedCallback(t, i, s) {
|
|
1526
1522
|
i !== s && (t === "disabled" && s ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1541,9 +1537,9 @@ class Ds extends HTMLElement {
|
|
|
1541
1537
|
return ["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"];
|
|
1542
1538
|
}
|
|
1543
1539
|
}
|
|
1544
|
-
Zt = new WeakMap(), te = new WeakMap(),
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1540
|
+
Zt = new WeakMap(), te = new WeakMap(), De = new WeakMap(), Oe = new WeakMap(), m(Os, "observedAttributes", ["disabled"]);
|
|
1541
|
+
const Nn = document.createElement("template");
|
|
1542
|
+
Nn.innerHTML = /* HTML */
|
|
1547
1543
|
`
|
|
1548
1544
|
<style>
|
|
1549
1545
|
:host {
|
|
@@ -1727,62 +1723,63 @@ Sn.innerHTML = /* HTML */
|
|
|
1727
1723
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1728
1724
|
</div>
|
|
1729
1725
|
`;
|
|
1730
|
-
const
|
|
1731
|
-
var
|
|
1732
|
-
const
|
|
1726
|
+
const Xi = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
1727
|
+
var Ui, it, Fe, gt, ft, b, He, st, nt, ee, _i, rt, B, Y, F, ot, ze, Ge, R, Et, h, ns, Rn, Un, _n, rs, Pn, Mn, Dn, $e, On, Fn, Hn, zn, Be, Pi, Mi, Gn, Ut, os, as, fi, pt, $n, Bn, Kn, ls, Di, Oi, hs, E, I;
|
|
1728
|
+
const Ee = class Ee extends HTMLElement {
|
|
1733
1729
|
constructor() {
|
|
1734
1730
|
super();
|
|
1735
1731
|
l(this, h);
|
|
1736
1732
|
l(this, it, /* @__PURE__ */ new Map());
|
|
1737
|
-
l(this,
|
|
1738
|
-
l(this, vt, null);
|
|
1733
|
+
l(this, Fe, 2e3);
|
|
1739
1734
|
l(this, gt, null);
|
|
1735
|
+
l(this, ft, null);
|
|
1740
1736
|
l(this, b);
|
|
1741
|
-
l(this,
|
|
1737
|
+
l(this, He, e(Ee, Ui));
|
|
1742
1738
|
l(this, st);
|
|
1743
1739
|
l(this, nt);
|
|
1744
1740
|
l(this, ee);
|
|
1741
|
+
l(this, _i);
|
|
1745
1742
|
l(this, rt);
|
|
1746
1743
|
l(this, B);
|
|
1747
|
-
l(this,
|
|
1744
|
+
l(this, Y);
|
|
1748
1745
|
l(this, F);
|
|
1749
1746
|
l(this, ot);
|
|
1750
|
-
l(this, He);
|
|
1751
1747
|
l(this, ze);
|
|
1752
|
-
l(this,
|
|
1753
|
-
l(this,
|
|
1754
|
-
l(this,
|
|
1748
|
+
l(this, Ge);
|
|
1749
|
+
l(this, R);
|
|
1750
|
+
l(this, Et, null);
|
|
1751
|
+
l(this, $e, 0);
|
|
1755
1752
|
m(this, "handleEvent", (t) => {
|
|
1756
1753
|
switch (t.type) {
|
|
1757
1754
|
case "pointerdown":
|
|
1758
|
-
c(this,
|
|
1755
|
+
c(this, $e, t.timeStamp);
|
|
1759
1756
|
break;
|
|
1760
1757
|
case "pointermove":
|
|
1761
|
-
r(this, h,
|
|
1758
|
+
r(this, h, On).call(this, t);
|
|
1762
1759
|
break;
|
|
1763
1760
|
case "pointerup":
|
|
1764
|
-
r(this, h,
|
|
1761
|
+
r(this, h, Fn).call(this, t);
|
|
1765
1762
|
break;
|
|
1766
1763
|
case "mouseleave":
|
|
1767
1764
|
r(this, h, pt).call(this);
|
|
1768
1765
|
break;
|
|
1769
1766
|
case "dblclick":
|
|
1770
|
-
r(this, h,
|
|
1767
|
+
r(this, h, Hn).call(this, t);
|
|
1771
1768
|
break;
|
|
1772
1769
|
case "mousemove":
|
|
1773
|
-
r(this, h,
|
|
1770
|
+
r(this, h, zn).call(this, t);
|
|
1774
1771
|
break;
|
|
1775
1772
|
case "keydown":
|
|
1776
|
-
e(this,
|
|
1773
|
+
e(this, Mi).call(this, t);
|
|
1777
1774
|
break;
|
|
1778
1775
|
case "keyup":
|
|
1779
|
-
r(this, h, pt).call(this), e(this,
|
|
1776
|
+
r(this, h, pt).call(this), e(this, Pi).call(this, t);
|
|
1780
1777
|
break;
|
|
1781
1778
|
}
|
|
1782
1779
|
});
|
|
1783
|
-
l(this,
|
|
1780
|
+
l(this, Be, (t) => {
|
|
1784
1781
|
var i;
|
|
1785
|
-
if (e(this, b) && (e(this,
|
|
1782
|
+
if (e(this, b) && (e(this, R).debug("Vindral event", { type: t.type }), t instanceof CustomEvent))
|
|
1786
1783
|
switch (t.type) {
|
|
1787
1784
|
case f.PLAY:
|
|
1788
1785
|
this.removeAttribute(n.PAUSED);
|
|
@@ -1815,11 +1812,11 @@ const fe = class fe extends HTMLElement {
|
|
|
1815
1812
|
}
|
|
1816
1813
|
break;
|
|
1817
1814
|
case f.CHANNEL_GRID_OPENED: {
|
|
1818
|
-
e(this,
|
|
1815
|
+
e(this, Et) === null && r(this, h, os).call(this);
|
|
1819
1816
|
break;
|
|
1820
1817
|
}
|
|
1821
1818
|
case f.CHANNEL_GRID_CLOSED: {
|
|
1822
|
-
e(this,
|
|
1819
|
+
e(this, Et) !== null && (clearTimeout(e(this, Et)), c(this, Et, null));
|
|
1823
1820
|
break;
|
|
1824
1821
|
}
|
|
1825
1822
|
case f.ENTER_PIP:
|
|
@@ -1829,13 +1826,13 @@ const fe = class fe extends HTMLElement {
|
|
|
1829
1826
|
this.removeAttribute(n.IS_PIP);
|
|
1830
1827
|
break;
|
|
1831
1828
|
case f.REQUEST_AIRPLAY:
|
|
1832
|
-
(i = e(this,
|
|
1829
|
+
(i = e(this, Y)) == null || i.showPlaybackTargetPicker();
|
|
1833
1830
|
break;
|
|
1834
1831
|
case f.SET_LANGUAGE:
|
|
1835
|
-
|
|
1832
|
+
C(t.detail) ? this.setAttribute(n.LANGUAGE, t.detail) : this.removeAttribute(n.LANGUAGE);
|
|
1836
1833
|
break;
|
|
1837
1834
|
case f.SET_TEXT_TRACK:
|
|
1838
|
-
|
|
1835
|
+
C(t.detail) ? this.setAttribute(n.TEXT_TRACK, t.detail) : this.removeAttribute(n.TEXT_TRACK);
|
|
1839
1836
|
break;
|
|
1840
1837
|
case f.REQUEST_USER_INPUT:
|
|
1841
1838
|
e(this, b).play(), e(this, b).muted = !1;
|
|
@@ -1848,20 +1845,20 @@ const fe = class fe extends HTMLElement {
|
|
|
1848
1845
|
break;
|
|
1849
1846
|
}
|
|
1850
1847
|
});
|
|
1851
|
-
l(this,
|
|
1848
|
+
l(this, Pi, (t) => {
|
|
1852
1849
|
const { key: i } = t;
|
|
1853
|
-
if (!
|
|
1850
|
+
if (!Xi.includes(i)) {
|
|
1854
1851
|
this.removeEventListener("keyup", this);
|
|
1855
1852
|
return;
|
|
1856
1853
|
}
|
|
1857
|
-
r(this, h,
|
|
1854
|
+
r(this, h, Gn).call(this, t);
|
|
1858
1855
|
});
|
|
1859
|
-
l(this,
|
|
1856
|
+
l(this, Mi, (t) => {
|
|
1860
1857
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
1861
|
-
i || s || !
|
|
1858
|
+
i || s || !Xi.includes(o) || this.addEventListener("keyup", this, { once: !0 });
|
|
1862
1859
|
});
|
|
1863
|
-
l(this,
|
|
1864
|
-
l(this,
|
|
1860
|
+
l(this, Ut, null);
|
|
1861
|
+
l(this, Di, () => {
|
|
1865
1862
|
var i, s, o;
|
|
1866
1863
|
if (!("orientation" in screen) || !screen.orientation.lock)
|
|
1867
1864
|
return;
|
|
@@ -1869,18 +1866,18 @@ const fe = class fe extends HTMLElement {
|
|
|
1869
1866
|
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(() => {
|
|
1870
1867
|
});
|
|
1871
1868
|
});
|
|
1872
|
-
l(this,
|
|
1869
|
+
l(this, Oi, () => {
|
|
1873
1870
|
!("orientation" in screen) || !screen.orientation.unlock || screen.orientation.unlock();
|
|
1874
1871
|
});
|
|
1875
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
1876
|
-
const i =
|
|
1877
|
-
c(this,
|
|
1872
|
+
this.attachShadow({ mode: "open" }).appendChild(Nn.content.cloneNode(!0));
|
|
1873
|
+
const i = qi(this.getAttribute("log-level"));
|
|
1874
|
+
c(this, R, Vr.get().createContext("VindralController")), e(this, R).setLevel(i);
|
|
1878
1875
|
}
|
|
1879
1876
|
connectedCallback() {
|
|
1880
1877
|
return G(this, null, function* () {
|
|
1881
|
-
|
|
1878
|
+
N(this.getAttribute("auto-instance-enabled"), !0) && (yield r(this, h, ns).call(this));
|
|
1882
1879
|
for (const i of Object.values(f))
|
|
1883
|
-
this.addEventListener(i, e(this,
|
|
1880
|
+
this.addEventListener(i, e(this, Be));
|
|
1884
1881
|
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 });
|
|
1885
1882
|
});
|
|
1886
1883
|
}
|
|
@@ -1888,24 +1885,24 @@ const fe = class fe extends HTMLElement {
|
|
|
1888
1885
|
var t, i, s, o;
|
|
1889
1886
|
(t = e(this, b)) == null || t.unload(), (i = e(this, rt)) == null || i.unload(), (s = e(this, B)) == null || s.unload(), (o = e(this, F)) == null || o.unload();
|
|
1890
1887
|
for (const p of Object.values(f))
|
|
1891
|
-
this.removeEventListener(p, e(this,
|
|
1888
|
+
this.removeEventListener(p, e(this, Be));
|
|
1892
1889
|
this.disconnectListener(this);
|
|
1893
1890
|
}
|
|
1894
1891
|
attributeChangedCallback(t, i, s) {
|
|
1895
|
-
var o, p, u, v, g, P, et, J,
|
|
1892
|
+
var o, p, u, v, g, P, et, J, Lt, Tt, xt, di, ci, ui, pi;
|
|
1896
1893
|
if (i != s)
|
|
1897
|
-
switch (e(this,
|
|
1894
|
+
switch (e(this, R).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
1898
1895
|
case "channel-id":
|
|
1899
|
-
c(this, st, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), r(this, h,
|
|
1896
|
+
c(this, st, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), r(this, h, E).call(this, n.BUFFERING, ""), r(this, h, E).call(this, n.CHANNEL_ID, s), r(this, h, E).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl()));
|
|
1900
1897
|
break;
|
|
1901
1898
|
case "channel-group-id":
|
|
1902
1899
|
c(this, nt, s);
|
|
1903
1900
|
break;
|
|
1904
1901
|
case "url":
|
|
1905
|
-
s && c(this,
|
|
1902
|
+
s && c(this, He, s);
|
|
1906
1903
|
break;
|
|
1907
1904
|
case "paused":
|
|
1908
|
-
|
|
1905
|
+
C(s) ? (o = e(this, b)) == null || o.pause() : (r(this, h, I).call(this, n.NEEDS_USER_INPUT_VIDEO), (p = e(this, b)) == null || p.play());
|
|
1909
1906
|
break;
|
|
1910
1907
|
case "target-buffer-time":
|
|
1911
1908
|
if (e(this, b) && s) {
|
|
@@ -1914,63 +1911,66 @@ const fe = class fe extends HTMLElement {
|
|
|
1914
1911
|
}
|
|
1915
1912
|
break;
|
|
1916
1913
|
case "user-interacting":
|
|
1917
|
-
|
|
1914
|
+
C(s) ? r(this, h, E).call(this, n.USER_INTERACTING, "") : r(this, h, I).call(this, n.USER_INTERACTING);
|
|
1918
1915
|
break;
|
|
1919
1916
|
case "muted":
|
|
1920
|
-
e(this, b) && (
|
|
1917
|
+
e(this, b) && (C(s) ? (e(this, b).muted = !0, r(this, h, E).call(this, n.MUTED, ""), (u = e(this, F)) != null && u.isMediaElementSource && ((v = e(this, F)) == null || v.stop(), r(this, h, E).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, r(this, h, I).call(this, n.MUTED), r(this, h, I).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()));
|
|
1921
1918
|
break;
|
|
1922
1919
|
case "ui-locked":
|
|
1923
|
-
|
|
1920
|
+
C(s) ? r(this, h, fi).call(this) : r(this, h, pt).call(this);
|
|
1924
1921
|
break;
|
|
1925
1922
|
case "is-fullscreen":
|
|
1926
|
-
|
|
1923
|
+
C(s) ? r(this, h, Kn).call(this) : r(this, h, ls).call(this);
|
|
1927
1924
|
break;
|
|
1928
1925
|
case "max-video-bit-rate":
|
|
1929
|
-
c(this, ee, s),
|
|
1926
|
+
c(this, ee, s), C(s) ? r(this, h, E).call(this, n.MAX_VIDEO_BITRATE, s) : r(this, h, I).call(this, n.MAX_VIDEO_BITRATE);
|
|
1927
|
+
break;
|
|
1928
|
+
case "max-initial-bit-rate":
|
|
1929
|
+
c(this, _i, s), C(s) ? r(this, h, E).call(this, n.MAX_INITIAL_BITRATE, s) : r(this, h, I).call(this, n.MAX_INITIAL_BITRATE);
|
|
1930
1930
|
break;
|
|
1931
1931
|
case "is-pip":
|
|
1932
|
-
|
|
1932
|
+
C(s) ? r(this, h, $n).call(this) : r(this, h, Bn).call(this);
|
|
1933
1933
|
break;
|
|
1934
1934
|
case "is-airplaying":
|
|
1935
|
-
|
|
1935
|
+
C(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");
|
|
1936
1936
|
break;
|
|
1937
1937
|
case "is-casting":
|
|
1938
|
-
|
|
1938
|
+
C(s) ? ((Lt = e(this, B)) != null && Lt.isFullscreen() && r(this, h, ls).call(this), (Tt = e(this, b)) == null || Tt.pause()) : document.hidden || (xt = e(this, b)) == null || xt.play();
|
|
1939
1939
|
break;
|
|
1940
1940
|
case "cast-receiver-id":
|
|
1941
|
-
c(this,
|
|
1941
|
+
c(this, ze, s);
|
|
1942
1942
|
break;
|
|
1943
1943
|
case "cast-background":
|
|
1944
|
-
c(this,
|
|
1944
|
+
c(this, Ge, s);
|
|
1945
1945
|
break;
|
|
1946
1946
|
case "language":
|
|
1947
|
-
e(this, b) && (e(this, b).language = s,
|
|
1947
|
+
e(this, b) && (e(this, b).language = s, C(s) ? r(this, h, E).call(this, n.LANGUAGE, s) : r(this, h, I).call(this, n.LANGUAGE));
|
|
1948
1948
|
break;
|
|
1949
1949
|
case "text-track":
|
|
1950
|
-
e(this, b) && (e(this, b).textTrack = s,
|
|
1950
|
+
e(this, b) && (e(this, b).textTrack = s, C(s) ? r(this, h, E).call(this, n.TEXT_TRACK, s) : r(this, h, I).call(this, n.TEXT_TRACK));
|
|
1951
1951
|
break;
|
|
1952
1952
|
case "log-level":
|
|
1953
|
-
|
|
1953
|
+
C(s) && e(this, R).setLevel(qi(s));
|
|
1954
1954
|
break;
|
|
1955
1955
|
case "authentication-token":
|
|
1956
|
-
|
|
1956
|
+
C(s) ? ((di = e(this, b)) == null || di.updateAuthenticationToken(s), (ci = e(this, Y)) == null || ci.updateAuthenticationToken(s), r(this, h, E).call(this, n.AUTHENTICATION_TOKEN, s)) : r(this, h, I).call(this, n.AUTHENTICATION_TOKEN);
|
|
1957
1957
|
break;
|
|
1958
1958
|
case "volume":
|
|
1959
|
-
if (e(this, b) &&
|
|
1959
|
+
if (e(this, b) && C(s)) {
|
|
1960
1960
|
const z = parseFloat(s);
|
|
1961
1961
|
e(this, b).volume = z;
|
|
1962
1962
|
}
|
|
1963
1963
|
break;
|
|
1964
1964
|
case "drm-headers":
|
|
1965
|
-
if (
|
|
1965
|
+
if (C(s)) {
|
|
1966
1966
|
const z = mi(s);
|
|
1967
|
-
z ? (
|
|
1967
|
+
z ? (ui = e(this, b)) == null || ui.drm.setHeaders(z) : e(this, R).warn("Invalid DRM headers format:", s);
|
|
1968
1968
|
}
|
|
1969
1969
|
break;
|
|
1970
1970
|
case "drm-queryparams":
|
|
1971
|
-
if (
|
|
1971
|
+
if (C(s)) {
|
|
1972
1972
|
const z = mi(s);
|
|
1973
|
-
z ? (
|
|
1973
|
+
z ? (pi = e(this, b)) == null || pi.drm.setQueryParams(z) : e(this, R).warn("Invalid DRM query parameters format:", s);
|
|
1974
1974
|
}
|
|
1975
1975
|
break;
|
|
1976
1976
|
}
|
|
@@ -2016,18 +2016,18 @@ const fe = class fe extends HTMLElement {
|
|
|
2016
2016
|
return e(this, b);
|
|
2017
2017
|
}
|
|
2018
2018
|
get airPlay() {
|
|
2019
|
-
return e(this,
|
|
2019
|
+
return e(this, Y);
|
|
2020
2020
|
}
|
|
2021
2021
|
connect() {
|
|
2022
|
-
r(this, h,
|
|
2022
|
+
r(this, h, ns).call(this);
|
|
2023
2023
|
}
|
|
2024
2024
|
};
|
|
2025
|
-
|
|
2025
|
+
Ui = new WeakMap(), it = new WeakMap(), Fe = new WeakMap(), gt = new WeakMap(), ft = new WeakMap(), b = new WeakMap(), He = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), ee = new WeakMap(), _i = new WeakMap(), rt = new WeakMap(), B = new WeakMap(), Y = new WeakMap(), F = new WeakMap(), ot = new WeakMap(), ze = new WeakMap(), Ge = new WeakMap(), R = new WeakMap(), Et = new WeakMap(), h = new WeakSet(), ns = function() {
|
|
2026
2026
|
return G(this, null, function* () {
|
|
2027
|
-
var
|
|
2027
|
+
var zs, Gs;
|
|
2028
2028
|
if (!e(this, st)) return;
|
|
2029
|
-
yield (
|
|
2030
|
-
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 =
|
|
2029
|
+
yield (zs = e(this, b)) == null ? void 0 : zs.unload();
|
|
2030
|
+
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 = ce(this.getAttribute("max-video-bit-rate")), g = ce(this.getAttribute("max-initial-bit-rate")), P = ho(this.getAttribute("max-size")), et = ce(this.getAttribute("min-buffer-time")), J = ce(this.getAttribute("max-buffer-time")), Lt = N(this.getAttribute("burst-enabled")), Tt = N(this.getAttribute("mse-enabled")), xt = N(this.getAttribute("mse-opus-enabled")), di = N(this.getAttribute("ios-background-play-enabled")), ci = N(this.getAttribute("ios-wake-lock-enabled")), ui = N(this.getAttribute("ios-media-element-enabled")), pi = N(this.getAttribute("abr-enabled")), z = N(this.getAttribute("size-based-resolution-cap-enabled")), Ur = N(this.getAttribute("telemetry-enabled")), _r = lo(this.getAttribute("video-codecs")), Fs = Js(this.getAttribute("poster")), Pr = co(this.getAttribute("advanced")), Mr = qi(this.getAttribute("log-level")), Dr = {
|
|
2031
2031
|
headers: mi(this.getAttribute("drm-headers")),
|
|
2032
2032
|
queryParams: mi(this.getAttribute("drm-queryparams")),
|
|
2033
2033
|
widevine: {
|
|
@@ -2038,152 +2038,153 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2038
2038
|
videoRobustness: vi(this.getAttribute("drm-playready-video-robustness")),
|
|
2039
2039
|
audioRobustness: vi(this.getAttribute("drm-playready-audio-robustness"))
|
|
2040
2040
|
}
|
|
2041
|
-
},
|
|
2042
|
-
c(this, b, new
|
|
2043
|
-
url: e(this,
|
|
2041
|
+
}, Or = N(this.getAttribute("webtransport-enabled")), Hs = ce(this.getAttribute("reconnect-retries")), Fr = Hs !== void 0 ? (y) => y.reconnectRetries < Hs : void 0, Hr = this.getAttribute("language") || void 0;
|
|
2042
|
+
c(this, b, new Jr({
|
|
2043
|
+
url: e(this, He),
|
|
2044
2044
|
channelId: e(this, st),
|
|
2045
2045
|
channelGroupId: e(this, nt),
|
|
2046
2046
|
edgeUrl: p,
|
|
2047
2047
|
authenticationToken: u,
|
|
2048
2048
|
muted: i,
|
|
2049
2049
|
media: s,
|
|
2050
|
-
maxSize:
|
|
2050
|
+
maxSize: P,
|
|
2051
2051
|
maxVideoBitRate: v,
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2052
|
+
maxInitialBitRate: g,
|
|
2053
|
+
minBufferTime: et,
|
|
2054
|
+
maxBufferTime: J,
|
|
2055
|
+
burstEnabled: Lt,
|
|
2056
|
+
mseEnabled: Tt,
|
|
2057
|
+
mseOpusEnabled: xt,
|
|
2058
|
+
iosBackgroundPlayEnabled: di,
|
|
2059
|
+
iosWakeLockEnabled: ci,
|
|
2060
|
+
iosMediaElementEnabled: ui,
|
|
2061
|
+
abrEnabled: pi,
|
|
2062
|
+
sizeBasedResolutionCapEnabled: z,
|
|
2063
|
+
telemetryEnabled: Ur,
|
|
2064
|
+
videoCodecs: _r,
|
|
2065
|
+
poster: Fs,
|
|
2065
2066
|
textTrack: o,
|
|
2066
|
-
advanced:
|
|
2067
|
-
logLevel:
|
|
2068
|
-
language:
|
|
2069
|
-
drm:
|
|
2070
|
-
webtransportEnabled:
|
|
2071
|
-
reconnectHandler:
|
|
2067
|
+
advanced: Pr,
|
|
2068
|
+
logLevel: Mr,
|
|
2069
|
+
language: Hr,
|
|
2070
|
+
drm: Dr,
|
|
2071
|
+
webtransportEnabled: Or,
|
|
2072
|
+
reconnectHandler: Fr
|
|
2072
2073
|
})), e(this, b).on("rendition levels", (y) => {
|
|
2073
|
-
const D = y.filter((
|
|
2074
|
+
const D = y.filter((bi) => {
|
|
2074
2075
|
var de;
|
|
2075
|
-
return (de =
|
|
2076
|
+
return (de = bi.video) == null ? void 0 : de.width;
|
|
2076
2077
|
});
|
|
2077
|
-
r(this, h,
|
|
2078
|
+
r(this, h, E).call(this, n.RENDITION_LEVELS, JSON.stringify(D));
|
|
2078
2079
|
}), e(this, b).on("rendition level", (y) => {
|
|
2079
|
-
r(this, h,
|
|
2080
|
+
r(this, h, E).call(this, n.RENDITION_LEVEL, JSON.stringify(y));
|
|
2080
2081
|
}), e(this, b).on("playback state", (y) => {
|
|
2081
2082
|
switch (y) {
|
|
2082
2083
|
case "playing":
|
|
2083
|
-
r(this, h,
|
|
2084
|
+
r(this, h, I).call(this, n.PAUSED), r(this, h, I).call(this, n.BUFFERING);
|
|
2084
2085
|
break;
|
|
2085
2086
|
case "paused":
|
|
2086
|
-
r(this, h,
|
|
2087
|
+
r(this, h, E).call(this, n.PAUSED, ""), r(this, h, I).call(this, n.BUFFERING);
|
|
2087
2088
|
break;
|
|
2088
2089
|
case "buffering":
|
|
2089
|
-
r(this, h,
|
|
2090
|
+
r(this, h, I).call(this, n.PAUSED), r(this, h, E).call(this, n.BUFFERING, "");
|
|
2090
2091
|
break;
|
|
2091
2092
|
}
|
|
2092
2093
|
}), e(this, b).on("volume state", (y) => {
|
|
2093
|
-
r(this, h,
|
|
2094
|
+
r(this, h, E).call(this, n.VOLUME, y.volume.toString()), y.isMuted ? r(this, h, E).call(this, n.MUTED, "") : r(this, h, I).call(this, n.MUTED);
|
|
2094
2095
|
}), e(this, b).on("channel switch failed", ({ channelId: y }) => {
|
|
2095
2096
|
var D;
|
|
2096
|
-
this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h,
|
|
2097
|
+
this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h, I).call(this, n.BUFFERING);
|
|
2097
2098
|
}), e(this, b).on("channel switch", ({ channelId: y }) => {
|
|
2098
2099
|
var D;
|
|
2099
|
-
e(this, st) !== y && this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h,
|
|
2100
|
+
e(this, st) !== y && this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h, I).call(this, n.BUFFERING);
|
|
2100
2101
|
}), e(this, b).on("channels", (y) => {
|
|
2101
|
-
c(this,
|
|
2102
|
+
c(this, Ut, Date.now()), r(this, h, E).call(this, n.CHANNELS, JSON.stringify(y));
|
|
2102
2103
|
}), e(this, b).on("languages", (y) => {
|
|
2103
2104
|
var D;
|
|
2104
|
-
r(this, h,
|
|
2105
|
+
r(this, h, E).call(this, n.LANGUAGES, JSON.stringify(y)), (D = e(this, b)) != null && D.language && r(this, h, E).call(this, n.LANGUAGE, e(this, b).language);
|
|
2105
2106
|
}), e(this, b).on("text tracks", (y) => {
|
|
2106
|
-
var D,
|
|
2107
|
-
r(this, h,
|
|
2107
|
+
var D, bi, de;
|
|
2108
|
+
r(this, h, E).call(this, n.TEXT_TRACKS, JSON.stringify(y)), (D = e(this, b)) != null && D.textTrack && r(this, h, E).call(this, n.TEXT_TRACK, (de = (bi = e(this, b)) == null ? void 0 : bi.textTrack) != null ? de : "");
|
|
2108
2109
|
}), e(this, b).on("needs user input", (y) => {
|
|
2109
|
-
y != null && y.forVideo ? (r(this, h,
|
|
2110
|
+
y != null && y.forVideo ? (r(this, h, E).call(this, n.NEEDS_USER_INPUT_VIDEO, ""), r(this, h, I).call(this, n.NEEDS_USER_INPUT_AUDIO)) : y != null && y.forAudio && (r(this, h, E).call(this, n.NEEDS_USER_INPUT_AUDIO, ""), r(this, h, I).call(this, n.NEEDS_USER_INPUT_VIDEO));
|
|
2110
2111
|
}), e(this, b).on("is live", (y) => {
|
|
2111
|
-
y || r(this, h,
|
|
2112
|
-
}), c(this,
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2112
|
+
y || r(this, h, I).call(this, n.BUFFERING);
|
|
2113
|
+
}), c(this, ft, (Gs = this.shadowRoot) == null ? void 0 : Gs.querySelector("#video")), e(this, ft) && e(this, b).attach(e(this, ft)), this.setAttribute(n.MEDIA, e(this, b).media), e(this, b).muted && r(this, h, E).call(this, n.MUTED, ""), r(this, h, E).call(this, n.VOLUME, e(this, b).volume.toString()), C(Fs) || r(this, h, E).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
2114
|
+
const zr = N(this.getAttribute(n.AIRPLAY_ENABLED), !1), Gr = N(this.getAttribute(n.CAST_ENABLED), !0), $r = N(this.getAttribute(n.FULLSCREEN_ENABLED), !0), Br = N(this.getAttribute(n.PIP_ENABLED), !0), Kr = N(this.getAttribute(n.VU_METER_ENABLED), !1);
|
|
2115
|
+
zr && r(this, h, Mn).call(this, e(this, b)), Gr && r(this, h, _n).call(this, e(this, b)), $r && r(this, h, Un).call(this, e(this, b)), Br && r(this, h, Rn).call(this, e(this, b)), t || e(this, b).play(), Kr && r(this, h, Dn).call(this, e(this, b)), this.dispatchEvent(
|
|
2115
2116
|
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
2116
2117
|
);
|
|
2117
2118
|
});
|
|
2118
|
-
},
|
|
2119
|
-
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new
|
|
2120
|
-
i ? r(this, h,
|
|
2119
|
+
}, Rn = function(t) {
|
|
2120
|
+
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new mo(t.mediaElement)), e(this, rt).isSupported() && (e(this, R).debug("PIP is supported"), r(this, h, E).call(this, n.PIP_AVAILABLE, "")), e(this, rt).on("on picture in picture change", (i) => {
|
|
2121
|
+
i ? r(this, h, E).call(this, n.IS_PIP, "") : r(this, h, I).call(this, n.IS_PIP);
|
|
2121
2122
|
}));
|
|
2122
2123
|
}, Un = function(t) {
|
|
2123
|
-
const i = !
|
|
2124
|
-
c(this, B, new
|
|
2125
|
-
s ? r(this, h,
|
|
2124
|
+
const i = !me.isFullscreenApiSupported(this) && me.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
|
|
2125
|
+
c(this, B, new me(i)), e(this, B).on("on fullscreen change", (s) => {
|
|
2126
|
+
s ? r(this, h, E).call(this, n.FULLSCREEN, "") : r(this, h, I).call(this, n.FULLSCREEN);
|
|
2126
2127
|
});
|
|
2127
|
-
},
|
|
2128
|
-
c(this, ot, new
|
|
2129
|
-
background: e(this,
|
|
2130
|
-
receiverApplicationId: e(this,
|
|
2128
|
+
}, _n = function(t) {
|
|
2129
|
+
c(this, ot, new io({
|
|
2130
|
+
background: e(this, Ge),
|
|
2131
|
+
receiverApplicationId: e(this, ze),
|
|
2131
2132
|
options: t.getCastOptions()
|
|
2132
2133
|
})), e(this, ot).init().then(() => {
|
|
2133
2134
|
var i, s, o;
|
|
2134
|
-
r(this, h,
|
|
2135
|
+
r(this, h, E).call(this, n.CAST_AVAILABLE, ""), (i = e(this, ot)) == null || i.on("connected", r(this, h, rs).bind(this)), (s = e(this, ot)) == null || s.on("resumed", r(this, h, rs).bind(this)), (o = e(this, ot)) == null || o.on("disconnected", r(this, h, Pn).bind(this));
|
|
2135
2136
|
}).catch((i) => {
|
|
2136
|
-
e(this,
|
|
2137
|
+
e(this, R).warn("Failed to initialize CastSender", i);
|
|
2137
2138
|
});
|
|
2138
|
-
},
|
|
2139
|
+
}, rs = function() {
|
|
2139
2140
|
var i, s;
|
|
2140
|
-
r(this, h,
|
|
2141
|
+
r(this, h, E).call(this, n.IS_CASTING, "");
|
|
2141
2142
|
const t = (s = (i = e(this, ot)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
|
|
2142
|
-
r(this, h,
|
|
2143
|
-
},
|
|
2144
|
-
r(this, h,
|
|
2145
|
-
},
|
|
2143
|
+
r(this, h, E).call(this, n.CAST_RECEIVER_NAME, t);
|
|
2144
|
+
}, Pn = function() {
|
|
2145
|
+
r(this, h, I).call(this, n.IS_CASTING), r(this, h, I).call(this, n.CAST_RECEIVER_NAME);
|
|
2146
|
+
}, Mn = function(t) {
|
|
2146
2147
|
var s;
|
|
2147
|
-
(s = e(this,
|
|
2148
|
+
(s = e(this, Y)) == null || s.unload();
|
|
2148
2149
|
const i = t.getCastOptions();
|
|
2149
|
-
c(this,
|
|
2150
|
+
c(this, Y, new bo({
|
|
2150
2151
|
url: i.url,
|
|
2151
2152
|
channelId: i.channelId,
|
|
2152
2153
|
authenticationToken: i.authenticationToken,
|
|
2153
2154
|
container: this
|
|
2154
|
-
})), e(this,
|
|
2155
|
-
r(this, h,
|
|
2156
|
-
}), e(this,
|
|
2157
|
-
r(this, h,
|
|
2158
|
-
}), e(this,
|
|
2159
|
-
r(this, h,
|
|
2155
|
+
})), e(this, Y).once("available", () => {
|
|
2156
|
+
r(this, h, E).call(this, n.AIRPLAY_AVAILABLE, "");
|
|
2157
|
+
}), e(this, Y).on("connected", () => {
|
|
2158
|
+
r(this, h, E).call(this, n.IS_AIRPLAYING, "");
|
|
2159
|
+
}), e(this, Y).on("disconnected", () => {
|
|
2160
|
+
r(this, h, I).call(this, n.IS_AIRPLAYING);
|
|
2160
2161
|
});
|
|
2161
|
-
},
|
|
2162
|
+
}, Dn = function(t) {
|
|
2162
2163
|
var i;
|
|
2163
|
-
if ((i = e(this, F)) == null || i.unload(), !
|
|
2164
|
+
if ((i = e(this, F)) == null || i.unload(), !Qr()) {
|
|
2164
2165
|
if (t.audioNode)
|
|
2165
|
-
c(this, F, new
|
|
2166
|
+
c(this, F, new Xs(t.audioNode));
|
|
2166
2167
|
else if (t.mediaElement instanceof HTMLMediaElement)
|
|
2167
|
-
c(this, F, new
|
|
2168
|
+
c(this, F, new Xs(t.mediaElement));
|
|
2168
2169
|
else
|
|
2169
2170
|
return;
|
|
2170
2171
|
e(this, F).on("on decibel change", (s) => {
|
|
2171
|
-
r(this, h,
|
|
2172
|
-
}), r(this, h,
|
|
2172
|
+
r(this, h, E).call(this, n.VOLUME_LEVEL, JSON.stringify(s));
|
|
2173
|
+
}), r(this, h, E).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, F).isMediaElementSource || !this.hasAttribute(n.MUTED)) && e(this, F).start();
|
|
2173
2174
|
}
|
|
2174
|
-
},
|
|
2175
|
-
t.pointerType !== "mouse" && t.timeStamp - e(this,
|
|
2176
|
-
}, On = function(t) {
|
|
2177
|
-
const i = this.hasAttribute(n.USER_INTERACTING);
|
|
2178
|
-
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);
|
|
2175
|
+
}, $e = new WeakMap(), On = function(t) {
|
|
2176
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, $e) < 250 || (r(this, h, fi).call(this), e(this, gt) && clearTimeout(e(this, gt)), t.target instanceof HTMLElement && ([this, e(this, ft)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && r(this, h, pt).call(this));
|
|
2179
2177
|
}, Fn = function(t) {
|
|
2180
|
-
|
|
2178
|
+
const i = this.hasAttribute(n.USER_INTERACTING);
|
|
2179
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, ft)].includes(t.target) && i ? r(this, h, as).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);
|
|
2181
2180
|
}, Hn = function(t) {
|
|
2181
|
+
!e(this, B) || t.target instanceof tt || t.target instanceof Ds || t.target instanceof Os || (this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, ""));
|
|
2182
|
+
}, zn = function(t) {
|
|
2182
2183
|
this.hasAttribute(n.USER_INTERACTING) || r(this, h, pt).call(this);
|
|
2183
|
-
},
|
|
2184
|
+
}, Be = new WeakMap(), Pi = new WeakMap(), Mi = new WeakMap(), Gn = function(t) {
|
|
2184
2185
|
var u, v;
|
|
2185
2186
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
2186
|
-
if (!(i || s || !
|
|
2187
|
+
if (!(i || s || !Xi.includes(o) || (((u = t.target) == null ? void 0 : u.keysUsed) || []).includes(o)))
|
|
2187
2188
|
switch (o) {
|
|
2188
2189
|
case "f":
|
|
2189
2190
|
this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, "");
|
|
@@ -2195,21 +2196,21 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2195
2196
|
(v = this.querySelector("vindral-scroll-overlay")) == null || v.setAttribute("open", "");
|
|
2196
2197
|
break;
|
|
2197
2198
|
}
|
|
2198
|
-
},
|
|
2199
|
+
}, Ut = new WeakMap(), os = function() {
|
|
2199
2200
|
return G(this, null, function* () {
|
|
2200
2201
|
if (!e(this, b) || !e(this, nt))
|
|
2201
2202
|
return;
|
|
2202
2203
|
const t = Date.now();
|
|
2203
|
-
if (e(this,
|
|
2204
|
-
e(this,
|
|
2204
|
+
if (e(this, Ut) && t - e(this, Ut) < 1e4)
|
|
2205
|
+
e(this, R).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2205
2206
|
else {
|
|
2206
|
-
c(this,
|
|
2207
|
+
c(this, Ut, t);
|
|
2207
2208
|
const i = yield e(this, b).getApiClient().getChannels(e(this, nt));
|
|
2208
|
-
r(this, h,
|
|
2209
|
+
r(this, h, E).call(this, n.CHANNELS, JSON.stringify(i));
|
|
2209
2210
|
}
|
|
2210
|
-
c(this,
|
|
2211
|
+
c(this, Et, window.setTimeout(() => void r(this, h, os).call(this), 1e4));
|
|
2211
2212
|
});
|
|
2212
|
-
},
|
|
2213
|
+
}, as = function() {
|
|
2213
2214
|
!this.hasAttribute(n.USER_INTERACTING) || this.hasAttribute(n.UI_LOCKED) || (this.dispatchEvent(
|
|
2214
2215
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
|
|
2215
2216
|
), this.removeAttribute(n.USER_INTERACTING));
|
|
@@ -2220,44 +2221,44 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2220
2221
|
);
|
|
2221
2222
|
});
|
|
2222
2223
|
}, pt = function() {
|
|
2223
|
-
r(this, h, fi).call(this), e(this,
|
|
2224
|
-
r(this, h,
|
|
2225
|
-
}, e(this,
|
|
2226
|
-
},
|
|
2224
|
+
r(this, h, fi).call(this), e(this, gt) && clearTimeout(e(this, gt)), e(this, Fe) && c(this, gt, self.setTimeout(() => {
|
|
2225
|
+
r(this, h, as).call(this);
|
|
2226
|
+
}, e(this, Fe)));
|
|
2227
|
+
}, $n = function() {
|
|
2227
2228
|
var t;
|
|
2228
|
-
r(this, h,
|
|
2229
|
-
e(this,
|
|
2229
|
+
r(this, h, hs).call(this), (t = e(this, rt)) == null || t.request().catch((i) => {
|
|
2230
|
+
e(this, R).warn("Failed to enter picture in picture:", i);
|
|
2230
2231
|
});
|
|
2231
|
-
},
|
|
2232
|
+
}, Bn = function() {
|
|
2232
2233
|
var t;
|
|
2233
2234
|
(t = e(this, rt)) == null || t.exit().catch((i) => {
|
|
2234
|
-
e(this,
|
|
2235
|
+
e(this, R).warn("Failed to exit picture in picture:", i);
|
|
2235
2236
|
});
|
|
2236
|
-
},
|
|
2237
|
+
}, Kn = function() {
|
|
2237
2238
|
var t, i;
|
|
2238
|
-
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (r(this, h,
|
|
2239
|
-
e(this,
|
|
2239
|
+
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (r(this, h, hs).call(this), (i = e(this, B)) == null || i.request().then(() => {
|
|
2240
|
+
e(this, Di).call(this);
|
|
2240
2241
|
}).catch((s) => {
|
|
2241
|
-
e(this,
|
|
2242
|
-
})) : (this.setAttribute(n.FULLSCREEN_FALLBACK, ""), r(this, h,
|
|
2243
|
-
},
|
|
2242
|
+
e(this, R).warn("Failed to enter fullscreen:", s);
|
|
2243
|
+
})) : (this.setAttribute(n.FULLSCREEN_FALLBACK, ""), r(this, h, E).call(this, n.FULLSCREEN, ""));
|
|
2244
|
+
}, ls = function() {
|
|
2244
2245
|
var t, i;
|
|
2245
2246
|
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (i = e(this, B)) == null || i.exit().then(() => {
|
|
2246
|
-
e(this,
|
|
2247
|
+
e(this, Oi).call(this);
|
|
2247
2248
|
}).catch((s) => {
|
|
2248
|
-
e(this,
|
|
2249
|
-
}) : (this.removeAttribute(n.FULLSCREEN_FALLBACK), r(this, h,
|
|
2250
|
-
},
|
|
2249
|
+
e(this, R).warn("Failed to exit fullscreen:", s);
|
|
2250
|
+
}) : (this.removeAttribute(n.FULLSCREEN_FALLBACK), r(this, h, I).call(this, n.FULLSCREEN));
|
|
2251
|
+
}, Di = new WeakMap(), Oi = new WeakMap(), hs = function() {
|
|
2251
2252
|
if (!e(this, b)) return;
|
|
2252
2253
|
e(this, b).emitter.emit("ios-hack: reset size");
|
|
2253
|
-
},
|
|
2254
|
+
}, E = function(t, i) {
|
|
2254
2255
|
var s;
|
|
2255
2256
|
(s = e(this, it).get(t)) == null || s.forEach((o) => o.setAttribute(t, i));
|
|
2256
|
-
},
|
|
2257
|
+
}, I = function(t) {
|
|
2257
2258
|
var i;
|
|
2258
2259
|
(i = e(this, it).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
|
|
2259
|
-
}, m(
|
|
2260
|
-
...
|
|
2260
|
+
}, m(Ee, "observedAttributes", [
|
|
2261
|
+
...Ys,
|
|
2261
2262
|
"url",
|
|
2262
2263
|
"edge-url",
|
|
2263
2264
|
"target-buffer-time",
|
|
@@ -2268,6 +2269,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2268
2269
|
"min-buffer-time",
|
|
2269
2270
|
"max-buffer-time",
|
|
2270
2271
|
"max-audio-bit-rate",
|
|
2272
|
+
"max-initial-bit-rate",
|
|
2271
2273
|
"burst-enabled",
|
|
2272
2274
|
"mse-enabled",
|
|
2273
2275
|
"mse-opus-enabled",
|
|
@@ -2290,20 +2292,20 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2290
2292
|
"reconnect-retries",
|
|
2291
2293
|
"auto-instance-enabled",
|
|
2292
2294
|
"language"
|
|
2293
|
-
]), l(
|
|
2294
|
-
let
|
|
2295
|
-
const
|
|
2295
|
+
]), l(Ee, Ui, "https://lb.cdn.vindral.com");
|
|
2296
|
+
let Te = Ee;
|
|
2297
|
+
const qn = document.createElement("template"), vo = (
|
|
2296
2298
|
/* SVG */
|
|
2297
2299
|
`
|
|
2298
2300
|
<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>
|
|
2299
2301
|
`
|
|
2300
|
-
),
|
|
2302
|
+
), go = (
|
|
2301
2303
|
/* SVG */
|
|
2302
2304
|
`
|
|
2303
2305
|
<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>
|
|
2304
2306
|
`
|
|
2305
2307
|
);
|
|
2306
|
-
|
|
2308
|
+
qn.innerHTML = /* HTML */
|
|
2307
2309
|
`
|
|
2308
2310
|
<style>
|
|
2309
2311
|
:host {
|
|
@@ -2320,14 +2322,14 @@ Kn.innerHTML = /* HTML */
|
|
|
2320
2322
|
</style>
|
|
2321
2323
|
|
|
2322
2324
|
<slot name="icon">
|
|
2323
|
-
<slot name="enter">${
|
|
2324
|
-
<slot name="exit">${
|
|
2325
|
+
<slot name="enter">${vo}</slot>
|
|
2326
|
+
<slot name="exit">${go}</slot>
|
|
2325
2327
|
</slot>
|
|
2326
2328
|
`;
|
|
2327
|
-
const
|
|
2329
|
+
const Ae = class Ae extends tt {
|
|
2328
2330
|
constructor() {
|
|
2329
2331
|
var a;
|
|
2330
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2332
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(qn.content.cloneNode(!0));
|
|
2331
2333
|
}
|
|
2332
2334
|
connectedCallback() {
|
|
2333
2335
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2349,15 +2351,15 @@ const Ee = class Ee extends tt {
|
|
|
2349
2351
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2350
2352
|
}
|
|
2351
2353
|
};
|
|
2352
|
-
m(
|
|
2353
|
-
let
|
|
2354
|
-
const
|
|
2354
|
+
m(Ae, "observedAttributes", [...q(Ae, Ae, "observedAttributes"), n.FULLSCREEN]);
|
|
2355
|
+
let ds = Ae;
|
|
2356
|
+
const fo = (
|
|
2355
2357
|
/* SVG */
|
|
2356
2358
|
`
|
|
2357
2359
|
<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>
|
|
2358
2360
|
`
|
|
2359
|
-
),
|
|
2360
|
-
|
|
2361
|
+
), Xn = document.createElement("template");
|
|
2362
|
+
Xn.innerHTML = /* HTML */
|
|
2361
2363
|
`
|
|
2362
2364
|
<style>
|
|
2363
2365
|
:host(:not([hidden])) {
|
|
@@ -2365,38 +2367,38 @@ qn.innerHTML = /* HTML */
|
|
|
2365
2367
|
}
|
|
2366
2368
|
</style>
|
|
2367
2369
|
|
|
2368
|
-
<slot name="button">${
|
|
2370
|
+
<slot name="button">${fo}</slot>
|
|
2369
2371
|
<slot name="listbox" hidden>
|
|
2370
2372
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2371
2373
|
</slot>
|
|
2372
2374
|
`;
|
|
2373
|
-
var
|
|
2374
|
-
const
|
|
2375
|
+
var Ke, us;
|
|
2376
|
+
const ye = class ye extends Ds {
|
|
2375
2377
|
constructor() {
|
|
2376
2378
|
var t, i, s, o;
|
|
2377
2379
|
super();
|
|
2378
|
-
l(this,
|
|
2379
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
2380
|
+
l(this, Ke);
|
|
2381
|
+
(t = this.shadowRoot) == null || t.appendChild(Xn.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]");
|
|
2380
2382
|
}
|
|
2381
2383
|
connectedCallback() {
|
|
2382
|
-
super.connectedCallback(), r(this,
|
|
2384
|
+
super.connectedCallback(), r(this, Ke, us).call(this), this.setAttribute("aria-label", "Languages");
|
|
2383
2385
|
}
|
|
2384
2386
|
attributeChangedCallback(t, i, s) {
|
|
2385
|
-
super.attributeChangedCallback(t, i, s), (t === n.LANGUAGES || t === n.TEXT_TRACKS) && r(this,
|
|
2387
|
+
super.attributeChangedCallback(t, i, s), (t === n.LANGUAGES || t === n.TEXT_TRACKS) && r(this, Ke, us).call(this);
|
|
2386
2388
|
}
|
|
2387
2389
|
};
|
|
2388
|
-
|
|
2390
|
+
Ke = new WeakSet(), us = function() {
|
|
2389
2391
|
const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(n.LANGUAGES)), s = t(this.getAttribute(n.TEXT_TRACKS));
|
|
2390
2392
|
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2391
|
-
}, m(
|
|
2392
|
-
let
|
|
2393
|
-
const
|
|
2393
|
+
}, m(ye, "observedAttributes", [...q(ye, ye, "observedAttributes"), n.LANGUAGES, n.TEXT_TRACKS]);
|
|
2394
|
+
let cs = ye;
|
|
2395
|
+
const jn = document.createElement("template"), Eo = (
|
|
2394
2396
|
/* SVG */
|
|
2395
2397
|
`
|
|
2396
2398
|
<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>
|
|
2397
2399
|
`
|
|
2398
2400
|
);
|
|
2399
|
-
|
|
2401
|
+
jn.innerHTML = /* HTML */
|
|
2400
2402
|
`
|
|
2401
2403
|
<style>
|
|
2402
2404
|
:host {
|
|
@@ -2472,7 +2474,7 @@ Xn.innerHTML = /* HTML */
|
|
|
2472
2474
|
}
|
|
2473
2475
|
|
|
2474
2476
|
[role="menuitem"][aria-selected="true"]::before {
|
|
2475
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
2477
|
+
content: url("data:image/svg+xml,${encodeURIComponent(Eo)}");
|
|
2476
2478
|
position: absolute;
|
|
2477
2479
|
left: var(--padding-3);
|
|
2478
2480
|
top: calc(50% - 8px);
|
|
@@ -2511,19 +2513,19 @@ Xn.innerHTML = /* HTML */
|
|
|
2511
2513
|
<div class="menu"></div>
|
|
2512
2514
|
</div>
|
|
2513
2515
|
`;
|
|
2514
|
-
var
|
|
2515
|
-
class
|
|
2516
|
+
var qe, Xe, je, Ye, Q, K, _t, At, ie, Ve, at, W, A, Vn, Jn, ps, bs, Ei, pe, be, Qn, Wn, Zn, ms, vs, tr;
|
|
2517
|
+
class Yn extends HTMLElement {
|
|
2516
2518
|
constructor() {
|
|
2517
2519
|
super();
|
|
2518
|
-
l(this,
|
|
2519
|
-
l(this, Ke, []);
|
|
2520
|
+
l(this, A);
|
|
2520
2521
|
l(this, qe, []);
|
|
2521
|
-
l(this, Xe);
|
|
2522
|
+
l(this, Xe, []);
|
|
2522
2523
|
l(this, je);
|
|
2524
|
+
l(this, Ye);
|
|
2523
2525
|
l(this, Q, []);
|
|
2524
2526
|
l(this, K, []);
|
|
2525
2527
|
l(this, _t, null);
|
|
2526
|
-
l(this,
|
|
2528
|
+
l(this, At, null);
|
|
2527
2529
|
l(this, ie, null);
|
|
2528
2530
|
l(this, Ve, null);
|
|
2529
2531
|
l(this, at, null);
|
|
@@ -2531,16 +2533,16 @@ class jn extends HTMLElement {
|
|
|
2531
2533
|
m(this, "handleEvent", (t) => {
|
|
2532
2534
|
switch (t.type) {
|
|
2533
2535
|
case "keydown":
|
|
2534
|
-
r(this,
|
|
2536
|
+
r(this, A, Wn).call(this, t);
|
|
2535
2537
|
break;
|
|
2536
2538
|
}
|
|
2537
2539
|
});
|
|
2538
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
2540
|
+
this.attachShadow({ mode: "open" }).appendChild(jn.content.cloneNode(!0));
|
|
2539
2541
|
}
|
|
2540
2542
|
connectedCallback() {
|
|
2541
2543
|
var i, s, o;
|
|
2542
2544
|
const t = this.getRootNode();
|
|
2543
|
-
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,
|
|
2545
|
+
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, At, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), r(this, A, Vn).call(this), r(this, A, Jn).call(this), c(this, Ve, t.host), this.addEventListener("keydown", this));
|
|
2544
2546
|
}
|
|
2545
2547
|
disconnectedCallback() {
|
|
2546
2548
|
this.removeEventListener("keydown", this);
|
|
@@ -2549,16 +2551,16 @@ class jn extends HTMLElement {
|
|
|
2549
2551
|
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));
|
|
2550
2552
|
}
|
|
2551
2553
|
set languages(t) {
|
|
2552
|
-
c(this,
|
|
2554
|
+
c(this, qe, t), r(this, A, bs).call(this), r(this, A, pe).call(this);
|
|
2553
2555
|
}
|
|
2554
2556
|
set textTracks(t) {
|
|
2555
|
-
c(this,
|
|
2557
|
+
c(this, Xe, t), r(this, A, ps).call(this), r(this, A, be).call(this);
|
|
2556
2558
|
}
|
|
2557
2559
|
set language(t) {
|
|
2558
|
-
c(this,
|
|
2560
|
+
c(this, je, t), r(this, A, pe).call(this);
|
|
2559
2561
|
}
|
|
2560
2562
|
set textTrack(t) {
|
|
2561
|
-
c(this,
|
|
2563
|
+
c(this, Ye, t), r(this, A, be).call(this);
|
|
2562
2564
|
}
|
|
2563
2565
|
get keysUsed() {
|
|
2564
2566
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End"];
|
|
@@ -2567,7 +2569,7 @@ class jn extends HTMLElement {
|
|
|
2567
2569
|
e(this, at) ? e(this, at).focus() : e(this, W) && e(this, W).focus();
|
|
2568
2570
|
}
|
|
2569
2571
|
}
|
|
2570
|
-
|
|
2572
|
+
qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Q = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), At = new WeakMap(), ie = new WeakMap(), Ve = new WeakMap(), at = new WeakMap(), W = new WeakMap(), A = new WeakSet(), Vn = function() {
|
|
2571
2573
|
const t = (s) => {
|
|
2572
2574
|
s.forEach((o) => {
|
|
2573
2575
|
if (o.intersectionRatio !== 1)
|
|
@@ -2584,68 +2586,68 @@ Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(),
|
|
|
2584
2586
|
threshold: 0
|
|
2585
2587
|
// 0 means any intersection is enough to be considered "inside"
|
|
2586
2588
|
}).observe(this);
|
|
2587
|
-
},
|
|
2588
|
-
e(this, _t) && (r(this,
|
|
2589
|
-
}, us = function() {
|
|
2590
|
-
e(this, Et).innerHTML = "", c(this, K, []);
|
|
2591
|
-
const t = r(this, E, Ei).call(this, "Off", "textTrack", void 0);
|
|
2592
|
-
e(this, Et).appendChild(t), e(this, K).push({ element: t, value: void 0 }), e(this, qe).forEach((i) => {
|
|
2593
|
-
const s = r(this, E, Ei).call(this, i, "textTrack", i);
|
|
2594
|
-
e(this, Et).appendChild(s), e(this, K).push({ element: s, value: i });
|
|
2595
|
-
}), r(this, E, pe).call(this);
|
|
2589
|
+
}, Jn = function() {
|
|
2590
|
+
e(this, _t) && (r(this, A, bs).call(this), r(this, A, pe).call(this)), e(this, At) && (r(this, A, ps).call(this), r(this, A, be).call(this));
|
|
2596
2591
|
}, ps = function() {
|
|
2597
|
-
e(this,
|
|
2598
|
-
|
|
2592
|
+
e(this, At).innerHTML = "", c(this, K, []);
|
|
2593
|
+
const t = r(this, A, Ei).call(this, "Off", "textTrack", void 0);
|
|
2594
|
+
e(this, At).appendChild(t), e(this, K).push({ element: t, value: void 0 }), e(this, Xe).forEach((i) => {
|
|
2595
|
+
const s = r(this, A, Ei).call(this, i, "textTrack", i);
|
|
2596
|
+
e(this, At).appendChild(s), e(this, K).push({ element: s, value: i });
|
|
2597
|
+
}), r(this, A, be).call(this);
|
|
2598
|
+
}, bs = function() {
|
|
2599
|
+
e(this, _t).innerHTML = "", c(this, Q, []), e(this, qe).forEach((t) => {
|
|
2600
|
+
const i = r(this, A, Ei).call(this, t, "language", t);
|
|
2599
2601
|
e(this, _t).appendChild(i), e(this, Q).push({ element: i, value: t });
|
|
2600
|
-
}), r(this,
|
|
2602
|
+
}), r(this, A, pe).call(this);
|
|
2601
2603
|
}, Ei = function(t, i, s) {
|
|
2602
2604
|
const o = document.createElement("div");
|
|
2603
|
-
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => r(this,
|
|
2604
|
-
},
|
|
2605
|
+
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => r(this, A, Qn).call(this, s, i)), o;
|
|
2606
|
+
}, pe = function() {
|
|
2605
2607
|
e(this, at) && (e(this, at).removeAttribute("aria-selected"), e(this, at).tabIndex = -1);
|
|
2606
|
-
const t = e(this, Q).find((i) => i.value === e(this,
|
|
2608
|
+
const t = e(this, Q).find((i) => i.value === e(this, je));
|
|
2607
2609
|
t && (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, at, t.element));
|
|
2608
|
-
},
|
|
2610
|
+
}, be = function() {
|
|
2609
2611
|
e(this, W) && (e(this, W).removeAttribute("aria-selected"), e(this, W).tabIndex = -1);
|
|
2610
|
-
const t = e(this, K).find((i) => i.value === e(this,
|
|
2612
|
+
const t = e(this, K).find((i) => i.value === e(this, Ye));
|
|
2611
2613
|
if (t)
|
|
2612
2614
|
t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, W, t.element);
|
|
2613
2615
|
else {
|
|
2614
2616
|
const i = e(this, K).find((s) => s.value === void 0);
|
|
2615
2617
|
i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, c(this, W, i.element));
|
|
2616
2618
|
}
|
|
2617
|
-
},
|
|
2619
|
+
}, Qn = function(t, i) {
|
|
2618
2620
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
2619
2621
|
const s = i === "language" ? f.SET_LANGUAGE : f.SET_TEXT_TRACK;
|
|
2620
2622
|
this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
|
|
2621
|
-
},
|
|
2623
|
+
}, Wn = function(t) {
|
|
2622
2624
|
var u, v, g;
|
|
2623
2625
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
2624
|
-
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,
|
|
2625
|
-
},
|
|
2626
|
+
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, A, vs).call(this)) == null ? void 0 : v.element) == null || g.click() : r(this, A, Zn).call(this, t));
|
|
2627
|
+
}, Zn = function(t) {
|
|
2626
2628
|
var g;
|
|
2627
|
-
const { key: i } = t, s = [...e(this, Q), ...e(this, K)], o = (g = r(this,
|
|
2629
|
+
const { key: i } = t, s = [...e(this, Q), ...e(this, K)], o = (g = r(this, A, vs).call(this)) != null ? g : s[0];
|
|
2628
2630
|
if (!o) return;
|
|
2629
2631
|
const p = s.indexOf(o);
|
|
2630
2632
|
let u = Math.max(0, p);
|
|
2631
|
-
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : i === "ArrowLeft" ? u = r(this,
|
|
2633
|
+
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : i === "ArrowLeft" ? u = r(this, A, ms).call(this, p, "left") : i === "ArrowRight" ? u = r(this, A, ms).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);
|
|
2632
2634
|
const v = s[u];
|
|
2633
|
-
v && (r(this,
|
|
2634
|
-
},
|
|
2635
|
+
v && (r(this, A, tr).call(this, v.value), v.element.focus());
|
|
2636
|
+
}, ms = function(t, i) {
|
|
2635
2637
|
const s = e(this, Q).length, o = e(this, K).length;
|
|
2636
2638
|
return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
|
|
2637
|
-
},
|
|
2639
|
+
}, vs = function() {
|
|
2638
2640
|
return [...e(this, Q), ...e(this, K)].find((t) => t.element.tabIndex === 0);
|
|
2639
|
-
},
|
|
2641
|
+
}, tr = function(t) {
|
|
2640
2642
|
for (const i of [...e(this, Q), ...e(this, K)])
|
|
2641
2643
|
i.element.tabIndex = i.value === t ? 0 : -1;
|
|
2642
|
-
}, m(
|
|
2644
|
+
}, m(Yn, "observedAttributes", [
|
|
2643
2645
|
n.LANGUAGES,
|
|
2644
2646
|
n.TEXT_TRACKS,
|
|
2645
2647
|
n.LANGUAGE,
|
|
2646
2648
|
n.TEXT_TRACK
|
|
2647
2649
|
]);
|
|
2648
|
-
const
|
|
2650
|
+
const er = document.createElement("template"), Ao = (
|
|
2649
2651
|
/* SVG */
|
|
2650
2652
|
`
|
|
2651
2653
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -2653,14 +2655,14 @@ const tr = document.createElement("template"), go = (
|
|
|
2653
2655
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
2654
2656
|
</g></svg>
|
|
2655
2657
|
`
|
|
2656
|
-
),
|
|
2658
|
+
), yo = (
|
|
2657
2659
|
/* SVG */
|
|
2658
2660
|
`
|
|
2659
2661
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
2660
2662
|
<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>
|
|
2661
2663
|
`
|
|
2662
2664
|
);
|
|
2663
|
-
|
|
2665
|
+
er.innerHTML = /* HTML */
|
|
2664
2666
|
`
|
|
2665
2667
|
<style>
|
|
2666
2668
|
:host {
|
|
@@ -2677,14 +2679,14 @@ tr.innerHTML = /* HTML */
|
|
|
2677
2679
|
</style>
|
|
2678
2680
|
|
|
2679
2681
|
<slot name="icon">
|
|
2680
|
-
<slot name="mute">${
|
|
2681
|
-
<slot name="unmute">${
|
|
2682
|
+
<slot name="mute">${Ao}</slot>
|
|
2683
|
+
<slot name="unmute">${yo}</slot>
|
|
2682
2684
|
</slot>
|
|
2683
2685
|
`;
|
|
2684
|
-
const
|
|
2686
|
+
const ke = class ke extends tt {
|
|
2685
2687
|
constructor() {
|
|
2686
2688
|
var a;
|
|
2687
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2689
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(er.content.cloneNode(!0));
|
|
2688
2690
|
}
|
|
2689
2691
|
connectedCallback() {
|
|
2690
2692
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -2706,15 +2708,15 @@ const ye = class ye extends tt {
|
|
|
2706
2708
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2707
2709
|
}
|
|
2708
2710
|
};
|
|
2709
|
-
m(
|
|
2710
|
-
let
|
|
2711
|
-
const
|
|
2711
|
+
m(ke, "observedAttributes", [...q(ke, ke, "observedAttributes"), n.MUTED]);
|
|
2712
|
+
let gs = ke;
|
|
2713
|
+
const ir = document.createElement("template"), ko = (
|
|
2712
2714
|
/* SVG */
|
|
2713
2715
|
`
|
|
2714
2716
|
<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>
|
|
2715
2717
|
`
|
|
2716
2718
|
);
|
|
2717
|
-
|
|
2719
|
+
ir.innerHTML = /* HTML */
|
|
2718
2720
|
`
|
|
2719
2721
|
<style>
|
|
2720
2722
|
:host {
|
|
@@ -2725,12 +2727,12 @@ er.innerHTML = /* HTML */
|
|
|
2725
2727
|
display: none !important;
|
|
2726
2728
|
}
|
|
2727
2729
|
</style>
|
|
2728
|
-
<slot name="icon">${
|
|
2730
|
+
<slot name="icon">${ko}</slot>
|
|
2729
2731
|
`;
|
|
2730
|
-
const
|
|
2732
|
+
const Ie = class Ie extends tt {
|
|
2731
2733
|
constructor() {
|
|
2732
2734
|
var a;
|
|
2733
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2735
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(ir.content.cloneNode(!0));
|
|
2734
2736
|
}
|
|
2735
2737
|
connectedCallback() {
|
|
2736
2738
|
super.connectedCallback(), this.setAttribute(
|
|
@@ -2758,20 +2760,20 @@ const ke = class ke extends tt {
|
|
|
2758
2760
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2759
2761
|
}
|
|
2760
2762
|
};
|
|
2761
|
-
m(
|
|
2762
|
-
let
|
|
2763
|
-
const
|
|
2763
|
+
m(Ie, "observedAttributes", [...q(Ie, Ie, "observedAttributes"), n.IS_PIP, n.PIP_AVAILABLE]);
|
|
2764
|
+
let fs = Ie;
|
|
2765
|
+
const sr = document.createElement("template"), Io = (
|
|
2764
2766
|
/* SVG */
|
|
2765
2767
|
`
|
|
2766
2768
|
<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>
|
|
2767
2769
|
`
|
|
2768
|
-
),
|
|
2770
|
+
), wo = (
|
|
2769
2771
|
/* SVG */
|
|
2770
2772
|
`
|
|
2771
2773
|
<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>
|
|
2772
2774
|
`
|
|
2773
2775
|
);
|
|
2774
|
-
|
|
2776
|
+
sr.innerHTML = /* HTML */
|
|
2775
2777
|
`
|
|
2776
2778
|
<style>
|
|
2777
2779
|
:host {
|
|
@@ -2788,14 +2790,14 @@ ir.innerHTML = /* HTML */
|
|
|
2788
2790
|
</style>
|
|
2789
2791
|
|
|
2790
2792
|
<slot name="icon">
|
|
2791
|
-
<slot name="play">${
|
|
2792
|
-
<slot name="pause">${
|
|
2793
|
+
<slot name="play">${Io}</slot>
|
|
2794
|
+
<slot name="pause">${wo}</slot>
|
|
2793
2795
|
</slot>
|
|
2794
2796
|
`;
|
|
2795
2797
|
const we = class we extends tt {
|
|
2796
2798
|
constructor() {
|
|
2797
2799
|
var a;
|
|
2798
|
-
super(), (a = this.shadowRoot) == null || a.appendChild(
|
|
2800
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(sr.content.cloneNode(!0));
|
|
2799
2801
|
}
|
|
2800
2802
|
connectedCallback() {
|
|
2801
2803
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -2818,67 +2820,64 @@ const we = class we extends tt {
|
|
|
2818
2820
|
}
|
|
2819
2821
|
};
|
|
2820
2822
|
m(we, "observedAttributes", [...q(we, we, "observedAttributes"), n.PAUSED]);
|
|
2821
|
-
let
|
|
2823
|
+
let Es = we;
|
|
2822
2824
|
const X = {
|
|
2823
2825
|
TITLE: "title",
|
|
2824
2826
|
OFFLINE: "offline",
|
|
2825
2827
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
2826
2828
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
2827
|
-
},
|
|
2828
|
-
var
|
|
2829
|
-
class
|
|
2829
|
+
}, Co = Object.values(X);
|
|
2830
|
+
var Je, se, yt, Pt, kt, It, lt, H, As, nr, ys, ks;
|
|
2831
|
+
class Lo extends hi {
|
|
2830
2832
|
constructor(t) {
|
|
2831
2833
|
super();
|
|
2832
2834
|
l(this, H);
|
|
2833
|
-
l(this,
|
|
2835
|
+
l(this, Je);
|
|
2834
2836
|
l(this, se);
|
|
2835
|
-
l(this,
|
|
2837
|
+
l(this, yt, !1);
|
|
2836
2838
|
l(this, Pt, !1);
|
|
2837
|
-
l(this,
|
|
2838
|
-
l(this,
|
|
2839
|
+
l(this, kt, !0);
|
|
2840
|
+
l(this, It, null);
|
|
2839
2841
|
l(this, lt, null);
|
|
2840
|
-
c(this, se, t), c(this,
|
|
2842
|
+
c(this, se, t), c(this, Je, new so({
|
|
2841
2843
|
publicEndpoint: t.url,
|
|
2842
2844
|
tokenFactory: () => t.authenticationToken
|
|
2843
2845
|
}));
|
|
2844
2846
|
}
|
|
2845
2847
|
start(t = 5e3) {
|
|
2846
|
-
e(this, lt) && clearInterval(e(this, lt)), c(this,
|
|
2847
|
-
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this,
|
|
2848
|
+
e(this, lt) && clearInterval(e(this, lt)), c(this, yt, !1), c(this, Pt, !1), r(this, H, ks).call(this), r(this, H, As).call(this), c(this, lt, window.setInterval(() => {
|
|
2849
|
+
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this, It) && e(this, kt) && c(this, It, window.setTimeout(() => r(this, H, nr).call(this), 300 * 1e3)), !e(this, Pt) && e(this, kt) && r(this, H, As).call(this);
|
|
2848
2850
|
}, t));
|
|
2849
2851
|
}
|
|
2850
2852
|
stop() {
|
|
2851
|
-
r(this, H,
|
|
2853
|
+
r(this, H, ys).call(this), e(this, lt) && (window.clearInterval(e(this, lt)), c(this, lt, null));
|
|
2852
2854
|
}
|
|
2853
2855
|
}
|
|
2854
|
-
|
|
2856
|
+
Je = new WeakMap(), se = new WeakMap(), yt = new WeakMap(), Pt = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), lt = new WeakMap(), H = new WeakSet(), As = function() {
|
|
2855
2857
|
return G(this, null, function* () {
|
|
2856
|
-
if (e(this,
|
|
2858
|
+
if (e(this, yt))
|
|
2857
2859
|
return;
|
|
2858
|
-
c(this,
|
|
2860
|
+
c(this, yt, !0);
|
|
2859
2861
|
let t = "Stream is offline", i = "Please stand by";
|
|
2860
2862
|
try {
|
|
2861
|
-
const s = yield e(this,
|
|
2863
|
+
const s = yield e(this, Je).getChannel(e(this, se).channelId);
|
|
2862
2864
|
if (s.isLive) {
|
|
2863
|
-
c(this, Pt, !0), r(this, H,
|
|
2865
|
+
c(this, Pt, !0), r(this, H, ks).call(this), this.emit("live", s), c(this, yt, !1);
|
|
2864
2866
|
return;
|
|
2865
2867
|
}
|
|
2866
2868
|
} catch (s) {
|
|
2867
|
-
|
|
2869
|
+
no(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
|
|
2868
2870
|
}
|
|
2869
|
-
e(this,
|
|
2871
|
+
e(this, kt) && this.emit("error", { title: t, message: i }), c(this, yt, !1);
|
|
2870
2872
|
});
|
|
2871
|
-
},
|
|
2872
|
-
this.stop(), c(this,
|
|
2873
|
-
}, As = function() {
|
|
2874
|
-
e(this, kt) && (window.clearTimeout(e(this, kt)), c(this, kt, null));
|
|
2873
|
+
}, nr = function() {
|
|
2874
|
+
this.stop(), c(this, kt, !1), this.emit("timeout");
|
|
2875
2875
|
}, ys = function() {
|
|
2876
|
-
|
|
2876
|
+
e(this, It) && (window.clearTimeout(e(this, It)), c(this, It, null));
|
|
2877
|
+
}, ks = function() {
|
|
2878
|
+
r(this, H, ys).call(this), c(this, kt, !0);
|
|
2877
2879
|
};
|
|
2878
|
-
const
|
|
2879
|
-
"/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/",
|
|
2880
|
-
"i"
|
|
2881
|
-
), Co = navigator.userAgent.toLowerCase(), Lo = Io.test(Co), To = (d) => Le.observedAttributes.includes(d), nr = (
|
|
2880
|
+
const To = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, xo = navigator.userAgent.toLowerCase(), So = To.test(xo), No = (d) => Te.observedAttributes.includes(d), rr = (
|
|
2882
2881
|
/* HTML */
|
|
2883
2882
|
`
|
|
2884
2883
|
<style>
|
|
@@ -2890,7 +2889,7 @@ const Io = new RegExp(
|
|
|
2890
2889
|
display: flex;
|
|
2891
2890
|
justify-content: center;
|
|
2892
2891
|
|
|
2893
|
-
--vindral-volume-range-display: ${
|
|
2892
|
+
--vindral-volume-range-display: ${So ? "none" : "flex"};
|
|
2894
2893
|
--vindral-airplay-button-display: none;
|
|
2895
2894
|
--vindral-play-overlay-display: none;
|
|
2896
2895
|
--vindral-grid-item-offline-display: none;
|
|
@@ -2958,10 +2957,10 @@ const Io = new RegExp(
|
|
|
2958
2957
|
}
|
|
2959
2958
|
</style>
|
|
2960
2959
|
`
|
|
2961
|
-
),
|
|
2960
|
+
), Ro = (
|
|
2962
2961
|
/* HTML */
|
|
2963
2962
|
`
|
|
2964
|
-
${
|
|
2963
|
+
${rr}
|
|
2965
2964
|
|
|
2966
2965
|
<vindral-controller>
|
|
2967
2966
|
<vindral-control-bar slot="top-bar">
|
|
@@ -2993,10 +2992,10 @@ const Io = new RegExp(
|
|
|
2993
2992
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
2994
2993
|
</vindral-controller>
|
|
2995
2994
|
`
|
|
2996
|
-
),
|
|
2995
|
+
), Uo = (
|
|
2997
2996
|
/* HTML */
|
|
2998
2997
|
`
|
|
2999
|
-
${
|
|
2998
|
+
${rr}
|
|
3000
2999
|
|
|
3001
3000
|
<style>
|
|
3002
3001
|
#control-bar {
|
|
@@ -3019,59 +3018,62 @@ const Io = new RegExp(
|
|
|
3019
3018
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
3020
3019
|
</vindral-controller>
|
|
3021
3020
|
`
|
|
3022
|
-
),
|
|
3023
|
-
var Z, x, M, ht, dt,
|
|
3024
|
-
class
|
|
3021
|
+
), js = document.createElement("template");
|
|
3022
|
+
var Z, x, M, ht, dt, Fi, Qe, Hi, S, Is, ar, We, Ai, bt;
|
|
3023
|
+
class or extends HTMLElement {
|
|
3025
3024
|
constructor() {
|
|
3026
3025
|
super();
|
|
3027
|
-
l(this,
|
|
3026
|
+
l(this, S);
|
|
3028
3027
|
l(this, Z);
|
|
3029
3028
|
l(this, x);
|
|
3030
3029
|
l(this, M);
|
|
3031
3030
|
l(this, ht);
|
|
3032
3031
|
l(this, dt);
|
|
3033
|
-
l(this,
|
|
3032
|
+
l(this, Fi, () => {
|
|
3034
3033
|
Array.from(this.attributes).forEach((t) => {
|
|
3035
|
-
e(this,
|
|
3034
|
+
e(this, Qe).call(this, t.name, t.value);
|
|
3036
3035
|
});
|
|
3037
3036
|
});
|
|
3038
|
-
l(this,
|
|
3039
|
-
|
|
3037
|
+
l(this, Qe, (t, i) => {
|
|
3038
|
+
No(t) && (C(i) ? e(this, x).setAttribute(t, i) : e(this, x).removeAttribute(t));
|
|
3040
3039
|
});
|
|
3041
|
-
l(this,
|
|
3042
|
-
l(this,
|
|
3040
|
+
l(this, Hi, () => Vs(this.getAttribute(n.MEDIA)) === "audio" ? Uo : Ro);
|
|
3041
|
+
l(this, We, () => {
|
|
3043
3042
|
const t = e(this, x).instance;
|
|
3044
3043
|
t && (t.on("is live", (i) => {
|
|
3045
|
-
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this,
|
|
3044
|
+
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this, S, bt).call(this, "Stream is offline", "Please stand by"));
|
|
3046
3045
|
}), t.on("channels", (i) => {
|
|
3047
3046
|
const s = e(this, x).getAttribute("channel-id"), o = i.find((p) => p.channelId === s);
|
|
3048
|
-
o && r(this,
|
|
3047
|
+
o && r(this, S, Ai).call(this, o);
|
|
3049
3048
|
}), t.on("channel switch", ({ channelId: i }) => {
|
|
3050
3049
|
const s = t.channels.find((o) => o.channelId === i);
|
|
3051
|
-
s && r(this,
|
|
3050
|
+
s && r(this, S, Ai).call(this, s);
|
|
3052
3051
|
}), t.on("error", (i) => {
|
|
3053
|
-
|
|
3054
|
-
|
|
3052
|
+
if (i.code() === Wr) {
|
|
3053
|
+
r(this, S, bt).call(this, "Stream is offline", "Please stand by");
|
|
3054
|
+
return;
|
|
3055
|
+
}
|
|
3056
|
+
i.isFatal() && (i.code() === Zr ? r(this, S, bt).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === to ? r(this, S, bt).call(this, "Stream is offline", "Please stand by") : r(this, S, bt).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)));
|
|
3055
3057
|
}));
|
|
3056
3058
|
});
|
|
3057
|
-
c(this, Z, this.attachShadow({ mode: "open" })), r(this,
|
|
3059
|
+
c(this, Z, this.attachShadow({ mode: "open" })), r(this, S, Is).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"));
|
|
3058
3060
|
}
|
|
3059
3061
|
connectedCallback() {
|
|
3060
|
-
this.setAttribute(X.OFFLINE, ""), e(this, x).addEventListener("vindral-instance-ready", e(this,
|
|
3062
|
+
this.setAttribute(X.OFFLINE, ""), e(this, x).addEventListener("vindral-instance-ready", e(this, We)), r(this, S, ar).call(this);
|
|
3061
3063
|
}
|
|
3062
3064
|
disconnectedCallback() {
|
|
3063
3065
|
var t;
|
|
3064
|
-
e(this, x).removeEventListener("vindral-instance-ready", e(this,
|
|
3066
|
+
e(this, x).removeEventListener("vindral-instance-ready", e(this, We)), (t = e(this, dt)) == null || t.stop();
|
|
3065
3067
|
}
|
|
3066
3068
|
attributeChangedCallback(t, i, s) {
|
|
3067
3069
|
if (i !== s)
|
|
3068
3070
|
if (t === n.MEDIA)
|
|
3069
|
-
r(this,
|
|
3071
|
+
r(this, S, Is).call(this);
|
|
3070
3072
|
else if (t === X.REFRESH_POSTER_ENABLED) {
|
|
3071
3073
|
const o = e(this, Z).querySelector("vindral-poster-overlay");
|
|
3072
|
-
o && (o.disabled =
|
|
3074
|
+
o && (o.disabled = N(this.getAttribute(X.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3073
3075
|
} else
|
|
3074
|
-
e(this,
|
|
3076
|
+
e(this, Qe).call(this, t, s);
|
|
3075
3077
|
}
|
|
3076
3078
|
get instance() {
|
|
3077
3079
|
return e(this, x).instance;
|
|
@@ -3080,52 +3082,52 @@ class rr extends HTMLElement {
|
|
|
3080
3082
|
return e(this, x).airPlay;
|
|
3081
3083
|
}
|
|
3082
3084
|
}
|
|
3083
|
-
Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(),
|
|
3084
|
-
|
|
3085
|
-
const t =
|
|
3085
|
+
Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Fi = new WeakMap(), Qe = new WeakMap(), Hi = new WeakMap(), S = new WeakSet(), Is = function() {
|
|
3086
|
+
js.innerHTML = e(this, Hi).call(this);
|
|
3087
|
+
const t = js.content.cloneNode(!0);
|
|
3086
3088
|
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) => {
|
|
3087
3089
|
e(this, x).appendChild(i);
|
|
3088
|
-
}), e(this,
|
|
3089
|
-
},
|
|
3090
|
+
}), e(this, Fi).call(this), e(this, Z).innerHTML = "", e(this, Z).appendChild(t);
|
|
3091
|
+
}, ar = function() {
|
|
3090
3092
|
var p;
|
|
3091
|
-
if (
|
|
3093
|
+
if (N(this.getAttribute(X.STREAM_POLL_ENABLED), !0) === !1)
|
|
3092
3094
|
return;
|
|
3093
3095
|
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");
|
|
3094
3096
|
if (!t || !i) {
|
|
3095
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3097
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, bt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3096
3098
|
return;
|
|
3097
3099
|
}
|
|
3098
|
-
c(this, dt, new
|
|
3100
|
+
c(this, dt, new Lo({
|
|
3099
3101
|
url: t,
|
|
3100
3102
|
channelId: i,
|
|
3101
3103
|
authenticationToken: s,
|
|
3102
3104
|
infiniteReconnect: o
|
|
3103
3105
|
})), e(this, dt).on("live", (u) => {
|
|
3104
|
-
e(this, x).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), r(this,
|
|
3106
|
+
e(this, x).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), r(this, S, Ai).call(this, u);
|
|
3105
3107
|
}), e(this, dt).on("timeout", () => {
|
|
3106
3108
|
e(this, M).setAttribute("hidden", ""), e(this, ht).removeAttribute("hidden");
|
|
3107
3109
|
}), e(this, dt).on("error", (u) => {
|
|
3108
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3110
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, bt).call(this, u.title, u.message);
|
|
3109
3111
|
}), e(this, ht).addEventListener("click", () => {
|
|
3110
3112
|
e(this, x).connect(), e(this, ht).setAttribute("hidden", ""), e(this, M).setAttribute("hidden", ""), e(this, x).focus();
|
|
3111
3113
|
}), this.hasAttribute("paused") && e(this, dt).start();
|
|
3112
|
-
},
|
|
3114
|
+
}, We = new WeakMap(), Ai = function(t) {
|
|
3113
3115
|
var u, v;
|
|
3114
|
-
const i =
|
|
3116
|
+
const i = Js(this.getAttribute("title"), !1);
|
|
3115
3117
|
if (!i) return;
|
|
3116
3118
|
const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
|
|
3117
3119
|
let p;
|
|
3118
|
-
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,
|
|
3120
|
+
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, ao({
|
|
3119
3121
|
title: o,
|
|
3120
3122
|
poster: p
|
|
3121
3123
|
});
|
|
3122
|
-
},
|
|
3124
|
+
}, bt = function(t, i) {
|
|
3123
3125
|
e(this, M).setAttribute("title", t), e(this, M).setAttribute("description", i);
|
|
3124
3126
|
const s = this.getAttribute("poster");
|
|
3125
3127
|
s && e(this, M).setAttribute("background-image", s), e(this, M).removeAttribute("hidden");
|
|
3126
|
-
}, m(
|
|
3127
|
-
const
|
|
3128
|
-
|
|
3128
|
+
}, m(or, "observedAttributes", [...Te.observedAttributes, ...Co]);
|
|
3129
|
+
const lr = document.createElement("template");
|
|
3130
|
+
lr.innerHTML = /* HTML */
|
|
3129
3131
|
`
|
|
3130
3132
|
<style>
|
|
3131
3133
|
:host {
|
|
@@ -3161,35 +3163,35 @@ ar.innerHTML = /* HTML */
|
|
|
3161
3163
|
}
|
|
3162
3164
|
</style>
|
|
3163
3165
|
`;
|
|
3164
|
-
const
|
|
3165
|
-
var ne, wt, Mt, re,
|
|
3166
|
-
class
|
|
3166
|
+
const _o = 6e3;
|
|
3167
|
+
var ne, wt, Mt, re, V, dr, yi, ws, zi;
|
|
3168
|
+
class hr extends HTMLElement {
|
|
3167
3169
|
constructor() {
|
|
3168
3170
|
super();
|
|
3169
|
-
l(this,
|
|
3171
|
+
l(this, V);
|
|
3170
3172
|
l(this, ne, null);
|
|
3171
3173
|
l(this, wt, null);
|
|
3172
3174
|
l(this, Mt, null);
|
|
3173
3175
|
l(this, re, () => {
|
|
3174
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this,
|
|
3176
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this, V, dr).call(this) : r(this, V, yi).call(this);
|
|
3175
3177
|
});
|
|
3176
|
-
l(this,
|
|
3178
|
+
l(this, zi, (t) => {
|
|
3177
3179
|
t.forEach((i) => {
|
|
3178
3180
|
i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3179
3181
|
});
|
|
3180
3182
|
});
|
|
3181
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3183
|
+
this.attachShadow({ mode: "open" }).appendChild(lr.content.cloneNode(!0));
|
|
3182
3184
|
}
|
|
3183
3185
|
connectedCallback() {
|
|
3184
3186
|
var t;
|
|
3185
|
-
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,
|
|
3187
|
+
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, zi))), e(this, Mt).observe(this);
|
|
3186
3188
|
}
|
|
3187
3189
|
disconnectedCallback() {
|
|
3188
3190
|
var t, i;
|
|
3189
|
-
(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,
|
|
3191
|
+
(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, V, yi).call(this);
|
|
3190
3192
|
}
|
|
3191
3193
|
attributeChangedCallback(t, i, s) {
|
|
3192
|
-
i !== s && (t === n.POSTER_SRC && this.paused && !this.disabled && r(this,
|
|
3194
|
+
i !== s && (t === n.POSTER_SRC && this.paused && !this.disabled && r(this, V, ws).call(this), (t === n.PAUSED || t === "disabled" || t === "intersecting") && e(this, re).call(this));
|
|
3193
3195
|
}
|
|
3194
3196
|
get disabled() {
|
|
3195
3197
|
return this.hasAttribute("disabled");
|
|
@@ -3204,21 +3206,21 @@ class lr extends HTMLElement {
|
|
|
3204
3206
|
return this.hasAttribute(n.PAUSED);
|
|
3205
3207
|
}
|
|
3206
3208
|
}
|
|
3207
|
-
ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(),
|
|
3208
|
-
e(this, wt) === null && (r(this,
|
|
3209
|
+
ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(), V = new WeakSet(), dr = function() {
|
|
3210
|
+
e(this, wt) === null && (r(this, V, yi).call(this), c(this, wt, window.setInterval(() => r(this, V, ws).call(this), _o)));
|
|
3209
3211
|
}, yi = function() {
|
|
3210
3212
|
e(this, wt) !== null && (clearInterval(e(this, wt)), c(this, wt, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3211
3213
|
}, ws = function() {
|
|
3212
3214
|
if (!this.posterSrc) return;
|
|
3213
3215
|
const t = new URL(this.posterSrc), i = new Image();
|
|
3214
3216
|
t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
|
|
3215
|
-
},
|
|
3217
|
+
}, zi = new WeakMap(), m(hr, "observedAttributes", [
|
|
3216
3218
|
n.POSTER_SRC,
|
|
3217
3219
|
n.PAUSED,
|
|
3218
3220
|
"disabled",
|
|
3219
3221
|
"intersecting"
|
|
3220
3222
|
]);
|
|
3221
|
-
const
|
|
3223
|
+
const Po = (
|
|
3222
3224
|
/* SVG */
|
|
3223
3225
|
`
|
|
3224
3226
|
<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">
|
|
@@ -3226,8 +3228,8 @@ const Uo = (
|
|
|
3226
3228
|
<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" />
|
|
3227
3229
|
</svg>
|
|
3228
3230
|
`
|
|
3229
|
-
),
|
|
3230
|
-
|
|
3231
|
+
), cr = document.createElement("template");
|
|
3232
|
+
cr.innerHTML = /* HTML */
|
|
3231
3233
|
`
|
|
3232
3234
|
<style>
|
|
3233
3235
|
:host {
|
|
@@ -3235,38 +3237,38 @@ dr.innerHTML = /* HTML */
|
|
|
3235
3237
|
}
|
|
3236
3238
|
</style>
|
|
3237
3239
|
|
|
3238
|
-
<slot name="button">${
|
|
3240
|
+
<slot name="button">${Po}</slot>
|
|
3239
3241
|
<slot name="listbox" hidden>
|
|
3240
3242
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3241
3243
|
</slot>
|
|
3242
3244
|
`;
|
|
3243
|
-
var
|
|
3244
|
-
const
|
|
3245
|
+
var Ze, Ls;
|
|
3246
|
+
const Ce = class Ce extends Ds {
|
|
3245
3247
|
constructor() {
|
|
3246
3248
|
var t, i, s, o;
|
|
3247
3249
|
super();
|
|
3248
|
-
l(this,
|
|
3249
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3250
|
+
l(this, Ze);
|
|
3251
|
+
(t = this.shadowRoot) == null || t.appendChild(cr.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]");
|
|
3250
3252
|
}
|
|
3251
3253
|
connectedCallback() {
|
|
3252
|
-
super.connectedCallback(), r(this,
|
|
3254
|
+
super.connectedCallback(), r(this, Ze, Ls).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3253
3255
|
}
|
|
3254
3256
|
attributeChangedCallback(t, i, s) {
|
|
3255
|
-
super.attributeChangedCallback(t, i, s), t === n.RENDITION_LEVELS && r(this,
|
|
3257
|
+
super.attributeChangedCallback(t, i, s), t === n.RENDITION_LEVELS && r(this, Ze, Ls).call(this);
|
|
3256
3258
|
}
|
|
3257
3259
|
};
|
|
3258
|
-
|
|
3260
|
+
Ze = new WeakSet(), Ls = function() {
|
|
3259
3261
|
const t = this.getAttribute(n.RENDITION_LEVELS);
|
|
3260
3262
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3261
|
-
}, m(
|
|
3262
|
-
let
|
|
3263
|
-
const
|
|
3263
|
+
}, m(Ce, "observedAttributes", [...q(Ce, Ce, "observedAttributes"), n.RENDITION_LEVELS]);
|
|
3264
|
+
let Cs = Ce;
|
|
3265
|
+
const ur = document.createElement("template"), Mo = (
|
|
3264
3266
|
/* SVG */
|
|
3265
3267
|
`
|
|
3266
3268
|
<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>
|
|
3267
3269
|
`
|
|
3268
3270
|
);
|
|
3269
|
-
|
|
3271
|
+
ur.innerHTML = /* HTML */
|
|
3270
3272
|
`
|
|
3271
3273
|
<style>
|
|
3272
3274
|
:host {
|
|
@@ -3339,7 +3341,7 @@ cr.innerHTML = /* HTML */
|
|
|
3339
3341
|
}
|
|
3340
3342
|
|
|
3341
3343
|
[role="menuitem"][aria-selected="true"]::before {
|
|
3342
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3344
|
+
content: url("data:image/svg+xml,${encodeURIComponent(Mo)}");
|
|
3343
3345
|
position: absolute;
|
|
3344
3346
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
3345
3347
|
top: calc(50% - 8px);
|
|
@@ -3369,30 +3371,30 @@ cr.innerHTML = /* HTML */
|
|
|
3369
3371
|
<div class="menu"></div>
|
|
3370
3372
|
</slot>
|
|
3371
3373
|
`;
|
|
3372
|
-
var Dt,
|
|
3373
|
-
class
|
|
3374
|
+
var Dt, ti, Ct, ct, Ot, ei, L, br, Ts, mr, xs, vr, gr, fr, Ss, Er;
|
|
3375
|
+
class pr extends HTMLElement {
|
|
3374
3376
|
constructor() {
|
|
3375
3377
|
super();
|
|
3376
|
-
l(this,
|
|
3378
|
+
l(this, L);
|
|
3377
3379
|
l(this, Dt, []);
|
|
3378
|
-
l(this,
|
|
3379
|
-
l(this,
|
|
3380
|
+
l(this, ti, Number.MAX_SAFE_INTEGER);
|
|
3381
|
+
l(this, Ct, null);
|
|
3380
3382
|
l(this, ct, []);
|
|
3381
3383
|
l(this, Ot, null);
|
|
3382
|
-
l(this,
|
|
3384
|
+
l(this, ei, null);
|
|
3383
3385
|
m(this, "handleEvent", (t) => {
|
|
3384
3386
|
switch (t.type) {
|
|
3385
3387
|
case "keydown":
|
|
3386
|
-
r(this,
|
|
3388
|
+
r(this, L, gr).call(this, t);
|
|
3387
3389
|
break;
|
|
3388
3390
|
}
|
|
3389
3391
|
});
|
|
3390
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3392
|
+
this.attachShadow({ mode: "open" }).appendChild(ur.content.cloneNode(!0));
|
|
3391
3393
|
}
|
|
3392
3394
|
connectedCallback() {
|
|
3393
3395
|
var i;
|
|
3394
3396
|
const t = this.getRootNode();
|
|
3395
|
-
t instanceof ShadowRoot && (c(this, Ot, t.host.closest("vindral-controller")), (i = e(this, Ot)) == null || i.connectListener(this), r(this,
|
|
3397
|
+
t instanceof ShadowRoot && (c(this, Ot, t.host.closest("vindral-controller")), (i = e(this, Ot)) == null || i.connectListener(this), r(this, L, br).call(this), r(this, L, Ts).call(this), c(this, ei, t.host), this.addEventListener("keydown", this));
|
|
3396
3398
|
}
|
|
3397
3399
|
disconnectedCallback() {
|
|
3398
3400
|
var t;
|
|
@@ -3402,20 +3404,20 @@ class ur extends HTMLElement {
|
|
|
3402
3404
|
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));
|
|
3403
3405
|
}
|
|
3404
3406
|
set list(t) {
|
|
3405
|
-
c(this, Dt, t), r(this,
|
|
3407
|
+
c(this, Dt, t), r(this, L, Ts).call(this);
|
|
3406
3408
|
}
|
|
3407
3409
|
set maxVideoBitrate(t) {
|
|
3408
|
-
c(this,
|
|
3410
|
+
c(this, ti, t), r(this, L, xs).call(this);
|
|
3409
3411
|
}
|
|
3410
3412
|
get keysUsed() {
|
|
3411
3413
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
3412
3414
|
}
|
|
3413
3415
|
focus() {
|
|
3414
3416
|
var t;
|
|
3415
|
-
(t = e(this,
|
|
3417
|
+
(t = e(this, Ct)) == null || t.focus();
|
|
3416
3418
|
}
|
|
3417
3419
|
}
|
|
3418
|
-
Dt = new WeakMap(),
|
|
3420
|
+
Dt = new WeakMap(), ti = new WeakMap(), Ct = new WeakMap(), ct = new WeakMap(), Ot = new WeakMap(), ei = new WeakMap(), L = new WeakSet(), br = function() {
|
|
3419
3421
|
const t = (s) => {
|
|
3420
3422
|
s.forEach((o) => {
|
|
3421
3423
|
if (o.intersectionRatio !== 1)
|
|
@@ -3432,25 +3434,25 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3432
3434
|
threshold: 0
|
|
3433
3435
|
// 0 means any intersection is enough to be considered "inside"
|
|
3434
3436
|
}).observe(this);
|
|
3435
|
-
},
|
|
3437
|
+
}, Ts = function() {
|
|
3436
3438
|
var i;
|
|
3437
3439
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
3438
3440
|
t && (c(this, ct, []), t.innerHTML = "", e(this, Dt).sort((s, o) => {
|
|
3439
3441
|
var p, u;
|
|
3440
3442
|
return (p = s.video) != null && p.bitRate && ((u = o.video) != null && u.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
3441
3443
|
}).forEach((s) => {
|
|
3442
|
-
var v, g, P, et, J,
|
|
3444
|
+
var v, g, P, et, J, Lt, Tt, xt;
|
|
3443
3445
|
const o = document.createElement("div");
|
|
3444
3446
|
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
3445
|
-
const p = r(this,
|
|
3446
|
-
o.textContent = s.video ?
|
|
3447
|
+
const p = r(this, L, mr).call(this, (g = s.video) == null ? void 0 : g.frameRate);
|
|
3448
|
+
o.textContent = s.video ? oo(s.video) : "";
|
|
3447
3449
|
const u = document.createElement("span");
|
|
3448
|
-
u.classList.add("menu-item-subtitle"), u.textContent = `${
|
|
3449
|
-
}), r(this,
|
|
3450
|
-
},
|
|
3450
|
+
u.classList.add("menu-item-subtitle"), u.textContent = `${ro(((et = (P = s.video) == null ? void 0 : P.bitRate) != null ? et : 0) + ((Lt = (J = s.audio) == null ? void 0 : J.bitRate) != null ? Lt : 0))}, ${p}p`, o.appendChild(u), o.addEventListener("click", () => r(this, L, vr).call(this, s)), e(this, ct).push({ el: o, id: (xt = (Tt = s.video) == null ? void 0 : Tt.id) != null ? xt : -1 }), t.appendChild(o);
|
|
3451
|
+
}), r(this, L, xs).call(this));
|
|
3452
|
+
}, mr = function(t) {
|
|
3451
3453
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
3452
|
-
},
|
|
3453
|
-
e(this,
|
|
3454
|
+
}, xs = function() {
|
|
3455
|
+
e(this, Ct) && (e(this, Ct).removeAttribute("aria-selected"), e(this, Ct).tabIndex = -1);
|
|
3454
3456
|
const t = e(this, Dt).sort(
|
|
3455
3457
|
(s, o) => {
|
|
3456
3458
|
var p, u;
|
|
@@ -3459,7 +3461,7 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3459
3461
|
), i = e(this, Dt).filter(
|
|
3460
3462
|
(s) => {
|
|
3461
3463
|
var o;
|
|
3462
|
-
return ((o = s.video) == null ? void 0 : o.bitRate) && s.video.bitRate <= e(this,
|
|
3464
|
+
return ((o = s.video) == null ? void 0 : o.bitRate) && s.video.bitRate <= e(this, ti);
|
|
3463
3465
|
}
|
|
3464
3466
|
)[0] || t[t.length - 1];
|
|
3465
3467
|
if (i) {
|
|
@@ -3467,33 +3469,33 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3467
3469
|
var p;
|
|
3468
3470
|
return o.id === ((p = i.video) == null ? void 0 : p.id);
|
|
3469
3471
|
});
|
|
3470
|
-
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this,
|
|
3472
|
+
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this, Ct, s.el));
|
|
3471
3473
|
}
|
|
3472
|
-
},
|
|
3474
|
+
}, vr = function(t) {
|
|
3473
3475
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
3474
3476
|
new CustomEvent(f.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
3475
3477
|
);
|
|
3476
|
-
},
|
|
3478
|
+
}, gr = function(t) {
|
|
3477
3479
|
var u, v, g;
|
|
3478
3480
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
3479
|
-
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this,
|
|
3480
|
-
},
|
|
3481
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, ei)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, L, Ss).call(this)) == null ? void 0 : v.el) == null || g.click() : r(this, L, fr).call(this, t));
|
|
3482
|
+
}, fr = function(t) {
|
|
3481
3483
|
var g;
|
|
3482
|
-
const { key: i } = t, s = e(this, ct), o = (g = r(this,
|
|
3484
|
+
const { key: i } = t, s = e(this, ct), o = (g = r(this, L, Ss).call(this)) != null ? g : s[0];
|
|
3483
3485
|
if (!o) return;
|
|
3484
3486
|
const p = s.indexOf(o);
|
|
3485
3487
|
let u = Math.max(0, p);
|
|
3486
3488
|
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);
|
|
3487
3489
|
const v = s[u];
|
|
3488
|
-
v && (r(this,
|
|
3489
|
-
},
|
|
3490
|
+
v && (r(this, L, Er).call(this, v.id), v.el.focus());
|
|
3491
|
+
}, Ss = function() {
|
|
3490
3492
|
return e(this, ct).find((t) => t.el.tabIndex === 0);
|
|
3491
|
-
},
|
|
3493
|
+
}, Er = function(t) {
|
|
3492
3494
|
for (const i of e(this, ct))
|
|
3493
3495
|
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
3494
|
-
}, m(
|
|
3495
|
-
const
|
|
3496
|
-
|
|
3496
|
+
}, m(pr, "observedAttributes", [n.RENDITION_LEVELS, n.MAX_VIDEO_BITRATE]);
|
|
3497
|
+
const Ar = document.createElement("template");
|
|
3498
|
+
Ar.innerHTML = /* HTML */
|
|
3497
3499
|
`
|
|
3498
3500
|
<style>
|
|
3499
3501
|
:host {
|
|
@@ -3562,43 +3564,43 @@ Er.innerHTML = /* HTML */
|
|
|
3562
3564
|
<div id="scroll-area"></div>
|
|
3563
3565
|
<slot id="content"></slot>
|
|
3564
3566
|
`;
|
|
3565
|
-
var ut, Ft, oe,
|
|
3566
|
-
class
|
|
3567
|
+
var ut, Ft, oe, ii, w, kr, Ir, wr, Gi, $i, ki, Ns, Rs, Us, _s;
|
|
3568
|
+
class yr extends HTMLElement {
|
|
3567
3569
|
constructor() {
|
|
3568
3570
|
super();
|
|
3569
|
-
l(this,
|
|
3571
|
+
l(this, w);
|
|
3570
3572
|
l(this, ut, null);
|
|
3571
3573
|
l(this, Ft, null);
|
|
3572
3574
|
l(this, oe, null);
|
|
3573
|
-
l(this,
|
|
3575
|
+
l(this, ii, 0);
|
|
3574
3576
|
m(this, "handleEvent", (t) => {
|
|
3575
3577
|
switch (t.type) {
|
|
3576
3578
|
case "touchstart":
|
|
3577
|
-
r(this,
|
|
3579
|
+
r(this, w, kr).call(this, t);
|
|
3578
3580
|
break;
|
|
3579
3581
|
case "touchmove":
|
|
3580
|
-
r(this,
|
|
3582
|
+
r(this, w, Ir).call(this, t);
|
|
3581
3583
|
break;
|
|
3582
3584
|
case "touchend":
|
|
3583
|
-
r(this,
|
|
3585
|
+
r(this, w, wr).call(this, t);
|
|
3584
3586
|
break;
|
|
3585
3587
|
}
|
|
3586
3588
|
});
|
|
3587
|
-
l(this,
|
|
3588
|
-
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), r(this,
|
|
3589
|
+
l(this, Gi, () => {
|
|
3590
|
+
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), r(this, w, _s).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, w, Us).call(this) : (
|
|
3589
3591
|
// fully open
|
|
3590
|
-
!this.hasAttribute("snap-touch") && r(this,
|
|
3592
|
+
!this.hasAttribute("snap-touch") && r(this, w, Rs).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
|
|
3591
3593
|
);
|
|
3592
3594
|
});
|
|
3593
|
-
l(this,
|
|
3594
|
-
const t = e(this,
|
|
3595
|
-
if (c(this,
|
|
3595
|
+
l(this, $i, () => {
|
|
3596
|
+
const t = e(this, ii);
|
|
3597
|
+
if (c(this, ii, this.scrollTop), !r(this, w, ki).call(this)) {
|
|
3596
3598
|
this.scrollTop = 0;
|
|
3597
3599
|
return;
|
|
3598
3600
|
}
|
|
3599
|
-
this.scrollTop === 0 ? (this.open = !1, r(this,
|
|
3601
|
+
this.scrollTop === 0 ? (this.open = !1, r(this, w, _s).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, w, Us).call(this) : r(this, w, Rs).call(this) && t <= this.scrollTop && (this.open = !0);
|
|
3600
3602
|
});
|
|
3601
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3603
|
+
this.attachShadow({ mode: "open" }).appendChild(Ar.content.cloneNode(!0));
|
|
3602
3604
|
}
|
|
3603
3605
|
connectedCallback() {
|
|
3604
3606
|
var i, s, o, p, u, v;
|
|
@@ -3608,11 +3610,11 @@ class Ar extends HTMLElement {
|
|
|
3608
3610
|
this.open && (this.open = !1);
|
|
3609
3611
|
});
|
|
3610
3612
|
const g = this.hasAttribute("touch-enabled");
|
|
3611
|
-
if (!
|
|
3612
|
-
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this,
|
|
3613
|
+
if (!eo() || !g) {
|
|
3614
|
+
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, $i));
|
|
3613
3615
|
return;
|
|
3614
3616
|
}
|
|
3615
|
-
this.addEventListener("scroll", e(this,
|
|
3617
|
+
this.addEventListener("scroll", e(this, Gi)), (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 });
|
|
3616
3618
|
}
|
|
3617
3619
|
}
|
|
3618
3620
|
disconnectedCallback() {
|
|
@@ -3621,7 +3623,7 @@ class Ar extends HTMLElement {
|
|
|
3621
3623
|
}
|
|
3622
3624
|
attributeChangedCallback(t, i, s) {
|
|
3623
3625
|
var o;
|
|
3624
|
-
i !== s && (t === n.USER_INTERACTING && s === null && r(this,
|
|
3626
|
+
i !== s && (t === n.USER_INTERACTING && s === null && r(this, w, Ns).call(this) && setTimeout(() => {
|
|
3625
3627
|
this.open = !1;
|
|
3626
3628
|
}, 300), t === "open" && this.scrollTo({ top: s === null ? 0 : (o = e(this, Ft)) == null ? void 0 : o.clientHeight, behavior: "smooth" }));
|
|
3627
3629
|
}
|
|
@@ -3638,39 +3640,39 @@ class Ar extends HTMLElement {
|
|
|
3638
3640
|
return this.hasAttribute("visible");
|
|
3639
3641
|
}
|
|
3640
3642
|
}
|
|
3641
|
-
ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(),
|
|
3642
|
-
r(this,
|
|
3643
|
-
},
|
|
3644
|
-
if (!(!r(this,
|
|
3643
|
+
ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(), ii = new WeakMap(), w = new WeakSet(), kr = function(t) {
|
|
3644
|
+
r(this, w, ki).call(this) && t.touches[0] && c(this, oe, t.touches[0].clientY);
|
|
3645
|
+
}, Ir = function(t) {
|
|
3646
|
+
if (!(!r(this, w, ki).call(this) || !e(this, oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
|
|
3645
3647
|
const i = t.touches[0].clientY, s = e(this, oe) - i;
|
|
3646
3648
|
this.scrollTop = s;
|
|
3647
3649
|
}
|
|
3648
3650
|
}, wr = function(t) {
|
|
3649
|
-
r(this,
|
|
3650
|
-
},
|
|
3651
|
+
r(this, w, Ns).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
|
|
3652
|
+
}, Gi = new WeakMap(), $i = new WeakMap(), ki = function() {
|
|
3651
3653
|
return this.hasAttribute(n.USER_INTERACTING);
|
|
3652
|
-
}, Ss = function() {
|
|
3653
|
-
return this.scrollTop > 0;
|
|
3654
3654
|
}, Ns = function() {
|
|
3655
|
+
return this.scrollTop > 0;
|
|
3656
|
+
}, Rs = function() {
|
|
3655
3657
|
var t;
|
|
3656
3658
|
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, Ft)) == null ? void 0 : t.clientHeight);
|
|
3657
3659
|
}, Us = function() {
|
|
3658
3660
|
this.visible = !0, this.dispatchEvent(new CustomEvent(f.LOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3659
|
-
},
|
|
3661
|
+
}, _s = function() {
|
|
3660
3662
|
this.visible = !1, this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3661
|
-
}, m(
|
|
3662
|
-
const
|
|
3663
|
+
}, m(yr, "observedAttributes", [n.USER_INTERACTING, "open", "touch-enabled"]);
|
|
3664
|
+
const Cr = document.createElement("template"), Do = (
|
|
3663
3665
|
/* SVG */
|
|
3664
3666
|
`
|
|
3665
3667
|
<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>
|
|
3666
3668
|
`
|
|
3667
|
-
),
|
|
3669
|
+
), Oo = (
|
|
3668
3670
|
/* SVG */
|
|
3669
3671
|
`
|
|
3670
3672
|
<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>
|
|
3671
3673
|
`
|
|
3672
3674
|
);
|
|
3673
|
-
|
|
3675
|
+
Cr.innerHTML = /* HTML */
|
|
3674
3676
|
`
|
|
3675
3677
|
<style>
|
|
3676
3678
|
:host {
|
|
@@ -3723,16 +3725,16 @@ Ir.innerHTML = /* HTML */
|
|
|
3723
3725
|
</style>
|
|
3724
3726
|
|
|
3725
3727
|
<slot name="icon">
|
|
3726
|
-
<slot name="play">${
|
|
3727
|
-
<slot name="unmute">${
|
|
3728
|
+
<slot name="play">${Do}</slot>
|
|
3729
|
+
<slot name="unmute">${Oo}</slot>
|
|
3728
3730
|
</slot>
|
|
3729
3731
|
`;
|
|
3730
|
-
var ae,
|
|
3731
|
-
class
|
|
3732
|
+
var ae, si, Ht, ni;
|
|
3733
|
+
class Lr extends HTMLElement {
|
|
3732
3734
|
constructor() {
|
|
3733
3735
|
super();
|
|
3734
3736
|
l(this, ae, null);
|
|
3735
|
-
l(this,
|
|
3737
|
+
l(this, si, () => {
|
|
3736
3738
|
this.dispatchEvent(new CustomEvent(f.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
3737
3739
|
});
|
|
3738
3740
|
l(this, Ht, (t) => {
|
|
@@ -3743,7 +3745,7 @@ class Cr extends HTMLElement {
|
|
|
3743
3745
|
}
|
|
3744
3746
|
this.dispatchEvent(new CustomEvent(f.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
3745
3747
|
});
|
|
3746
|
-
l(this,
|
|
3748
|
+
l(this, ni, (t) => {
|
|
3747
3749
|
const { metaKey: i, altKey: s, key: o } = t;
|
|
3748
3750
|
if (i || s || !this.keysUsed.includes(o)) {
|
|
3749
3751
|
this.removeEventListener("keyup", e(this, Ht));
|
|
@@ -3751,7 +3753,7 @@ class Cr extends HTMLElement {
|
|
|
3751
3753
|
}
|
|
3752
3754
|
this.addEventListener("keyup", e(this, Ht), { once: !0 });
|
|
3753
3755
|
});
|
|
3754
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3756
|
+
this.attachShadow({ mode: "open" }).appendChild(Cr.content.cloneNode(!0));
|
|
3755
3757
|
}
|
|
3756
3758
|
get keysUsed() {
|
|
3757
3759
|
return ["Enter", " "];
|
|
@@ -3761,24 +3763,24 @@ class Cr extends HTMLElement {
|
|
|
3761
3763
|
c(this, ae, this.closest("vindral-controller")), (t = e(this, ae)) == null || t.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
3762
3764
|
}
|
|
3763
3765
|
enable() {
|
|
3764
|
-
this.addEventListener("click", e(this,
|
|
3766
|
+
this.addEventListener("click", e(this, si)), this.addEventListener("keydown", e(this, ni)), this.tabIndex = 0;
|
|
3765
3767
|
}
|
|
3766
3768
|
disable() {
|
|
3767
|
-
this.removeEventListener("click", e(this,
|
|
3769
|
+
this.removeEventListener("click", e(this, si)), this.removeEventListener("keydown", e(this, ni)), this.removeEventListener("keyup", e(this, Ht)), this.tabIndex = -1;
|
|
3768
3770
|
}
|
|
3769
3771
|
disconnectedCallback() {
|
|
3770
3772
|
var t;
|
|
3771
3773
|
(t = e(this, ae)) == null || t.disconnectListener(this), this.disable();
|
|
3772
3774
|
}
|
|
3773
3775
|
}
|
|
3774
|
-
ae = new WeakMap(),
|
|
3776
|
+
ae = new WeakMap(), si = new WeakMap(), Ht = new WeakMap(), ni = new WeakMap(), m(Lr, "observedAttributes", [
|
|
3775
3777
|
"hidden",
|
|
3776
3778
|
n.NEEDS_USER_INPUT_VIDEO,
|
|
3777
3779
|
n.NEEDS_USER_INPUT_AUDIO,
|
|
3778
3780
|
n.PAUSED
|
|
3779
3781
|
]);
|
|
3780
|
-
const
|
|
3781
|
-
|
|
3782
|
+
const Tr = document.createElement("template");
|
|
3783
|
+
Tr.innerHTML = /* HTML */
|
|
3782
3784
|
`
|
|
3783
3785
|
<style>
|
|
3784
3786
|
:host,
|
|
@@ -3797,14 +3799,12 @@ Lr.innerHTML = /* HTML */
|
|
|
3797
3799
|
font-size: 20px;
|
|
3798
3800
|
color: var(--fg-strong);
|
|
3799
3801
|
pointer-events: none;
|
|
3802
|
+
transition: opacity 100ms;
|
|
3803
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
3800
3804
|
}
|
|
3801
3805
|
|
|
3802
3806
|
:host([hidden]) {
|
|
3803
|
-
|
|
3804
|
-
}
|
|
3805
|
-
|
|
3806
|
-
#background {
|
|
3807
|
-
opacity: 0.7;
|
|
3807
|
+
opacity: 0;
|
|
3808
3808
|
}
|
|
3809
3809
|
|
|
3810
3810
|
#message-container {
|
|
@@ -3822,12 +3822,9 @@ Lr.innerHTML = /* HTML */
|
|
|
3822
3822
|
|
|
3823
3823
|
#title,
|
|
3824
3824
|
#description {
|
|
3825
|
-
position: static;
|
|
3826
|
-
width: 100%;
|
|
3827
3825
|
text-align: center;
|
|
3828
3826
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
|
|
3829
3827
|
margin: 0;
|
|
3830
|
-
pointer-events: none;
|
|
3831
3828
|
}
|
|
3832
3829
|
|
|
3833
3830
|
#title {
|
|
@@ -3871,32 +3868,32 @@ Lr.innerHTML = /* HTML */
|
|
|
3871
3868
|
<p id="description"></p>
|
|
3872
3869
|
</div>
|
|
3873
3870
|
`;
|
|
3874
|
-
var
|
|
3875
|
-
class
|
|
3871
|
+
var ri, oi, ai;
|
|
3872
|
+
class xr extends HTMLElement {
|
|
3876
3873
|
constructor() {
|
|
3877
3874
|
super();
|
|
3878
|
-
l(this, ni);
|
|
3879
3875
|
l(this, ri);
|
|
3880
3876
|
l(this, oi);
|
|
3877
|
+
l(this, ai);
|
|
3881
3878
|
const t = this.attachShadow({ mode: "open" });
|
|
3882
|
-
t.appendChild(
|
|
3879
|
+
t.appendChild(Tr.content.cloneNode(!0)), c(this, ri, t.querySelector("#title")), c(this, oi, t.querySelector("#description")), c(this, ai, t.querySelector("#background"));
|
|
3883
3880
|
}
|
|
3884
3881
|
connectedCallback() {
|
|
3885
3882
|
}
|
|
3886
3883
|
disconnectedCallback() {
|
|
3887
3884
|
}
|
|
3888
3885
|
attributeChangedCallback(t, i, s) {
|
|
3889
|
-
i !== s && (t === "title" ? e(this,
|
|
3886
|
+
i !== s && (t === "title" ? e(this, ri).textContent = s : t === "description" ? e(this, oi).textContent = s : t === "background-image" && (e(this, ai).style.backgroundImage = `url(${s})`));
|
|
3890
3887
|
}
|
|
3891
3888
|
}
|
|
3892
|
-
|
|
3893
|
-
const
|
|
3889
|
+
ri = new WeakMap(), oi = new WeakMap(), ai = new WeakMap(), m(xr, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
3890
|
+
const Sr = document.createElement("template"), Fo = (
|
|
3894
3891
|
/* SVG */
|
|
3895
3892
|
`
|
|
3896
3893
|
<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>
|
|
3897
3894
|
`
|
|
3898
3895
|
);
|
|
3899
|
-
|
|
3896
|
+
Sr.innerHTML = /* HTML */
|
|
3900
3897
|
`
|
|
3901
3898
|
<style>
|
|
3902
3899
|
:host {
|
|
@@ -3946,14 +3943,14 @@ xr.innerHTML = /* HTML */
|
|
|
3946
3943
|
}
|
|
3947
3944
|
</style>
|
|
3948
3945
|
|
|
3949
|
-
<slot id="play" name="icon">${
|
|
3946
|
+
<slot id="play" name="icon">${Fo}</slot>
|
|
3950
3947
|
`;
|
|
3951
3948
|
var le;
|
|
3952
|
-
class
|
|
3949
|
+
class Nr extends HTMLElement {
|
|
3953
3950
|
constructor() {
|
|
3954
3951
|
super();
|
|
3955
3952
|
l(this, le, null);
|
|
3956
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3953
|
+
this.attachShadow({ mode: "open" }).appendChild(Sr.content.cloneNode(!0));
|
|
3957
3954
|
}
|
|
3958
3955
|
connectedCallback() {
|
|
3959
3956
|
var t;
|
|
@@ -3964,12 +3961,12 @@ class Sr extends HTMLElement {
|
|
|
3964
3961
|
(t = e(this, le)) == null || t.disconnectListener(this);
|
|
3965
3962
|
}
|
|
3966
3963
|
attributeChangedCallback(t, i, s) {
|
|
3967
|
-
i !== s && t === "hidden" && !
|
|
3964
|
+
i !== s && t === "hidden" && !C(s) && this.focus();
|
|
3968
3965
|
}
|
|
3969
3966
|
}
|
|
3970
|
-
le = new WeakMap(), m(
|
|
3971
|
-
const
|
|
3972
|
-
|
|
3967
|
+
le = new WeakMap(), m(Nr, "observedAttributes", ["hidden"]);
|
|
3968
|
+
const Rr = document.createElement("template");
|
|
3969
|
+
Rr.innerHTML = /* HTML */
|
|
3973
3970
|
`
|
|
3974
3971
|
<style>
|
|
3975
3972
|
:host {
|
|
@@ -3978,26 +3975,26 @@ Nr.innerHTML = /* HTML */
|
|
|
3978
3975
|
}
|
|
3979
3976
|
</style>
|
|
3980
3977
|
`;
|
|
3981
|
-
const
|
|
3982
|
-
var
|
|
3983
|
-
const
|
|
3978
|
+
const Ho = (d) => `${Math.round(d * 100)}%`;
|
|
3979
|
+
var li;
|
|
3980
|
+
const Le = class Le extends Os {
|
|
3984
3981
|
constructor() {
|
|
3985
3982
|
var t;
|
|
3986
3983
|
super();
|
|
3987
|
-
l(this,
|
|
3984
|
+
l(this, li, () => {
|
|
3988
3985
|
const t = this.range.valueAsNumber;
|
|
3989
3986
|
this.dispatchEvent(new CustomEvent(f.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
3990
3987
|
});
|
|
3991
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3988
|
+
(t = this.shadowRoot) == null || t.appendChild(Rr.content.cloneNode(!0));
|
|
3992
3989
|
}
|
|
3993
3990
|
connectedCallback() {
|
|
3994
|
-
super.connectedCallback(), this.range.addEventListener("input", e(this,
|
|
3991
|
+
super.connectedCallback(), this.range.addEventListener("input", e(this, li)), this.range.setAttribute("aria-label", "volume");
|
|
3995
3992
|
}
|
|
3996
3993
|
disconnectedCallback() {
|
|
3997
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", e(this,
|
|
3994
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, li));
|
|
3998
3995
|
}
|
|
3999
3996
|
attributeChangedCallback(t, i, s) {
|
|
4000
|
-
super.attributeChangedCallback(t, i, s), (t === n.MUTED || t === n.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
3997
|
+
super.attributeChangedCallback(t, i, s), (t === n.MUTED || t === n.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Ho(this.range.valueAsNumber)), this.updateBar());
|
|
4001
3998
|
}
|
|
4002
3999
|
get volume() {
|
|
4003
4000
|
var t;
|
|
@@ -4007,11 +4004,11 @@ const Ce = class Ce extends Ds {
|
|
|
4007
4004
|
return this.hasAttribute(n.MUTED);
|
|
4008
4005
|
}
|
|
4009
4006
|
};
|
|
4010
|
-
|
|
4011
|
-
let
|
|
4012
|
-
function
|
|
4013
|
-
customElements.define("vindral-controller",
|
|
4007
|
+
li = new WeakMap(), m(Le, "observedAttributes", [...q(Le, Le, "observedAttributes"), n.MUTED, n.VOLUME]);
|
|
4008
|
+
let Ps = Le;
|
|
4009
|
+
function qo() {
|
|
4010
|
+
customElements.define("vindral-controller", Te), customElements.define("vindral-control-bar", Cn), customElements.define("vindral-play-button", Es), customElements.define("vindral-mute-button", gs), customElements.define("vindral-buffering-overlay", sn), customElements.define("vindral-scroll-overlay", yr), customElements.define("vindral-play-overlay", Nr), customElements.define("vindral-user-input-play-overlay", Lr), customElements.define("vindral-fullscreen-button", ds), customElements.define("vindral-rendition-levels-menu", Cs), customElements.define("vindral-rendition-levels-menu-list", pr), customElements.define("vindral-channel-grid-button", ts), customElements.define("vindral-channel-grid", cn), customElements.define("vindral-channel-grid-item", Ms), customElements.define("vindral-pip-button", fs), customElements.define("vindral-airplay-button", Vi), customElements.define("vindral-cast-button", Qi), customElements.define("vindral-cast-overlay", an), customElements.define("vindral-buffering-icon", tn), customElements.define("vindral-language-menu", cs), customElements.define("vindral-language-menu-list", Yn), customElements.define("vindral-message", xr), customElements.define("vindral-volume-range", Ps), customElements.define("vindral-poster-overlay", hr), customElements.define("vindral-player", or);
|
|
4014
4011
|
}
|
|
4015
4012
|
export {
|
|
4016
|
-
|
|
4013
|
+
qo as registerComponents
|
|
4017
4014
|
};
|