@vindral/web-sdk 4.1.10 → 4.2.0
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/BQEuFJLn.js +206 -0
- package/BoKiM5eL.js +232 -0
- package/{CPEMXA01.js → CuhQLT-7.js} +1 -1
- package/{BWE6d-4K.js → DBHv5ggB.js} +5884 -5139
- package/{uEFjK_x4.js → DGo74EDo.js} +15 -8
- package/{BJjv9_f9.js → HT5RB929.js} +1 -1
- package/api-client.d.ts +41 -42
- package/api-client.js +1 -1
- package/cast-sender.d.ts +37 -43
- package/cast-sender.js +1 -1
- package/core.d.ts +149 -94
- package/core.js +1 -1
- package/legacy.d.ts +149 -94
- package/legacy.es.js +8469 -7447
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.d.ts +134 -90
- package/player.js +1275 -1265
- package/react.d.ts +134 -90
- package/C8BeO5Y9.js +0 -117
package/player.js
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var eh = Object.defineProperty;
|
|
2
|
+
var ih = Object.getPrototypeOf;
|
|
3
|
+
var sh = Reflect.get;
|
|
4
|
+
var ta = (p) => {
|
|
5
5
|
throw TypeError(p);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
var v = (p,
|
|
9
|
-
var e = (p,
|
|
10
|
-
var
|
|
7
|
+
var nh = (p, a, t) => a in p ? eh(p, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[a] = t;
|
|
8
|
+
var v = (p, a, t) => nh(p, typeof a != "symbol" ? a + "" : a, t), Pn = (p, a, t) => a.has(p) || ta("Cannot " + t);
|
|
9
|
+
var e = (p, a, t) => (Pn(p, a, "read from private field"), t ? t.call(p) : a.get(p)), l = (p, a, t) => a.has(p) ? ta("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(p) : a.set(p, t), h = (p, a, t, i) => (Pn(p, a, "write to private field"), i ? i.call(p, t) : a.set(p, t), t), n = (p, a, t) => (Pn(p, a, "access private method"), t);
|
|
10
|
+
var ea = (p, a, t, i) => ({
|
|
11
11
|
set _(s) {
|
|
12
|
-
h(p,
|
|
12
|
+
h(p, a, s, t);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
|
-
return e(p,
|
|
15
|
+
return e(p, a, i);
|
|
16
16
|
}
|
|
17
|
-
}),
|
|
18
|
-
var
|
|
19
|
-
var
|
|
17
|
+
}), W = (p, a, t) => sh(ih(p), t, a);
|
|
18
|
+
var q = (p, a, t) => new Promise((i, s) => {
|
|
19
|
+
var o = (m) => {
|
|
20
20
|
try {
|
|
21
21
|
c(t.next(m));
|
|
22
|
-
} catch (
|
|
23
|
-
s(
|
|
22
|
+
} catch (E) {
|
|
23
|
+
s(E);
|
|
24
24
|
}
|
|
25
25
|
}, u = (m) => {
|
|
26
26
|
try {
|
|
27
27
|
c(t.throw(m));
|
|
28
|
-
} catch (
|
|
29
|
-
s(
|
|
28
|
+
} catch (E) {
|
|
29
|
+
s(E);
|
|
30
30
|
}
|
|
31
|
-
}, c = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(
|
|
32
|
-
c((t = t.apply(p,
|
|
31
|
+
}, c = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(o, u);
|
|
32
|
+
c((t = t.apply(p, a)).next());
|
|
33
33
|
});
|
|
34
|
-
import { L as
|
|
35
|
-
import { E as
|
|
36
|
-
import { CastSender as
|
|
37
|
-
import { A as
|
|
38
|
-
const Fn = 1e3, Hn = Fn * 1e3,
|
|
34
|
+
import { i as rh, e as ah, g as oh, f as lh, s as ia, h as hh, j as dh, k as ch, l as uh, m as ph, o as sa, p as bh, L as da, V as mh, q as vh, r as fh, u as gh, C as Eh, A as Ah, t as yh, v as kh } from "./DBHv5ggB.js";
|
|
35
|
+
import { E as Ys } from "./DGo74EDo.js";
|
|
36
|
+
import { CastSender as Ih } from "./cast-sender.js";
|
|
37
|
+
import { A as Lh, d as Th } from "./CuhQLT-7.js";
|
|
38
|
+
const Fn = 1e3, Hn = Fn * 1e3, na = Hn * 1e3, Dn = (p, a, t) => p % a === 0 ? p / a : (p / a).toFixed(t), ca = (p, a = 1) => p >= na ? `${Dn(p, na, a)} Gbit/s` : p >= Hn ? `${Dn(p, Hn, a)} Mbit/s` : p >= Fn ? `${Dn(p, Fn, a)} Kbit/s` : `${p} bit/s`, ua = ({ width: p, height: a }) => `${p}x${a}`, Sh = ({
|
|
39
39
|
title: p,
|
|
40
|
-
subTitle:
|
|
40
|
+
subTitle: a = "Live stream",
|
|
41
41
|
poster: t
|
|
42
42
|
}) => {
|
|
43
43
|
document.title = p, "mediaSession" in navigator && (navigator.mediaSession.metadata = new MediaMetadata({
|
|
44
44
|
title: p,
|
|
45
|
-
artist:
|
|
45
|
+
artist: a,
|
|
46
46
|
artwork: t ? [{ src: t }] : []
|
|
47
47
|
}));
|
|
48
|
-
},
|
|
48
|
+
}, wh = (p) => p === "mse" || p === "webcodecs" || p === "wasm";
|
|
49
|
+
function Ch(p) {
|
|
50
|
+
if (p === null || p === "auto")
|
|
51
|
+
return;
|
|
52
|
+
const a = p.split(",").filter(wh);
|
|
53
|
+
return a.length > 0 ? a : void 0;
|
|
54
|
+
}
|
|
55
|
+
function xh(p) {
|
|
56
|
+
if (p === "no-preference" || p === "prefer-hardware" || p === "prefer-software")
|
|
57
|
+
return p;
|
|
58
|
+
}
|
|
59
|
+
const r = {
|
|
49
60
|
PAUSED: "paused",
|
|
50
61
|
MUTED: "muted",
|
|
51
62
|
USER_INTERACTING: "user-interacting",
|
|
@@ -89,7 +100,7 @@ const Fn = 1e3, Hn = Fn * 1e3, ea = Hn * 1e3, Dn = (p, o, t) => p % o === 0 ? p
|
|
|
89
100
|
TIMESHIFT_POSITION: "timeshift-position",
|
|
90
101
|
POSTER_SRC: "poster-src",
|
|
91
102
|
DURATION: "duration"
|
|
92
|
-
},
|
|
103
|
+
}, pa = Object.values(r), y = {
|
|
93
104
|
PLAY: "play",
|
|
94
105
|
PAUSE: "pause",
|
|
95
106
|
MUTE: "mute",
|
|
@@ -113,89 +124,78 @@ const Fn = 1e3, Hn = Fn * 1e3, ea = Hn * 1e3, Dn = (p, o, t) => p % o === 0 ? p
|
|
|
113
124
|
SEEK: "seek",
|
|
114
125
|
GO_LIVE: "go-live"
|
|
115
126
|
};
|
|
116
|
-
function
|
|
127
|
+
function ba(p) {
|
|
117
128
|
return p === "audio" || p === "video" || p === "audio+video" ? p : "audio+video";
|
|
118
129
|
}
|
|
119
130
|
function Mn(p) {
|
|
120
131
|
return p === "trace" || p === "debug" || p === "info" || p === "warn" || p === "error" || p === "off" ? p : "off";
|
|
121
132
|
}
|
|
122
|
-
function
|
|
133
|
+
function Nh(p) {
|
|
123
134
|
if (p === null)
|
|
124
135
|
return;
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
136
|
+
const a = p.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
|
|
137
|
+
if (a.length !== 0)
|
|
138
|
+
return a;
|
|
128
139
|
}
|
|
129
|
-
function
|
|
130
|
-
if (p === "no-preference" || p === "prefer-hardware" || p === "prefer-software")
|
|
131
|
-
return p;
|
|
132
|
-
}
|
|
133
|
-
function uh(p) {
|
|
140
|
+
function Rh(p) {
|
|
134
141
|
if (p !== null)
|
|
135
142
|
try {
|
|
136
|
-
const
|
|
137
|
-
if (typeof
|
|
138
|
-
const t =
|
|
143
|
+
const a = JSON.parse(p);
|
|
144
|
+
if (typeof a == "object" && a !== null) {
|
|
145
|
+
const t = a;
|
|
139
146
|
if (typeof t.width == "number" && typeof t.height == "number")
|
|
140
147
|
return t;
|
|
141
148
|
}
|
|
142
|
-
} catch (
|
|
149
|
+
} catch (a) {
|
|
143
150
|
return;
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
|
-
function
|
|
153
|
+
function _h(p) {
|
|
147
154
|
if (p !== null)
|
|
148
155
|
try {
|
|
149
|
-
const
|
|
150
|
-
if (typeof
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const i = t.wasmDecodingConstraint;
|
|
154
|
-
if (typeof i.width != "number" || typeof i.height != "number" || typeof i.bitRate != "number")
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
return t;
|
|
158
|
-
}
|
|
159
|
-
} catch (o) {
|
|
156
|
+
const a = JSON.parse(p);
|
|
157
|
+
if (typeof a == "object" && a !== null)
|
|
158
|
+
return a;
|
|
159
|
+
} catch (a) {
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Bt(p) {
|
|
164
164
|
if (p === null)
|
|
165
165
|
return;
|
|
166
|
-
const
|
|
167
|
-
return isNaN(
|
|
166
|
+
const a = parseFloat(p);
|
|
167
|
+
return isNaN(a) ? void 0 : a;
|
|
168
168
|
}
|
|
169
169
|
function U(p) {
|
|
170
170
|
return typeof p == "string";
|
|
171
171
|
}
|
|
172
|
-
function R(p,
|
|
172
|
+
function R(p, a) {
|
|
173
173
|
if (p === null)
|
|
174
|
-
return
|
|
174
|
+
return a != null ? a : void 0;
|
|
175
175
|
const t = p.toLowerCase();
|
|
176
|
-
return t === "false" ? !1 : t === "true" || t === "" ? !0 :
|
|
176
|
+
return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
179
|
-
return p === null ?
|
|
178
|
+
function ma(p, a) {
|
|
179
|
+
return p === null ? a != null ? a : void 0 : p === "" || p.toLowerCase() === "true" ? !0 : p.toLowerCase() === "false" ? !1 : p;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Ws(p) {
|
|
182
182
|
if (p === null)
|
|
183
183
|
return;
|
|
184
|
-
const
|
|
184
|
+
const a = {}, t = p.split(",");
|
|
185
185
|
for (const i of t) {
|
|
186
|
-
const [s,
|
|
187
|
-
s &&
|
|
186
|
+
const [s, o] = i.split(":");
|
|
187
|
+
s && o && (a[s.trim()] = o.trim());
|
|
188
188
|
}
|
|
189
|
-
return Object.keys(
|
|
189
|
+
return Object.keys(a).length > 0 ? a : void 0;
|
|
190
190
|
}
|
|
191
191
|
function Js(p) {
|
|
192
192
|
if (p === null)
|
|
193
193
|
return;
|
|
194
|
-
const
|
|
195
|
-
return
|
|
194
|
+
const a = p.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
195
|
+
return a.length > 0 ? a : void 0;
|
|
196
196
|
}
|
|
197
|
-
const
|
|
198
|
-
|
|
197
|
+
const va = document.createElement("template");
|
|
198
|
+
va.innerHTML = /* HTML */
|
|
199
199
|
`
|
|
200
200
|
<style>
|
|
201
201
|
:host {
|
|
@@ -260,14 +260,14 @@ class mt extends HTMLElement {
|
|
|
260
260
|
this.handleClick(t);
|
|
261
261
|
});
|
|
262
262
|
l(this, Mi, (t) => {
|
|
263
|
-
const { metaKey: i, altKey: s, key:
|
|
264
|
-
if (i || s || !this.keysUsed.includes(
|
|
263
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
264
|
+
if (i || s || !this.keysUsed.includes(o)) {
|
|
265
265
|
this.removeEventListener("keyup", e(this, Ee));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
this.addEventListener("keyup", e(this, Ee), { once: !0 });
|
|
269
269
|
});
|
|
270
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
270
|
+
this.attachShadow({ mode: "open" }).appendChild(va.content.cloneNode(!0));
|
|
271
271
|
}
|
|
272
272
|
get keysUsed() {
|
|
273
273
|
return ["Enter", " "];
|
|
@@ -291,13 +291,13 @@ class mt extends HTMLElement {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
He = new WeakMap(), Di = new WeakMap(), Ee = new WeakMap(), Mi = new WeakMap(), v(mt, "observedAttributes", ["disabled"]);
|
|
294
|
-
const
|
|
294
|
+
const fa = document.createElement("template"), ra = (
|
|
295
295
|
/* SVG */
|
|
296
296
|
`
|
|
297
297
|
<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>
|
|
298
298
|
`
|
|
299
299
|
);
|
|
300
|
-
|
|
300
|
+
fa.innerHTML = /* HTML */
|
|
301
301
|
`
|
|
302
302
|
<style>
|
|
303
303
|
:host {
|
|
@@ -318,8 +318,8 @@ ba.innerHTML = /* HTML */
|
|
|
318
318
|
</style>
|
|
319
319
|
|
|
320
320
|
<slot name="icon">
|
|
321
|
-
<slot name="enter">${
|
|
322
|
-
<slot name="exit">${
|
|
321
|
+
<slot name="enter">${ra}</slot>
|
|
322
|
+
<slot name="exit">${ra}</slot>
|
|
323
323
|
</slot>
|
|
324
324
|
`;
|
|
325
325
|
var Oi, zn;
|
|
@@ -328,7 +328,7 @@ const Ai = class Ai extends mt {
|
|
|
328
328
|
var t;
|
|
329
329
|
super();
|
|
330
330
|
l(this, Oi);
|
|
331
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
331
|
+
(t = this.shadowRoot) == null || t.appendChild(fa.content.cloneNode(!0));
|
|
332
332
|
}
|
|
333
333
|
connectedCallback() {
|
|
334
334
|
super.connectedCallback(), n(this, Oi, zn).call(this);
|
|
@@ -352,13 +352,13 @@ const Ai = class Ai extends mt {
|
|
|
352
352
|
Oi = new WeakSet(), zn = function() {
|
|
353
353
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
354
354
|
}, v(Ai, "observedAttributes", [
|
|
355
|
-
...
|
|
355
|
+
...W(Ai, Ai, "observedAttributes"),
|
|
356
356
|
r.AIRPLAY_AVAILABLE,
|
|
357
357
|
r.IS_AIRPLAYING
|
|
358
358
|
]);
|
|
359
359
|
let Bn = Ai;
|
|
360
|
-
const
|
|
361
|
-
|
|
360
|
+
const ga = document.createElement("template");
|
|
361
|
+
ga.innerHTML = /* HTML */
|
|
362
362
|
`
|
|
363
363
|
<style>
|
|
364
364
|
:host {
|
|
@@ -370,7 +370,7 @@ ma.innerHTML = /* HTML */
|
|
|
370
370
|
}
|
|
371
371
|
</style>
|
|
372
372
|
`;
|
|
373
|
-
var Be, ze, et, Fi,
|
|
373
|
+
var Be, ze, et, Fi, cn, un, ci, Ea, Aa;
|
|
374
374
|
class Un extends mt {
|
|
375
375
|
constructor() {
|
|
376
376
|
var t;
|
|
@@ -380,21 +380,21 @@ class Un extends mt {
|
|
|
380
380
|
l(this, ze);
|
|
381
381
|
l(this, et);
|
|
382
382
|
l(this, Fi, null);
|
|
383
|
-
l(this,
|
|
383
|
+
l(this, cn, (t) => {
|
|
384
384
|
t.composedPath().includes(this) || this.hide();
|
|
385
385
|
});
|
|
386
|
-
l(this,
|
|
386
|
+
l(this, un, () => {
|
|
387
387
|
this.hide();
|
|
388
388
|
});
|
|
389
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
389
|
+
(t = this.shadowRoot) == null || t.appendChild(ga.content.cloneNode(!0));
|
|
390
390
|
}
|
|
391
391
|
connectedCallback() {
|
|
392
|
-
var u, c, m,
|
|
392
|
+
var u, c, m, E;
|
|
393
393
|
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-haspopup", "listbox");
|
|
394
394
|
const t = (u = this.getAttribute("list-position")) != null ? u : "top";
|
|
395
395
|
(c = e(this, ze)) == null || c.setAttribute("list-position", t);
|
|
396
|
-
const i = this.getRootNode(),
|
|
397
|
-
Promise.all(
|
|
396
|
+
const i = this.getRootNode(), o = [...(E = (m = this.shadowRoot) == null ? void 0 : m.querySelectorAll(":not(:defined)")) != null ? E : []].map((N) => customElements.whenDefined(N.localName));
|
|
397
|
+
Promise.all(o).then(() => {
|
|
398
398
|
var N;
|
|
399
399
|
(i instanceof Document || i instanceof ShadowRoot) && (h(this, Fi, i.querySelector("vindral-controller")), (N = e(this, Fi)) == null || N.connectListener(this));
|
|
400
400
|
});
|
|
@@ -409,24 +409,24 @@ class Un extends mt {
|
|
|
409
409
|
h(this, et, t);
|
|
410
410
|
}
|
|
411
411
|
enable() {
|
|
412
|
-
super.enable(), this.addEventListener("change", e(this,
|
|
412
|
+
super.enable(), this.addEventListener("change", e(this, un)), document.addEventListener("click", e(this, cn));
|
|
413
413
|
}
|
|
414
414
|
hide() {
|
|
415
415
|
var t, i;
|
|
416
416
|
!e(this, et) || (t = e(this, et)) != null && t.hidden || (e(this, et).hidden = !0, (i = e(this, Be)) == null || i.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(y.UNLOCK_UI, { bubbles: !0, composed: !0 })), this.focus());
|
|
417
417
|
}
|
|
418
418
|
handleClick(t) {
|
|
419
|
-
e(this, et) && !t.composedPath().includes(e(this, et)) && n(this, ci,
|
|
419
|
+
e(this, et) && !t.composedPath().includes(e(this, et)) && n(this, ci, Ea).call(this);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
Be = new WeakMap(), ze = new WeakMap(), et = new WeakMap(), Fi = new WeakMap(),
|
|
422
|
+
Be = new WeakMap(), ze = new WeakMap(), et = new WeakMap(), Fi = new WeakMap(), cn = new WeakMap(), un = new WeakMap(), ci = new WeakSet(), Ea = function() {
|
|
423
423
|
var t;
|
|
424
|
-
(t = e(this, et)) != null && t.hidden ? n(this, ci,
|
|
425
|
-
},
|
|
424
|
+
(t = e(this, et)) != null && t.hidden ? n(this, ci, Aa).call(this) : this.hide();
|
|
425
|
+
}, Aa = function() {
|
|
426
426
|
var t, i, s;
|
|
427
427
|
(t = e(this, et)) != null && t.hidden && (e(this, et).hidden = !1, (i = e(this, Be)) == null || i.setAttribute("aria-expanded", "true"), (s = e(this, ze)) == null || s.focus(), this.dispatchEvent(new CustomEvent(y.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
428
428
|
};
|
|
429
|
-
const
|
|
429
|
+
const Uh = (
|
|
430
430
|
/* SVG */
|
|
431
431
|
`
|
|
432
432
|
<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">
|
|
@@ -434,8 +434,8 @@ const bh = (
|
|
|
434
434
|
<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" />
|
|
435
435
|
</svg>
|
|
436
436
|
`
|
|
437
|
-
),
|
|
438
|
-
|
|
437
|
+
), ya = document.createElement("template");
|
|
438
|
+
ya.innerHTML = /* HTML */
|
|
439
439
|
`
|
|
440
440
|
<style>
|
|
441
441
|
:host {
|
|
@@ -443,7 +443,7 @@ ga.innerHTML = /* HTML */
|
|
|
443
443
|
}
|
|
444
444
|
</style>
|
|
445
445
|
|
|
446
|
-
<slot name="button">${
|
|
446
|
+
<slot name="button">${Uh}</slot>
|
|
447
447
|
<slot name="listbox" hidden>
|
|
448
448
|
<vindral-advanced-rendition-menu-list id="listbox" part="listbox"></vindral-advanced-rendition-menu-list>
|
|
449
449
|
</slot>
|
|
@@ -451,10 +451,10 @@ ga.innerHTML = /* HTML */
|
|
|
451
451
|
var Hi, Gn;
|
|
452
452
|
const yi = class yi extends Un {
|
|
453
453
|
constructor() {
|
|
454
|
-
var t, i, s,
|
|
454
|
+
var t, i, s, o;
|
|
455
455
|
super();
|
|
456
456
|
l(this, Hi);
|
|
457
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
457
|
+
(t = this.shadowRoot) == null || t.appendChild(ya.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]");
|
|
458
458
|
}
|
|
459
459
|
connectedCallback() {
|
|
460
460
|
super.connectedCallback(), n(this, Hi, Gn).call(this), this.setAttribute("aria-label", "Advanced rendition controls");
|
|
@@ -466,10 +466,10 @@ const yi = class yi extends Un {
|
|
|
466
466
|
Hi = new WeakSet(), Gn = function() {
|
|
467
467
|
const t = this.getAttribute(r.RENDITION_LEVELS);
|
|
468
468
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
469
|
-
}, v(yi, "observedAttributes", [...
|
|
469
|
+
}, v(yi, "observedAttributes", [...W(yi, yi, "observedAttributes"), r.RENDITION_LEVELS]);
|
|
470
470
|
let $n = yi;
|
|
471
|
-
const
|
|
472
|
-
|
|
471
|
+
const ka = document.createElement("template");
|
|
472
|
+
ka.innerHTML = /* HTML */
|
|
473
473
|
`
|
|
474
474
|
<style>
|
|
475
475
|
:host {
|
|
@@ -661,43 +661,43 @@ Ea.innerHTML = /* HTML */
|
|
|
661
661
|
<div class="menu" role="menu" aria-label="Quality options"></div>
|
|
662
662
|
</slot>
|
|
663
663
|
`;
|
|
664
|
-
var $e, Ae, it,
|
|
665
|
-
class
|
|
664
|
+
var $e, Ae, it, Tt, Bi, Ge, Et, ye, zi, Kt, L, La, Ta, Sa, ui, pi, wa, Kn, Ca, me, xa, Na, Ra, _a, qn, Ua;
|
|
665
|
+
class Ia extends HTMLElement {
|
|
666
666
|
constructor() {
|
|
667
667
|
super();
|
|
668
668
|
l(this, L);
|
|
669
669
|
l(this, $e, []);
|
|
670
670
|
l(this, Ae, Number.MAX_SAFE_INTEGER);
|
|
671
671
|
l(this, it, !1);
|
|
672
|
-
l(this,
|
|
672
|
+
l(this, Tt, !0);
|
|
673
673
|
l(this, Bi, null);
|
|
674
674
|
l(this, Ge, null);
|
|
675
675
|
l(this, Et, []);
|
|
676
676
|
l(this, ye, null);
|
|
677
677
|
l(this, zi, null);
|
|
678
|
-
l(this,
|
|
678
|
+
l(this, Kt, null);
|
|
679
679
|
v(this, "handleEvent", (t) => {
|
|
680
|
-
t.type === "keydown" && n(this, L,
|
|
680
|
+
t.type === "keydown" && n(this, L, Ra).call(this, t);
|
|
681
681
|
});
|
|
682
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
682
|
+
this.attachShadow({ mode: "open" }).appendChild(ka.content.cloneNode(!0));
|
|
683
683
|
}
|
|
684
684
|
connectedCallback() {
|
|
685
685
|
var i;
|
|
686
686
|
const t = this.getRootNode();
|
|
687
|
-
t instanceof ShadowRoot && (h(this, ye, t.host.closest("vindral-controller")), (i = e(this, ye)) == null || i.connectListener(this), n(this, L,
|
|
687
|
+
t instanceof ShadowRoot && (h(this, ye, t.host.closest("vindral-controller")), (i = e(this, ye)) == null || i.connectListener(this), n(this, L, wa).call(this), n(this, L, La).call(this), n(this, L, Ta).call(this), n(this, L, Kn).call(this), h(this, zi, t.host), this.addEventListener("keydown", this));
|
|
688
688
|
}
|
|
689
689
|
disconnectedCallback() {
|
|
690
690
|
var t, i;
|
|
691
|
-
(t = e(this, ye)) == null || t.disconnectListener(this), (i = e(this,
|
|
691
|
+
(t = e(this, ye)) == null || t.disconnectListener(this), (i = e(this, Kt)) == null || i.disconnect(), h(this, Kt, null), this.removeEventListener("keydown", this);
|
|
692
692
|
}
|
|
693
693
|
attributeChangedCallback(t, i, s) {
|
|
694
|
-
i !== s && (t === r.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === r.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = s ? parseInt(s, 10) : Number.MAX_SAFE_INTEGER), t === r.ABR_ENABLED && (h(this, it, R(s, !1)), n(this, L, ui).call(this), n(this, L,
|
|
694
|
+
i !== s && (t === r.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === r.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = s ? parseInt(s, 10) : Number.MAX_SAFE_INTEGER), t === r.ABR_ENABLED && (h(this, it, R(s, !1)), n(this, L, ui).call(this), n(this, L, me).call(this)), t === r.RENDITION_LEVEL && s && (h(this, Bi, JSON.parse(s)), n(this, L, me).call(this)), t === r.SIZE_BASED_RESOLUTION_CAP_ENABLED && (h(this, Tt, R(s, !0)), n(this, L, pi).call(this)));
|
|
695
695
|
}
|
|
696
696
|
set list(t) {
|
|
697
|
-
h(this, $e, t), n(this, L,
|
|
697
|
+
h(this, $e, t), n(this, L, Kn).call(this);
|
|
698
698
|
}
|
|
699
699
|
set maxVideoBitrate(t) {
|
|
700
|
-
h(this, Ae, t), n(this, L,
|
|
700
|
+
h(this, Ae, t), n(this, L, me).call(this);
|
|
701
701
|
}
|
|
702
702
|
get keysUsed() {
|
|
703
703
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
@@ -707,23 +707,23 @@ class Aa extends HTMLElement {
|
|
|
707
707
|
(t = e(this, Ge)) == null || t.focus();
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
-
$e = new WeakMap(), Ae = new WeakMap(), it = new WeakMap(),
|
|
711
|
-
var s,
|
|
712
|
-
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector('[data-mode="auto"]'), i = (
|
|
710
|
+
$e = new WeakMap(), Ae = new WeakMap(), it = new WeakMap(), Tt = new WeakMap(), Bi = new WeakMap(), Ge = new WeakMap(), Et = new WeakMap(), ye = new WeakMap(), zi = new WeakMap(), Kt = new WeakMap(), L = new WeakSet(), La = function() {
|
|
711
|
+
var s, o;
|
|
712
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector('[data-mode="auto"]'), i = (o = this.shadowRoot) == null ? void 0 : o.querySelector('[data-mode="fixed"]');
|
|
713
713
|
t == null || t.addEventListener("click", () => {
|
|
714
|
-
h(this, it, !0), n(this, L, ui).call(this), n(this, L,
|
|
714
|
+
h(this, it, !0), n(this, L, ui).call(this), n(this, L, me).call(this), this.dispatchEvent(new CustomEvent(y.SET_ABR_MODE, { bubbles: !0, composed: !0, detail: !0 }));
|
|
715
715
|
}), i == null || i.addEventListener("click", () => {
|
|
716
|
-
const u = n(this, L,
|
|
716
|
+
const u = n(this, L, Sa).call(this);
|
|
717
717
|
u && this.dispatchEvent(
|
|
718
718
|
new CustomEvent(y.SET_RENDITION, { bubbles: !0, composed: !0, detail: u })
|
|
719
|
-
), h(this, it, !1), n(this, L, ui).call(this), n(this, L,
|
|
719
|
+
), h(this, it, !1), n(this, L, ui).call(this), n(this, L, me).call(this), this.dispatchEvent(new CustomEvent(y.SET_ABR_MODE, { bubbles: !0, composed: !0, detail: !1 }));
|
|
720
720
|
}), n(this, L, ui).call(this);
|
|
721
|
-
},
|
|
721
|
+
}, Ta = function() {
|
|
722
722
|
var i;
|
|
723
723
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#size-cap-toggle");
|
|
724
724
|
t == null || t.addEventListener("click", () => {
|
|
725
|
-
const s = !e(this,
|
|
726
|
-
h(this,
|
|
725
|
+
const s = !e(this, Tt);
|
|
726
|
+
h(this, Tt, s), n(this, L, pi).call(this), this.dispatchEvent(
|
|
727
727
|
new CustomEvent(y.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
728
728
|
bubbles: !0,
|
|
729
729
|
composed: !0,
|
|
@@ -731,118 +731,118 @@ $e = new WeakMap(), Ae = new WeakMap(), it = new WeakMap(), wt = new WeakMap(),
|
|
|
731
731
|
})
|
|
732
732
|
);
|
|
733
733
|
}), n(this, L, pi).call(this);
|
|
734
|
-
},
|
|
734
|
+
}, Sa = function() {
|
|
735
735
|
const t = [...e(this, $e)].sort(
|
|
736
|
-
(s,
|
|
736
|
+
(s, o) => {
|
|
737
737
|
var u, c;
|
|
738
|
-
return (u = s.video) != null && u.bitRate && ((c =
|
|
738
|
+
return (u = s.video) != null && u.bitRate && ((c = o.video) != null && c.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
739
739
|
}
|
|
740
740
|
);
|
|
741
741
|
return t.find((s) => {
|
|
742
|
-
var
|
|
743
|
-
return ((
|
|
742
|
+
var o;
|
|
743
|
+
return ((o = s.video) == null ? void 0 : o.bitRate) && s.video.bitRate <= e(this, Ae);
|
|
744
744
|
}) || t[t.length - 1] || null;
|
|
745
745
|
}, ui = function() {
|
|
746
|
-
var
|
|
747
|
-
const t = (
|
|
746
|
+
var o, u, c;
|
|
747
|
+
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector('[data-mode="auto"]'), i = (u = this.shadowRoot) == null ? void 0 : u.querySelector('[data-mode="fixed"]'), s = (c = this.shadowRoot) == null ? void 0 : c.querySelector("#quality-status-text");
|
|
748
748
|
t && i && (t.setAttribute("data-active", String(e(this, it))), i.setAttribute("data-active", String(!e(this, it)))), s && (s.textContent = e(this, it) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), n(this, L, pi).call(this);
|
|
749
749
|
}, pi = function() {
|
|
750
750
|
var i;
|
|
751
751
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#size-cap-toggle");
|
|
752
|
-
t && (t.textContent = e(this,
|
|
753
|
-
},
|
|
752
|
+
t && (t.textContent = e(this, Tt) ? "On" : "Off", t.setAttribute("aria-pressed", String(e(this, Tt))), t.setAttribute("data-active", String(e(this, Tt))), t.disabled = !e(this, it), t.title = e(this, it) ? "Toggle size-based resolution cap" : "Only available in Auto (ABR) mode");
|
|
753
|
+
}, wa = function() {
|
|
754
754
|
var i;
|
|
755
755
|
const t = (s) => {
|
|
756
|
-
s.forEach((
|
|
757
|
-
if (
|
|
756
|
+
s.forEach((o) => {
|
|
757
|
+
if (o.intersectionRatio === 1) {
|
|
758
758
|
this.style.height = "auto";
|
|
759
759
|
return;
|
|
760
|
-
} else if (
|
|
761
|
-
const c =
|
|
760
|
+
} else if (o.intersectionRatio > 0) {
|
|
761
|
+
const c = o.intersectionRect.height, m = Math.max(0, c - 24);
|
|
762
762
|
this.style.height = `${m}px`;
|
|
763
763
|
} else
|
|
764
764
|
this.style.height = "auto";
|
|
765
765
|
});
|
|
766
766
|
};
|
|
767
|
-
(i = e(this,
|
|
767
|
+
(i = e(this, Kt)) == null || i.disconnect(), h(this, Kt, new IntersectionObserver(t, {
|
|
768
768
|
root: e(this, ye),
|
|
769
769
|
// The parent element to use as the viewport
|
|
770
770
|
threshold: 0
|
|
771
771
|
// 0 means any intersection is enough to be considered "inside"
|
|
772
|
-
})), e(this,
|
|
773
|
-
},
|
|
772
|
+
})), e(this, Kt).observe(this);
|
|
773
|
+
}, Kn = function() {
|
|
774
774
|
var i;
|
|
775
775
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
776
|
-
t && (h(this, Et, []), t.innerHTML = "", e(this, $e).sort((s,
|
|
776
|
+
t && (h(this, Et, []), t.innerHTML = "", e(this, $e).sort((s, o) => {
|
|
777
777
|
var u, c;
|
|
778
|
-
return (u = s.video) != null && u.bitRate && ((c =
|
|
778
|
+
return (u = s.video) != null && u.bitRate && ((c = o.video) != null && c.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
779
779
|
}).forEach((s) => {
|
|
780
|
-
var
|
|
781
|
-
const
|
|
782
|
-
|
|
780
|
+
var H, G, vt, ft, gt, de, ce, ue, pe, be;
|
|
781
|
+
const o = document.createElement("div");
|
|
782
|
+
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((H = s.video) == null ? void 0 : H.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
783
783
|
const u = document.createElement("div");
|
|
784
784
|
u.className = "menu-item-info";
|
|
785
785
|
const c = document.createElement("span");
|
|
786
|
-
c.className = "menu-item-title", c.textContent = s.video ?
|
|
786
|
+
c.className = "menu-item-title", c.textContent = s.video ? ua(s.video) : "";
|
|
787
787
|
const m = document.createElement("span");
|
|
788
788
|
m.classList.add("menu-item-subtitle");
|
|
789
|
-
const
|
|
790
|
-
m.textContent = `${
|
|
789
|
+
const E = n(this, L, Ca).call(this, (G = s.video) == null ? void 0 : G.frameRate);
|
|
790
|
+
m.textContent = `${ca(((ft = (vt = s.video) == null ? void 0 : vt.bitRate) != null ? ft : 0) + ((de = (gt = s.audio) == null ? void 0 : gt.bitRate) != null ? de : 0))}, ${E}fps`, u.appendChild(c), u.appendChild(m), o.appendChild(u);
|
|
791
791
|
const N = document.createElement("span");
|
|
792
|
-
N.className = "current-label", N.textContent = "Current",
|
|
793
|
-
el:
|
|
794
|
-
id: (
|
|
795
|
-
bitrate: (
|
|
796
|
-
}), t.appendChild(
|
|
797
|
-
}), n(this, L,
|
|
798
|
-
},
|
|
792
|
+
N.className = "current-label", N.textContent = "Current", o.appendChild(N), o.addEventListener("click", () => n(this, L, Na).call(this, s)), e(this, Et).push({
|
|
793
|
+
el: o,
|
|
794
|
+
id: (ue = (ce = s.video) == null ? void 0 : ce.id) != null ? ue : -1,
|
|
795
|
+
bitrate: (be = (pe = s.video) == null ? void 0 : pe.bitRate) != null ? be : 0
|
|
796
|
+
}), t.appendChild(o);
|
|
797
|
+
}), n(this, L, me).call(this));
|
|
798
|
+
}, Ca = function(t) {
|
|
799
799
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
800
|
-
},
|
|
801
|
-
var
|
|
802
|
-
const t = (u = (
|
|
800
|
+
}, me = function() {
|
|
801
|
+
var o, u;
|
|
802
|
+
const t = (u = (o = e(this, Bi)) == null ? void 0 : o.video) == null ? void 0 : u.id, i = n(this, L, xa).call(this), s = i == null ? void 0 : i.id;
|
|
803
803
|
h(this, Ge, null), e(this, Et).forEach((c) => {
|
|
804
|
-
const m = c.id,
|
|
804
|
+
const m = c.id, E = c.bitrate;
|
|
805
805
|
c.el.setAttribute("data-playing", String(m === t));
|
|
806
806
|
const N = m === s;
|
|
807
807
|
if (c.el.setAttribute("data-selected", String(N)), N ? (c.el.setAttribute("aria-selected", "true"), c.el.tabIndex = 0, h(this, Ge, c.el)) : (c.el.removeAttribute("aria-selected"), c.el.tabIndex = -1), e(this, it)) {
|
|
808
|
-
const
|
|
809
|
-
c.el.setAttribute("data-capped", String(
|
|
808
|
+
const H = E > e(this, Ae);
|
|
809
|
+
c.el.setAttribute("data-capped", String(H));
|
|
810
810
|
} else
|
|
811
811
|
c.el.removeAttribute("data-capped");
|
|
812
812
|
});
|
|
813
|
-
},
|
|
813
|
+
}, xa = function() {
|
|
814
814
|
const t = [...e(this, Et)].sort((i, s) => s.bitrate - i.bitrate);
|
|
815
815
|
return t.find((i) => i.bitrate <= e(this, Ae)) || t[t.length - 1];
|
|
816
|
-
},
|
|
816
|
+
}, Na = function(t) {
|
|
817
817
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
818
818
|
new CustomEvent(y.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
819
819
|
);
|
|
820
|
-
},
|
|
821
|
-
var c, m,
|
|
822
|
-
const { key: i, ctrlKey: s, altKey:
|
|
823
|
-
s ||
|
|
824
|
-
},
|
|
825
|
-
var
|
|
826
|
-
const { key: i } = t, s = e(this, Et),
|
|
827
|
-
if (!
|
|
828
|
-
const u = s.indexOf(
|
|
820
|
+
}, Ra = function(t) {
|
|
821
|
+
var c, m, E;
|
|
822
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
823
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (c = e(this, zi)) == null || c.hide() : i === "Enter" || i === " " ? (E = (m = n(this, L, qn).call(this)) == null ? void 0 : m.el) == null || E.click() : n(this, L, _a).call(this, t));
|
|
824
|
+
}, _a = function(t) {
|
|
825
|
+
var E;
|
|
826
|
+
const { key: i } = t, s = e(this, Et), o = (E = n(this, L, qn).call(this)) != null ? E : s[0];
|
|
827
|
+
if (!o) return;
|
|
828
|
+
const u = s.indexOf(o);
|
|
829
829
|
let c = Math.max(0, u);
|
|
830
830
|
i === "ArrowDown" ? c++ : i === "ArrowUp" ? c-- : t.key === "Home" ? c = 0 : t.key === "End" && (c = s.length - 1), c < 0 && (c = s.length - 1), c > s.length - 1 && (c = 0);
|
|
831
831
|
const m = s[c];
|
|
832
|
-
m && (n(this, L,
|
|
833
|
-
},
|
|
832
|
+
m && (n(this, L, Ua).call(this, m.id), m.el.focus());
|
|
833
|
+
}, qn = function() {
|
|
834
834
|
return e(this, Et).find((t) => t.el.tabIndex === 0);
|
|
835
|
-
},
|
|
835
|
+
}, Ua = function(t) {
|
|
836
836
|
for (const i of e(this, Et))
|
|
837
837
|
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
838
|
-
}, v(
|
|
838
|
+
}, v(Ia, "observedAttributes", [
|
|
839
839
|
r.RENDITION_LEVELS,
|
|
840
840
|
r.MAX_VIDEO_BITRATE,
|
|
841
841
|
r.ABR_ENABLED,
|
|
842
842
|
r.RENDITION_LEVEL,
|
|
843
843
|
r.SIZE_BASED_RESOLUTION_CAP_ENABLED
|
|
844
844
|
]);
|
|
845
|
-
const
|
|
845
|
+
const Pa = document.createElement("template"), Ph = (
|
|
846
846
|
/* SVG */
|
|
847
847
|
`
|
|
848
848
|
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -881,7 +881,7 @@ const Ra = document.createElement("template"), mh = (
|
|
|
881
881
|
</svg>
|
|
882
882
|
`
|
|
883
883
|
);
|
|
884
|
-
|
|
884
|
+
Pa.innerHTML = /* HTML */
|
|
885
885
|
`
|
|
886
886
|
<style>
|
|
887
887
|
:host {
|
|
@@ -897,27 +897,27 @@ Ra.innerHTML = /* HTML */
|
|
|
897
897
|
}
|
|
898
898
|
</style>
|
|
899
899
|
|
|
900
|
-
<slot name="icon">${
|
|
900
|
+
<slot name="icon">${Ph}</slot>
|
|
901
901
|
`;
|
|
902
|
-
var
|
|
903
|
-
class
|
|
902
|
+
var Ke;
|
|
903
|
+
class Da extends HTMLElement {
|
|
904
904
|
constructor() {
|
|
905
905
|
super();
|
|
906
|
-
l(this,
|
|
907
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
906
|
+
l(this, Ke, null);
|
|
907
|
+
this.attachShadow({ mode: "open" }).appendChild(Pa.content.cloneNode(!0));
|
|
908
908
|
}
|
|
909
909
|
connectedCallback() {
|
|
910
910
|
var t;
|
|
911
|
-
h(this,
|
|
911
|
+
h(this, Ke, this.closest("vindral-controller")), (t = e(this, Ke)) == null || t.connectListener(this);
|
|
912
912
|
}
|
|
913
913
|
disconnectedCallback() {
|
|
914
914
|
var t;
|
|
915
|
-
(t = e(this,
|
|
915
|
+
(t = e(this, Ke)) == null || t.disconnectListener(this);
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
|
|
919
|
-
const
|
|
920
|
-
|
|
918
|
+
Ke = new WeakMap(), v(Da, "observedAttributes", [r.BUFFERING]);
|
|
919
|
+
const Ma = document.createElement("template");
|
|
920
|
+
Ma.innerHTML = /* HTML */
|
|
921
921
|
`
|
|
922
922
|
<style>
|
|
923
923
|
:host {
|
|
@@ -975,25 +975,25 @@ Ua.innerHTML = /* HTML */
|
|
|
975
975
|
|
|
976
976
|
<div id="buffering-indicator"></div>
|
|
977
977
|
`;
|
|
978
|
-
var
|
|
979
|
-
class
|
|
978
|
+
var qe;
|
|
979
|
+
class Oa extends HTMLElement {
|
|
980
980
|
constructor() {
|
|
981
981
|
super();
|
|
982
|
-
l(this,
|
|
983
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
982
|
+
l(this, qe, null);
|
|
983
|
+
this.attachShadow({ mode: "open" }).appendChild(Ma.content.cloneNode(!0));
|
|
984
984
|
}
|
|
985
985
|
connectedCallback() {
|
|
986
986
|
var t;
|
|
987
|
-
h(this,
|
|
987
|
+
h(this, qe, this.closest("vindral-controller")), (t = e(this, qe)) == null || t.connectListener(this);
|
|
988
988
|
}
|
|
989
989
|
disconnectedCallback() {
|
|
990
990
|
var t;
|
|
991
|
-
(t = e(this,
|
|
991
|
+
(t = e(this, qe)) == null || t.disconnectListener(this);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
|
|
995
|
-
const
|
|
996
|
-
|
|
994
|
+
qe = new WeakMap(), v(Oa, "observedAttributes", [r.BUFFERING]);
|
|
995
|
+
const Fa = document.createElement("template");
|
|
996
|
+
Fa.innerHTML = /* HTML */
|
|
997
997
|
`
|
|
998
998
|
<style>
|
|
999
999
|
:host {
|
|
@@ -1018,22 +1018,22 @@ Da.innerHTML = /* HTML */
|
|
|
1018
1018
|
}
|
|
1019
1019
|
</style>
|
|
1020
1020
|
`;
|
|
1021
|
-
var
|
|
1021
|
+
var Me, Xn, Ha;
|
|
1022
1022
|
const ki = class ki extends mt {
|
|
1023
1023
|
constructor() {
|
|
1024
1024
|
var t;
|
|
1025
1025
|
super();
|
|
1026
|
-
l(this,
|
|
1027
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1026
|
+
l(this, Me);
|
|
1027
|
+
(t = this.shadowRoot) == null || t.appendChild(Fa.content.cloneNode(!0));
|
|
1028
1028
|
}
|
|
1029
1029
|
connectedCallback() {
|
|
1030
|
-
super.connectedCallback(), n(this,
|
|
1030
|
+
super.connectedCallback(), n(this, Me, Xn).call(this);
|
|
1031
1031
|
}
|
|
1032
1032
|
disconnectedCallback() {
|
|
1033
1033
|
super.disconnectedCallback();
|
|
1034
1034
|
}
|
|
1035
1035
|
attributeChangedCallback(t, i, s) {
|
|
1036
|
-
super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this,
|
|
1036
|
+
super.attributeChangedCallback(t, i, s), t === r.CAST_AVAILABLE && n(this, Me, Ha).call(this), t === r.IS_CASTING && n(this, Me, Xn).call(this);
|
|
1037
1037
|
}
|
|
1038
1038
|
set isCasting(t) {
|
|
1039
1039
|
t ? this.setAttribute(r.IS_CASTING, "") : this.removeAttribute(r.IS_CASTING);
|
|
@@ -1044,22 +1044,22 @@ const ki = class ki extends mt {
|
|
|
1044
1044
|
handleClick(t) {
|
|
1045
1045
|
}
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1047
|
+
Me = new WeakSet(), Xn = function() {
|
|
1048
1048
|
this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
|
|
1049
|
-
},
|
|
1049
|
+
}, Ha = function() {
|
|
1050
1050
|
var t, i;
|
|
1051
1051
|
if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
|
|
1052
1052
|
const s = document.createElement("google-cast-launcher");
|
|
1053
1053
|
(i = this.shadowRoot) == null || i.appendChild(s);
|
|
1054
1054
|
}
|
|
1055
1055
|
}, v(ki, "observedAttributes", [
|
|
1056
|
-
...
|
|
1056
|
+
...W(ki, ki, "observedAttributes"),
|
|
1057
1057
|
r.CAST_AVAILABLE,
|
|
1058
1058
|
r.IS_CASTING
|
|
1059
1059
|
]);
|
|
1060
1060
|
let Vn = ki;
|
|
1061
|
-
const
|
|
1062
|
-
|
|
1061
|
+
const Ba = document.createElement("template");
|
|
1062
|
+
Ba.innerHTML = /* HTML */
|
|
1063
1063
|
`
|
|
1064
1064
|
<style>
|
|
1065
1065
|
:host {
|
|
@@ -1096,12 +1096,12 @@ Oa.innerHTML = /* HTML */
|
|
|
1096
1096
|
<span id="text"></span>
|
|
1097
1097
|
`;
|
|
1098
1098
|
var Ve, Xe;
|
|
1099
|
-
class
|
|
1099
|
+
class za extends HTMLElement {
|
|
1100
1100
|
constructor() {
|
|
1101
1101
|
super();
|
|
1102
1102
|
l(this, Ve, null);
|
|
1103
1103
|
l(this, Xe, null);
|
|
1104
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
1104
|
+
this.attachShadow({ mode: "open" }).appendChild(Ba.content.cloneNode(!0));
|
|
1105
1105
|
}
|
|
1106
1106
|
connectedCallback() {
|
|
1107
1107
|
var t, i;
|
|
@@ -1115,18 +1115,18 @@ class Fa extends HTMLElement {
|
|
|
1115
1115
|
i === s || !e(this, Xe) || t === "cast-receiver-name" && typeof s == "string" && (e(this, Xe).innerText = `Casting to ${s || "device"}`);
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
Ve = new WeakMap(), Xe = new WeakMap(), v(
|
|
1119
|
-
function
|
|
1120
|
-
const
|
|
1121
|
-
if (!
|
|
1122
|
-
if (
|
|
1123
|
-
const t =
|
|
1124
|
-
return t != null ? t :
|
|
1125
|
-
}
|
|
1126
|
-
return
|
|
1118
|
+
Ve = new WeakMap(), Xe = new WeakMap(), v(za, "observedAttributes", [r.IS_CASTING, r.CAST_RECEIVER_NAME]);
|
|
1119
|
+
function $a(p = document) {
|
|
1120
|
+
const a = p == null ? void 0 : p.activeElement;
|
|
1121
|
+
if (!a) return null;
|
|
1122
|
+
if (a.shadowRoot) {
|
|
1123
|
+
const t = $a(a.shadowRoot);
|
|
1124
|
+
return t != null ? t : a;
|
|
1125
|
+
}
|
|
1126
|
+
return a;
|
|
1127
1127
|
}
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1128
|
+
const Ga = document.createElement("template");
|
|
1129
|
+
Ga.innerHTML = /* HTML */
|
|
1130
1130
|
`
|
|
1131
1131
|
<style>
|
|
1132
1132
|
:host {
|
|
@@ -1199,13 +1199,13 @@ Ba.innerHTML = /* HTML */
|
|
|
1199
1199
|
<slot></slot>
|
|
1200
1200
|
`;
|
|
1201
1201
|
var ke;
|
|
1202
|
-
class
|
|
1202
|
+
class jr extends HTMLElement {
|
|
1203
1203
|
constructor() {
|
|
1204
1204
|
super();
|
|
1205
1205
|
l(this, ke);
|
|
1206
1206
|
v(this, "lastThumbnailUpdate");
|
|
1207
1207
|
const t = this.attachShadow({ mode: "open" });
|
|
1208
|
-
h(this, ke, document.createElement("span")), e(this, ke).className = "channel-title", t.appendChild(e(this, ke)), t.appendChild(
|
|
1208
|
+
h(this, ke, document.createElement("span")), e(this, ke).className = "channel-title", t.appendChild(e(this, ke)), t.appendChild(Ga.content.cloneNode(!0));
|
|
1209
1209
|
}
|
|
1210
1210
|
attributeChangedCallback(t, i, s) {
|
|
1211
1211
|
if (i !== s)
|
|
@@ -1221,13 +1221,13 @@ class Xr extends HTMLElement {
|
|
|
1221
1221
|
updateThumbnail() {
|
|
1222
1222
|
const t = this.getAttribute("url"), i = this.hasAttribute("offline"), s = this.hasAttribute("visible");
|
|
1223
1223
|
if (i || !t || !s || this.lastThumbnailUpdate && Date.now() - this.lastThumbnailUpdate < 1e4) return;
|
|
1224
|
-
const
|
|
1225
|
-
c &&
|
|
1224
|
+
const o = new URL(t), u = new Image(), c = this.getAttribute("authentication-token");
|
|
1225
|
+
c && o.searchParams.set("auth.token", c), o.searchParams.set("t", Date.now().toString()), u.src = o.toString(), u.onload = () => this.style.backgroundImage = `url(${o.toString()})`;
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
|
-
ke = new WeakMap(), v(
|
|
1229
|
-
const
|
|
1230
|
-
|
|
1228
|
+
ke = new WeakMap(), v(jr, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
|
|
1229
|
+
const Ka = document.createElement("template");
|
|
1230
|
+
Ka.innerHTML = /* HTML */
|
|
1231
1231
|
`
|
|
1232
1232
|
<style>
|
|
1233
1233
|
:host {
|
|
@@ -1300,8 +1300,8 @@ za.innerHTML = /* HTML */
|
|
|
1300
1300
|
<slot name="grid" id="grid"></slot>
|
|
1301
1301
|
</div>
|
|
1302
1302
|
`;
|
|
1303
|
-
var qt, St, je, Z,
|
|
1304
|
-
class
|
|
1303
|
+
var qt, St, je, Z, z, Ye, $i, We, Vt, Xt, k, Va, Xa, ja, Ya, Wa, Ja, jn, Za, Qa, to, eo, io, so, no, bi, ro, Yn, ao, mi, Zs;
|
|
1304
|
+
class qa extends HTMLElement {
|
|
1305
1305
|
constructor() {
|
|
1306
1306
|
super();
|
|
1307
1307
|
l(this, k);
|
|
@@ -1309,21 +1309,21 @@ class $a extends HTMLElement {
|
|
|
1309
1309
|
l(this, St, null);
|
|
1310
1310
|
l(this, je, []);
|
|
1311
1311
|
l(this, Z, []);
|
|
1312
|
-
l(this,
|
|
1312
|
+
l(this, z);
|
|
1313
1313
|
l(this, Ye);
|
|
1314
1314
|
l(this, $i);
|
|
1315
|
-
l(this,
|
|
1316
|
-
l(this, Kt);
|
|
1315
|
+
l(this, We);
|
|
1317
1316
|
l(this, Vt);
|
|
1317
|
+
l(this, Xt);
|
|
1318
1318
|
v(this, "handleEvent", (t) => {
|
|
1319
|
-
t.type === "keydown" && n(this, k,
|
|
1319
|
+
t.type === "keydown" && n(this, k, so).call(this, t);
|
|
1320
1320
|
});
|
|
1321
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
1321
|
+
this.attachShadow({ mode: "open" }).appendChild(Ka.content.cloneNode(!0));
|
|
1322
1322
|
}
|
|
1323
1323
|
connectedCallback() {
|
|
1324
1324
|
var t, i, s;
|
|
1325
|
-
h(this, St, this.closest("vindral-controller")), (t = e(this, St)) == null || t.connectListener(this), n(this, k,
|
|
1326
|
-
n(this, k,
|
|
1325
|
+
h(this, St, this.closest("vindral-controller")), (t = e(this, St)) == null || t.connectListener(this), n(this, k, Va).call(this), (s = e(this, qt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), n(this, k, jn).call(this), h(this, $i, window.setInterval(() => {
|
|
1326
|
+
n(this, k, eo).call(this);
|
|
1327
1327
|
}, 1e4));
|
|
1328
1328
|
}
|
|
1329
1329
|
disconnectedCallback() {
|
|
@@ -1334,7 +1334,7 @@ class $a extends HTMLElement {
|
|
|
1334
1334
|
if (i !== s)
|
|
1335
1335
|
switch (t) {
|
|
1336
1336
|
case r.CHANNEL_ID: {
|
|
1337
|
-
n(this, k,
|
|
1337
|
+
n(this, k, to).call(this, s);
|
|
1338
1338
|
break;
|
|
1339
1339
|
}
|
|
1340
1340
|
case r.CHANNELS:
|
|
@@ -1350,143 +1350,143 @@ class $a extends HTMLElement {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
focus() {
|
|
1352
1352
|
var i;
|
|
1353
|
-
const t =
|
|
1354
|
-
t && t !== this && !this.contains(t) && h(this,
|
|
1353
|
+
const t = $a();
|
|
1354
|
+
t && t !== this && !this.contains(t) && h(this, We, t), (i = e(this, z)) == null || i.focus();
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
qt = new WeakMap(), St = new WeakMap(), je = new WeakMap(), Z = new WeakMap(),
|
|
1357
|
+
qt = new WeakMap(), St = new WeakMap(), je = new WeakMap(), Z = new WeakMap(), z = new WeakMap(), Ye = new WeakMap(), $i = new WeakMap(), We = new WeakMap(), Vt = new WeakMap(), Xt = new WeakMap(), k = new WeakSet(), Va = function() {
|
|
1358
1358
|
h(this, qt, new IntersectionObserver(
|
|
1359
1359
|
(t) => {
|
|
1360
1360
|
t.forEach((i) => {
|
|
1361
|
-
const { target: s, isIntersecting:
|
|
1362
|
-
s instanceof
|
|
1361
|
+
const { target: s, isIntersecting: o } = i;
|
|
1362
|
+
s instanceof jr ? n(this, k, Ja).call(this, s, o) : n(this, k, Xa).call(this, o);
|
|
1363
1363
|
});
|
|
1364
1364
|
},
|
|
1365
1365
|
{
|
|
1366
1366
|
root: e(this, St)
|
|
1367
1367
|
}
|
|
1368
1368
|
));
|
|
1369
|
-
},
|
|
1370
|
-
t ? n(this, k,
|
|
1371
|
-
},
|
|
1372
|
-
this.dispatchEvent(new CustomEvent(y.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 })), n(this, k,
|
|
1373
|
-
},
|
|
1374
|
-
n(this, k, mi).call(this), e(this,
|
|
1375
|
-
},
|
|
1369
|
+
}, Xa = function(t) {
|
|
1370
|
+
t ? n(this, k, ja).call(this) : n(this, k, Ya).call(this);
|
|
1371
|
+
}, ja = function() {
|
|
1372
|
+
this.dispatchEvent(new CustomEvent(y.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 })), n(this, k, Wa).call(this), this.addEventListener("keydown", this), e(this, z) && (e(this, z).tabIndex = 0);
|
|
1373
|
+
}, Ya = function() {
|
|
1374
|
+
n(this, k, mi).call(this), e(this, z) && (e(this, z).tabIndex = -1), this.dispatchEvent(new CustomEvent(y.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), n(this, k, ro).call(this), this.removeEventListener("keydown", this);
|
|
1375
|
+
}, Wa = function() {
|
|
1376
1376
|
var t;
|
|
1377
|
-
n(this, k, mi).call(this), h(this,
|
|
1378
|
-
clearTimeout(e(this,
|
|
1379
|
-
n(this, k,
|
|
1377
|
+
n(this, k, mi).call(this), h(this, Xt, () => {
|
|
1378
|
+
clearTimeout(e(this, Vt)), h(this, Vt, window.setTimeout(() => {
|
|
1379
|
+
n(this, k, ao).call(this) && this.focus(), n(this, k, mi).call(this);
|
|
1380
1380
|
}, 100));
|
|
1381
|
-
}), (t = this.parentElement) == null || t.addEventListener("scroll", e(this,
|
|
1382
|
-
},
|
|
1381
|
+
}), (t = this.parentElement) == null || t.addEventListener("scroll", e(this, Xt));
|
|
1382
|
+
}, Ja = function(t, i) {
|
|
1383
1383
|
i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
|
|
1384
1384
|
}, jn = function() {
|
|
1385
|
-
var
|
|
1386
|
-
const t = (
|
|
1385
|
+
var o;
|
|
1386
|
+
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=grid]"), i = new Map(e(this, Z).map((u) => [u.id, u])), s = this.getAttribute("channel-id");
|
|
1387
1387
|
h(this, Z, e(this, je).map((u) => {
|
|
1388
|
-
var
|
|
1388
|
+
var E;
|
|
1389
1389
|
const c = i.get(u.channelId);
|
|
1390
1390
|
if (c)
|
|
1391
|
-
return n(this, k,
|
|
1392
|
-
const m = n(this, k,
|
|
1393
|
-
return (
|
|
1391
|
+
return n(this, k, Za).call(this, c.element, u), c;
|
|
1392
|
+
const m = n(this, k, Qa).call(this, u, s);
|
|
1393
|
+
return (E = e(this, qt)) == null || E.observe(m.element), t.contains(m.element) || t.appendChild(m.element), m;
|
|
1394
1394
|
})), i.forEach((u, c) => {
|
|
1395
1395
|
var m;
|
|
1396
|
-
e(this, je).some((
|
|
1396
|
+
e(this, je).some((E) => E.channelId === c) || ((m = e(this, qt)) == null || m.unobserve(u.element), u.element.remove());
|
|
1397
1397
|
}), e(this, Z).sort((u, c) => u.element.hasAttribute("offline") && !c.element.hasAttribute("offline") ? 1 : -1).forEach((u) => {
|
|
1398
1398
|
t.contains(u.element) || t.appendChild(u.element);
|
|
1399
1399
|
});
|
|
1400
|
-
},
|
|
1400
|
+
}, Za = function(t, i) {
|
|
1401
1401
|
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
1402
|
-
},
|
|
1402
|
+
}, Qa = function(t, i) {
|
|
1403
1403
|
const s = document.createElement("vindral-channel-grid-item");
|
|
1404
|
-
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, Ye) && s.setAttribute("authentication-token", e(this, Ye)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), h(this,
|
|
1405
|
-
},
|
|
1404
|
+
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, Ye) && s.setAttribute("authentication-token", e(this, Ye)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), h(this, z, s)), s.tabIndex = -1, s.onclick = () => n(this, k, io).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
|
|
1405
|
+
}, to = function(t) {
|
|
1406
1406
|
e(this, Z).forEach((i) => {
|
|
1407
|
-
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, h(this,
|
|
1407
|
+
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, h(this, z, i.element)) : (i.element.tabIndex = -1, i.element.setAttribute("aria-selected", "false"));
|
|
1408
1408
|
});
|
|
1409
|
-
},
|
|
1409
|
+
}, eo = function() {
|
|
1410
1410
|
this.hasAttribute("hidden") || e(this, Z).forEach((t) => t.element.updateThumbnail());
|
|
1411
|
-
},
|
|
1411
|
+
}, io = function(t) {
|
|
1412
1412
|
var i;
|
|
1413
|
-
n(this, k,
|
|
1414
|
-
},
|
|
1413
|
+
n(this, k, Zs).call(this), (i = e(this, St)) == null || i.setAttribute("channel-id", t.channelId);
|
|
1414
|
+
}, so = function(t) {
|
|
1415
1415
|
var c;
|
|
1416
|
-
const { key: i, ctrlKey: s, altKey:
|
|
1417
|
-
s ||
|
|
1418
|
-
},
|
|
1419
|
-
if (!e(this,
|
|
1416
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
1417
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? n(this, k, Zs).call(this) : i === "Enter" || i === " " ? (c = e(this, z)) == null || c.click() : n(this, k, no).call(this, t));
|
|
1418
|
+
}, no = function(t) {
|
|
1419
|
+
if (!e(this, z)) return;
|
|
1420
1420
|
const { key: i } = t;
|
|
1421
|
-
let
|
|
1422
|
-
const u = e(this,
|
|
1421
|
+
let o = e(this, Z).findIndex((c) => c.element === e(this, z));
|
|
1422
|
+
const u = e(this, z).getBoundingClientRect();
|
|
1423
1423
|
switch (i) {
|
|
1424
1424
|
case "ArrowUp":
|
|
1425
|
-
if (
|
|
1426
|
-
n(this, k,
|
|
1425
|
+
if (o = n(this, k, bi).call(this, u, -1, 0), o < 0) {
|
|
1426
|
+
n(this, k, Zs).call(this);
|
|
1427
1427
|
return;
|
|
1428
1428
|
}
|
|
1429
1429
|
break;
|
|
1430
1430
|
case "ArrowDown":
|
|
1431
|
-
|
|
1431
|
+
o = n(this, k, bi).call(this, u, 1, 0);
|
|
1432
1432
|
break;
|
|
1433
1433
|
case "ArrowLeft":
|
|
1434
|
-
|
|
1434
|
+
o = n(this, k, bi).call(this, u, 0, -1);
|
|
1435
1435
|
break;
|
|
1436
1436
|
case "ArrowRight":
|
|
1437
|
-
|
|
1437
|
+
o = n(this, k, bi).call(this, u, 0, 1);
|
|
1438
1438
|
break;
|
|
1439
1439
|
case "Home":
|
|
1440
|
-
|
|
1440
|
+
o = 0;
|
|
1441
1441
|
break;
|
|
1442
1442
|
case "End":
|
|
1443
|
-
|
|
1443
|
+
o = e(this, Z).length - 1;
|
|
1444
1444
|
break;
|
|
1445
1445
|
}
|
|
1446
|
-
if (
|
|
1447
|
-
const c = e(this, Z)[
|
|
1446
|
+
if (o >= 0 && o < e(this, Z).length) {
|
|
1447
|
+
const c = e(this, Z)[o];
|
|
1448
1448
|
if (!c) return;
|
|
1449
|
-
e(this,
|
|
1449
|
+
e(this, z).setAttribute("aria-selected", "false"), e(this, z).tabIndex = -1, h(this, z, c.element), e(this, z).setAttribute("aria-selected", "true"), e(this, z).tabIndex = 0, e(this, z).focus();
|
|
1450
1450
|
}
|
|
1451
1451
|
}, bi = function(t, i, s) {
|
|
1452
|
-
let
|
|
1452
|
+
let o = -1, u = 1 / 0;
|
|
1453
1453
|
return e(this, Z).filter((c) => c.element.getBoundingClientRect().width > 0).forEach((c, m) => {
|
|
1454
|
-
const
|
|
1455
|
-
if (N &&
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1454
|
+
const E = c.element.getBoundingClientRect(), N = i === 0 || i < 0 && E.top < t.top || i > 0 && E.top > t.top, H = s === 0 || s < 0 && E.left < t.left || s > 0 && E.left > t.left;
|
|
1455
|
+
if (N && H) {
|
|
1456
|
+
const G = Math.sqrt((E.top - t.top) ** 2 + (E.left - t.left) ** 2);
|
|
1457
|
+
G < u && (u = G, o = m);
|
|
1458
1458
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
},
|
|
1459
|
+
}), o;
|
|
1460
|
+
}, ro = function() {
|
|
1461
1461
|
var t, i;
|
|
1462
|
-
if ((t = e(this,
|
|
1463
|
-
e(this,
|
|
1462
|
+
if ((t = e(this, We)) != null && t.isConnected) {
|
|
1463
|
+
e(this, We).focus({ preventScroll: !0 });
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
1466
|
(i = e(this, St)) == null || i.focus({ preventScroll: !0 });
|
|
1467
1467
|
}, Yn = function(t) {
|
|
1468
1468
|
return (t == null ? void 0 : t.localName) === "vindral-scroll-overlay";
|
|
1469
|
-
},
|
|
1469
|
+
}, ao = function() {
|
|
1470
1470
|
const t = this.parentElement;
|
|
1471
1471
|
return t ? n(this, k, Yn).call(this, t) ? t.hasAttribute("open") : !this.hasAttribute("hidden") : !1;
|
|
1472
1472
|
}, mi = function() {
|
|
1473
1473
|
var t;
|
|
1474
|
-
e(this,
|
|
1475
|
-
},
|
|
1474
|
+
e(this, Vt) && (clearTimeout(e(this, Vt)), h(this, Vt, void 0)), e(this, Xt) && ((t = this.parentElement) == null || t.removeEventListener("scroll", e(this, Xt)), h(this, Xt, void 0));
|
|
1475
|
+
}, Zs = function() {
|
|
1476
1476
|
const t = this.parentElement;
|
|
1477
1477
|
if (n(this, k, Yn).call(this, t)) {
|
|
1478
1478
|
t.open = !1;
|
|
1479
1479
|
return;
|
|
1480
1480
|
}
|
|
1481
1481
|
t == null || t.removeAttribute("open");
|
|
1482
|
-
}, v(
|
|
1482
|
+
}, v(qa, "observedAttributes", [
|
|
1483
1483
|
r.CHANNELS,
|
|
1484
1484
|
r.CHANNEL_ID,
|
|
1485
1485
|
r.AUTHENTICATION_TOKEN,
|
|
1486
1486
|
"mode",
|
|
1487
1487
|
"hidden"
|
|
1488
1488
|
]);
|
|
1489
|
-
const
|
|
1489
|
+
const Dh = (
|
|
1490
1490
|
/* SVG */
|
|
1491
1491
|
`
|
|
1492
1492
|
<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">
|
|
@@ -1497,8 +1497,8 @@ const vh = (
|
|
|
1497
1497
|
<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" />
|
|
1498
1498
|
</svg>
|
|
1499
1499
|
`
|
|
1500
|
-
),
|
|
1501
|
-
|
|
1500
|
+
), oo = document.createElement("template");
|
|
1501
|
+
oo.innerHTML = /* HTML */
|
|
1502
1502
|
`
|
|
1503
1503
|
<style>
|
|
1504
1504
|
:host {
|
|
@@ -1512,21 +1512,21 @@ no.innerHTML = /* HTML */
|
|
|
1512
1512
|
display: none;
|
|
1513
1513
|
}
|
|
1514
1514
|
</style>
|
|
1515
|
-
<slot name="button">${
|
|
1515
|
+
<slot name="button">${Dh}</slot>
|
|
1516
1516
|
`;
|
|
1517
|
-
var
|
|
1517
|
+
var Je, X, st, pn, V, lo, Jn, Qs, Zn, Qn;
|
|
1518
1518
|
const Ii = class Ii extends mt {
|
|
1519
1519
|
constructor() {
|
|
1520
1520
|
var t, i;
|
|
1521
1521
|
super();
|
|
1522
1522
|
l(this, V);
|
|
1523
|
-
l(this,
|
|
1523
|
+
l(this, Je);
|
|
1524
1524
|
l(this, X);
|
|
1525
1525
|
l(this, st);
|
|
1526
|
-
l(this,
|
|
1527
|
-
t.composedPath().includes(this) || n(this, V,
|
|
1526
|
+
l(this, pn, (t) => {
|
|
1527
|
+
t.composedPath().includes(this) || n(this, V, Qs).call(this);
|
|
1528
1528
|
});
|
|
1529
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1529
|
+
(t = this.shadowRoot) == null || t.appendChild(oo.content.cloneNode(!0)), h(this, Je, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
|
|
1530
1530
|
}
|
|
1531
1531
|
connectedCallback() {
|
|
1532
1532
|
var i;
|
|
@@ -1540,20 +1540,20 @@ const Ii = class Ii extends mt {
|
|
|
1540
1540
|
super.attributeChangedCallback(t, i, s), (t === r.CHANNEL_GROUP_ID || t === r.CHANNELS) && n(this, V, Zn).call(this);
|
|
1541
1541
|
}
|
|
1542
1542
|
enable() {
|
|
1543
|
-
super.enable(), document.addEventListener("click", e(this,
|
|
1543
|
+
super.enable(), document.addEventListener("click", e(this, pn));
|
|
1544
1544
|
}
|
|
1545
1545
|
handleClick(t) {
|
|
1546
|
-
n(this, V,
|
|
1546
|
+
n(this, V, lo).call(this);
|
|
1547
1547
|
}
|
|
1548
1548
|
get isOpen() {
|
|
1549
1549
|
var t;
|
|
1550
1550
|
return e(this, st) ? e(this, st).hasAttribute("open") : !((t = e(this, X)) != null && t.hidden);
|
|
1551
1551
|
}
|
|
1552
1552
|
};
|
|
1553
|
-
|
|
1553
|
+
Je = new WeakMap(), X = new WeakMap(), st = new WeakMap(), pn = new WeakMap(), V = new WeakSet(), lo = function() {
|
|
1554
1554
|
var t;
|
|
1555
|
-
e(this, st) ? e(this, st).hasAttribute("open") ? n(this, V,
|
|
1556
|
-
},
|
|
1555
|
+
e(this, st) ? e(this, st).hasAttribute("open") ? n(this, V, Qs).call(this) : n(this, V, Jn).call(this) : (t = e(this, X)) != null && t.hidden ? n(this, V, Jn).call(this) : n(this, V, Qs).call(this), n(this, V, Qn).call(this);
|
|
1556
|
+
}, Jn = function() {
|
|
1557
1557
|
var t;
|
|
1558
1558
|
if (e(this, st))
|
|
1559
1559
|
e(this, st).setAttribute("open", "");
|
|
@@ -1561,28 +1561,28 @@ We = new WeakMap(), X = new WeakMap(), st = new WeakMap(), un = new WeakMap(), V
|
|
|
1561
1561
|
if (!((t = e(this, X)) != null && t.hidden)) return;
|
|
1562
1562
|
e(this, X).hidden = !1, e(this, X).focus();
|
|
1563
1563
|
}
|
|
1564
|
-
e(this,
|
|
1565
|
-
},
|
|
1564
|
+
e(this, Je).setAttribute("aria-expanded", "true");
|
|
1565
|
+
}, Qs = function() {
|
|
1566
1566
|
if (e(this, st))
|
|
1567
1567
|
e(this, st).open = !1;
|
|
1568
1568
|
else {
|
|
1569
1569
|
if (!e(this, X) || e(this, X).hidden) return;
|
|
1570
1570
|
e(this, X).hidden = !0;
|
|
1571
1571
|
}
|
|
1572
|
-
e(this,
|
|
1572
|
+
e(this, Je).setAttribute("aria-expanded", "false");
|
|
1573
1573
|
}, Zn = function() {
|
|
1574
1574
|
this.getAttribute(r.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(r.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1575
1575
|
}, Qn = function() {
|
|
1576
1576
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
1577
1577
|
}, v(Ii, "observedAttributes", [
|
|
1578
|
-
...
|
|
1578
|
+
...W(Ii, Ii, "observedAttributes"),
|
|
1579
1579
|
r.CHANNEL_GROUP_ID,
|
|
1580
1580
|
r.CHANNELS,
|
|
1581
1581
|
"hidden"
|
|
1582
1582
|
]);
|
|
1583
|
-
let
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1583
|
+
let Wn = Ii;
|
|
1584
|
+
const ho = document.createElement("template");
|
|
1585
|
+
ho.innerHTML = /* HTML */
|
|
1586
1586
|
`
|
|
1587
1587
|
<style>
|
|
1588
1588
|
:host {
|
|
@@ -1611,17 +1611,17 @@ ao.innerHTML = /* HTML */
|
|
|
1611
1611
|
<slot name="right"></slot>
|
|
1612
1612
|
</slot>
|
|
1613
1613
|
`;
|
|
1614
|
-
class
|
|
1614
|
+
class co extends HTMLElement {
|
|
1615
1615
|
constructor() {
|
|
1616
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1616
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(ho.content.cloneNode(!0));
|
|
1617
1617
|
}
|
|
1618
1618
|
connectedCallback() {
|
|
1619
1619
|
}
|
|
1620
1620
|
disconnectedCallback() {
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
v(
|
|
1624
|
-
class
|
|
1623
|
+
v(co, "observedAttributes", []);
|
|
1624
|
+
class Mh extends Ys {
|
|
1625
1625
|
constructor(t) {
|
|
1626
1626
|
super();
|
|
1627
1627
|
v(this, "config");
|
|
@@ -1690,7 +1690,7 @@ class fh extends js {
|
|
|
1690
1690
|
return this.config.authenticationToken && t.searchParams.set("authenticationToken", this.config.authenticationToken), t.toString();
|
|
1691
1691
|
}
|
|
1692
1692
|
checkHlsUrl(t) {
|
|
1693
|
-
return
|
|
1693
|
+
return q(this, null, function* () {
|
|
1694
1694
|
try {
|
|
1695
1695
|
return (yield fetch(t, { method: "HEAD" })).ok;
|
|
1696
1696
|
} catch (i) {
|
|
@@ -1699,21 +1699,21 @@ class fh extends js {
|
|
|
1699
1699
|
});
|
|
1700
1700
|
}
|
|
1701
1701
|
}
|
|
1702
|
-
const
|
|
1702
|
+
const Fe = class Fe extends Ys {
|
|
1703
1703
|
constructor(t) {
|
|
1704
1704
|
super();
|
|
1705
1705
|
v(this, "container");
|
|
1706
1706
|
v(this, "unload", () => {
|
|
1707
1707
|
document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
|
|
1708
1708
|
});
|
|
1709
|
-
v(this, "request", () =>
|
|
1709
|
+
v(this, "request", () => q(this, null, function* () {
|
|
1710
1710
|
try {
|
|
1711
1711
|
yield this.requestFn();
|
|
1712
1712
|
} catch (t) {
|
|
1713
1713
|
throw this.onChange(), t;
|
|
1714
1714
|
}
|
|
1715
1715
|
}));
|
|
1716
|
-
v(this, "exit", () =>
|
|
1716
|
+
v(this, "exit", () => q(this, null, function* () {
|
|
1717
1717
|
try {
|
|
1718
1718
|
yield this.exitFn();
|
|
1719
1719
|
} catch (t) {
|
|
@@ -1722,46 +1722,40 @@ const ge = class ge extends js {
|
|
|
1722
1722
|
}));
|
|
1723
1723
|
v(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen()));
|
|
1724
1724
|
// into the yolo zone
|
|
1725
|
-
v(this, "isFullscreen", () =>
|
|
1726
|
-
v(this, "isSupported", () =>
|
|
1727
|
-
v(this, "isFullscreenApiSupported", () =>
|
|
1725
|
+
v(this, "isFullscreen", () => rh());
|
|
1726
|
+
v(this, "isSupported", () => Fe.isFullscreenApiSupported(this.container) || !this.isInIframe());
|
|
1727
|
+
v(this, "isFullscreenApiSupported", () => Fe.isFullscreenApiSupported(this.container));
|
|
1728
1728
|
v(this, "isInIframe", () => window.location !== window.parent.location);
|
|
1729
1729
|
this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
|
|
1730
1730
|
}
|
|
1731
1731
|
get requestFn() {
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
});
|
|
1732
|
+
var t;
|
|
1733
|
+
return (t = oh(this.container)) != null ? t : (() => Promise.resolve());
|
|
1735
1734
|
}
|
|
1736
1735
|
get exitFn() {
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
return a ? a.bind(document) : this.container.webkitExitFullscreen.bind(this.container);
|
|
1740
|
-
}
|
|
1741
|
-
return () => new Promise((t) => {
|
|
1742
|
-
t();
|
|
1743
|
-
});
|
|
1736
|
+
var t;
|
|
1737
|
+
return Fe.isFullscreenApiSupported(this.container) && this.isFullscreen() ? (t = lh(this.container)) != null ? t : (() => Promise.resolve()) : () => Promise.resolve();
|
|
1744
1738
|
}
|
|
1745
1739
|
};
|
|
1746
|
-
v(
|
|
1747
|
-
let Lt =
|
|
1748
|
-
var
|
|
1749
|
-
class
|
|
1740
|
+
v(Fe, "isFullscreenApiSupported", (t) => ah(t));
|
|
1741
|
+
let Lt = Fe;
|
|
1742
|
+
var bn, mn, vn, fn, Ze, gn, En, Gi, Qe;
|
|
1743
|
+
class aa extends Ys {
|
|
1750
1744
|
constructor(t) {
|
|
1751
1745
|
super();
|
|
1752
1746
|
v(this, "unload", () => {
|
|
1753
|
-
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange);
|
|
1747
|
+
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), ia(this.element, !1);
|
|
1754
1748
|
});
|
|
1755
|
-
v(this, "request", () =>
|
|
1749
|
+
v(this, "request", () => q(this, null, function* () {
|
|
1756
1750
|
try {
|
|
1757
|
-
return yield e(this,
|
|
1751
|
+
return yield e(this, bn).call(this);
|
|
1758
1752
|
} catch (t) {
|
|
1759
1753
|
throw this.onChange(), t;
|
|
1760
1754
|
}
|
|
1761
1755
|
}));
|
|
1762
|
-
v(this, "exit", () =>
|
|
1756
|
+
v(this, "exit", () => q(this, null, function* () {
|
|
1763
1757
|
try {
|
|
1764
|
-
return yield e(this,
|
|
1758
|
+
return yield e(this, mn).call(this);
|
|
1765
1759
|
} catch (t) {
|
|
1766
1760
|
throw this.onChange(), t;
|
|
1767
1761
|
}
|
|
@@ -1769,52 +1763,54 @@ class sa extends js {
|
|
|
1769
1763
|
v(this, "onChange", () => {
|
|
1770
1764
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1771
1765
|
});
|
|
1772
|
-
v(this, "isPictureInPictureActive", () => e(this,
|
|
1766
|
+
v(this, "isPictureInPictureActive", () => e(this, En).call(this) || e(this, gn).call(this));
|
|
1773
1767
|
v(this, "isSupported", () => e(this, Qe).call(this) || e(this, Ze).call(this));
|
|
1774
|
-
l(this,
|
|
1775
|
-
l(this,
|
|
1776
|
-
l(this,
|
|
1777
|
-
|
|
1768
|
+
l(this, bn, () => e(this, Ze).call(this) ? e(this, vn).call(this) : e(this, Qe).call(this) ? e(this, Gi).call(this, "picture-in-picture") : Promise.resolve());
|
|
1769
|
+
l(this, mn, () => this.isPictureInPictureActive() ? e(this, Ze).call(this) ? e(this, fn).call(this) : e(this, Qe).call(this) ? e(this, Gi).call(this, "inline") : Promise.resolve() : Promise.resolve());
|
|
1770
|
+
l(this, vn, () => q(this, null, function* () {
|
|
1771
|
+
const t = hh(this.element);
|
|
1772
|
+
t && (yield t());
|
|
1778
1773
|
}));
|
|
1779
|
-
l(this,
|
|
1780
|
-
|
|
1774
|
+
l(this, fn, () => q(null, null, function* () {
|
|
1775
|
+
const t = dh();
|
|
1776
|
+
t && (yield t());
|
|
1781
1777
|
}));
|
|
1782
|
-
l(this, Ze, () =>
|
|
1783
|
-
l(this,
|
|
1784
|
-
l(this,
|
|
1785
|
-
l(this, Gi, (t) => (this.element
|
|
1786
|
-
l(this, Qe, () =>
|
|
1787
|
-
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element
|
|
1778
|
+
l(this, Ze, () => ch(this.element));
|
|
1779
|
+
l(this, gn, () => uh());
|
|
1780
|
+
l(this, En, () => ph(this.element) === "picture-in-picture");
|
|
1781
|
+
l(this, Gi, (t) => (sa(this.element) && bh(this.element, t), Promise.resolve()));
|
|
1782
|
+
l(this, Qe, () => sa(this.element));
|
|
1783
|
+
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), ia(this.element, !0);
|
|
1788
1784
|
}
|
|
1789
1785
|
get videoElement() {
|
|
1790
1786
|
return this.element;
|
|
1791
1787
|
}
|
|
1792
1788
|
}
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1789
|
+
bn = new WeakMap(), mn = new WeakMap(), vn = new WeakMap(), fn = new WeakMap(), Ze = new WeakMap(), gn = new WeakMap(), En = new WeakMap(), Gi = new WeakMap(), Qe = new WeakMap();
|
|
1790
|
+
const oa = (p) => {
|
|
1795
1791
|
var t;
|
|
1796
|
-
let
|
|
1797
|
-
return !
|
|
1792
|
+
let a = "observedAttributes" in p.constructor ? p.constructor.observedAttributes : void 0;
|
|
1793
|
+
return !a && ((t = p.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(p), a = "observedAttributes" in p.constructor ? p.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => pa.includes(i)) : [];
|
|
1798
1794
|
};
|
|
1799
|
-
function
|
|
1795
|
+
function Oh(p) {
|
|
1800
1796
|
if (typeof p != "string") return NaN;
|
|
1801
|
-
const
|
|
1797
|
+
const a = /(\d+(?:\.\d+)?)([hms])/gi, t = [...p.matchAll(a)];
|
|
1802
1798
|
return t.length === 0 ? NaN : t.reduce((i, s) => {
|
|
1803
1799
|
var c, m;
|
|
1804
|
-
const
|
|
1800
|
+
const o = parseFloat((c = s[1]) != null ? c : "0");
|
|
1805
1801
|
switch (((m = s[2]) != null ? m : "").toLowerCase()) {
|
|
1806
1802
|
case "h":
|
|
1807
|
-
return i +
|
|
1803
|
+
return i + o * 3600;
|
|
1808
1804
|
case "m":
|
|
1809
|
-
return i +
|
|
1805
|
+
return i + o * 60;
|
|
1810
1806
|
case "s":
|
|
1811
|
-
return i +
|
|
1807
|
+
return i + o;
|
|
1812
1808
|
default:
|
|
1813
1809
|
return i;
|
|
1814
1810
|
}
|
|
1815
1811
|
}, 0);
|
|
1816
1812
|
}
|
|
1817
|
-
class
|
|
1813
|
+
class la extends Ys {
|
|
1818
1814
|
constructor(t) {
|
|
1819
1815
|
super();
|
|
1820
1816
|
v(this, "audioContext");
|
|
@@ -1842,8 +1838,8 @@ class ra extends js {
|
|
|
1842
1838
|
let s = 0;
|
|
1843
1839
|
if (this.canUseFloatTimeDomainData) {
|
|
1844
1840
|
t.getFloatTimeDomainData(i);
|
|
1845
|
-
for (let
|
|
1846
|
-
const u = i[
|
|
1841
|
+
for (let o = 0; o < i.length; o++) {
|
|
1842
|
+
const u = i[o];
|
|
1847
1843
|
if (u) {
|
|
1848
1844
|
const c = u ** 2;
|
|
1849
1845
|
s = Math.max(c, s);
|
|
@@ -1851,8 +1847,8 @@ class ra extends js {
|
|
|
1851
1847
|
}
|
|
1852
1848
|
} else {
|
|
1853
1849
|
t.getByteTimeDomainData(i);
|
|
1854
|
-
for (let
|
|
1855
|
-
const u = i[
|
|
1850
|
+
for (let o = 0; o < i.length; o++) {
|
|
1851
|
+
const u = i[o];
|
|
1856
1852
|
if (u) {
|
|
1857
1853
|
const c = (u / 128 - 1) ** 2;
|
|
1858
1854
|
s = Math.max(c, s);
|
|
@@ -1877,58 +1873,58 @@ class ra extends js {
|
|
|
1877
1873
|
return this.source instanceof HTMLMediaElement;
|
|
1878
1874
|
}
|
|
1879
1875
|
}
|
|
1880
|
-
var f,
|
|
1881
|
-
const
|
|
1882
|
-
constructor(
|
|
1883
|
-
l(this,
|
|
1876
|
+
var f, $, x, ti, wt, Ct, jt, Ie, Yt, ot, Ki, ei, _, T, uo, er, po, ir, sr, bo, mo, vo, fo, go, qi, Vi, Xi, ji, Eo, Ao, Yi, Wi, vi, ve;
|
|
1877
|
+
const Gt = class Gt {
|
|
1878
|
+
constructor(a, t) {
|
|
1879
|
+
l(this, T);
|
|
1884
1880
|
l(this, f);
|
|
1885
|
-
l(this,
|
|
1881
|
+
l(this, $);
|
|
1886
1882
|
l(this, x);
|
|
1887
1883
|
l(this, ti);
|
|
1888
|
-
l(this,
|
|
1884
|
+
l(this, wt);
|
|
1889
1885
|
v(this, "userPaused", !0);
|
|
1890
1886
|
l(this, Ct);
|
|
1891
|
-
l(this,
|
|
1887
|
+
l(this, jt);
|
|
1892
1888
|
l(this, Ie, !1);
|
|
1893
|
-
l(this,
|
|
1889
|
+
l(this, Yt, !1);
|
|
1894
1890
|
l(this, ot, null);
|
|
1895
|
-
l(this,
|
|
1891
|
+
l(this, Ki, 0);
|
|
1896
1892
|
l(this, ei, !1);
|
|
1897
|
-
l(this, _,
|
|
1898
|
-
l(this,
|
|
1899
|
-
l(this, Vi, () => n(this,
|
|
1893
|
+
l(this, _, da.get().createContext("HlsPlayer"));
|
|
1894
|
+
l(this, qi, () => n(this, T, vi).call(this, !0));
|
|
1895
|
+
l(this, Vi, () => n(this, T, vi).call(this, !1));
|
|
1900
1896
|
l(this, Yi, () => {
|
|
1901
|
-
e(this, f).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !e(this, f).paused && n(this,
|
|
1897
|
+
e(this, f).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !e(this, f).paused && n(this, T, vi).call(this, !1);
|
|
1902
1898
|
});
|
|
1903
|
-
l(this,
|
|
1904
|
-
e(this, f).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && n(this,
|
|
1899
|
+
l(this, Wi, () => {
|
|
1900
|
+
e(this, f).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && n(this, T, vi).call(this, !1);
|
|
1905
1901
|
});
|
|
1906
|
-
h(this,
|
|
1902
|
+
h(this, $, a), h(this, jt, t == null ? void 0 : t.maxVideoBitRate), e(this, $).style.position = "absolute", e(this, $).style.top = "0", e(this, $).style.left = "0", e(this, $).style.width = "100%", e(this, $).style.height = "100%", e(this, $).style.opacity = "0", e(this, $).style.pointerEvents = "none", e(this, $).style.transition = "opacity 0.12s linear";
|
|
1907
1903
|
const i = document.createElement("video");
|
|
1908
|
-
h(this, f, i),
|
|
1904
|
+
h(this, f, i), a.appendChild(e(this, f)), e(this, f).style.width = "100%", e(this, f).style.height = "100%", e(this, f).setAttribute("playsinline", ""), e(this, f).setAttribute("webkit-playsinline", ""), e(this, f).setAttribute("preload", "metadata"), n(this, T, Eo).call(this), h(this, ei, e(this, f).muted), (t == null ? void 0 : t.volume) !== void 0 && (this.volume = t.volume), (t == null ? void 0 : t.muted) !== void 0 && (this.muted = t.muted);
|
|
1909
1905
|
}
|
|
1910
1906
|
hide() {
|
|
1911
|
-
h(this, Ie, !0), h(this,
|
|
1907
|
+
h(this, Ie, !0), h(this, Yt, !1), e(this, $).classList.remove("active"), e(this, $).style.opacity = "0", e(this, $).style.pointerEvents = "none", h(this, ot, null);
|
|
1912
1908
|
}
|
|
1913
1909
|
play() {
|
|
1914
|
-
return
|
|
1910
|
+
return q(this, null, function* () {
|
|
1915
1911
|
try {
|
|
1916
1912
|
return e(this, x) ? (this.userPaused = !1, yield e(this, f).play()) : Promise.reject("HLS not initialized");
|
|
1917
|
-
} catch (
|
|
1918
|
-
e(this, _).error("Failed to play timeshift video:",
|
|
1913
|
+
} catch (a) {
|
|
1914
|
+
e(this, _).error("Failed to play timeshift video:", a);
|
|
1919
1915
|
}
|
|
1920
1916
|
});
|
|
1921
1917
|
}
|
|
1922
|
-
seek(
|
|
1923
|
-
return
|
|
1924
|
-
if (e(this, _).debug("HlsPlayer seek to",
|
|
1918
|
+
seek(a) {
|
|
1919
|
+
return q(this, null, function* () {
|
|
1920
|
+
if (e(this, _).debug("HlsPlayer seek to", a.time), !Number.isFinite(a.time)) {
|
|
1925
1921
|
h(this, ot, null);
|
|
1926
1922
|
return;
|
|
1927
1923
|
}
|
|
1928
|
-
if (h(this, ot,
|
|
1929
|
-
n(this,
|
|
1924
|
+
if (h(this, ot, a.time > 0.1 ? a.time : null), this.isActive() && e(this, x))
|
|
1925
|
+
n(this, T, sr).call(this, a.time);
|
|
1930
1926
|
else
|
|
1931
|
-
return n(this,
|
|
1927
|
+
return n(this, T, bo).call(this, a);
|
|
1932
1928
|
});
|
|
1933
1929
|
}
|
|
1934
1930
|
shouldIgnoreTimeupdate() {
|
|
@@ -1946,22 +1942,22 @@ const $t = class $t {
|
|
|
1946
1942
|
return document.pictureInPictureElement === e(this, f) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1947
1943
|
}
|
|
1948
1944
|
isActive() {
|
|
1949
|
-
return e(this,
|
|
1945
|
+
return e(this, $).style.opacity === "1" || e(this, $).classList.contains("active");
|
|
1950
1946
|
}
|
|
1951
1947
|
cleanup() {
|
|
1952
|
-
n(this,
|
|
1948
|
+
n(this, T, Ao).call(this), n(this, T, ir).call(this), e(this, Ct) && (cancelAnimationFrame(e(this, Ct)), h(this, Ct, void 0)), h(this, ot, null), e(this, f).remove();
|
|
1953
1949
|
}
|
|
1954
|
-
addEventListener(
|
|
1955
|
-
e(this, f).addEventListener(
|
|
1950
|
+
addEventListener(a, t) {
|
|
1951
|
+
e(this, f).addEventListener(a, t);
|
|
1956
1952
|
}
|
|
1957
|
-
removeEventListener(
|
|
1958
|
-
e(this, f).removeEventListener(
|
|
1953
|
+
removeEventListener(a, t) {
|
|
1954
|
+
e(this, f).removeEventListener(a, t);
|
|
1959
1955
|
}
|
|
1960
|
-
dispatchEvent(
|
|
1961
|
-
return e(this, f).dispatchEvent(
|
|
1956
|
+
dispatchEvent(a) {
|
|
1957
|
+
return e(this, f).dispatchEvent(a);
|
|
1962
1958
|
}
|
|
1963
|
-
setTimeshiftUrl(
|
|
1964
|
-
e(this,
|
|
1959
|
+
setTimeshiftUrl(a) {
|
|
1960
|
+
e(this, wt) !== a && (e(this, _).debug("HLSPlayer Setting timeshift URL to", a), h(this, wt, a));
|
|
1965
1961
|
}
|
|
1966
1962
|
get videoElement() {
|
|
1967
1963
|
return e(this, f);
|
|
@@ -1972,20 +1968,20 @@ const $t = class $t {
|
|
|
1972
1968
|
get paused() {
|
|
1973
1969
|
return e(this, f).paused;
|
|
1974
1970
|
}
|
|
1975
|
-
set volume(
|
|
1976
|
-
e(this, f).volume =
|
|
1971
|
+
set volume(a) {
|
|
1972
|
+
e(this, f).volume = a;
|
|
1977
1973
|
}
|
|
1978
1974
|
get volume() {
|
|
1979
1975
|
return e(this, f).volume;
|
|
1980
1976
|
}
|
|
1981
|
-
set muted(
|
|
1982
|
-
h(this, ei,
|
|
1977
|
+
set muted(a) {
|
|
1978
|
+
h(this, ei, a), e(this, f).muted = a;
|
|
1983
1979
|
}
|
|
1984
1980
|
get muted() {
|
|
1985
1981
|
return e(this, ei);
|
|
1986
1982
|
}
|
|
1987
|
-
set currentTime(
|
|
1988
|
-
e(this, f).currentTime =
|
|
1983
|
+
set currentTime(a) {
|
|
1984
|
+
e(this, f).currentTime = a;
|
|
1989
1985
|
}
|
|
1990
1986
|
get currentTime() {
|
|
1991
1987
|
return e(this, f).currentTime;
|
|
@@ -1997,20 +1993,20 @@ const $t = class $t {
|
|
|
1997
1993
|
return e(this, f).duration;
|
|
1998
1994
|
}
|
|
1999
1995
|
get maxVideoBitRate() {
|
|
2000
|
-
return e(this,
|
|
1996
|
+
return e(this, jt);
|
|
2001
1997
|
}
|
|
2002
|
-
set maxVideoBitRate(
|
|
2003
|
-
h(this,
|
|
1998
|
+
set maxVideoBitRate(a) {
|
|
1999
|
+
h(this, jt, a), a !== void 0 && e(this, x) && n(this, T, er).call(this, a);
|
|
2004
2000
|
}
|
|
2005
2001
|
};
|
|
2006
|
-
f = new WeakMap(),
|
|
2007
|
-
return
|
|
2008
|
-
const { default:
|
|
2009
|
-
if (h(this, ti,
|
|
2002
|
+
f = new WeakMap(), $ = new WeakMap(), x = new WeakMap(), ti = new WeakMap(), wt = new WeakMap(), Ct = new WeakMap(), jt = new WeakMap(), Ie = new WeakMap(), Yt = new WeakMap(), ot = new WeakMap(), Ki = new WeakMap(), ei = new WeakMap(), _ = new WeakMap(), T = new WeakSet(), uo = function() {
|
|
2003
|
+
return q(this, null, function* () {
|
|
2004
|
+
const { default: a } = yield import("./h5LA1Y1W.js");
|
|
2005
|
+
if (h(this, ti, a), !a.isSupported()) {
|
|
2010
2006
|
e(this, _).warn("HLS not supported");
|
|
2011
2007
|
return;
|
|
2012
2008
|
}
|
|
2013
|
-
h(this, x, new
|
|
2009
|
+
h(this, x, new a({
|
|
2014
2010
|
capLevelToPlayerSize: !0,
|
|
2015
2011
|
enableWorker: !0,
|
|
2016
2012
|
backBufferLength: 30,
|
|
@@ -2030,12 +2026,12 @@ f = new WeakMap(), z = new WeakMap(), x = new WeakMap(), ti = new WeakMap(), Tt
|
|
|
2030
2026
|
startFragPrefetch: !0,
|
|
2031
2027
|
testBandwidth: !1,
|
|
2032
2028
|
debug: !1
|
|
2033
|
-
})), e(this, x).attachMedia(e(this, f)), e(this, x).on(
|
|
2034
|
-
e(this, _).error("[HLS] error:", i), i.fatal && n(this,
|
|
2035
|
-
}), e(this, x).on(
|
|
2029
|
+
})), e(this, x).attachMedia(e(this, f)), e(this, x).on(a.Events.MEDIA_ATTACHED, () => e(this, _).debug("[HLS] media attached")), e(this, x).on(a.Events.MANIFEST_PARSED, () => e(this, _).debug("[HLS] manifest parsed")), e(this, x).on(a.Events.ERROR, (t, i) => {
|
|
2030
|
+
e(this, _).error("[HLS] error:", i), i.fatal && n(this, T, po).call(this, i);
|
|
2031
|
+
}), e(this, x).on(a.Events.MANIFEST_PARSED, () => {
|
|
2036
2032
|
var t;
|
|
2037
|
-
!e(this,
|
|
2038
|
-
}), e(this, x).on(
|
|
2033
|
+
!e(this, jt) || ((t = e(this, x)) == null ? void 0 : t.levels.length) === 0 || n(this, T, er).call(this, e(this, jt));
|
|
2034
|
+
}), e(this, x).on(a.Events.LEVEL_SWITCHED, () => {
|
|
2039
2035
|
var t, i;
|
|
2040
2036
|
e(this, _).debug(
|
|
2041
2037
|
"Level switched:",
|
|
@@ -2047,26 +2043,26 @@ f = new WeakMap(), z = new WeakMap(), x = new WeakMap(), ti = new WeakMap(), Tt
|
|
|
2047
2043
|
);
|
|
2048
2044
|
});
|
|
2049
2045
|
});
|
|
2050
|
-
}, er = function(
|
|
2046
|
+
}, er = function(a) {
|
|
2051
2047
|
var s;
|
|
2052
2048
|
if (!e(this, x)) {
|
|
2053
2049
|
e(this, _).warn("HLS not initialized, cannot set bitrate cap");
|
|
2054
2050
|
return;
|
|
2055
2051
|
}
|
|
2056
|
-
let t = e(this, x).levels.map((
|
|
2052
|
+
let t = e(this, x).levels.map((o, u) => ({ i: u, bitrate: o.bitrate })).filter((o) => a >= o.bitrate * 0.8).map((o) => o.i).pop();
|
|
2057
2053
|
t === void 0 && (t = 0, e(this, _).debug(
|
|
2058
|
-
"No level fits under bitrate cap: " +
|
|
2054
|
+
"No level fits under bitrate cap: " + a + ", defaulting to lowest level: " + ((s = e(this, x).levels[0]) == null ? void 0 : s.bitrate)
|
|
2059
2055
|
));
|
|
2060
2056
|
const i = e(this, x).currentLevel;
|
|
2061
2057
|
e(this, x).autoLevelCapping = t, i !== t && (e(this, _).debug(`Current level ${i} exceeds cap ${t}, forcing immediate switch`), e(this, x).currentLevel = t);
|
|
2062
|
-
},
|
|
2058
|
+
}, po = function(a) {
|
|
2063
2059
|
var i, s;
|
|
2064
2060
|
if (!e(this, ti)) {
|
|
2065
2061
|
e(this, _).error("Hls class not available for error handling");
|
|
2066
2062
|
return;
|
|
2067
2063
|
}
|
|
2068
2064
|
const t = e(this, ti);
|
|
2069
|
-
switch (
|
|
2065
|
+
switch (a.type) {
|
|
2070
2066
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
2071
2067
|
e(this, _).warn("[HLS] network error -> startLoad"), (i = e(this, x)) == null || i.startLoad();
|
|
2072
2068
|
break;
|
|
@@ -2074,68 +2070,68 @@ f = new WeakMap(), z = new WeakMap(), x = new WeakMap(), ti = new WeakMap(), Tt
|
|
|
2074
2070
|
e(this, _).warn("[HLS] media error -> recoverMediaError"), (s = e(this, x)) == null || s.recoverMediaError();
|
|
2075
2071
|
break;
|
|
2076
2072
|
default:
|
|
2077
|
-
e(this, _).error("[HLS] fatal -> destroy"), n(this,
|
|
2073
|
+
e(this, _).error("[HLS] fatal -> destroy"), n(this, T, ir).call(this);
|
|
2078
2074
|
break;
|
|
2079
2075
|
}
|
|
2080
2076
|
}, ir = function() {
|
|
2081
2077
|
e(this, x) && (e(this, x).destroy(), h(this, x, void 0));
|
|
2082
|
-
}, sr = function(
|
|
2083
|
-
if (!Number.isFinite(
|
|
2078
|
+
}, sr = function(a) {
|
|
2079
|
+
if (!Number.isFinite(a)) {
|
|
2084
2080
|
h(this, ot, null);
|
|
2085
2081
|
return;
|
|
2086
2082
|
}
|
|
2087
|
-
const t = n(this,
|
|
2083
|
+
const t = n(this, T, go).call(this, e(this, f), a);
|
|
2088
2084
|
h(this, ot, t > 0.1 ? t : null), e(this, Ct) && cancelAnimationFrame(e(this, Ct)), h(this, Ct, requestAnimationFrame(() => {
|
|
2089
2085
|
e(this, f).currentTime = t;
|
|
2090
2086
|
}));
|
|
2091
|
-
},
|
|
2092
|
-
return
|
|
2093
|
-
const { time: t, playWhenReady: i = !0 } =
|
|
2094
|
-
if (!e(this,
|
|
2087
|
+
}, bo = function(a) {
|
|
2088
|
+
return q(this, null, function* () {
|
|
2089
|
+
const { time: t, playWhenReady: i = !0 } = a || {}, s = ++ea(this, Ki)._;
|
|
2090
|
+
if (!e(this, wt)) {
|
|
2095
2091
|
e(this, _).warn("No timeshift URL");
|
|
2096
2092
|
return;
|
|
2097
2093
|
}
|
|
2098
|
-
if (!e(this, x) && (yield n(this,
|
|
2094
|
+
if (!e(this, x) && (yield n(this, T, uo).call(this), !n(this, T, ve).call(this, s)))
|
|
2099
2095
|
return;
|
|
2100
|
-
h(this, Ie, !1), h(this,
|
|
2101
|
-
const
|
|
2102
|
-
e(this, f).muted = !0, yield n(this,
|
|
2096
|
+
h(this, Ie, !1), h(this, Yt, !1), e(this, x) && (!e(this, x).url || e(this, x).url !== e(this, wt)) && (e(this, _).debug("Loading timeshift URL", e(this, wt)), e(this, x).loadSource(e(this, wt)));
|
|
2097
|
+
const o = this.muted;
|
|
2098
|
+
e(this, f).muted = !0, yield n(this, T, mo).call(this), n(this, T, ve).call(this, s) && (n(this, T, sr).call(this, t), !(i && (yield this.play(), !n(this, T, ve).call(this, s))) && n(this, T, vo).call(this, o, s));
|
|
2103
2099
|
});
|
|
2104
|
-
},
|
|
2105
|
-
return e(this, f).duration && !isNaN(e(this, f).duration) ? Promise.resolve() : new Promise((
|
|
2100
|
+
}, mo = function() {
|
|
2101
|
+
return e(this, f).duration && !isNaN(e(this, f).duration) ? Promise.resolve() : new Promise((a) => {
|
|
2106
2102
|
e(this, _).debug("Waiting for duration...");
|
|
2107
2103
|
const t = () => {
|
|
2108
|
-
e(this, _).debug("Duration loaded:", e(this, f).duration), e(this, f).removeEventListener("loadedmetadata", t), clearTimeout(i),
|
|
2104
|
+
e(this, _).debug("Duration loaded:", e(this, f).duration), e(this, f).removeEventListener("loadedmetadata", t), clearTimeout(i), a();
|
|
2109
2105
|
}, i = setTimeout(() => {
|
|
2110
|
-
e(this, _).debug("Duration timeout, proceeding anyway"), e(this, f).removeEventListener("loadedmetadata", t),
|
|
2106
|
+
e(this, _).debug("Duration timeout, proceeding anyway"), e(this, f).removeEventListener("loadedmetadata", t), a();
|
|
2111
2107
|
}, 2e4);
|
|
2112
2108
|
e(this, f).addEventListener("loadedmetadata", t);
|
|
2113
2109
|
});
|
|
2114
|
-
},
|
|
2115
|
-
const i = HTMLMediaElement.HAVE_CURRENT_DATA, s = () => e(this, f).readyState >= i && e(this, f).videoWidth > 0 && e(this, f).videoHeight > 0,
|
|
2116
|
-
e(this, Ie) || e(this,
|
|
2110
|
+
}, vo = function(a, t) {
|
|
2111
|
+
const i = HTMLMediaElement.HAVE_CURRENT_DATA, s = () => e(this, f).readyState >= i && e(this, f).videoWidth > 0 && e(this, f).videoHeight > 0, o = () => {
|
|
2112
|
+
e(this, Ie) || e(this, Yt) || !n(this, T, ve).call(this, t) || (h(this, Yt, !0), e(this, _).debug("Revealing timeshift video"), e(this, $).classList.add("active"), e(this, $).style.opacity = "1", e(this, $).style.pointerEvents = "auto", e(this, f).dispatchEvent(
|
|
2117
2113
|
new CustomEvent("timeshiftready", {
|
|
2118
2114
|
detail: { activationId: t }
|
|
2119
2115
|
})
|
|
2120
|
-
),
|
|
2116
|
+
), a || n(this, T, fo).call(this, t));
|
|
2121
2117
|
}, u = () => {
|
|
2122
|
-
e(this, Ie) || e(this,
|
|
2118
|
+
e(this, Ie) || e(this, Yt) || !n(this, T, ve).call(this, t) || s() && (m(), o());
|
|
2123
2119
|
};
|
|
2124
2120
|
let c = !1;
|
|
2125
2121
|
const m = () => {
|
|
2126
|
-
c || (c = !0, e(this, f).removeEventListener("canplay", u), e(this, f).removeEventListener("canplaythrough", u), e(this, f).removeEventListener("loadeddata", u), clearTimeout(
|
|
2122
|
+
c || (c = !0, e(this, f).removeEventListener("canplay", u), e(this, f).removeEventListener("canplaythrough", u), e(this, f).removeEventListener("loadeddata", u), clearTimeout(E));
|
|
2127
2123
|
};
|
|
2128
2124
|
if (s()) {
|
|
2129
|
-
|
|
2125
|
+
o();
|
|
2130
2126
|
return;
|
|
2131
2127
|
}
|
|
2132
2128
|
e(this, f).addEventListener("canplay", u), e(this, f).addEventListener("canplaythrough", u), e(this, f).addEventListener("loadeddata", u);
|
|
2133
|
-
const
|
|
2134
|
-
e(this, _).debug("Timeout reached, forcing reveal"), m(),
|
|
2129
|
+
const E = setTimeout(() => {
|
|
2130
|
+
e(this, _).debug("Timeout reached, forcing reveal"), m(), o();
|
|
2135
2131
|
}, 2e3);
|
|
2136
|
-
},
|
|
2132
|
+
}, fo = function(a) {
|
|
2137
2133
|
const t = () => {
|
|
2138
|
-
n(this,
|
|
2134
|
+
n(this, T, ve).call(this, a) && (e(this, f).muted = !1);
|
|
2139
2135
|
};
|
|
2140
2136
|
"requestVideoFrameCallback" in e(this, f) ? e(this, f).requestVideoFrameCallback(() => {
|
|
2141
2137
|
setTimeout(() => {
|
|
@@ -2144,34 +2140,34 @@ f = new WeakMap(), z = new WeakMap(), x = new WeakMap(), ti = new WeakMap(), Tt
|
|
|
2144
2140
|
}) : setTimeout(() => {
|
|
2145
2141
|
t();
|
|
2146
2142
|
}, 120);
|
|
2147
|
-
},
|
|
2148
|
-
const i =
|
|
2143
|
+
}, go = function(a, t) {
|
|
2144
|
+
const i = a.seekable;
|
|
2149
2145
|
if (!i || i.length === 0) return t;
|
|
2150
|
-
const s = i.start(0),
|
|
2151
|
-
return e(this, _).debug("Clamped seekable:", Math.max(s, Math.min(t,
|
|
2152
|
-
},
|
|
2153
|
-
for (const
|
|
2154
|
-
for (const
|
|
2155
|
-
e(this, f).addEventListener("timeupdate", e(this, Yi)), e(this, f).addEventListener("progress", e(this,
|
|
2156
|
-
},
|
|
2157
|
-
for (const
|
|
2158
|
-
for (const
|
|
2159
|
-
e(this, f).removeEventListener("timeupdate", e(this, Yi)), e(this, f).removeEventListener("progress", e(this,
|
|
2160
|
-
}, Yi = new WeakMap(),
|
|
2161
|
-
const t =
|
|
2146
|
+
const s = i.start(0), o = i.end(i.length - 1);
|
|
2147
|
+
return e(this, _).debug("Clamped seekable:", Math.max(s, Math.min(t, o))), Math.max(s, Math.min(t, o));
|
|
2148
|
+
}, qi = new WeakMap(), Vi = new WeakMap(), Xi = new WeakMap(), ji = new WeakMap(), Eo = function() {
|
|
2149
|
+
for (const a of e(Gt, Xi)) e(this, f).addEventListener(a, e(this, qi));
|
|
2150
|
+
for (const a of e(Gt, ji)) e(this, f).addEventListener(a, e(this, Vi));
|
|
2151
|
+
e(this, f).addEventListener("timeupdate", e(this, Yi)), e(this, f).addEventListener("progress", e(this, Wi));
|
|
2152
|
+
}, Ao = function() {
|
|
2153
|
+
for (const a of e(Gt, Xi)) e(this, f).removeEventListener(a, e(this, qi));
|
|
2154
|
+
for (const a of e(Gt, ji)) e(this, f).removeEventListener(a, e(this, Vi));
|
|
2155
|
+
e(this, f).removeEventListener("timeupdate", e(this, Yi)), e(this, f).removeEventListener("progress", e(this, Wi));
|
|
2156
|
+
}, Yi = new WeakMap(), Wi = new WeakMap(), vi = function(a) {
|
|
2157
|
+
const t = a && (e(this, f).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || e(this, f).seeking || e(this, f).paused && !this.userPaused);
|
|
2162
2158
|
e(this, f).dispatchEvent(
|
|
2163
2159
|
new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
2164
2160
|
bubbles: !0,
|
|
2165
2161
|
composed: !0
|
|
2166
2162
|
})
|
|
2167
2163
|
);
|
|
2168
|
-
},
|
|
2169
|
-
return e(this,
|
|
2170
|
-
}, l(
|
|
2171
|
-
let tr =
|
|
2172
|
-
class
|
|
2173
|
-
constructor(
|
|
2174
|
-
this.vindral =
|
|
2164
|
+
}, ve = function(a) {
|
|
2165
|
+
return e(this, Ki) === a;
|
|
2166
|
+
}, l(Gt, Xi, ["waiting", "seeking", "stalled", "loadstart"]), l(Gt, ji, ["canplay", "canplaythrough", "seeked", "loadeddata"]);
|
|
2167
|
+
let tr = Gt;
|
|
2168
|
+
class Fh {
|
|
2169
|
+
constructor(a) {
|
|
2170
|
+
this.vindral = a;
|
|
2175
2171
|
}
|
|
2176
2172
|
get volume() {
|
|
2177
2173
|
return this.vindral.volume;
|
|
@@ -2180,17 +2176,17 @@ class Eh {
|
|
|
2180
2176
|
return this.vindral.muted;
|
|
2181
2177
|
}
|
|
2182
2178
|
play() {
|
|
2183
|
-
return
|
|
2184
|
-
var
|
|
2185
|
-
return (
|
|
2179
|
+
return q(this, null, function* () {
|
|
2180
|
+
var a;
|
|
2181
|
+
return (a = this.vindral) == null || a.play(), Promise.resolve();
|
|
2186
2182
|
});
|
|
2187
2183
|
}
|
|
2188
2184
|
pause() {
|
|
2189
2185
|
this.vindral.pause();
|
|
2190
2186
|
}
|
|
2191
2187
|
}
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2188
|
+
const yo = document.createElement("template");
|
|
2189
|
+
yo.innerHTML = /* HTML */
|
|
2194
2190
|
`
|
|
2195
2191
|
<style>
|
|
2196
2192
|
:host {
|
|
@@ -2330,7 +2326,7 @@ class Ui extends HTMLElement {
|
|
|
2330
2326
|
l(this, ii, null);
|
|
2331
2327
|
l(this, si);
|
|
2332
2328
|
v(this, "range");
|
|
2333
|
-
h(this, si, this.attachShadow({ mode: "open" })), e(this, si).appendChild(
|
|
2329
|
+
h(this, si, this.attachShadow({ mode: "open" })), e(this, si).appendChild(yo.content.cloneNode(!0)), this.range = e(this, si).getElementById("range");
|
|
2334
2330
|
}
|
|
2335
2331
|
connectedCallback() {
|
|
2336
2332
|
var t;
|
|
@@ -2360,8 +2356,8 @@ class Ui extends HTMLElement {
|
|
|
2360
2356
|
}
|
|
2361
2357
|
}
|
|
2362
2358
|
ii = new WeakMap(), si = new WeakMap(), v(Ui, "observedAttributes", ["disabled"]);
|
|
2363
|
-
const
|
|
2364
|
-
|
|
2359
|
+
const ko = document.createElement("template");
|
|
2360
|
+
ko.innerHTML = /* HTML */
|
|
2365
2361
|
`
|
|
2366
2362
|
<style>
|
|
2367
2363
|
:host {
|
|
@@ -2464,6 +2460,11 @@ Eo.innerHTML = /* HTML */
|
|
|
2464
2460
|
transform: translateY(var(--vindral-subtitle-offset, 0px)) !important;
|
|
2465
2461
|
}
|
|
2466
2462
|
|
|
2463
|
+
#video video::cue {
|
|
2464
|
+
font-size: 28px;
|
|
2465
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2467
2468
|
:host([user-interacting]) #video {
|
|
2468
2469
|
cursor: auto;
|
|
2469
2470
|
}
|
|
@@ -2558,176 +2559,176 @@ Eo.innerHTML = /* HTML */
|
|
|
2558
2559
|
</div>
|
|
2559
2560
|
`;
|
|
2560
2561
|
const On = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
2561
|
-
var
|
|
2562
|
+
var An, xt, Ji, lt, Wt, Zi, b, M, Jt, g, Qi, At, Nt, Zt, yn, j, Rt, Le, ht, Q, _t, ts, es, K, Qt, te, d, nr, kn, In, is, ss, ns, rs, as, os, ls, hs, ds, cs, rr, ar, us, ps, bs, ms, vs, fs, gs, Es, Io, or, lr, As, hr, Lo, tn, To, So, en, wo, dr, Co, xo, No, ys, Ro, _o, Uo, Po, ks, Ln, Tn, Do, Is, Sn, wn, Te, cr, ur, sn, zt, Mo, nn, rn, Oo, pr, Cn, xn, br, A, w;
|
|
2562
2563
|
const Li = class Li extends HTMLElement {
|
|
2563
2564
|
constructor() {
|
|
2564
2565
|
var s;
|
|
2565
2566
|
super();
|
|
2566
2567
|
l(this, d);
|
|
2567
2568
|
l(this, xt, /* @__PURE__ */ new Map());
|
|
2568
|
-
l(this,
|
|
2569
|
+
l(this, Ji, 2e3);
|
|
2569
2570
|
l(this, lt, null);
|
|
2570
|
-
l(this,
|
|
2571
|
+
l(this, Wt, null);
|
|
2571
2572
|
l(this, Zi);
|
|
2572
2573
|
l(this, b);
|
|
2573
|
-
l(this,
|
|
2574
|
-
l(this,
|
|
2575
|
-
l(this,
|
|
2576
|
-
l(this, Qi, e(Li,
|
|
2574
|
+
l(this, M);
|
|
2575
|
+
l(this, Jt);
|
|
2576
|
+
l(this, g);
|
|
2577
|
+
l(this, Qi, e(Li, An));
|
|
2577
2578
|
l(this, At);
|
|
2578
2579
|
l(this, Nt);
|
|
2579
|
-
l(this,
|
|
2580
|
-
l(this,
|
|
2580
|
+
l(this, Zt);
|
|
2581
|
+
l(this, yn);
|
|
2581
2582
|
l(this, j);
|
|
2582
2583
|
l(this, Rt);
|
|
2583
|
-
l(this,
|
|
2584
|
+
l(this, Le);
|
|
2584
2585
|
l(this, ht);
|
|
2585
2586
|
l(this, Q);
|
|
2586
2587
|
l(this, _t);
|
|
2587
2588
|
l(this, ts);
|
|
2588
2589
|
l(this, es);
|
|
2589
|
-
l(this,
|
|
2590
|
-
l(this,
|
|
2591
|
-
l(this,
|
|
2590
|
+
l(this, K);
|
|
2591
|
+
l(this, Qt, null);
|
|
2592
|
+
l(this, te, !1);
|
|
2592
2593
|
// Store references to listener functions for removal
|
|
2593
|
-
l(this,
|
|
2594
|
+
l(this, kn, (t) => {
|
|
2594
2595
|
const i = t.filter((s) => {
|
|
2595
|
-
var
|
|
2596
|
-
return (
|
|
2596
|
+
var o;
|
|
2597
|
+
return (o = s.video) == null ? void 0 : o.width;
|
|
2597
2598
|
});
|
|
2598
2599
|
n(this, d, A).call(this, r.RENDITION_LEVELS, JSON.stringify(i));
|
|
2599
2600
|
});
|
|
2600
|
-
l(this,
|
|
2601
|
+
l(this, In, (t) => {
|
|
2601
2602
|
n(this, d, A).call(this, r.RENDITION_LEVEL, JSON.stringify(t));
|
|
2602
2603
|
});
|
|
2603
2604
|
l(this, is, (t) => {
|
|
2604
2605
|
switch (t) {
|
|
2605
2606
|
case "playing":
|
|
2606
|
-
n(this, d,
|
|
2607
|
+
n(this, d, w).call(this, r.PAUSED), n(this, d, w).call(this, r.BUFFERING);
|
|
2607
2608
|
break;
|
|
2608
2609
|
case "paused":
|
|
2609
|
-
n(this, d, A).call(this, r.PAUSED, ""), n(this, d,
|
|
2610
|
+
n(this, d, A).call(this, r.PAUSED, ""), n(this, d, w).call(this, r.BUFFERING);
|
|
2610
2611
|
break;
|
|
2611
2612
|
case "buffering":
|
|
2612
|
-
n(this, d,
|
|
2613
|
+
n(this, d, w).call(this, r.PAUSED), n(this, d, A).call(this, r.BUFFERING, "");
|
|
2613
2614
|
break;
|
|
2614
2615
|
}
|
|
2615
2616
|
});
|
|
2616
2617
|
l(this, ss, (t) => {
|
|
2617
|
-
n(this, d, A).call(this, r.VOLUME, t.volume.toString()), t.isMuted ? n(this, d, A).call(this, r.MUTED, "") : n(this, d,
|
|
2618
|
+
n(this, d, A).call(this, r.VOLUME, t.volume.toString()), t.isMuted ? n(this, d, A).call(this, r.MUTED, "") : n(this, d, w).call(this, r.MUTED);
|
|
2618
2619
|
});
|
|
2619
2620
|
l(this, ns, ({ channelId: t }) => {
|
|
2620
2621
|
var i;
|
|
2621
|
-
this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, d,
|
|
2622
|
+
this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, d, w).call(this, r.BUFFERING);
|
|
2622
2623
|
});
|
|
2623
2624
|
l(this, rs, ({ channelId: t }) => {
|
|
2624
2625
|
var i;
|
|
2625
|
-
e(this, At) !== t && this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, d,
|
|
2626
|
+
e(this, At) !== t && this.setAttribute(r.CHANNEL_ID, t), ((i = e(this, b)) == null ? void 0 : i.playbackState) !== "buffering" && n(this, d, w).call(this, r.BUFFERING);
|
|
2626
2627
|
});
|
|
2627
2628
|
l(this, as, (t) => {
|
|
2628
|
-
h(this,
|
|
2629
|
+
h(this, Te, Date.now()), n(this, d, A).call(this, r.CHANNELS, JSON.stringify(t));
|
|
2629
2630
|
});
|
|
2630
2631
|
l(this, os, (t) => {
|
|
2631
2632
|
var i;
|
|
2632
2633
|
n(this, d, A).call(this, r.LANGUAGES, JSON.stringify(t)), (i = e(this, b)) != null && i.language && n(this, d, A).call(this, r.LANGUAGE, e(this, b).language);
|
|
2633
2634
|
});
|
|
2634
2635
|
l(this, ls, (t) => {
|
|
2635
|
-
var i, s,
|
|
2636
|
-
n(this, d, A).call(this, r.TEXT_TRACKS, JSON.stringify(t)), (i = e(this, b)) != null && i.textTrack && n(this, d, A).call(this, r.TEXT_TRACK, (
|
|
2636
|
+
var i, s, o;
|
|
2637
|
+
n(this, d, A).call(this, r.TEXT_TRACKS, JSON.stringify(t)), (i = e(this, b)) != null && i.textTrack && n(this, d, A).call(this, r.TEXT_TRACK, (o = (s = e(this, b)) == null ? void 0 : s.textTrack) != null ? o : "");
|
|
2637
2638
|
});
|
|
2638
2639
|
l(this, hs, (t) => {
|
|
2639
|
-
t != null && t.forVideo ? (n(this, d, A).call(this, r.NEEDS_USER_INPUT_VIDEO, ""), n(this, d,
|
|
2640
|
+
t != null && t.forVideo ? (n(this, d, A).call(this, r.NEEDS_USER_INPUT_VIDEO, ""), n(this, d, w).call(this, r.NEEDS_USER_INPUT_AUDIO)) : t != null && t.forAudio && (n(this, d, A).call(this, r.NEEDS_USER_INPUT_AUDIO, ""), n(this, d, w).call(this, r.NEEDS_USER_INPUT_VIDEO));
|
|
2640
2641
|
});
|
|
2641
2642
|
l(this, ds, (t) => {
|
|
2642
|
-
t || n(this, d,
|
|
2643
|
+
t || n(this, d, w).call(this, r.BUFFERING);
|
|
2643
2644
|
});
|
|
2644
2645
|
l(this, cs, (t) => {
|
|
2645
2646
|
var N;
|
|
2646
2647
|
const { urls: i, duration: s } = t;
|
|
2647
|
-
if (!i[0] || !e(this,
|
|
2648
|
-
const
|
|
2649
|
-
|
|
2648
|
+
if (!i[0] || !e(this, g)) return;
|
|
2649
|
+
const o = new URL(i[0]);
|
|
2650
|
+
o.searchParams.set("channelId", (N = e(this, At)) != null ? N : "");
|
|
2650
2651
|
const u = this.getAttribute("authentication-token");
|
|
2651
|
-
u &&
|
|
2652
|
-
const c =
|
|
2652
|
+
u && o.searchParams.set("authToken", u);
|
|
2653
|
+
const c = Oh(s);
|
|
2653
2654
|
if (isNaN(c)) {
|
|
2654
|
-
e(this,
|
|
2655
|
+
e(this, K).error(`Invalid duration format: ${s}`);
|
|
2655
2656
|
return;
|
|
2656
2657
|
}
|
|
2657
|
-
const m = Math.floor(Date.now() / 1e3),
|
|
2658
|
-
|
|
2658
|
+
const m = Math.floor(Date.now() / 1e3), E = new Date((m - c) * 1e3).toISOString();
|
|
2659
|
+
o.searchParams.set("from", E), e(this, g).setTimeshiftUrl(o.toString()), n(this, d, A).call(this, r.DURATION, c.toString());
|
|
2659
2660
|
});
|
|
2660
2661
|
l(this, us, () => {
|
|
2661
|
-
n(this, d,
|
|
2662
|
+
n(this, d, w).call(this, r.PAUSED), n(this, d, w).call(this, r.BUFFERING);
|
|
2662
2663
|
});
|
|
2663
2664
|
l(this, ps, () => {
|
|
2664
|
-
n(this, d, A).call(this, r.PAUSED, ""), n(this, d,
|
|
2665
|
+
n(this, d, A).call(this, r.PAUSED, ""), n(this, d, w).call(this, r.BUFFERING);
|
|
2665
2666
|
});
|
|
2666
2667
|
l(this, bs, () => {
|
|
2667
|
-
e(this,
|
|
2668
|
+
e(this, Is).call(this), n(this, d, w).call(this, r.BUFFERING);
|
|
2668
2669
|
});
|
|
2669
|
-
l(this,
|
|
2670
|
-
if (!e(this,
|
|
2671
|
-
const t = e(this,
|
|
2670
|
+
l(this, ms, () => {
|
|
2671
|
+
if (!e(this, g)) return;
|
|
2672
|
+
const t = e(this, g).duration;
|
|
2672
2673
|
n(this, d, A).call(this, r.DURATION, isNaN(t) ? "0" : t.toString());
|
|
2673
2674
|
});
|
|
2674
|
-
l(this,
|
|
2675
|
+
l(this, vs, () => {
|
|
2675
2676
|
var i, s;
|
|
2676
|
-
if (!e(this,
|
|
2677
|
+
if (!e(this, g) || e(this, g).seeking || (s = (i = e(this, g)).shouldIgnoreTimeupdate) != null && s.call(i))
|
|
2677
2678
|
return;
|
|
2678
|
-
const t = e(this,
|
|
2679
|
+
const t = e(this, g).currentTime;
|
|
2679
2680
|
t != null && n(this, d, A).call(this, r.TIMESHIFT_POSITION, t.toString());
|
|
2680
2681
|
});
|
|
2681
|
-
l(this, vs, () => {
|
|
2682
|
-
e(this, E) && (n(this, d, A).call(this, r.VOLUME, e(this, E).volume.toString()), e(this, E).muted ? n(this, d, A).call(this, r.MUTED, "") : n(this, d, T).call(this, r.MUTED));
|
|
2683
|
-
});
|
|
2684
2682
|
l(this, fs, () => {
|
|
2685
|
-
n(this, d, A).call(this, r.
|
|
2683
|
+
e(this, g) && (n(this, d, A).call(this, r.VOLUME, e(this, g).volume.toString()), e(this, g).muted ? n(this, d, A).call(this, r.MUTED, "") : n(this, d, w).call(this, r.MUTED));
|
|
2686
2684
|
});
|
|
2687
2685
|
l(this, gs, () => {
|
|
2688
|
-
n(this, d,
|
|
2686
|
+
n(this, d, A).call(this, r.BUFFERING, "");
|
|
2689
2687
|
});
|
|
2690
2688
|
l(this, Es, () => {
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2689
|
+
n(this, d, w).call(this, r.BUFFERING);
|
|
2690
|
+
});
|
|
2691
|
+
l(this, As, () => {
|
|
2692
|
+
if (e(this, te)) {
|
|
2693
|
+
if (e(this, M) !== e(this, g)) {
|
|
2694
|
+
h(this, te, !1);
|
|
2694
2695
|
return;
|
|
2695
2696
|
}
|
|
2696
|
-
h(this,
|
|
2697
|
+
h(this, te, !1), n(this, d, nn).call(this);
|
|
2697
2698
|
}
|
|
2698
2699
|
});
|
|
2699
|
-
l(this,
|
|
2700
|
+
l(this, ys, 0);
|
|
2700
2701
|
v(this, "handleEvent", (t) => {
|
|
2701
2702
|
switch (t.type) {
|
|
2702
2703
|
case "pointerdown":
|
|
2703
|
-
h(this,
|
|
2704
|
+
h(this, ys, t.timeStamp);
|
|
2704
2705
|
break;
|
|
2705
2706
|
case "pointermove":
|
|
2706
|
-
n(this, d,
|
|
2707
|
+
n(this, d, Ro).call(this, t);
|
|
2707
2708
|
break;
|
|
2708
2709
|
case "pointerup":
|
|
2709
|
-
n(this, d,
|
|
2710
|
+
n(this, d, _o).call(this, t);
|
|
2710
2711
|
break;
|
|
2711
2712
|
case "mouseleave":
|
|
2712
|
-
n(this, d,
|
|
2713
|
+
n(this, d, zt).call(this);
|
|
2713
2714
|
break;
|
|
2714
2715
|
case "dblclick":
|
|
2715
|
-
n(this, d,
|
|
2716
|
+
n(this, d, Uo).call(this, t);
|
|
2716
2717
|
break;
|
|
2717
2718
|
case "mousemove":
|
|
2718
|
-
n(this, d,
|
|
2719
|
+
n(this, d, Po).call(this, t);
|
|
2719
2720
|
break;
|
|
2720
2721
|
case "keydown":
|
|
2721
|
-
e(this,
|
|
2722
|
+
e(this, Tn).call(this, t);
|
|
2722
2723
|
break;
|
|
2723
2724
|
case "keyup":
|
|
2724
|
-
n(this, d,
|
|
2725
|
+
n(this, d, zt).call(this), e(this, Ln).call(this, t);
|
|
2725
2726
|
break;
|
|
2726
2727
|
}
|
|
2727
2728
|
});
|
|
2728
|
-
l(this,
|
|
2729
|
+
l(this, ks, (t) => {
|
|
2729
2730
|
var i;
|
|
2730
|
-
if (e(this, b) && (e(this,
|
|
2731
|
+
if (e(this, b) && (e(this, K).debug("Vindral event", { type: t.type }), t instanceof CustomEvent))
|
|
2731
2732
|
switch (t.type) {
|
|
2732
2733
|
case y.PLAY:
|
|
2733
2734
|
this.removeAttribute(r.PAUSED);
|
|
@@ -2772,11 +2773,11 @@ const Li = class Li extends HTMLElement {
|
|
|
2772
2773
|
}
|
|
2773
2774
|
break;
|
|
2774
2775
|
case y.CHANNEL_GRID_OPENED: {
|
|
2775
|
-
e(this,
|
|
2776
|
+
e(this, Qt) === null && n(this, d, cr).call(this);
|
|
2776
2777
|
break;
|
|
2777
2778
|
}
|
|
2778
2779
|
case y.CHANNEL_GRID_CLOSED: {
|
|
2779
|
-
e(this,
|
|
2780
|
+
e(this, Qt) !== null && (clearTimeout(e(this, Qt)), h(this, Qt, null));
|
|
2780
2781
|
break;
|
|
2781
2782
|
}
|
|
2782
2783
|
case y.ENTER_PIP:
|
|
@@ -2800,14 +2801,14 @@ const Li = class Li extends HTMLElement {
|
|
|
2800
2801
|
case y.SET_VOLUME:
|
|
2801
2802
|
{
|
|
2802
2803
|
const s = t.detail;
|
|
2803
|
-
e(this, b).muted && s > 0 ? (e(this, b).muted = !1, e(this,
|
|
2804
|
+
e(this, b).muted && s > 0 ? (e(this, b).muted = !1, e(this, g) && (e(this, g).muted = !1)) : s === 0 && (e(this, b).muted = !0, e(this, g) && (e(this, g).muted = !0)), this.setAttribute(r.VOLUME, s.toString());
|
|
2804
2805
|
}
|
|
2805
2806
|
break;
|
|
2806
2807
|
case y.SEEK:
|
|
2807
2808
|
this.handleTimeShiftUpdate(String(t.detail));
|
|
2808
2809
|
break;
|
|
2809
2810
|
case y.GO_LIVE:
|
|
2810
|
-
e(this,
|
|
2811
|
+
e(this, Is).call(this);
|
|
2811
2812
|
break;
|
|
2812
2813
|
}
|
|
2813
2814
|
});
|
|
@@ -2817,73 +2818,76 @@ const Li = class Li extends HTMLElement {
|
|
|
2817
2818
|
this.removeEventListener("keyup", this);
|
|
2818
2819
|
return;
|
|
2819
2820
|
}
|
|
2820
|
-
n(this, d,
|
|
2821
|
+
n(this, d, Do).call(this, t);
|
|
2821
2822
|
});
|
|
2822
|
-
l(this,
|
|
2823
|
-
const { metaKey: i, altKey: s, key:
|
|
2824
|
-
i || s || !On.includes(
|
|
2823
|
+
l(this, Tn, (t) => {
|
|
2824
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
2825
|
+
i || s || !On.includes(o) || this.addEventListener("keyup", this, { once: !0 });
|
|
2825
2826
|
});
|
|
2826
|
-
l(this,
|
|
2827
|
+
l(this, Is, () => {
|
|
2827
2828
|
this.removeAttribute(r.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2828
2829
|
});
|
|
2829
2830
|
l(this, Sn, (t) => {
|
|
2830
2831
|
var i;
|
|
2831
|
-
e(this,
|
|
2832
|
+
e(this, g) || n(this, d, or).call(this), e(this, M) !== e(this, g) && (t && n(this, d, rn).call(this), h(this, M, e(this, g)), n(this, d, ar).call(this), n(this, d, Io).call(this), n(this, d, tn).call(this), (i = e(this, b)) == null || i.pause(), h(this, te, t));
|
|
2832
2833
|
});
|
|
2833
|
-
l(this,
|
|
2834
|
-
var i, s,
|
|
2835
|
-
t && n(this, d,
|
|
2836
|
-
n(this, d,
|
|
2834
|
+
l(this, wn, (t) => {
|
|
2835
|
+
var i, s, o, u;
|
|
2836
|
+
t && n(this, d, rn).call(this), (i = e(this, g)) == null || i.hide(), h(this, M, e(this, Jt)), n(this, d, tn).call(this), this.hasAttribute(r.PAUSED) ? (s = e(this, M)) == null || s.pause() : (o = e(this, M)) == null || o.play(), n(this, d, hr).call(this), n(this, d, rr).call(this), (u = e(this, g)) == null || u.pause(), t && (h(this, te, !1), setTimeout(() => {
|
|
2837
|
+
n(this, d, nn).call(this);
|
|
2837
2838
|
}, 100));
|
|
2838
2839
|
});
|
|
2839
2840
|
v(this, "handleTimeShiftUpdate", (t) => {
|
|
2840
2841
|
var s;
|
|
2841
2842
|
const i = this.hasAttribute(r.IS_PIP);
|
|
2842
2843
|
if (t !== !1) {
|
|
2843
|
-
e(this, Sn).call(this, i), (s = e(this,
|
|
2844
|
+
e(this, Sn).call(this, i), (s = e(this, g)) == null || s.seek({
|
|
2844
2845
|
time: parseFloat(t),
|
|
2845
2846
|
playWhenReady: !this.hasAttribute(r.PAUSED)
|
|
2846
2847
|
});
|
|
2847
2848
|
return;
|
|
2848
2849
|
}
|
|
2849
|
-
e(this,
|
|
2850
|
+
e(this, M) !== e(this, Jt) && e(this, wn).call(this, i);
|
|
2850
2851
|
});
|
|
2851
|
-
l(this,
|
|
2852
|
+
l(this, Te, null);
|
|
2852
2853
|
l(this, Cn, () => {
|
|
2853
|
-
var
|
|
2854
|
-
|
|
2854
|
+
var s;
|
|
2855
|
+
const t = (s = e(this, b)) == null ? void 0 : s.currentRenditionLevel;
|
|
2856
|
+
if (!(t != null && t.video))
|
|
2855
2857
|
return;
|
|
2856
|
-
const
|
|
2857
|
-
|
|
2858
|
+
const i = fh(
|
|
2859
|
+
t.video.width > t.video.height ? "landscape-primary" : "portrait-primary"
|
|
2860
|
+
);
|
|
2861
|
+
i && i.catch(() => {
|
|
2858
2862
|
});
|
|
2859
2863
|
});
|
|
2860
2864
|
l(this, xn, () => {
|
|
2861
|
-
|
|
2865
|
+
gh();
|
|
2862
2866
|
});
|
|
2863
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
2867
|
+
this.attachShadow({ mode: "open" }).appendChild(ko.content.cloneNode(!0));
|
|
2864
2868
|
const i = Mn(this.getAttribute("log-level"));
|
|
2865
|
-
h(this,
|
|
2869
|
+
h(this, K, da.get().createContext("VindralController")), e(this, K).setLevel(i), h(this, Zi, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#time-shift-video"));
|
|
2866
2870
|
}
|
|
2867
2871
|
connectedCallback() {
|
|
2868
|
-
return
|
|
2872
|
+
return q(this, null, function* () {
|
|
2869
2873
|
R(this.getAttribute("auto-instance-enabled"), !0) && (yield n(this, d, nr).call(this));
|
|
2870
2874
|
for (const i of Object.values(y))
|
|
2871
|
-
this.addEventListener(i, e(this,
|
|
2875
|
+
this.addEventListener(i, e(this, ks));
|
|
2872
2876
|
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 });
|
|
2873
2877
|
});
|
|
2874
2878
|
}
|
|
2875
2879
|
disconnectedCallback() {
|
|
2876
|
-
var t, i, s,
|
|
2877
|
-
(t = e(this, b)) == null || t.unload(), (i = e(this, j)) == null || i.unload(), (s = e(this, Rt)) == null || s.unload(), (
|
|
2878
|
-
for (const
|
|
2879
|
-
this.removeEventListener(
|
|
2880
|
-
n(this, d,
|
|
2880
|
+
var t, i, s, o, u;
|
|
2881
|
+
(t = e(this, b)) == null || t.unload(), (i = e(this, j)) == null || i.unload(), (s = e(this, Rt)) == null || s.unload(), (o = e(this, Le)) == null || o.unload(), (u = e(this, Q)) == null || u.unload(), n(this, d, lr).call(this);
|
|
2882
|
+
for (const c of Object.values(y))
|
|
2883
|
+
this.removeEventListener(c, e(this, ks));
|
|
2884
|
+
n(this, d, ar).call(this), e(this, lt) && (clearTimeout(e(this, lt)), h(this, lt, null)), this.disconnectListener(this);
|
|
2881
2885
|
}
|
|
2882
2886
|
attributeChangedCallback(t, i, s) {
|
|
2883
|
-
var u, c, m,
|
|
2887
|
+
var u, c, m, E, N, H, G, vt, ft, gt, de, ce, ue, pe, be;
|
|
2884
2888
|
if (i == s)
|
|
2885
2889
|
return;
|
|
2886
|
-
switch (e(this,
|
|
2890
|
+
switch (e(this, K).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
2887
2891
|
case "channel-id":
|
|
2888
2892
|
h(this, At, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), n(this, d, A).call(this, r.BUFFERING, ""), n(this, d, A).call(this, r.CHANNEL_ID, s), n(this, d, A).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl()));
|
|
2889
2893
|
break;
|
|
@@ -2894,55 +2898,55 @@ const Li = class Li extends HTMLElement {
|
|
|
2894
2898
|
s && h(this, Qi, s);
|
|
2895
2899
|
break;
|
|
2896
2900
|
case "paused":
|
|
2897
|
-
U(s) ? ((u = e(this,
|
|
2901
|
+
U(s) ? ((u = e(this, M)) == null || u.pause(), n(this, d, A).call(this, r.PAUSED, "")) : (n(this, d, w).call(this, r.NEEDS_USER_INPUT_VIDEO), n(this, d, w).call(this, r.PAUSED), (c = e(this, M)) == null || c.play());
|
|
2898
2902
|
break;
|
|
2899
2903
|
case "target-buffer-time":
|
|
2900
2904
|
if (e(this, b) && s) {
|
|
2901
|
-
const
|
|
2902
|
-
Number.isNaN(
|
|
2905
|
+
const B = parseInt(s, 10);
|
|
2906
|
+
Number.isNaN(B) || (e(this, b).targetBufferTime = B);
|
|
2903
2907
|
}
|
|
2904
2908
|
break;
|
|
2905
2909
|
case "user-interacting":
|
|
2906
|
-
U(s) ? n(this, d, A).call(this, r.USER_INTERACTING, "") : n(this, d,
|
|
2910
|
+
U(s) ? n(this, d, A).call(this, r.USER_INTERACTING, "") : n(this, d, w).call(this, r.USER_INTERACTING);
|
|
2907
2911
|
break;
|
|
2908
2912
|
case "muted":
|
|
2909
|
-
e(this, b) && (U(s) ? (e(this, b).muted = !0, e(this,
|
|
2913
|
+
e(this, b) && (U(s) ? (e(this, b).muted = !0, e(this, g) && (e(this, g).muted = !0), n(this, d, A).call(this, r.MUTED, ""), (m = e(this, Q)) != null && m.isMediaElementSource && ((E = e(this, Q)) == null || E.stop(), n(this, d, A).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, e(this, g) && (e(this, g).muted = !1), n(this, d, w).call(this, r.MUTED), n(this, d, w).call(this, r.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (N = e(this, Q)) == null || N.start()));
|
|
2910
2914
|
break;
|
|
2911
2915
|
case "ui-locked":
|
|
2912
|
-
U(s) ? n(this, d,
|
|
2916
|
+
U(s) ? n(this, d, sn).call(this) : n(this, d, zt).call(this);
|
|
2913
2917
|
break;
|
|
2914
2918
|
case "is-fullscreen":
|
|
2915
|
-
U(s) ? n(this, d,
|
|
2919
|
+
U(s) ? n(this, d, Oo).call(this) : n(this, d, pr).call(this);
|
|
2916
2920
|
break;
|
|
2917
2921
|
case "abr-enabled":
|
|
2918
2922
|
{
|
|
2919
|
-
const
|
|
2920
|
-
e(this, b) && (e(this, b).abrEnabled =
|
|
2923
|
+
const B = R(s != null ? s : null, !1);
|
|
2924
|
+
e(this, b) && (e(this, b).abrEnabled = B, B && (e(this, b).sizeBasedResolutionCapEnabled = R(
|
|
2921
2925
|
this.getAttribute(r.SIZE_BASED_RESOLUTION_CAP_ENABLED),
|
|
2922
2926
|
!0
|
|
2923
|
-
))),
|
|
2927
|
+
))), B ? n(this, d, A).call(this, r.ABR_ENABLED, "") : n(this, d, w).call(this, r.ABR_ENABLED);
|
|
2924
2928
|
}
|
|
2925
2929
|
break;
|
|
2926
2930
|
case "size-based-resolution-cap-enabled":
|
|
2927
2931
|
{
|
|
2928
|
-
const
|
|
2929
|
-
e(this, b) && (e(this, b).sizeBasedResolutionCapEnabled =
|
|
2932
|
+
const B = R(s != null ? s : null, !0);
|
|
2933
|
+
e(this, b) && (e(this, b).sizeBasedResolutionCapEnabled = B), n(this, d, A).call(this, r.SIZE_BASED_RESOLUTION_CAP_ENABLED, B ? "true" : "false");
|
|
2930
2934
|
}
|
|
2931
2935
|
break;
|
|
2932
2936
|
case "max-video-bit-rate":
|
|
2933
|
-
h(this,
|
|
2937
|
+
h(this, Zt, s), U(s) ? n(this, d, A).call(this, r.MAX_VIDEO_BITRATE, s) : n(this, d, w).call(this, r.MAX_VIDEO_BITRATE), e(this, g) && (e(this, g).maxVideoBitRate = s ? Bt(s) : void 0);
|
|
2934
2938
|
break;
|
|
2935
2939
|
case "max-initial-bit-rate":
|
|
2936
|
-
h(this,
|
|
2940
|
+
h(this, yn, s), U(s) ? n(this, d, A).call(this, r.MAX_INITIAL_BITRATE, s) : n(this, d, w).call(this, r.MAX_INITIAL_BITRATE);
|
|
2937
2941
|
break;
|
|
2938
2942
|
case "is-pip":
|
|
2939
|
-
U(s) ? n(this, d,
|
|
2943
|
+
U(s) ? n(this, d, nn).call(this) : n(this, d, rn).call(this);
|
|
2940
2944
|
break;
|
|
2941
2945
|
case "is-airplaying":
|
|
2942
|
-
U(s) ? ((
|
|
2946
|
+
U(s) ? ((H = e(this, b)) != null && H.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (G = e(this, b)) == null || G.pause()) : (vt = e(this, b)) != null && vt.mediaElement && (e(this, b).mediaElement.style.display = "block");
|
|
2943
2947
|
break;
|
|
2944
2948
|
case "is-casting":
|
|
2945
|
-
U(s) ? ((ft = e(this, Rt)) != null && ft.isFullscreen() && n(this, d,
|
|
2949
|
+
U(s) ? ((ft = e(this, Rt)) != null && ft.isFullscreen() && n(this, d, pr).call(this), (gt = e(this, b)) == null || gt.pause()) : document.hidden || (de = e(this, b)) == null || de.play();
|
|
2946
2950
|
break;
|
|
2947
2951
|
case "cast-receiver-id":
|
|
2948
2952
|
h(this, ts, s);
|
|
@@ -2951,36 +2955,36 @@ const Li = class Li extends HTMLElement {
|
|
|
2951
2955
|
h(this, es, s);
|
|
2952
2956
|
break;
|
|
2953
2957
|
case "language":
|
|
2954
|
-
e(this, b) && (e(this, b).language = s, U(s) ? n(this, d, A).call(this, r.LANGUAGE, s) : n(this, d,
|
|
2958
|
+
e(this, b) && (e(this, b).language = s, U(s) ? n(this, d, A).call(this, r.LANGUAGE, s) : n(this, d, w).call(this, r.LANGUAGE));
|
|
2955
2959
|
break;
|
|
2956
2960
|
case "text-track":
|
|
2957
|
-
e(this, b) && (e(this, b).textTrack = s, U(s) ? n(this, d, A).call(this, r.TEXT_TRACK, s) : n(this, d,
|
|
2961
|
+
e(this, b) && (e(this, b).textTrack = s, U(s) ? n(this, d, A).call(this, r.TEXT_TRACK, s) : n(this, d, w).call(this, r.TEXT_TRACK));
|
|
2958
2962
|
break;
|
|
2959
2963
|
case "log-level":
|
|
2960
|
-
U(s) && e(this,
|
|
2964
|
+
U(s) && e(this, K).setLevel(Mn(s));
|
|
2961
2965
|
break;
|
|
2962
2966
|
case "authentication-token":
|
|
2963
|
-
U(s) ? ((
|
|
2967
|
+
U(s) ? ((ce = e(this, b)) == null || ce.updateAuthenticationToken(s), (ue = e(this, ht)) == null || ue.updateAuthenticationToken(s), n(this, d, A).call(this, r.AUTHENTICATION_TOKEN, s)) : n(this, d, w).call(this, r.AUTHENTICATION_TOKEN);
|
|
2964
2968
|
break;
|
|
2965
2969
|
case "volume":
|
|
2966
2970
|
if (U(s)) {
|
|
2967
|
-
const
|
|
2968
|
-
e(this,
|
|
2971
|
+
const B = parseFloat(s);
|
|
2972
|
+
e(this, g) && (e(this, g).volume = B), e(this, b) && (e(this, b).volume = B);
|
|
2969
2973
|
}
|
|
2970
2974
|
break;
|
|
2971
2975
|
case "timeshift-position":
|
|
2972
|
-
U(s) ? n(this, d, A).call(this, r.TIMESHIFT_POSITION, s) : n(this, d,
|
|
2976
|
+
U(s) ? n(this, d, A).call(this, r.TIMESHIFT_POSITION, s) : n(this, d, w).call(this, r.TIMESHIFT_POSITION);
|
|
2973
2977
|
break;
|
|
2974
2978
|
case "drm-headers":
|
|
2975
2979
|
if (U(s)) {
|
|
2976
|
-
const
|
|
2977
|
-
|
|
2980
|
+
const B = Ws(s);
|
|
2981
|
+
B ? (pe = e(this, b)) == null || pe.drm.setHeaders(B) : e(this, K).warn("Invalid DRM headers format:", s);
|
|
2978
2982
|
}
|
|
2979
2983
|
break;
|
|
2980
2984
|
case "drm-queryparams":
|
|
2981
2985
|
if (U(s)) {
|
|
2982
|
-
const
|
|
2983
|
-
|
|
2986
|
+
const B = Ws(s);
|
|
2987
|
+
B ? (be = e(this, b)) == null || be.drm.setQueryParams(B) : e(this, K).warn("Invalid DRM query parameters format:", s);
|
|
2984
2988
|
}
|
|
2985
2989
|
break;
|
|
2986
2990
|
}
|
|
@@ -2988,13 +2992,13 @@ const Li = class Li extends HTMLElement {
|
|
|
2988
2992
|
r.USER_INTERACTING,
|
|
2989
2993
|
r.PAUSED,
|
|
2990
2994
|
r.HIDE_UI_ON_PAUSE
|
|
2991
|
-
].includes(t) && n(this, d,
|
|
2995
|
+
].includes(t) && n(this, d, Mo).call(this);
|
|
2992
2996
|
}
|
|
2993
2997
|
connectListener(t) {
|
|
2994
|
-
|
|
2995
|
-
var u, c, m,
|
|
2996
|
-
const
|
|
2997
|
-
switch (
|
|
2998
|
+
oa(t).forEach((s) => {
|
|
2999
|
+
var u, c, m, E, N, H;
|
|
3000
|
+
const o = e(this, xt).get(s);
|
|
3001
|
+
switch (o ? o.push(t) : e(this, xt).set(s, [t]), s) {
|
|
2998
3002
|
case r.PAUSED:
|
|
2999
3003
|
(((u = e(this, b)) == null ? void 0 : u.playbackState) === "paused" || this.hasAttribute(r.PAUSED)) && t.setAttribute(r.PAUSED, "");
|
|
3000
3004
|
break;
|
|
@@ -3002,17 +3006,17 @@ const Li = class Li extends HTMLElement {
|
|
|
3002
3006
|
((c = e(this, b)) != null && c.muted || this.hasAttribute(r.MUTED)) && t.setAttribute(r.MUTED, "");
|
|
3003
3007
|
break;
|
|
3004
3008
|
case r.MAX_VIDEO_BITRATE:
|
|
3005
|
-
e(this,
|
|
3009
|
+
e(this, Zt) && t.setAttribute(r.MAX_VIDEO_BITRATE, e(this, Zt));
|
|
3006
3010
|
break;
|
|
3007
3011
|
case r.ABR_ENABLED:
|
|
3008
|
-
((
|
|
3012
|
+
((E = (m = e(this, b)) == null ? void 0 : m.abrEnabled) != null ? E : R(this.getAttribute(r.ABR_ENABLED), !0)) ? t.setAttribute(r.ABR_ENABLED, "") : t.removeAttribute(r.ABR_ENABLED);
|
|
3009
3013
|
break;
|
|
3010
3014
|
case r.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
3011
3015
|
{
|
|
3012
|
-
const
|
|
3016
|
+
const G = (H = (N = e(this, b)) == null ? void 0 : N.sizeBasedResolutionCapEnabled) != null ? H : R(this.getAttribute(r.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0);
|
|
3013
3017
|
t.setAttribute(
|
|
3014
3018
|
r.SIZE_BASED_RESOLUTION_CAP_ENABLED,
|
|
3015
|
-
|
|
3019
|
+
G ? "true" : "false"
|
|
3016
3020
|
);
|
|
3017
3021
|
}
|
|
3018
3022
|
break;
|
|
@@ -3023,19 +3027,19 @@ const Li = class Li extends HTMLElement {
|
|
|
3023
3027
|
e(this, Nt) && t.setAttribute(r.CHANNEL_GROUP_ID, e(this, Nt));
|
|
3024
3028
|
break;
|
|
3025
3029
|
case r.AUTHENTICATION_TOKEN: {
|
|
3026
|
-
const
|
|
3027
|
-
|
|
3030
|
+
const G = this.getAttribute("authentication-token");
|
|
3031
|
+
G && t.setAttribute(r.AUTHENTICATION_TOKEN, G);
|
|
3028
3032
|
break;
|
|
3029
3033
|
}
|
|
3030
3034
|
}
|
|
3031
3035
|
});
|
|
3032
3036
|
}
|
|
3033
3037
|
disconnectListener(t) {
|
|
3034
|
-
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3038
|
+
oa(t).forEach((s) => {
|
|
3039
|
+
const o = e(this, xt).get(s);
|
|
3040
|
+
o && e(this, xt).set(
|
|
3037
3041
|
s,
|
|
3038
|
-
|
|
3042
|
+
o.filter((u) => u != t)
|
|
3039
3043
|
);
|
|
3040
3044
|
});
|
|
3041
3045
|
}
|
|
@@ -3043,7 +3047,7 @@ const Li = class Li extends HTMLElement {
|
|
|
3043
3047
|
return e(this, b);
|
|
3044
3048
|
}
|
|
3045
3049
|
get fullscreen() {
|
|
3046
|
-
return n(this, d,
|
|
3050
|
+
return n(this, d, en).call(this);
|
|
3047
3051
|
}
|
|
3048
3052
|
get airPlay() {
|
|
3049
3053
|
return e(this, ht);
|
|
@@ -3052,14 +3056,15 @@ const Li = class Li extends HTMLElement {
|
|
|
3052
3056
|
n(this, d, nr).call(this);
|
|
3053
3057
|
}
|
|
3054
3058
|
};
|
|
3055
|
-
|
|
3056
|
-
return
|
|
3057
|
-
var
|
|
3059
|
+
An = new WeakMap(), xt = new WeakMap(), Ji = new WeakMap(), lt = new WeakMap(), Wt = new WeakMap(), Zi = new WeakMap(), b = new WeakMap(), M = new WeakMap(), Jt = new WeakMap(), g = new WeakMap(), Qi = new WeakMap(), At = new WeakMap(), Nt = new WeakMap(), Zt = new WeakMap(), yn = new WeakMap(), j = new WeakMap(), Rt = new WeakMap(), Le = new WeakMap(), ht = new WeakMap(), Q = new WeakMap(), _t = new WeakMap(), ts = new WeakMap(), es = new WeakMap(), K = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), d = new WeakSet(), nr = function() {
|
|
3060
|
+
return q(this, null, function* () {
|
|
3061
|
+
var Zr, Qr;
|
|
3058
3062
|
if (!e(this, At)) return;
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
+
const t = e(this, M) === e(this, Jt);
|
|
3064
|
+
yield (Zr = e(this, b)) == null ? void 0 : Zr.unload(), t && h(this, M, void 0);
|
|
3065
|
+
const i = this.hasAttribute(r.PAUSED), s = this.hasAttribute(r.MUTED), o = Bt(this.getAttribute(r.VOLUME)), u = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = ba(this.getAttribute(r.MEDIA)), m = this.getAttribute(r.TEXT_TRACK) || void 0, E = this.getAttribute("edge-url") || void 0, N = this.getAttribute("authentication-token") || void 0, H = Bt(this.getAttribute("max-video-bit-rate")), G = Bt(this.getAttribute("max-initial-bit-rate")), vt = Rh(this.getAttribute("max-size")), ft = Bt(this.getAttribute("min-buffer-time")), gt = Bt(this.getAttribute("max-buffer-time")), de = R(this.getAttribute("burst-enabled")), ce = R(this.getAttribute("mse-enabled")), ue = R(this.getAttribute("mse-opus-enabled")), pe = R(this.getAttribute("ios-background-play-enabled")), be = R(this.getAttribute("ios-wake-lock-enabled")), B = R(this.getAttribute("stream-to-media-element-enabled")), Dl = R(this.getAttribute("ios-media-element-enabled")), Ml = R(this.getAttribute("abr-enabled"), !0), Ol = R(this.getAttribute("size-based-resolution-cap-enabled")), Fl = R(this.getAttribute("telemetry-enabled")), Hl = Nh(this.getAttribute("video-codecs")), Yr = ma(this.getAttribute("poster")), Bl = _h(this.getAttribute("advanced")), zl = Mn(this.getAttribute("log-level")), $l = {
|
|
3066
|
+
headers: Ws(this.getAttribute("drm-headers")),
|
|
3067
|
+
queryParams: Ws(this.getAttribute("drm-queryparams")),
|
|
3063
3068
|
widevine: {
|
|
3064
3069
|
videoRobustness: Js(this.getAttribute("drm-widevine-video-robustness")),
|
|
3065
3070
|
audioRobustness: Js(this.getAttribute("drm-widevine-audio-robustness"))
|
|
@@ -3068,111 +3073,115 @@ En = new WeakMap(), xt = new WeakMap(), Wi = new WeakMap(), lt = new WeakMap(),
|
|
|
3068
3073
|
videoRobustness: Js(this.getAttribute("drm-playready-video-robustness")),
|
|
3069
3074
|
audioRobustness: Js(this.getAttribute("drm-playready-audio-robustness"))
|
|
3070
3075
|
}
|
|
3071
|
-
},
|
|
3076
|
+
}, Gl = xh(
|
|
3072
3077
|
this.getAttribute("webcodecs-hardware-acceleration")
|
|
3073
|
-
),
|
|
3074
|
-
h(this, b, new
|
|
3078
|
+
), Kl = Ch(this.getAttribute("decoders")), ql = R(this.getAttribute("offscreen-canvas-enabled")), Vl = R(this.getAttribute("webtransport-enabled")), Wr = Bt(this.getAttribute("reconnect-retries")), Xl = Wr !== void 0 ? (th) => th.reconnectRetries < Wr : void 0, jl = this.getAttribute("language") || void 0;
|
|
3079
|
+
h(this, b, new mh({
|
|
3075
3080
|
url: e(this, Qi),
|
|
3076
3081
|
channelId: e(this, At),
|
|
3077
3082
|
channelGroupId: e(this, Nt),
|
|
3078
|
-
edgeUrl:
|
|
3079
|
-
authenticationToken:
|
|
3080
|
-
muted:
|
|
3081
|
-
volume:
|
|
3082
|
-
media:
|
|
3083
|
-
maxSize:
|
|
3084
|
-
maxVideoBitRate:
|
|
3085
|
-
maxInitialBitRate:
|
|
3086
|
-
minBufferTime:
|
|
3087
|
-
maxBufferTime:
|
|
3088
|
-
burstEnabled:
|
|
3089
|
-
mseEnabled:
|
|
3090
|
-
mseOpusEnabled:
|
|
3091
|
-
iosBackgroundPlayEnabled:
|
|
3092
|
-
iosWakeLockEnabled:
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
webcodecsHardwareAcceleration:
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3083
|
+
edgeUrl: E,
|
|
3084
|
+
authenticationToken: N,
|
|
3085
|
+
muted: s,
|
|
3086
|
+
volume: u,
|
|
3087
|
+
media: c,
|
|
3088
|
+
maxSize: vt,
|
|
3089
|
+
maxVideoBitRate: H,
|
|
3090
|
+
maxInitialBitRate: G,
|
|
3091
|
+
minBufferTime: ft,
|
|
3092
|
+
maxBufferTime: gt,
|
|
3093
|
+
burstEnabled: de,
|
|
3094
|
+
mseEnabled: ce,
|
|
3095
|
+
mseOpusEnabled: ue,
|
|
3096
|
+
iosBackgroundPlayEnabled: pe,
|
|
3097
|
+
iosWakeLockEnabled: be,
|
|
3098
|
+
streamToMediaElementEnabled: B,
|
|
3099
|
+
iosMediaElementEnabled: Dl,
|
|
3100
|
+
abrEnabled: Ml,
|
|
3101
|
+
sizeBasedResolutionCapEnabled: Ol,
|
|
3102
|
+
telemetryEnabled: Fl,
|
|
3103
|
+
videoCodecs: Hl,
|
|
3104
|
+
poster: Yr,
|
|
3105
|
+
textTrack: m,
|
|
3106
|
+
advanced: Bl,
|
|
3107
|
+
logLevel: zl,
|
|
3108
|
+
language: jl,
|
|
3109
|
+
drm: $l,
|
|
3110
|
+
webtransportEnabled: Vl,
|
|
3111
|
+
webcodecsHardwareAcceleration: Gl,
|
|
3112
|
+
decoders: Kl,
|
|
3113
|
+
offscreenCanvasEnabled: ql,
|
|
3114
|
+
reconnectHandler: Xl
|
|
3115
|
+
})), h(this, Jt, new Fh(e(this, b))), e(this, M) || h(this, M, e(this, Jt)), n(this, d, rr).call(this), h(this, Wt, (Qr = this.shadowRoot) == null ? void 0 : Qr.querySelector("#video")), e(this, Wt) && e(this, b).attach(e(this, Wt)), this.setAttribute(r.MEDIA, e(this, b).media), e(this, b).muted && n(this, d, A).call(this, r.MUTED, ""), e(this, b).abrEnabled ? n(this, d, A).call(this, r.ABR_ENABLED, "") : n(this, d, w).call(this, r.ABR_ENABLED), n(this, d, A).call(this, r.SIZE_BASED_RESOLUTION_CAP_ENABLED, e(this, b).sizeBasedResolutionCapEnabled ? "true" : "false"), n(this, d, A).call(this, r.VOLUME, e(this, b).volume.toString()), U(Yr) || n(this, d, A).call(this, r.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
3116
|
+
const Yl = R(this.getAttribute(r.AIRPLAY_ENABLED), !1), Wl = R(this.getAttribute(r.CAST_ENABLED), !0), Jr = R(this.getAttribute(r.FULLSCREEN_ENABLED), !0), Jl = R(this.getAttribute(r.PIP_ENABLED), !0), Zl = R(this.getAttribute(r.VU_METER_ENABLED), !1), Ql = R(this.getAttribute(r.TIMESHIFT_ENABLED), !1);
|
|
3117
|
+
Yl && n(this, d, xo).call(this, e(this, b)), Wl && n(this, d, wo).call(this, e(this, b)), Jr && n(this, d, To).call(this, e(this, b)), Jl && n(this, d, Lo).call(this, e(this, b)), i || e(this, b).play(), Zl && n(this, d, No).call(this, e(this, b)), this.dispatchEvent(
|
|
3112
3118
|
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
3113
|
-
),
|
|
3119
|
+
), Ql && (n(this, d, or).call(this), Jr && n(this, d, So).call(this));
|
|
3114
3120
|
});
|
|
3115
|
-
},
|
|
3116
|
-
e(this, b) && (e(this, b).on("rendition levels", e(this,
|
|
3121
|
+
}, kn = new WeakMap(), In = new WeakMap(), is = new WeakMap(), ss = new WeakMap(), ns = new WeakMap(), rs = new WeakMap(), as = new WeakMap(), os = new WeakMap(), ls = new WeakMap(), hs = new WeakMap(), ds = new WeakMap(), cs = new WeakMap(), rr = function() {
|
|
3122
|
+
e(this, b) && (e(this, b).on("rendition levels", e(this, kn)), e(this, b).on("rendition level", e(this, In)), e(this, b).on("playback state", e(this, is)), e(this, b).on("volume state", e(this, ss)), e(this, b).on("channel switch failed", e(this, ns)), e(this, b).on("channel switch", e(this, rs)), e(this, b).on("channels", e(this, as)), e(this, b).on("languages", e(this, os)), e(this, b).on("text tracks", e(this, ls)), e(this, b).on("needs user input", e(this, hs)), e(this, b).on("is live", e(this, ds)), e(this, b).on("timeshift info", e(this, cs)));
|
|
3117
3123
|
}, ar = function() {
|
|
3118
3124
|
e(this, b) && (e(this, b).off("playback state", e(this, is)), e(this, b).off("volume state", e(this, ss)), e(this, b).off("channel switch failed", e(this, ns)), e(this, b).off("channel switch", e(this, rs)), e(this, b).off("channels", e(this, as)), e(this, b).off("languages", e(this, os)), e(this, b).off("text tracks", e(this, ls)), e(this, b).off("needs user input", e(this, hs)), e(this, b).off("is live", e(this, ds)), e(this, b).off("timeshift info", e(this, cs)));
|
|
3119
|
-
}, us = new WeakMap(), ps = new WeakMap(), bs = new WeakMap(),
|
|
3120
|
-
e(this,
|
|
3125
|
+
}, us = new WeakMap(), ps = new WeakMap(), bs = new WeakMap(), ms = new WeakMap(), vs = new WeakMap(), fs = new WeakMap(), gs = new WeakMap(), Es = new WeakMap(), Io = function() {
|
|
3126
|
+
e(this, g) && (e(this, g).addEventListener("playing", e(this, us)), e(this, g).addEventListener("pause", e(this, ps)), e(this, g).addEventListener("ended", e(this, bs)), e(this, g).addEventListener("timeupdate", e(this, vs)), e(this, g).addEventListener("volumechange", e(this, fs)), e(this, g).addEventListener("hlsbuffering", e(this, gs)), e(this, g).addEventListener("hlsnotbuffering", e(this, Es)), e(this, g).addEventListener("timeshiftready", e(this, As)));
|
|
3121
3127
|
}, or = function() {
|
|
3122
|
-
var
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
},
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3128
|
+
var o, u, c, m;
|
|
3129
|
+
const t = Bt(this.getAttribute(r.VOLUME)), i = t === void 0 ? (u = (o = e(this, M)) == null ? void 0 : o.volume) != null ? u : 1 : Math.max(0, Math.min(1, t)), s = R(this.getAttribute(r.MUTED), (m = (c = e(this, M)) == null ? void 0 : c.muted) != null ? m : !1);
|
|
3130
|
+
n(this, d, lr).call(this), h(this, g, new tr(e(this, Zi), {
|
|
3131
|
+
volume: i,
|
|
3132
|
+
muted: s,
|
|
3133
|
+
maxVideoBitRate: e(this, Zt) ? parseInt(e(this, Zt), 10) : void 0
|
|
3134
|
+
})), e(this, g).addEventListener("durationchange", e(this, ms));
|
|
3135
|
+
}, lr = function() {
|
|
3136
|
+
e(this, g) && (n(this, d, hr).call(this), e(this, g).removeEventListener("durationchange", e(this, ms)), e(this, g).cleanup(), e(this, M) === e(this, g) && h(this, M, void 0), h(this, g, void 0));
|
|
3137
|
+
}, As = new WeakMap(), hr = function() {
|
|
3138
|
+
e(this, g) && (e(this, g).removeEventListener("playing", e(this, us)), e(this, g).removeEventListener("pause", e(this, ps)), e(this, g).removeEventListener("ended", e(this, bs)), e(this, g).removeEventListener("timeupdate", e(this, vs)), e(this, g).removeEventListener("volumechange", e(this, fs)), e(this, g).removeEventListener("hlsbuffering", e(this, gs)), e(this, g).removeEventListener("hlsnotbuffering", e(this, Es)), e(this, g).removeEventListener("timeshiftready", e(this, As)));
|
|
3139
|
+
}, Lo = function(t) {
|
|
3140
|
+
t.mediaElement instanceof HTMLVideoElement && (h(this, j, new aa(t.mediaElement)), e(this, j).isSupported() && (e(this, K).debug("PIP is supported"), n(this, d, A).call(this, r.PIP_AVAILABLE, "")), e(this, j).on("on picture in picture change", (i) => {
|
|
3141
|
+
i ? n(this, d, A).call(this, r.IS_PIP, "") : n(this, d, w).call(this, r.IS_PIP);
|
|
3133
3142
|
}));
|
|
3134
|
-
},
|
|
3143
|
+
}, tn = function() {
|
|
3135
3144
|
var i;
|
|
3136
3145
|
if (!e(this, j)) return;
|
|
3137
3146
|
let t = null;
|
|
3138
|
-
e(this,
|
|
3139
|
-
s ? n(this, d, A).call(this, r.IS_PIP, "") : n(this, d,
|
|
3147
|
+
e(this, M) === e(this, g) && e(this, g) ? t = e(this, g).videoElement : ((i = e(this, b)) == null ? void 0 : i.mediaElement) instanceof HTMLVideoElement && (t = e(this, b).mediaElement), t && t !== e(this, j).videoElement && (e(this, K).debug("Updating PIP target to", e(this, M) === e(this, g) ? "HLS" : "Vindral"), e(this, j).unload(), h(this, j, new aa(t)), e(this, j).on("on picture in picture change", (s) => {
|
|
3148
|
+
s ? n(this, d, A).call(this, r.IS_PIP, "") : n(this, d, w).call(this, r.IS_PIP);
|
|
3140
3149
|
}));
|
|
3141
|
-
},
|
|
3150
|
+
}, To = function(t) {
|
|
3142
3151
|
const i = !Lt.isFullscreenApiSupported(this) && Lt.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
|
|
3143
3152
|
h(this, Rt, new Lt(i)), e(this, Rt).on("on fullscreen change", (s) => {
|
|
3144
|
-
s ? n(this, d, A).call(this, r.FULLSCREEN, "") : n(this, d,
|
|
3153
|
+
s ? n(this, d, A).call(this, r.FULLSCREEN, "") : n(this, d, w).call(this, r.FULLSCREEN);
|
|
3145
3154
|
});
|
|
3146
|
-
},
|
|
3155
|
+
}, So = function() {
|
|
3147
3156
|
var t;
|
|
3148
|
-
e(this,
|
|
3149
|
-
i ? n(this, d, A).call(this, r.FULLSCREEN, "") : n(this, d,
|
|
3157
|
+
e(this, g) && (h(this, Le, !Lt.isFullscreenApiSupported(this) && Lt.isFullscreenApiSupported((t = e(this, g)) == null ? void 0 : t.videoElement) ? new Lt(e(this, g).videoElement) : new Lt(this)), e(this, Le).on("on fullscreen change", (i) => {
|
|
3158
|
+
i ? n(this, d, A).call(this, r.FULLSCREEN, "") : n(this, d, w).call(this, r.FULLSCREEN);
|
|
3150
3159
|
}));
|
|
3151
|
-
},
|
|
3152
|
-
return this.hasAttribute(r.TIMESHIFT_POSITION) ? e(this,
|
|
3153
|
-
},
|
|
3154
|
-
h(this, _t, new
|
|
3160
|
+
}, en = function() {
|
|
3161
|
+
return this.hasAttribute(r.TIMESHIFT_POSITION) ? e(this, Le) : e(this, Rt);
|
|
3162
|
+
}, wo = function(t) {
|
|
3163
|
+
h(this, _t, new Ih({
|
|
3155
3164
|
background: e(this, es),
|
|
3156
3165
|
receiverApplicationId: e(this, ts),
|
|
3157
3166
|
options: t.getCastOptions()
|
|
3158
3167
|
})), e(this, _t).init().then(() => {
|
|
3159
|
-
var i, s,
|
|
3160
|
-
n(this, d, A).call(this, r.CAST_AVAILABLE, ""), (i = e(this, _t)) == null || i.on("connected", n(this, d,
|
|
3168
|
+
var i, s, o;
|
|
3169
|
+
n(this, d, A).call(this, r.CAST_AVAILABLE, ""), (i = e(this, _t)) == null || i.on("connected", n(this, d, dr).bind(this)), (s = e(this, _t)) == null || s.on("resumed", n(this, d, dr).bind(this)), (o = e(this, _t)) == null || o.on("disconnected", n(this, d, Co).bind(this));
|
|
3161
3170
|
}).catch((i) => {
|
|
3162
|
-
e(this,
|
|
3171
|
+
e(this, K).warn("Failed to initialize CastSender", i);
|
|
3163
3172
|
});
|
|
3164
|
-
},
|
|
3173
|
+
}, dr = function() {
|
|
3165
3174
|
var i, s;
|
|
3166
3175
|
n(this, d, A).call(this, r.IS_CASTING, "");
|
|
3167
3176
|
const t = (s = (i = e(this, _t)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
|
|
3168
3177
|
n(this, d, A).call(this, r.CAST_RECEIVER_NAME, t);
|
|
3169
|
-
},
|
|
3170
|
-
n(this, d,
|
|
3171
|
-
},
|
|
3178
|
+
}, Co = function() {
|
|
3179
|
+
n(this, d, w).call(this, r.IS_CASTING), n(this, d, w).call(this, r.CAST_RECEIVER_NAME);
|
|
3180
|
+
}, xo = function(t) {
|
|
3172
3181
|
var s;
|
|
3173
3182
|
(s = e(this, ht)) == null || s.unload();
|
|
3174
3183
|
const i = t.getCastOptions();
|
|
3175
|
-
h(this, ht, new
|
|
3184
|
+
h(this, ht, new Mh({
|
|
3176
3185
|
url: i.url,
|
|
3177
3186
|
channelId: i.channelId,
|
|
3178
3187
|
authenticationToken: i.authenticationToken,
|
|
@@ -3182,41 +3191,41 @@ En = new WeakMap(), xt = new WeakMap(), Wi = new WeakMap(), lt = new WeakMap(),
|
|
|
3182
3191
|
}), e(this, ht).on("connected", () => {
|
|
3183
3192
|
n(this, d, A).call(this, r.IS_AIRPLAYING, "");
|
|
3184
3193
|
}), e(this, ht).on("disconnected", () => {
|
|
3185
|
-
n(this, d,
|
|
3194
|
+
n(this, d, w).call(this, r.IS_AIRPLAYING);
|
|
3186
3195
|
});
|
|
3187
|
-
},
|
|
3196
|
+
}, No = function(t) {
|
|
3188
3197
|
var i;
|
|
3189
|
-
if ((i = e(this, Q)) == null || i.unload(), !
|
|
3198
|
+
if ((i = e(this, Q)) == null || i.unload(), !vh()) {
|
|
3190
3199
|
if (t.audioNode)
|
|
3191
|
-
h(this, Q, new
|
|
3200
|
+
h(this, Q, new la(t.audioNode));
|
|
3192
3201
|
else if (t.mediaElement instanceof HTMLMediaElement)
|
|
3193
|
-
h(this, Q, new
|
|
3202
|
+
h(this, Q, new la(t.mediaElement));
|
|
3194
3203
|
else
|
|
3195
3204
|
return;
|
|
3196
3205
|
e(this, Q).on("on decibel change", (s) => {
|
|
3197
3206
|
n(this, d, A).call(this, r.VOLUME_LEVEL, JSON.stringify(s));
|
|
3198
3207
|
}), n(this, d, A).call(this, r.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, Q).isMediaElementSource || !this.hasAttribute(r.MUTED)) && e(this, Q).start();
|
|
3199
3208
|
}
|
|
3200
|
-
},
|
|
3201
|
-
t.pointerType !== "mouse" && t.timeStamp - e(this,
|
|
3202
|
-
},
|
|
3209
|
+
}, ys = new WeakMap(), Ro = function(t) {
|
|
3210
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, ys) < 250 || (n(this, d, sn).call(this), e(this, lt) && clearTimeout(e(this, lt)), t.target instanceof HTMLElement && ([this, e(this, Wt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && n(this, d, zt).call(this));
|
|
3211
|
+
}, _o = function(t) {
|
|
3203
3212
|
const i = this.hasAttribute(r.USER_INTERACTING);
|
|
3204
|
-
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this,
|
|
3205
|
-
},
|
|
3213
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, Wt)].includes(t.target) && i ? n(this, d, ur).call(this) : n(this, d, zt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && n(this, d, zt).call(this);
|
|
3214
|
+
}, Uo = function(t) {
|
|
3206
3215
|
!e(this, Rt) || t.target instanceof mt || t.target instanceof Un || t.target instanceof Ui || (this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, ""));
|
|
3207
|
-
},
|
|
3208
|
-
this.hasAttribute(r.USER_INTERACTING) || n(this, d,
|
|
3209
|
-
},
|
|
3210
|
-
var m,
|
|
3211
|
-
const { metaKey: i, altKey: s, key:
|
|
3212
|
-
if (i || s || !On.includes(
|
|
3216
|
+
}, Po = function(t) {
|
|
3217
|
+
this.hasAttribute(r.USER_INTERACTING) || n(this, d, zt).call(this);
|
|
3218
|
+
}, ks = new WeakMap(), Ln = new WeakMap(), Tn = new WeakMap(), Do = function(t) {
|
|
3219
|
+
var m, E;
|
|
3220
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
3221
|
+
if (i || s || !On.includes(o))
|
|
3213
3222
|
return;
|
|
3214
3223
|
const u = (m = t.target) == null ? void 0 : m.keysUsed;
|
|
3215
|
-
if (!(Array.isArray(u) && u.includes(
|
|
3216
|
-
const
|
|
3217
|
-
return Array.isArray(
|
|
3224
|
+
if (!(Array.isArray(u) && u.includes(o) || t.composedPath().some((N) => {
|
|
3225
|
+
const H = N == null ? void 0 : N.keysUsed;
|
|
3226
|
+
return Array.isArray(H) && H.includes(o);
|
|
3218
3227
|
})))
|
|
3219
|
-
switch (
|
|
3228
|
+
switch (o) {
|
|
3220
3229
|
case "f":
|
|
3221
3230
|
this.hasAttribute(r.FULLSCREEN) ? this.removeAttribute(r.FULLSCREEN) : this.setAttribute(r.FULLSCREEN, "");
|
|
3222
3231
|
break;
|
|
@@ -3224,83 +3233,83 @@ En = new WeakMap(), xt = new WeakMap(), Wi = new WeakMap(), lt = new WeakMap(),
|
|
|
3224
3233
|
this.hasAttribute(r.MUTED) ? this.removeAttribute(r.MUTED) : this.setAttribute(r.MUTED, "");
|
|
3225
3234
|
break;
|
|
3226
3235
|
case "ArrowDown":
|
|
3227
|
-
(
|
|
3236
|
+
(E = this.querySelector("vindral-scroll-overlay")) == null || E.setAttribute("open", "");
|
|
3228
3237
|
break;
|
|
3229
3238
|
}
|
|
3230
|
-
},
|
|
3231
|
-
return
|
|
3239
|
+
}, Is = new WeakMap(), Sn = new WeakMap(), wn = new WeakMap(), Te = new WeakMap(), cr = function() {
|
|
3240
|
+
return q(this, null, function* () {
|
|
3232
3241
|
if (!e(this, b) || !e(this, Nt))
|
|
3233
3242
|
return;
|
|
3234
3243
|
const t = Date.now();
|
|
3235
|
-
if (e(this,
|
|
3236
|
-
e(this,
|
|
3244
|
+
if (e(this, Te) && t - e(this, Te) < 1e4)
|
|
3245
|
+
e(this, K).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
3237
3246
|
else {
|
|
3238
|
-
h(this,
|
|
3247
|
+
h(this, Te, t);
|
|
3239
3248
|
const i = yield e(this, b).getApiClient().getChannels(e(this, Nt));
|
|
3240
3249
|
n(this, d, A).call(this, r.CHANNELS, JSON.stringify(i));
|
|
3241
3250
|
}
|
|
3242
|
-
h(this,
|
|
3243
|
-
n(this, d,
|
|
3251
|
+
h(this, Qt, window.setTimeout(() => {
|
|
3252
|
+
n(this, d, cr).call(this);
|
|
3244
3253
|
}, 1e4));
|
|
3245
3254
|
});
|
|
3246
|
-
},
|
|
3255
|
+
}, ur = function() {
|
|
3247
3256
|
!this.hasAttribute(r.USER_INTERACTING) || this.hasAttribute(r.UI_LOCKED) || (this.dispatchEvent(
|
|
3248
3257
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
|
|
3249
3258
|
), this.removeAttribute(r.USER_INTERACTING));
|
|
3250
|
-
},
|
|
3259
|
+
}, sn = function() {
|
|
3251
3260
|
this.hasAttribute(r.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
3252
3261
|
this.setAttribute(r.USER_INTERACTING, ""), this.dispatchEvent(
|
|
3253
3262
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !0 } })
|
|
3254
3263
|
);
|
|
3255
3264
|
});
|
|
3256
|
-
},
|
|
3257
|
-
n(this, d,
|
|
3258
|
-
n(this, d,
|
|
3259
|
-
}, e(this,
|
|
3265
|
+
}, zt = function() {
|
|
3266
|
+
n(this, d, sn).call(this), e(this, lt) && clearTimeout(e(this, lt)), e(this, Ji) && h(this, lt, self.setTimeout(() => {
|
|
3267
|
+
n(this, d, ur).call(this);
|
|
3268
|
+
}, e(this, Ji)));
|
|
3260
3269
|
}, /** Syncs subtitle offset from CSS to media element for canvas rendering */
|
|
3261
|
-
|
|
3270
|
+
Mo = function() {
|
|
3262
3271
|
var i, s;
|
|
3263
3272
|
const t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
3264
3273
|
(s = (i = e(this, b)) == null ? void 0 : i.mediaElement) == null || s.style.setProperty("--vindral-subtitle-offset", t);
|
|
3265
|
-
},
|
|
3274
|
+
}, nn = function() {
|
|
3266
3275
|
var t;
|
|
3267
|
-
n(this, d,
|
|
3268
|
-
e(this,
|
|
3276
|
+
n(this, d, tn).call(this), n(this, d, br).call(this), (t = e(this, j)) == null || t.request().catch((i) => {
|
|
3277
|
+
e(this, K).warn("Failed to enter picture in picture:", i);
|
|
3269
3278
|
});
|
|
3270
|
-
},
|
|
3279
|
+
}, rn = function() {
|
|
3271
3280
|
var t;
|
|
3272
3281
|
(t = e(this, j)) == null || t.exit().catch((i) => {
|
|
3273
|
-
e(this,
|
|
3282
|
+
e(this, K).warn("Failed to exit picture in picture:", i);
|
|
3274
3283
|
});
|
|
3275
|
-
},
|
|
3276
|
-
const t = n(this, d,
|
|
3284
|
+
}, Oo = function() {
|
|
3285
|
+
const t = n(this, d, en).call(this);
|
|
3277
3286
|
if (!t) {
|
|
3278
3287
|
console.warn("No fullscreen target available"), this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, d, A).call(this, r.FULLSCREEN, "");
|
|
3279
3288
|
return;
|
|
3280
3289
|
}
|
|
3281
|
-
t != null && t.isFullscreenApiSupported() ? (n(this, d,
|
|
3290
|
+
t != null && t.isFullscreenApiSupported() ? (n(this, d, br).call(this), t == null || t.request().then(() => {
|
|
3282
3291
|
e(this, Cn).call(this);
|
|
3283
3292
|
}).catch((i) => {
|
|
3284
|
-
e(this,
|
|
3293
|
+
e(this, K).warn("Failed to enter fullscreen:", i);
|
|
3285
3294
|
})) : (this.setAttribute(r.FULLSCREEN_FALLBACK, ""), n(this, d, A).call(this, r.FULLSCREEN, ""));
|
|
3286
|
-
},
|
|
3287
|
-
const t = n(this, d,
|
|
3295
|
+
}, pr = function() {
|
|
3296
|
+
const t = n(this, d, en).call(this);
|
|
3288
3297
|
t != null && t.isFullscreenApiSupported() ? t == null || t.exit().then(() => {
|
|
3289
3298
|
e(this, xn).call(this);
|
|
3290
3299
|
}).catch((i) => {
|
|
3291
|
-
e(this,
|
|
3292
|
-
}) : (this.removeAttribute(r.FULLSCREEN_FALLBACK), n(this, d,
|
|
3293
|
-
}, Cn = new WeakMap(), xn = new WeakMap(),
|
|
3300
|
+
e(this, K).warn("Failed to exit fullscreen:", i);
|
|
3301
|
+
}) : (this.removeAttribute(r.FULLSCREEN_FALLBACK), n(this, d, w).call(this, r.FULLSCREEN));
|
|
3302
|
+
}, Cn = new WeakMap(), xn = new WeakMap(), br = function() {
|
|
3294
3303
|
if (!e(this, b)) return;
|
|
3295
3304
|
e(this, b).emitter.emit("ios-hack: reset size");
|
|
3296
3305
|
}, A = function(t, i) {
|
|
3297
3306
|
var s;
|
|
3298
|
-
(s = e(this, xt).get(t)) == null || s.forEach((
|
|
3299
|
-
},
|
|
3307
|
+
(s = e(this, xt).get(t)) == null || s.forEach((o) => o.setAttribute(t, i));
|
|
3308
|
+
}, w = function(t) {
|
|
3300
3309
|
var i;
|
|
3301
3310
|
(i = e(this, xt).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
|
|
3302
3311
|
}, v(Li, "observedAttributes", [
|
|
3303
|
-
...
|
|
3312
|
+
...pa,
|
|
3304
3313
|
"url",
|
|
3305
3314
|
"edge-url",
|
|
3306
3315
|
"target-buffer-time",
|
|
@@ -3317,6 +3326,7 @@ Uo = function() {
|
|
|
3317
3326
|
"mse-opus-enabled",
|
|
3318
3327
|
"ios-background-play-enabled",
|
|
3319
3328
|
"ios-wake-lock-enabled",
|
|
3329
|
+
"stream-to-media-element-enabled",
|
|
3320
3330
|
"ios-media-element-enabled",
|
|
3321
3331
|
"abr-enabled",
|
|
3322
3332
|
"size-based-resolution-cap-enabled",
|
|
@@ -3331,26 +3341,26 @@ Uo = function() {
|
|
|
3331
3341
|
"drm-playready-video-robustness",
|
|
3332
3342
|
"drm-playready-audio-robustness",
|
|
3333
3343
|
"webtransport-enabled",
|
|
3334
|
-
"webcodecs-enabled",
|
|
3335
3344
|
"webcodecs-hardware-acceleration",
|
|
3345
|
+
"decoders",
|
|
3336
3346
|
"offscreen-canvas-enabled",
|
|
3337
3347
|
"reconnect-retries",
|
|
3338
3348
|
"auto-instance-enabled",
|
|
3339
3349
|
"language"
|
|
3340
|
-
]), l(Li,
|
|
3350
|
+
]), l(Li, An, "https://lb.cdn.vindral.com");
|
|
3341
3351
|
let Pi = Li;
|
|
3342
|
-
const
|
|
3352
|
+
const Fo = document.createElement("template"), Hh = (
|
|
3343
3353
|
/* SVG */
|
|
3344
3354
|
`
|
|
3345
3355
|
<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>
|
|
3346
3356
|
`
|
|
3347
|
-
),
|
|
3357
|
+
), Bh = (
|
|
3348
3358
|
/* SVG */
|
|
3349
3359
|
`
|
|
3350
3360
|
<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>
|
|
3351
3361
|
`
|
|
3352
3362
|
);
|
|
3353
|
-
|
|
3363
|
+
Fo.innerHTML = /* HTML */
|
|
3354
3364
|
`
|
|
3355
3365
|
<style>
|
|
3356
3366
|
:host {
|
|
@@ -3367,14 +3377,14 @@ Do.innerHTML = /* HTML */
|
|
|
3367
3377
|
</style>
|
|
3368
3378
|
|
|
3369
3379
|
<slot name="icon">
|
|
3370
|
-
<slot name="enter">${
|
|
3371
|
-
<slot name="exit">${
|
|
3380
|
+
<slot name="enter">${Hh}</slot>
|
|
3381
|
+
<slot name="exit">${Bh}</slot>
|
|
3372
3382
|
</slot>
|
|
3373
3383
|
`;
|
|
3374
|
-
const
|
|
3384
|
+
const Ti = class Ti extends mt {
|
|
3375
3385
|
constructor() {
|
|
3376
|
-
var
|
|
3377
|
-
super(), (
|
|
3386
|
+
var a;
|
|
3387
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Fo.content.cloneNode(!0));
|
|
3378
3388
|
}
|
|
3379
3389
|
connectedCallback() {
|
|
3380
3390
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -3382,29 +3392,29 @@ const wi = class wi extends mt {
|
|
|
3382
3392
|
disconnectedCallback() {
|
|
3383
3393
|
super.disconnectedCallback();
|
|
3384
3394
|
}
|
|
3385
|
-
attributeChangedCallback(
|
|
3386
|
-
super.attributeChangedCallback(
|
|
3395
|
+
attributeChangedCallback(a, t, i) {
|
|
3396
|
+
super.attributeChangedCallback(a, t, i), a === r.FULLSCREEN && this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
3387
3397
|
}
|
|
3388
|
-
set isFullscreen(
|
|
3389
|
-
|
|
3398
|
+
set isFullscreen(a) {
|
|
3399
|
+
a ? this.setAttribute(r.FULLSCREEN, "") : this.removeAttribute(r.FULLSCREEN);
|
|
3390
3400
|
}
|
|
3391
3401
|
get isFullscreen() {
|
|
3392
3402
|
return this.hasAttribute(r.FULLSCREEN);
|
|
3393
3403
|
}
|
|
3394
|
-
handleClick(
|
|
3404
|
+
handleClick(a) {
|
|
3395
3405
|
const t = this.isFullscreen ? y.EXIT_FULLSCREEN : y.ENTER_FULLSCREEN;
|
|
3396
3406
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
3397
3407
|
}
|
|
3398
3408
|
};
|
|
3399
|
-
v(
|
|
3400
|
-
let
|
|
3401
|
-
const
|
|
3409
|
+
v(Ti, "observedAttributes", [...W(Ti, Ti, "observedAttributes"), r.FULLSCREEN]);
|
|
3410
|
+
let mr = Ti;
|
|
3411
|
+
const zh = (
|
|
3402
3412
|
/* SVG */
|
|
3403
3413
|
`
|
|
3404
3414
|
<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>
|
|
3405
3415
|
`
|
|
3406
|
-
),
|
|
3407
|
-
|
|
3416
|
+
), Ho = document.createElement("template");
|
|
3417
|
+
Ho.innerHTML = /* HTML */
|
|
3408
3418
|
`
|
|
3409
3419
|
<style>
|
|
3410
3420
|
:host(:not([hidden])) {
|
|
@@ -3412,38 +3422,38 @@ Mo.innerHTML = /* HTML */
|
|
|
3412
3422
|
}
|
|
3413
3423
|
</style>
|
|
3414
3424
|
|
|
3415
|
-
<slot name="button">${
|
|
3425
|
+
<slot name="button">${zh}</slot>
|
|
3416
3426
|
<slot name="listbox" hidden>
|
|
3417
3427
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
3418
3428
|
</slot>
|
|
3419
3429
|
`;
|
|
3420
|
-
var
|
|
3430
|
+
var Ls, fr;
|
|
3421
3431
|
const Si = class Si extends Un {
|
|
3422
3432
|
constructor() {
|
|
3423
|
-
var t, i, s,
|
|
3433
|
+
var t, i, s, o;
|
|
3424
3434
|
super();
|
|
3425
|
-
l(this,
|
|
3426
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3435
|
+
l(this, Ls);
|
|
3436
|
+
(t = this.shadowRoot) == null || t.appendChild(Ho.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]");
|
|
3427
3437
|
}
|
|
3428
3438
|
connectedCallback() {
|
|
3429
|
-
super.connectedCallback(), n(this,
|
|
3439
|
+
super.connectedCallback(), n(this, Ls, fr).call(this), this.setAttribute("aria-label", "Languages");
|
|
3430
3440
|
}
|
|
3431
3441
|
attributeChangedCallback(t, i, s) {
|
|
3432
|
-
super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this,
|
|
3442
|
+
super.attributeChangedCallback(t, i, s), (t === r.LANGUAGES || t === r.TEXT_TRACKS) && n(this, Ls, fr).call(this);
|
|
3433
3443
|
}
|
|
3434
3444
|
};
|
|
3435
|
-
|
|
3436
|
-
const t = (
|
|
3445
|
+
Ls = new WeakSet(), fr = function() {
|
|
3446
|
+
const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(r.LANGUAGES)), s = t(this.getAttribute(r.TEXT_TRACKS));
|
|
3437
3447
|
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
3438
|
-
}, v(Si, "observedAttributes", [...
|
|
3439
|
-
let
|
|
3440
|
-
const
|
|
3448
|
+
}, v(Si, "observedAttributes", [...W(Si, Si, "observedAttributes"), r.LANGUAGES, r.TEXT_TRACKS]);
|
|
3449
|
+
let vr = Si;
|
|
3450
|
+
const Bo = document.createElement("template"), $h = (
|
|
3441
3451
|
/* SVG */
|
|
3442
3452
|
`
|
|
3443
3453
|
<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>
|
|
3444
3454
|
`
|
|
3445
3455
|
);
|
|
3446
|
-
|
|
3456
|
+
Bo.innerHTML = /* HTML */
|
|
3447
3457
|
`
|
|
3448
3458
|
<style>
|
|
3449
3459
|
:host {
|
|
@@ -3519,7 +3529,7 @@ Oo.innerHTML = /* HTML */
|
|
|
3519
3529
|
}
|
|
3520
3530
|
|
|
3521
3531
|
[role="menuitem"][aria-selected="true"]::before {
|
|
3522
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3532
|
+
content: url("data:image/svg+xml,${encodeURIComponent($h)}");
|
|
3523
3533
|
position: absolute;
|
|
3524
3534
|
left: var(--padding-3);
|
|
3525
3535
|
top: calc(50% - 8px);
|
|
@@ -3558,32 +3568,32 @@ Oo.innerHTML = /* HTML */
|
|
|
3558
3568
|
<div class="menu"></div>
|
|
3559
3569
|
</div>
|
|
3560
3570
|
`;
|
|
3561
|
-
var
|
|
3562
|
-
class
|
|
3571
|
+
var Ts, Ss, ws, Cs, yt, nt, Se, ee, ni, xs, Ut, kt, S, $o, Go, gr, Er, an, fi, gi, Ko, qo, Vo, Ar, yr, Xo;
|
|
3572
|
+
class zo extends HTMLElement {
|
|
3563
3573
|
constructor() {
|
|
3564
3574
|
super();
|
|
3565
3575
|
l(this, S);
|
|
3566
|
-
l(this,
|
|
3567
|
-
l(this,
|
|
3568
|
-
l(this,
|
|
3569
|
-
l(this,
|
|
3576
|
+
l(this, Ts, []);
|
|
3577
|
+
l(this, Ss, []);
|
|
3578
|
+
l(this, ws);
|
|
3579
|
+
l(this, Cs);
|
|
3570
3580
|
l(this, yt, []);
|
|
3571
3581
|
l(this, nt, []);
|
|
3572
|
-
l(this,
|
|
3573
|
-
l(this,
|
|
3582
|
+
l(this, Se, null);
|
|
3583
|
+
l(this, ee, null);
|
|
3574
3584
|
l(this, ni, null);
|
|
3575
|
-
l(this,
|
|
3585
|
+
l(this, xs, null);
|
|
3576
3586
|
l(this, Ut, null);
|
|
3577
3587
|
l(this, kt, null);
|
|
3578
3588
|
v(this, "handleEvent", (t) => {
|
|
3579
|
-
t.type === "keydown" && n(this, S,
|
|
3589
|
+
t.type === "keydown" && n(this, S, qo).call(this, t);
|
|
3580
3590
|
});
|
|
3581
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3591
|
+
this.attachShadow({ mode: "open" }).appendChild(Bo.content.cloneNode(!0));
|
|
3582
3592
|
}
|
|
3583
3593
|
connectedCallback() {
|
|
3584
|
-
var i, s,
|
|
3594
|
+
var i, s, o;
|
|
3585
3595
|
const t = this.getRootNode();
|
|
3586
|
-
t instanceof ShadowRoot && (h(this, ni, t.host.closest("vindral-controller")), (i = e(this, ni)) == null || i.connectListener(this), h(this,
|
|
3596
|
+
t instanceof ShadowRoot && (h(this, ni, t.host.closest("vindral-controller")), (i = e(this, ni)) == null || i.connectListener(this), h(this, Se, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), h(this, ee, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), n(this, S, $o).call(this), n(this, S, Go).call(this), h(this, xs, t.host), this.addEventListener("keydown", this));
|
|
3587
3597
|
}
|
|
3588
3598
|
disconnectedCallback() {
|
|
3589
3599
|
this.removeEventListener("keydown", this);
|
|
@@ -3592,16 +3602,16 @@ class Fo extends HTMLElement {
|
|
|
3592
3602
|
i !== s && (t === r.LANGUAGES && s && (this.languages = JSON.parse(s)), t === r.TEXT_TRACKS && s && (this.textTracks = JSON.parse(s)), t === r.LANGUAGE && (this.language = s), t === r.TEXT_TRACK && (this.textTrack = s));
|
|
3593
3603
|
}
|
|
3594
3604
|
set languages(t) {
|
|
3595
|
-
h(this,
|
|
3605
|
+
h(this, Ts, t), n(this, S, Er).call(this), n(this, S, fi).call(this);
|
|
3596
3606
|
}
|
|
3597
3607
|
set textTracks(t) {
|
|
3598
|
-
h(this,
|
|
3608
|
+
h(this, Ss, t), n(this, S, gr).call(this), n(this, S, gi).call(this);
|
|
3599
3609
|
}
|
|
3600
3610
|
set language(t) {
|
|
3601
|
-
h(this,
|
|
3611
|
+
h(this, ws, t), n(this, S, fi).call(this);
|
|
3602
3612
|
}
|
|
3603
3613
|
set textTrack(t) {
|
|
3604
|
-
h(this,
|
|
3614
|
+
h(this, Cs, t), n(this, S, gi).call(this);
|
|
3605
3615
|
}
|
|
3606
3616
|
get keysUsed() {
|
|
3607
3617
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End"];
|
|
@@ -3610,13 +3620,13 @@ class Fo extends HTMLElement {
|
|
|
3610
3620
|
e(this, Ut) ? e(this, Ut).focus() : e(this, kt) && e(this, kt).focus();
|
|
3611
3621
|
}
|
|
3612
3622
|
}
|
|
3613
|
-
|
|
3623
|
+
Ts = new WeakMap(), Ss = new WeakMap(), ws = new WeakMap(), Cs = new WeakMap(), yt = new WeakMap(), nt = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ni = new WeakMap(), xs = new WeakMap(), Ut = new WeakMap(), kt = new WeakMap(), S = new WeakSet(), $o = function() {
|
|
3614
3624
|
const t = (s) => {
|
|
3615
|
-
s.forEach((
|
|
3616
|
-
if (
|
|
3617
|
-
if (
|
|
3618
|
-
const u = this.offsetHeight, c =
|
|
3619
|
-
this.style.height = `${
|
|
3625
|
+
s.forEach((o) => {
|
|
3626
|
+
if (o.intersectionRatio !== 1)
|
|
3627
|
+
if (o.intersectionRatio > 0) {
|
|
3628
|
+
const u = this.offsetHeight, c = o.intersectionRatio, E = u * c - 24;
|
|
3629
|
+
this.style.height = `${E}px`;
|
|
3620
3630
|
} else
|
|
3621
3631
|
this.style.height = "auto";
|
|
3622
3632
|
});
|
|
@@ -3627,68 +3637,68 @@ Ls = new WeakMap(), ws = new WeakMap(), Ss = new WeakMap(), Ts = new WeakMap(),
|
|
|
3627
3637
|
threshold: 0
|
|
3628
3638
|
// 0 means any intersection is enough to be considered "inside"
|
|
3629
3639
|
}).observe(this);
|
|
3630
|
-
},
|
|
3631
|
-
e(this,
|
|
3632
|
-
}, fr = function() {
|
|
3633
|
-
e(this, Qt).innerHTML = "", h(this, nt, []);
|
|
3634
|
-
const t = n(this, S, rn).call(this, "Off", "textTrack", void 0);
|
|
3635
|
-
e(this, Qt).appendChild(t), e(this, nt).push({ element: t, value: void 0 }), e(this, ws).forEach((i) => {
|
|
3636
|
-
const s = n(this, S, rn).call(this, i, "textTrack", i);
|
|
3637
|
-
e(this, Qt).appendChild(s), e(this, nt).push({ element: s, value: i });
|
|
3638
|
-
}), n(this, S, gi).call(this);
|
|
3640
|
+
}, Go = function() {
|
|
3641
|
+
e(this, Se) && (n(this, S, Er).call(this), n(this, S, fi).call(this)), e(this, ee) && (n(this, S, gr).call(this), n(this, S, gi).call(this));
|
|
3639
3642
|
}, gr = function() {
|
|
3640
|
-
e(this,
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
+
e(this, ee).innerHTML = "", h(this, nt, []);
|
|
3644
|
+
const t = n(this, S, an).call(this, "Off", "textTrack", void 0);
|
|
3645
|
+
e(this, ee).appendChild(t), e(this, nt).push({ element: t, value: void 0 }), e(this, Ss).forEach((i) => {
|
|
3646
|
+
const s = n(this, S, an).call(this, i, "textTrack", i);
|
|
3647
|
+
e(this, ee).appendChild(s), e(this, nt).push({ element: s, value: i });
|
|
3648
|
+
}), n(this, S, gi).call(this);
|
|
3649
|
+
}, Er = function() {
|
|
3650
|
+
e(this, Se).innerHTML = "", h(this, yt, []), e(this, Ts).forEach((t) => {
|
|
3651
|
+
const i = n(this, S, an).call(this, t, "language", t);
|
|
3652
|
+
e(this, Se).appendChild(i), e(this, yt).push({ element: i, value: t });
|
|
3643
3653
|
}), n(this, S, fi).call(this);
|
|
3644
|
-
},
|
|
3645
|
-
const
|
|
3646
|
-
return
|
|
3654
|
+
}, an = function(t, i, s) {
|
|
3655
|
+
const o = document.createElement("div");
|
|
3656
|
+
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => n(this, S, Ko).call(this, s, i)), o;
|
|
3647
3657
|
}, fi = function() {
|
|
3648
3658
|
e(this, Ut) && (e(this, Ut).removeAttribute("aria-selected"), e(this, Ut).tabIndex = -1);
|
|
3649
|
-
const t = e(this, yt).find((i) => i.value === e(this,
|
|
3659
|
+
const t = e(this, yt).find((i) => i.value === e(this, ws));
|
|
3650
3660
|
t && (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, h(this, Ut, t.element));
|
|
3651
3661
|
}, gi = function() {
|
|
3652
3662
|
e(this, kt) && (e(this, kt).removeAttribute("aria-selected"), e(this, kt).tabIndex = -1);
|
|
3653
|
-
const t = e(this, nt).find((i) => i.value === e(this,
|
|
3663
|
+
const t = e(this, nt).find((i) => i.value === e(this, Cs));
|
|
3654
3664
|
if (t)
|
|
3655
3665
|
t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, h(this, kt, t.element);
|
|
3656
3666
|
else {
|
|
3657
3667
|
const i = e(this, nt).find((s) => s.value === void 0);
|
|
3658
3668
|
i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, h(this, kt, i.element));
|
|
3659
3669
|
}
|
|
3660
|
-
},
|
|
3670
|
+
}, Ko = function(t, i) {
|
|
3661
3671
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
3662
3672
|
const s = i === "language" ? y.SET_LANGUAGE : y.SET_TEXT_TRACK;
|
|
3663
3673
|
this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
|
|
3664
|
-
},
|
|
3665
|
-
var c, m,
|
|
3666
|
-
const { key: i, ctrlKey: s, altKey:
|
|
3667
|
-
s ||
|
|
3668
|
-
},
|
|
3669
|
-
var
|
|
3670
|
-
const { key: i } = t, s = [...e(this, yt), ...e(this, nt)],
|
|
3671
|
-
if (!
|
|
3672
|
-
const u = s.indexOf(
|
|
3674
|
+
}, qo = function(t) {
|
|
3675
|
+
var c, m, E;
|
|
3676
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
3677
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (c = e(this, xs)) == null || c.hide() : i === "Enter" || i === " " ? (E = (m = n(this, S, yr).call(this)) == null ? void 0 : m.element) == null || E.click() : n(this, S, Vo).call(this, t));
|
|
3678
|
+
}, Vo = function(t) {
|
|
3679
|
+
var E;
|
|
3680
|
+
const { key: i } = t, s = [...e(this, yt), ...e(this, nt)], o = (E = n(this, S, yr).call(this)) != null ? E : s[0];
|
|
3681
|
+
if (!o) return;
|
|
3682
|
+
const u = s.indexOf(o);
|
|
3673
3683
|
let c = Math.max(0, u);
|
|
3674
|
-
i === "ArrowDown" ? c++ : i === "ArrowUp" ? c-- : i === "ArrowLeft" ? c = n(this, S,
|
|
3684
|
+
i === "ArrowDown" ? c++ : i === "ArrowUp" ? c-- : i === "ArrowLeft" ? c = n(this, S, Ar).call(this, u, "left") : i === "ArrowRight" ? c = n(this, S, Ar).call(this, u, "right") : t.key === "Home" ? c = 0 : t.key === "End" && (c = s.length - 1), c < 0 && (c = s.length - 1), c > s.length - 1 && (c = 0);
|
|
3675
3685
|
const m = s[c];
|
|
3676
|
-
m && (n(this, S,
|
|
3677
|
-
},
|
|
3678
|
-
const s = e(this, yt).length,
|
|
3679
|
-
return i === "left" ? t < s ? s +
|
|
3680
|
-
},
|
|
3686
|
+
m && (n(this, S, Xo).call(this, m.value), m.element.focus());
|
|
3687
|
+
}, Ar = function(t, i) {
|
|
3688
|
+
const s = e(this, yt).length, o = e(this, nt).length;
|
|
3689
|
+
return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
|
|
3690
|
+
}, yr = function() {
|
|
3681
3691
|
return [...e(this, yt), ...e(this, nt)].find((t) => t.element.tabIndex === 0);
|
|
3682
|
-
},
|
|
3692
|
+
}, Xo = function(t) {
|
|
3683
3693
|
for (const i of [...e(this, yt), ...e(this, nt)])
|
|
3684
3694
|
i.element.tabIndex = i.value === t ? 0 : -1;
|
|
3685
|
-
}, v(
|
|
3695
|
+
}, v(zo, "observedAttributes", [
|
|
3686
3696
|
r.LANGUAGES,
|
|
3687
3697
|
r.TEXT_TRACKS,
|
|
3688
3698
|
r.LANGUAGE,
|
|
3689
3699
|
r.TEXT_TRACK
|
|
3690
3700
|
]);
|
|
3691
|
-
const
|
|
3701
|
+
const jo = document.createElement("template"), Gh = (
|
|
3692
3702
|
/* SVG */
|
|
3693
3703
|
`
|
|
3694
3704
|
<svg xmlns="http://www.w3.org/2000/svg" width="5" height="5" viewBox="0 0 5 5" fill="currentColor">
|
|
@@ -3696,7 +3706,7 @@ const Ko = document.createElement("template"), Lh = (
|
|
|
3696
3706
|
</svg>
|
|
3697
3707
|
`
|
|
3698
3708
|
);
|
|
3699
|
-
|
|
3709
|
+
jo.innerHTML = /* HTML */
|
|
3700
3710
|
`
|
|
3701
3711
|
<style>
|
|
3702
3712
|
:host {
|
|
@@ -3758,13 +3768,13 @@ Ko.innerHTML = /* HTML */
|
|
|
3758
3768
|
}
|
|
3759
3769
|
</style>
|
|
3760
3770
|
|
|
3761
|
-
<slot name="icon">${
|
|
3771
|
+
<slot name="icon">${Gh}</slot>
|
|
3762
3772
|
<span class="live-text">LIVE</span>
|
|
3763
3773
|
`;
|
|
3764
|
-
const
|
|
3774
|
+
const wi = class wi extends mt {
|
|
3765
3775
|
constructor() {
|
|
3766
|
-
var
|
|
3767
|
-
super(), (
|
|
3776
|
+
var a;
|
|
3777
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(jo.content.cloneNode(!0));
|
|
3768
3778
|
}
|
|
3769
3779
|
connectedCallback() {
|
|
3770
3780
|
super.connectedCallback(), this.updateState();
|
|
@@ -3772,8 +3782,8 @@ const Ti = class Ti extends mt {
|
|
|
3772
3782
|
disconnectedCallback() {
|
|
3773
3783
|
super.disconnectedCallback();
|
|
3774
3784
|
}
|
|
3775
|
-
attributeChangedCallback(
|
|
3776
|
-
super.attributeChangedCallback(
|
|
3785
|
+
attributeChangedCallback(a, t, i) {
|
|
3786
|
+
super.attributeChangedCallback(a, t, i), (a === r.TIMESHIFT_POSITION || a === r.DURATION) && this.updateState();
|
|
3777
3787
|
}
|
|
3778
3788
|
updateState() {
|
|
3779
3789
|
if (!this.hasAttribute(r.DURATION)) {
|
|
@@ -3785,20 +3795,20 @@ const Ti = class Ti extends mt {
|
|
|
3785
3795
|
get isLive() {
|
|
3786
3796
|
return !this.hasAttribute(r.TIMESHIFT_POSITION);
|
|
3787
3797
|
}
|
|
3788
|
-
set isLive(
|
|
3789
|
-
|
|
3798
|
+
set isLive(a) {
|
|
3799
|
+
a ? this.removeAttribute(r.TIMESHIFT_POSITION) : this.setAttribute(r.TIMESHIFT_POSITION, "");
|
|
3790
3800
|
}
|
|
3791
|
-
handleClick(
|
|
3801
|
+
handleClick(a) {
|
|
3792
3802
|
this.isLive || this.dispatchEvent(new CustomEvent(y.GO_LIVE, { bubbles: !0, composed: !0 }));
|
|
3793
3803
|
}
|
|
3794
3804
|
};
|
|
3795
|
-
v(
|
|
3796
|
-
...
|
|
3805
|
+
v(wi, "observedAttributes", [
|
|
3806
|
+
...W(wi, wi, "observedAttributes"),
|
|
3797
3807
|
r.TIMESHIFT_POSITION,
|
|
3798
3808
|
r.DURATION
|
|
3799
3809
|
]);
|
|
3800
|
-
let
|
|
3801
|
-
const
|
|
3810
|
+
let kr = wi;
|
|
3811
|
+
const Yo = document.createElement("template"), Kh = (
|
|
3802
3812
|
/* SVG */
|
|
3803
3813
|
`
|
|
3804
3814
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -3806,14 +3816,14 @@ const Vo = document.createElement("template"), wh = (
|
|
|
3806
3816
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
3807
3817
|
</g></svg>
|
|
3808
3818
|
`
|
|
3809
|
-
),
|
|
3819
|
+
), qh = (
|
|
3810
3820
|
/* SVG */
|
|
3811
3821
|
`
|
|
3812
3822
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
3813
3823
|
<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>
|
|
3814
3824
|
`
|
|
3815
3825
|
);
|
|
3816
|
-
|
|
3826
|
+
Yo.innerHTML = /* HTML */
|
|
3817
3827
|
`
|
|
3818
3828
|
<style>
|
|
3819
3829
|
:host {
|
|
@@ -3830,14 +3840,14 @@ Vo.innerHTML = /* HTML */
|
|
|
3830
3840
|
</style>
|
|
3831
3841
|
|
|
3832
3842
|
<slot name="icon">
|
|
3833
|
-
<slot name="mute">${
|
|
3834
|
-
<slot name="unmute">${
|
|
3843
|
+
<slot name="mute">${Kh}</slot>
|
|
3844
|
+
<slot name="unmute">${qh}</slot>
|
|
3835
3845
|
</slot>
|
|
3836
3846
|
`;
|
|
3837
3847
|
const Ci = class Ci extends mt {
|
|
3838
3848
|
constructor() {
|
|
3839
|
-
var
|
|
3840
|
-
super(), (
|
|
3849
|
+
var a;
|
|
3850
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Yo.content.cloneNode(!0));
|
|
3841
3851
|
}
|
|
3842
3852
|
connectedCallback() {
|
|
3843
3853
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3845,29 +3855,29 @@ const Ci = class Ci extends mt {
|
|
|
3845
3855
|
disconnectedCallback() {
|
|
3846
3856
|
super.disconnectedCallback();
|
|
3847
3857
|
}
|
|
3848
|
-
attributeChangedCallback(
|
|
3849
|
-
super.attributeChangedCallback(
|
|
3858
|
+
attributeChangedCallback(a, t, i) {
|
|
3859
|
+
super.attributeChangedCallback(a, t, i), a === r.MUTED && this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
3850
3860
|
}
|
|
3851
|
-
set muted(
|
|
3852
|
-
|
|
3861
|
+
set muted(a) {
|
|
3862
|
+
a ? this.setAttribute(r.MUTED, "") : this.removeAttribute(r.MUTED);
|
|
3853
3863
|
}
|
|
3854
3864
|
get muted() {
|
|
3855
3865
|
return this.hasAttribute(r.MUTED);
|
|
3856
3866
|
}
|
|
3857
|
-
handleClick(
|
|
3867
|
+
handleClick(a) {
|
|
3858
3868
|
const t = this.muted ? y.UNMUTE : y.MUTE;
|
|
3859
3869
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
3860
3870
|
}
|
|
3861
3871
|
};
|
|
3862
|
-
v(Ci, "observedAttributes", [...
|
|
3863
|
-
let
|
|
3864
|
-
const
|
|
3872
|
+
v(Ci, "observedAttributes", [...W(Ci, Ci, "observedAttributes"), r.MUTED]);
|
|
3873
|
+
let Ir = Ci;
|
|
3874
|
+
const Wo = document.createElement("template"), Vh = (
|
|
3865
3875
|
/* SVG */
|
|
3866
3876
|
`
|
|
3867
3877
|
<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>
|
|
3868
3878
|
`
|
|
3869
3879
|
);
|
|
3870
|
-
|
|
3880
|
+
Wo.innerHTML = /* HTML */
|
|
3871
3881
|
`
|
|
3872
3882
|
<style>
|
|
3873
3883
|
:host {
|
|
@@ -3878,12 +3888,12 @@ Xo.innerHTML = /* HTML */
|
|
|
3878
3888
|
display: none !important;
|
|
3879
3889
|
}
|
|
3880
3890
|
</style>
|
|
3881
|
-
<slot name="icon">${
|
|
3891
|
+
<slot name="icon">${Vh}</slot>
|
|
3882
3892
|
`;
|
|
3883
3893
|
const xi = class xi extends mt {
|
|
3884
3894
|
constructor() {
|
|
3885
|
-
var
|
|
3886
|
-
super(), (
|
|
3895
|
+
var a;
|
|
3896
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Wo.content.cloneNode(!0));
|
|
3887
3897
|
}
|
|
3888
3898
|
connectedCallback() {
|
|
3889
3899
|
super.connectedCallback(), this.setAttribute(
|
|
@@ -3894,37 +3904,37 @@ const xi = class xi extends mt {
|
|
|
3894
3904
|
disconnectedCallback() {
|
|
3895
3905
|
super.disconnectedCallback();
|
|
3896
3906
|
}
|
|
3897
|
-
attributeChangedCallback(
|
|
3898
|
-
super.attributeChangedCallback(
|
|
3907
|
+
attributeChangedCallback(a, t, i) {
|
|
3908
|
+
super.attributeChangedCallback(a, t, i), a === r.IS_PIP && this.setAttribute(
|
|
3899
3909
|
"aria-label",
|
|
3900
3910
|
this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture"
|
|
3901
3911
|
);
|
|
3902
3912
|
}
|
|
3903
|
-
set isPictureInPictureActive(
|
|
3904
|
-
|
|
3913
|
+
set isPictureInPictureActive(a) {
|
|
3914
|
+
a ? this.setAttribute(r.IS_PIP, "") : this.removeAttribute(r.IS_PIP);
|
|
3905
3915
|
}
|
|
3906
3916
|
get isPictureInPictureActive() {
|
|
3907
3917
|
return this.hasAttribute(r.IS_PIP);
|
|
3908
3918
|
}
|
|
3909
|
-
handleClick(
|
|
3919
|
+
handleClick(a) {
|
|
3910
3920
|
const t = this.isPictureInPictureActive ? y.EXIT_PIP : y.ENTER_PIP;
|
|
3911
3921
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
3912
3922
|
}
|
|
3913
3923
|
};
|
|
3914
|
-
v(xi, "observedAttributes", [...
|
|
3915
|
-
let
|
|
3916
|
-
const
|
|
3924
|
+
v(xi, "observedAttributes", [...W(xi, xi, "observedAttributes"), r.IS_PIP, r.PIP_AVAILABLE]);
|
|
3925
|
+
let Lr = xi;
|
|
3926
|
+
const Jo = document.createElement("template"), Xh = (
|
|
3917
3927
|
/* SVG */
|
|
3918
3928
|
`
|
|
3919
3929
|
<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>
|
|
3920
3930
|
`
|
|
3921
|
-
),
|
|
3931
|
+
), jh = (
|
|
3922
3932
|
/* SVG */
|
|
3923
3933
|
`
|
|
3924
3934
|
<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>
|
|
3925
3935
|
`
|
|
3926
3936
|
);
|
|
3927
|
-
|
|
3937
|
+
Jo.innerHTML = /* HTML */
|
|
3928
3938
|
`
|
|
3929
3939
|
<style>
|
|
3930
3940
|
:host {
|
|
@@ -3941,14 +3951,14 @@ jo.innerHTML = /* HTML */
|
|
|
3941
3951
|
</style>
|
|
3942
3952
|
|
|
3943
3953
|
<slot name="icon">
|
|
3944
|
-
<slot name="play">${
|
|
3945
|
-
<slot name="pause">${
|
|
3954
|
+
<slot name="play">${Xh}</slot>
|
|
3955
|
+
<slot name="pause">${jh}</slot>
|
|
3946
3956
|
</slot>
|
|
3947
3957
|
`;
|
|
3948
3958
|
const Ni = class Ni extends mt {
|
|
3949
3959
|
constructor() {
|
|
3950
|
-
var
|
|
3951
|
-
super(), (
|
|
3960
|
+
var a;
|
|
3961
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Jo.content.cloneNode(!0));
|
|
3952
3962
|
}
|
|
3953
3963
|
connectedCallback() {
|
|
3954
3964
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3956,80 +3966,80 @@ const Ni = class Ni extends mt {
|
|
|
3956
3966
|
disconnectedCallback() {
|
|
3957
3967
|
super.disconnectedCallback();
|
|
3958
3968
|
}
|
|
3959
|
-
attributeChangedCallback(
|
|
3960
|
-
super.attributeChangedCallback(
|
|
3969
|
+
attributeChangedCallback(a, t, i) {
|
|
3970
|
+
super.attributeChangedCallback(a, t, i), a === r.PAUSED && this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
3961
3971
|
}
|
|
3962
|
-
set paused(
|
|
3963
|
-
|
|
3972
|
+
set paused(a) {
|
|
3973
|
+
a ? this.setAttribute(r.PAUSED, "") : this.removeAttribute(r.PAUSED);
|
|
3964
3974
|
}
|
|
3965
3975
|
get paused() {
|
|
3966
3976
|
return this.hasAttribute(r.PAUSED);
|
|
3967
3977
|
}
|
|
3968
|
-
handleClick(
|
|
3978
|
+
handleClick(a) {
|
|
3969
3979
|
const t = this.paused ? y.PLAY : y.PAUSE;
|
|
3970
3980
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
3971
3981
|
}
|
|
3972
3982
|
};
|
|
3973
|
-
v(Ni, "observedAttributes", [...
|
|
3974
|
-
let
|
|
3975
|
-
const
|
|
3983
|
+
v(Ni, "observedAttributes", [...W(Ni, Ni, "observedAttributes"), r.PAUSED]);
|
|
3984
|
+
let Tr = Ni;
|
|
3985
|
+
const J = {
|
|
3976
3986
|
TITLE: "title",
|
|
3977
3987
|
OFFLINE: "offline",
|
|
3978
3988
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3979
3989
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3980
3990
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3981
|
-
},
|
|
3982
|
-
var
|
|
3983
|
-
class
|
|
3991
|
+
}, Yh = Object.values(J);
|
|
3992
|
+
var Ns, ri, ie, we, se, ne, Pt, tt, Sr, Zo, wr, Cr;
|
|
3993
|
+
class Wh extends Ys {
|
|
3984
3994
|
constructor(t) {
|
|
3985
3995
|
super();
|
|
3986
3996
|
l(this, tt);
|
|
3987
|
-
l(this,
|
|
3997
|
+
l(this, Ns);
|
|
3988
3998
|
l(this, ri);
|
|
3989
|
-
l(this,
|
|
3990
|
-
l(this,
|
|
3991
|
-
l(this,
|
|
3992
|
-
l(this,
|
|
3999
|
+
l(this, ie, !1);
|
|
4000
|
+
l(this, we, !1);
|
|
4001
|
+
l(this, se, !0);
|
|
4002
|
+
l(this, ne, null);
|
|
3993
4003
|
l(this, Pt, null);
|
|
3994
|
-
h(this, ri, t), h(this,
|
|
4004
|
+
h(this, ri, t), h(this, Ns, new Lh({
|
|
3995
4005
|
publicEndpoint: t.url,
|
|
3996
4006
|
tokenFactory: () => t.authenticationToken
|
|
3997
4007
|
}));
|
|
3998
4008
|
}
|
|
3999
4009
|
start(t = 5e3) {
|
|
4000
|
-
e(this, Pt) && clearInterval(e(this, Pt)), h(this,
|
|
4001
|
-
!e(this,
|
|
4010
|
+
e(this, Pt) && clearInterval(e(this, Pt)), h(this, ie, !1), h(this, we, !1), n(this, tt, Cr).call(this), n(this, tt, Sr).call(this), h(this, Pt, window.setInterval(() => {
|
|
4011
|
+
!e(this, we) && !e(this, ri).infiniteReconnect && !e(this, ne) && e(this, se) && h(this, ne, window.setTimeout(() => n(this, tt, Zo).call(this), 300 * 1e3)), !e(this, we) && e(this, se) && n(this, tt, Sr).call(this);
|
|
4002
4012
|
}, t));
|
|
4003
4013
|
}
|
|
4004
4014
|
stop() {
|
|
4005
|
-
n(this, tt,
|
|
4015
|
+
n(this, tt, wr).call(this), e(this, Pt) && (window.clearInterval(e(this, Pt)), h(this, Pt, null));
|
|
4006
4016
|
}
|
|
4007
4017
|
}
|
|
4008
|
-
|
|
4009
|
-
return
|
|
4010
|
-
if (e(this,
|
|
4018
|
+
Ns = new WeakMap(), ri = new WeakMap(), ie = new WeakMap(), we = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), Pt = new WeakMap(), tt = new WeakSet(), Sr = function() {
|
|
4019
|
+
return q(this, null, function* () {
|
|
4020
|
+
if (e(this, ie))
|
|
4011
4021
|
return;
|
|
4012
|
-
h(this,
|
|
4022
|
+
h(this, ie, !0);
|
|
4013
4023
|
let t = "Stream is offline", i = "Please stand by";
|
|
4014
4024
|
try {
|
|
4015
|
-
const s = yield e(this,
|
|
4025
|
+
const s = yield e(this, Ns).getChannel(e(this, ri).channelId);
|
|
4016
4026
|
if (s.isLive) {
|
|
4017
|
-
h(this,
|
|
4027
|
+
h(this, we, !0), n(this, tt, Cr).call(this), this.emit("live", s), h(this, ie, !1);
|
|
4018
4028
|
return;
|
|
4019
4029
|
}
|
|
4020
4030
|
} catch (s) {
|
|
4021
|
-
|
|
4031
|
+
Th(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
|
|
4022
4032
|
}
|
|
4023
|
-
e(this,
|
|
4033
|
+
e(this, se) && this.emit("error", { title: t, message: i }), h(this, ie, !1);
|
|
4024
4034
|
});
|
|
4025
|
-
},
|
|
4026
|
-
this.stop(), h(this,
|
|
4027
|
-
},
|
|
4028
|
-
e(this,
|
|
4029
|
-
},
|
|
4030
|
-
n(this, tt,
|
|
4035
|
+
}, Zo = function() {
|
|
4036
|
+
this.stop(), h(this, se, !1), this.emit("timeout");
|
|
4037
|
+
}, wr = function() {
|
|
4038
|
+
e(this, ne) && (window.clearTimeout(e(this, ne)), h(this, ne, null));
|
|
4039
|
+
}, Cr = function() {
|
|
4040
|
+
n(this, tt, wr).call(this), h(this, se, !0);
|
|
4031
4041
|
};
|
|
4032
|
-
const
|
|
4042
|
+
const Jh = /\/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, Zh = navigator.userAgent.toLowerCase(), Qh = Jh.test(Zh), td = (p) => Pi.observedAttributes.includes(p), Qo = (
|
|
4033
4043
|
/* HTML */
|
|
4034
4044
|
`
|
|
4035
4045
|
<style>
|
|
@@ -4041,7 +4051,7 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4041
4051
|
display: flex;
|
|
4042
4052
|
justify-content: center;
|
|
4043
4053
|
|
|
4044
|
-
--vindral-volume-range-display: ${
|
|
4054
|
+
--vindral-volume-range-display: ${Qh ? "none" : "flex"};
|
|
4045
4055
|
--vindral-airplay-button-display: none;
|
|
4046
4056
|
--vindral-play-overlay-display: none;
|
|
4047
4057
|
--vindral-grid-item-offline-display: none;
|
|
@@ -4077,7 +4087,7 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4077
4087
|
// needs to be higher than bottom bar/UI
|
|
4078
4088
|
}
|
|
4079
4089
|
|
|
4080
|
-
:host([${
|
|
4090
|
+
:host([${J.OFFLINE}]) {
|
|
4081
4091
|
aspect-ratio: 16 / 9;
|
|
4082
4092
|
vindral-controller {
|
|
4083
4093
|
--vindral-ui-display: none;
|
|
@@ -4123,16 +4133,16 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4123
4133
|
}
|
|
4124
4134
|
</style>
|
|
4125
4135
|
`
|
|
4126
|
-
),
|
|
4127
|
-
const
|
|
4136
|
+
), ed = (p) => {
|
|
4137
|
+
const a = p ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
4128
4138
|
return (
|
|
4129
4139
|
/* HTML */
|
|
4130
4140
|
`
|
|
4131
|
-
${
|
|
4141
|
+
${Qo}
|
|
4132
4142
|
|
|
4133
4143
|
<vindral-controller>
|
|
4134
4144
|
<vindral-control-bar slot="top-bar">
|
|
4135
|
-
<${
|
|
4145
|
+
<${a} list-position="bottom"></${a}>
|
|
4136
4146
|
<vindral-cast-button></vindral-cast-button>
|
|
4137
4147
|
<vindral-airplay-button></vindral-airplay-button>
|
|
4138
4148
|
</vindral-control-bar>
|
|
@@ -4144,7 +4154,7 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4144
4154
|
<vindral-channel-grid-button slot="right"></vindral-channel-grid-button>
|
|
4145
4155
|
<vindral-language-menu slot="right"></vindral-language-menu>
|
|
4146
4156
|
<vindral-live-button id="live-button" slot="right"></vindral-live-button>
|
|
4147
|
-
<${
|
|
4157
|
+
<${a} slot="right"></${a}>
|
|
4148
4158
|
<vindral-pip-button slot="right"></vindral-pip-button>
|
|
4149
4159
|
<vindral-cast-button slot="right"></vindral-cast-button>
|
|
4150
4160
|
<vindral-airplay-button slot="right"></vindral-airplay-button>
|
|
@@ -4163,10 +4173,10 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4163
4173
|
</vindral-controller>
|
|
4164
4174
|
`
|
|
4165
4175
|
);
|
|
4166
|
-
},
|
|
4176
|
+
}, id = (
|
|
4167
4177
|
/* HTML */
|
|
4168
4178
|
`
|
|
4169
|
-
${
|
|
4179
|
+
${Qo}
|
|
4170
4180
|
|
|
4171
4181
|
<style>
|
|
4172
4182
|
#control-bar {
|
|
@@ -4189,129 +4199,129 @@ const _h = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|
|
|
|
4189
4199
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
4190
4200
|
</vindral-controller>
|
|
4191
4201
|
`
|
|
4192
|
-
),
|
|
4193
|
-
var dt,
|
|
4194
|
-
class
|
|
4202
|
+
), ha = document.createElement("template");
|
|
4203
|
+
var dt, O, Y, rt, ct, Rs, Nn, _s, F, el, Rn, xr, il, Ce, xe, on, $t;
|
|
4204
|
+
class tl extends HTMLElement {
|
|
4195
4205
|
constructor() {
|
|
4196
4206
|
super();
|
|
4197
|
-
l(this,
|
|
4207
|
+
l(this, F);
|
|
4198
4208
|
l(this, dt);
|
|
4199
|
-
l(this,
|
|
4209
|
+
l(this, O);
|
|
4200
4210
|
l(this, Y);
|
|
4201
4211
|
l(this, rt);
|
|
4202
4212
|
l(this, ct);
|
|
4203
|
-
l(this,
|
|
4213
|
+
l(this, Rs, /* @__PURE__ */ new Set());
|
|
4204
4214
|
l(this, Nn, () => {
|
|
4205
4215
|
Array.from(this.attributes).forEach((t) => {
|
|
4206
|
-
e(this,
|
|
4216
|
+
e(this, _s).call(this, t.name, t.value);
|
|
4207
4217
|
});
|
|
4208
4218
|
});
|
|
4209
|
-
l(this,
|
|
4210
|
-
|
|
4219
|
+
l(this, _s, (t, i) => {
|
|
4220
|
+
td(t) && (U(i) ? e(this, O).setAttribute(t, i) : e(this, O).removeAttribute(t));
|
|
4211
4221
|
});
|
|
4212
4222
|
l(this, Rn, () => {
|
|
4213
4223
|
Array.from(this.children).forEach((t) => {
|
|
4214
|
-
e(this,
|
|
4224
|
+
e(this, Rs).add(t);
|
|
4215
4225
|
});
|
|
4216
4226
|
});
|
|
4217
|
-
l(this,
|
|
4218
|
-
const t = e(this,
|
|
4227
|
+
l(this, Ce, () => {
|
|
4228
|
+
const t = e(this, O).instance;
|
|
4219
4229
|
t && (t.on("is live", (i) => {
|
|
4220
|
-
i ? (this.removeAttribute(
|
|
4230
|
+
i ? (this.removeAttribute(J.OFFLINE), e(this, Y).setAttribute("hidden", "")) : (this.setAttribute(J.OFFLINE, ""), e(this, Y).removeAttribute("hidden"), n(this, F, $t).call(this, "Stream is offline", "Please stand by"));
|
|
4221
4231
|
}), t.on("channels", (i) => {
|
|
4222
|
-
const s = e(this,
|
|
4223
|
-
|
|
4232
|
+
const s = e(this, O).getAttribute("channel-id"), o = i.find((u) => u.channelId === s);
|
|
4233
|
+
o && n(this, F, on).call(this, o);
|
|
4224
4234
|
}), t.on("channel switch", ({ channelId: i }) => {
|
|
4225
|
-
const s = t.channels.find((
|
|
4226
|
-
s && n(this,
|
|
4235
|
+
const s = t.channels.find((o) => o.channelId === i);
|
|
4236
|
+
s && n(this, F, on).call(this, s);
|
|
4227
4237
|
}), t.on("error", (i) => {
|
|
4228
|
-
if (i.code() ===
|
|
4229
|
-
n(this,
|
|
4238
|
+
if (i.code() === Eh) {
|
|
4239
|
+
n(this, F, $t).call(this, "Stream is offline", "Please stand by");
|
|
4230
4240
|
return;
|
|
4231
4241
|
}
|
|
4232
|
-
i.isFatal() && (i.code() ===
|
|
4242
|
+
i.isFatal() && (i.code() === Ah ? n(this, F, $t).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === yh ? n(this, F, $t).call(this, "Stream is offline", "Please stand by") : n(this, F, $t).call(this, "An error occurred", i.message), e(this, rt).removeAttribute("hidden"), this.setAttribute(J.OFFLINE, ""), e(this, O).dispatchEvent(new CustomEvent(y.EXIT_FULLSCREEN)), e(this, O).dispatchEvent(new CustomEvent(y.EXIT_PIP)));
|
|
4233
4243
|
}));
|
|
4234
4244
|
});
|
|
4235
|
-
l(this,
|
|
4236
|
-
e(this,
|
|
4245
|
+
l(this, xe, () => {
|
|
4246
|
+
e(this, O).connect(), e(this, rt).setAttribute("hidden", ""), e(this, Y).setAttribute("hidden", ""), e(this, O).focus();
|
|
4237
4247
|
});
|
|
4238
|
-
h(this, dt, this.attachShadow({ mode: "open" })), n(this,
|
|
4248
|
+
h(this, dt, this.attachShadow({ mode: "open" })), n(this, F, xr).call(this), h(this, O, e(this, dt).querySelector("vindral-controller")), h(this, Y, e(this, dt).querySelector("#vindral-message")), h(this, rt, e(this, dt).querySelector("#play-overlay"));
|
|
4239
4249
|
}
|
|
4240
4250
|
connectedCallback() {
|
|
4241
|
-
this.setAttribute(
|
|
4251
|
+
this.setAttribute(J.OFFLINE, ""), e(this, O).addEventListener("vindral-instance-ready", e(this, Ce)), n(this, F, il).call(this);
|
|
4242
4252
|
}
|
|
4243
4253
|
disconnectedCallback() {
|
|
4244
4254
|
var t;
|
|
4245
|
-
e(this,
|
|
4255
|
+
e(this, O).removeEventListener("vindral-instance-ready", e(this, Ce)), e(this, rt).removeEventListener("click", e(this, xe)), (t = e(this, ct)) == null || t.stop();
|
|
4246
4256
|
}
|
|
4247
4257
|
attributeChangedCallback(t, i, s) {
|
|
4248
4258
|
if (i !== s)
|
|
4249
|
-
if (t === r.MEDIA || t ===
|
|
4250
|
-
n(this,
|
|
4251
|
-
else if (t ===
|
|
4252
|
-
const
|
|
4253
|
-
|
|
4259
|
+
if (t === r.MEDIA || t === J.ADVANCED_RENDITION_MENU_ENABLED)
|
|
4260
|
+
n(this, F, xr).call(this);
|
|
4261
|
+
else if (t === J.REFRESH_POSTER_ENABLED) {
|
|
4262
|
+
const o = e(this, dt).querySelector("vindral-poster-overlay");
|
|
4263
|
+
o && (o.disabled = R(this.getAttribute(J.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
4254
4264
|
} else
|
|
4255
|
-
e(this,
|
|
4265
|
+
e(this, _s).call(this, t, s);
|
|
4256
4266
|
}
|
|
4257
4267
|
get instance() {
|
|
4258
|
-
return e(this,
|
|
4268
|
+
return e(this, O).instance;
|
|
4259
4269
|
}
|
|
4260
4270
|
get airPlay() {
|
|
4261
|
-
return e(this,
|
|
4271
|
+
return e(this, O).airPlay;
|
|
4262
4272
|
}
|
|
4263
4273
|
}
|
|
4264
|
-
dt = new WeakMap(),
|
|
4265
|
-
const t =
|
|
4266
|
-
this.getAttribute(
|
|
4274
|
+
dt = new WeakMap(), O = new WeakMap(), Y = new WeakMap(), rt = new WeakMap(), ct = new WeakMap(), Rs = new WeakMap(), Nn = new WeakMap(), _s = new WeakMap(), F = new WeakSet(), el = function() {
|
|
4275
|
+
const t = ba(this.getAttribute(r.MEDIA)), i = R(
|
|
4276
|
+
this.getAttribute(J.ADVANCED_RENDITION_MENU_ENABLED),
|
|
4267
4277
|
!1
|
|
4268
4278
|
);
|
|
4269
|
-
return t === "audio" ?
|
|
4270
|
-
}, Rn = new WeakMap(),
|
|
4271
|
-
const t = e(this, dt).hasChildNodes(), i = t ? e(this,
|
|
4272
|
-
this.isConnected && i && i.removeEventListener("vindral-instance-ready", e(this,
|
|
4273
|
-
const
|
|
4274
|
-
h(this,
|
|
4275
|
-
e(this,
|
|
4276
|
-
}), e(this, Nn).call(this), e(this, dt).innerHTML = "", e(this, dt).appendChild(
|
|
4277
|
-
},
|
|
4279
|
+
return t === "audio" ? id : ed(i);
|
|
4280
|
+
}, Rn = new WeakMap(), xr = function() {
|
|
4281
|
+
const t = e(this, dt).hasChildNodes(), i = t ? e(this, O) : void 0, s = t ? e(this, rt) : void 0;
|
|
4282
|
+
this.isConnected && i && i.removeEventListener("vindral-instance-ready", e(this, Ce)), this.isConnected && s && e(this, ct) && s.removeEventListener("click", e(this, xe)), ha.innerHTML = n(this, F, el).call(this);
|
|
4283
|
+
const o = ha.content.cloneNode(!0);
|
|
4284
|
+
h(this, O, o.querySelector("vindral-controller")), h(this, Y, o.querySelector("#vindral-message")), h(this, rt, o.querySelector("#play-overlay")), e(this, Rn).call(this), e(this, Rs).forEach((u) => {
|
|
4285
|
+
e(this, O).appendChild(u);
|
|
4286
|
+
}), e(this, Nn).call(this), e(this, dt).innerHTML = "", e(this, dt).appendChild(o), this.isConnected && (e(this, O).addEventListener("vindral-instance-ready", e(this, Ce)), e(this, ct) && e(this, rt).addEventListener("click", e(this, xe)));
|
|
4287
|
+
}, il = function() {
|
|
4278
4288
|
var u;
|
|
4279
|
-
if (R(this.getAttribute(
|
|
4289
|
+
if (R(this.getAttribute(J.STREAM_POLL_ENABLED), !0) === !1)
|
|
4280
4290
|
return;
|
|
4281
|
-
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (u = this.getAttribute("authentication-token")) != null ? u : void 0,
|
|
4291
|
+
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (u = this.getAttribute("authentication-token")) != null ? u : void 0, o = this.hasAttribute("infinite-reconnect");
|
|
4282
4292
|
if (!t || !i) {
|
|
4283
|
-
this.setAttribute(
|
|
4293
|
+
this.setAttribute(J.OFFLINE, ""), n(this, F, $t).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
4284
4294
|
return;
|
|
4285
4295
|
}
|
|
4286
|
-
h(this, ct, new
|
|
4296
|
+
h(this, ct, new Wh({
|
|
4287
4297
|
url: t,
|
|
4288
4298
|
channelId: i,
|
|
4289
4299
|
authenticationToken: s,
|
|
4290
|
-
infiniteReconnect:
|
|
4300
|
+
infiniteReconnect: o
|
|
4291
4301
|
})), e(this, ct).on("live", (c) => {
|
|
4292
|
-
e(this,
|
|
4302
|
+
e(this, O).connect(), this.removeAttribute("offline"), e(this, Y).setAttribute("hidden", ""), n(this, F, on).call(this, c);
|
|
4293
4303
|
}), e(this, ct).on("timeout", () => {
|
|
4294
4304
|
e(this, Y).setAttribute("hidden", ""), e(this, rt).removeAttribute("hidden");
|
|
4295
4305
|
}), e(this, ct).on("error", (c) => {
|
|
4296
|
-
this.setAttribute(
|
|
4297
|
-
}), e(this, rt).addEventListener("click", e(this,
|
|
4298
|
-
},
|
|
4306
|
+
this.setAttribute(J.OFFLINE, ""), n(this, F, $t).call(this, c.title, c.message);
|
|
4307
|
+
}), e(this, rt).addEventListener("click", e(this, xe)), this.hasAttribute("paused") && e(this, ct).start();
|
|
4308
|
+
}, Ce = new WeakMap(), xe = new WeakMap(), on = function(t) {
|
|
4299
4309
|
var c, m;
|
|
4300
|
-
const i =
|
|
4310
|
+
const i = ma(this.getAttribute("title"), !1);
|
|
4301
4311
|
if (!i) return;
|
|
4302
|
-
const s = this.getAttribute("poster"),
|
|
4312
|
+
const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
|
|
4303
4313
|
let u;
|
|
4304
|
-
typeof s == "string" ? u = s : u = (m = (c = this.instance) == null ? void 0 : c.getThumbnailUrl()) != null ? m : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0,
|
|
4305
|
-
title:
|
|
4314
|
+
typeof s == "string" ? u = s : u = (m = (c = this.instance) == null ? void 0 : c.getThumbnailUrl()) != null ? m : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, Sh({
|
|
4315
|
+
title: o,
|
|
4306
4316
|
poster: u
|
|
4307
4317
|
});
|
|
4308
|
-
},
|
|
4318
|
+
}, $t = function(t, i) {
|
|
4309
4319
|
e(this, Y).setAttribute("title", t), e(this, Y).setAttribute("description", i);
|
|
4310
4320
|
const s = this.getAttribute("poster");
|
|
4311
4321
|
s && e(this, Y).setAttribute("background-image", s), e(this, Y).removeAttribute("hidden");
|
|
4312
|
-
}, v(
|
|
4313
|
-
const
|
|
4314
|
-
|
|
4322
|
+
}, v(tl, "observedAttributes", [...Pi.observedAttributes, ...Yh]);
|
|
4323
|
+
const sl = document.createElement("template");
|
|
4324
|
+
sl.innerHTML = /* HTML */
|
|
4315
4325
|
`
|
|
4316
4326
|
<style>
|
|
4317
4327
|
:host {
|
|
@@ -4347,35 +4357,35 @@ tl.innerHTML = /* HTML */
|
|
|
4347
4357
|
}
|
|
4348
4358
|
</style>
|
|
4349
4359
|
`;
|
|
4350
|
-
const
|
|
4351
|
-
var ai,
|
|
4352
|
-
class
|
|
4360
|
+
const sd = 6e3;
|
|
4361
|
+
var ai, re, Ne, oi, bt, rl, ln, Nr, _n;
|
|
4362
|
+
class nl extends HTMLElement {
|
|
4353
4363
|
constructor() {
|
|
4354
4364
|
super();
|
|
4355
4365
|
l(this, bt);
|
|
4356
4366
|
l(this, ai, null);
|
|
4357
|
-
l(this,
|
|
4358
|
-
l(this,
|
|
4367
|
+
l(this, re, null);
|
|
4368
|
+
l(this, Ne, null);
|
|
4359
4369
|
l(this, oi, () => {
|
|
4360
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, bt,
|
|
4370
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? n(this, bt, rl).call(this) : n(this, bt, ln).call(this);
|
|
4361
4371
|
});
|
|
4362
4372
|
l(this, _n, (t) => {
|
|
4363
4373
|
t.forEach((i) => {
|
|
4364
4374
|
i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
4365
4375
|
});
|
|
4366
4376
|
});
|
|
4367
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4377
|
+
this.attachShadow({ mode: "open" }).appendChild(sl.content.cloneNode(!0));
|
|
4368
4378
|
}
|
|
4369
4379
|
connectedCallback() {
|
|
4370
4380
|
var t;
|
|
4371
|
-
h(this, ai, this.closest("vindral-controller")), (t = e(this, ai)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, oi)), h(this,
|
|
4381
|
+
h(this, ai, this.closest("vindral-controller")), (t = e(this, ai)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, oi)), h(this, Ne, new IntersectionObserver(e(this, _n))), e(this, Ne).observe(this);
|
|
4372
4382
|
}
|
|
4373
4383
|
disconnectedCallback() {
|
|
4374
4384
|
var t, i;
|
|
4375
|
-
(t = e(this, ai)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, oi)), (i = e(this,
|
|
4385
|
+
(t = e(this, ai)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, oi)), (i = e(this, Ne)) == null || i.disconnect(), h(this, Ne, null), n(this, bt, ln).call(this);
|
|
4376
4386
|
}
|
|
4377
4387
|
attributeChangedCallback(t, i, s) {
|
|
4378
|
-
i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, bt,
|
|
4388
|
+
i !== s && (t === r.POSTER_SRC && this.paused && !this.disabled && n(this, bt, Nr).call(this), (t === r.PAUSED || t === "disabled" || t === "intersecting") && e(this, oi).call(this));
|
|
4379
4389
|
}
|
|
4380
4390
|
get disabled() {
|
|
4381
4391
|
return this.hasAttribute("disabled");
|
|
@@ -4390,21 +4400,21 @@ class el extends HTMLElement {
|
|
|
4390
4400
|
return this.hasAttribute(r.PAUSED);
|
|
4391
4401
|
}
|
|
4392
4402
|
}
|
|
4393
|
-
ai = new WeakMap(),
|
|
4394
|
-
e(this,
|
|
4395
|
-
},
|
|
4396
|
-
e(this,
|
|
4397
|
-
},
|
|
4403
|
+
ai = new WeakMap(), re = new WeakMap(), Ne = new WeakMap(), oi = new WeakMap(), bt = new WeakSet(), rl = function() {
|
|
4404
|
+
e(this, re) === null && (n(this, bt, ln).call(this), h(this, re, window.setInterval(() => n(this, bt, Nr).call(this), sd)));
|
|
4405
|
+
}, ln = function() {
|
|
4406
|
+
e(this, re) !== null && (clearInterval(e(this, re)), h(this, re, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
4407
|
+
}, Nr = function() {
|
|
4398
4408
|
if (!this.posterSrc) return;
|
|
4399
4409
|
const t = new URL(this.posterSrc), i = new Image();
|
|
4400
4410
|
t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
|
|
4401
|
-
}, _n = new WeakMap(), v(
|
|
4411
|
+
}, _n = new WeakMap(), v(nl, "observedAttributes", [
|
|
4402
4412
|
r.POSTER_SRC,
|
|
4403
4413
|
r.PAUSED,
|
|
4404
4414
|
"disabled",
|
|
4405
4415
|
"intersecting"
|
|
4406
4416
|
]);
|
|
4407
|
-
const
|
|
4417
|
+
const nd = (
|
|
4408
4418
|
/* SVG */
|
|
4409
4419
|
`
|
|
4410
4420
|
<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">
|
|
@@ -4412,8 +4422,8 @@ const Hh = (
|
|
|
4412
4422
|
<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" />
|
|
4413
4423
|
</svg>
|
|
4414
4424
|
`
|
|
4415
|
-
),
|
|
4416
|
-
|
|
4425
|
+
), al = document.createElement("template");
|
|
4426
|
+
al.innerHTML = /* HTML */
|
|
4417
4427
|
`
|
|
4418
4428
|
<style>
|
|
4419
4429
|
:host {
|
|
@@ -4421,38 +4431,38 @@ sl.innerHTML = /* HTML */
|
|
|
4421
4431
|
}
|
|
4422
4432
|
</style>
|
|
4423
4433
|
|
|
4424
|
-
<slot name="button">${
|
|
4434
|
+
<slot name="button">${nd}</slot>
|
|
4425
4435
|
<slot name="listbox" hidden>
|
|
4426
4436
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
4427
4437
|
</slot>
|
|
4428
4438
|
`;
|
|
4429
|
-
var
|
|
4439
|
+
var Us, _r;
|
|
4430
4440
|
const Ri = class Ri extends Un {
|
|
4431
4441
|
constructor() {
|
|
4432
|
-
var t, i, s,
|
|
4442
|
+
var t, i, s, o;
|
|
4433
4443
|
super();
|
|
4434
|
-
l(this,
|
|
4435
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
4444
|
+
l(this, Us);
|
|
4445
|
+
(t = this.shadowRoot) == null || t.appendChild(al.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]");
|
|
4436
4446
|
}
|
|
4437
4447
|
connectedCallback() {
|
|
4438
|
-
super.connectedCallback(), n(this,
|
|
4448
|
+
super.connectedCallback(), n(this, Us, _r).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
4439
4449
|
}
|
|
4440
4450
|
attributeChangedCallback(t, i, s) {
|
|
4441
|
-
super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this,
|
|
4451
|
+
super.attributeChangedCallback(t, i, s), t === r.RENDITION_LEVELS && n(this, Us, _r).call(this);
|
|
4442
4452
|
}
|
|
4443
4453
|
};
|
|
4444
|
-
|
|
4454
|
+
Us = new WeakSet(), _r = function() {
|
|
4445
4455
|
const t = this.getAttribute(r.RENDITION_LEVELS);
|
|
4446
4456
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
4447
|
-
}, v(Ri, "observedAttributes", [...
|
|
4448
|
-
let
|
|
4449
|
-
const
|
|
4457
|
+
}, v(Ri, "observedAttributes", [...W(Ri, Ri, "observedAttributes"), r.RENDITION_LEVELS]);
|
|
4458
|
+
let Rr = Ri;
|
|
4459
|
+
const ol = document.createElement("template"), rd = (
|
|
4450
4460
|
/* SVG */
|
|
4451
4461
|
`
|
|
4452
4462
|
<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>
|
|
4453
4463
|
`
|
|
4454
4464
|
);
|
|
4455
|
-
|
|
4465
|
+
ol.innerHTML = /* HTML */
|
|
4456
4466
|
`
|
|
4457
4467
|
<style>
|
|
4458
4468
|
:host {
|
|
@@ -4525,7 +4535,7 @@ nl.innerHTML = /* HTML */
|
|
|
4525
4535
|
}
|
|
4526
4536
|
|
|
4527
4537
|
[role="menuitem"][aria-selected="true"]::before {
|
|
4528
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
4538
|
+
content: url("data:image/svg+xml,${encodeURIComponent(rd)}");
|
|
4529
4539
|
position: absolute;
|
|
4530
4540
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
4531
4541
|
top: calc(50% - 8px);
|
|
@@ -4555,127 +4565,127 @@ nl.innerHTML = /* HTML */
|
|
|
4555
4565
|
<div class="menu"></div>
|
|
4556
4566
|
</slot>
|
|
4557
4567
|
`;
|
|
4558
|
-
var
|
|
4559
|
-
class
|
|
4568
|
+
var Re, Ps, ae, Dt, _e, Ds, D, hl, Ur, dl, Pr, cl, ul, pl, Dr, bl;
|
|
4569
|
+
class ll extends HTMLElement {
|
|
4560
4570
|
constructor() {
|
|
4561
4571
|
super();
|
|
4562
4572
|
l(this, D);
|
|
4563
|
-
l(this,
|
|
4564
|
-
l(this,
|
|
4565
|
-
l(this,
|
|
4573
|
+
l(this, Re, []);
|
|
4574
|
+
l(this, Ps, Number.MAX_SAFE_INTEGER);
|
|
4575
|
+
l(this, ae, null);
|
|
4566
4576
|
l(this, Dt, []);
|
|
4567
|
-
l(this,
|
|
4568
|
-
l(this,
|
|
4577
|
+
l(this, _e, null);
|
|
4578
|
+
l(this, Ds, null);
|
|
4569
4579
|
v(this, "handleEvent", (t) => {
|
|
4570
|
-
t.type === "keydown" && n(this, D,
|
|
4580
|
+
t.type === "keydown" && n(this, D, ul).call(this, t);
|
|
4571
4581
|
});
|
|
4572
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4582
|
+
this.attachShadow({ mode: "open" }).appendChild(ol.content.cloneNode(!0));
|
|
4573
4583
|
}
|
|
4574
4584
|
connectedCallback() {
|
|
4575
4585
|
var i;
|
|
4576
4586
|
const t = this.getRootNode();
|
|
4577
|
-
t instanceof ShadowRoot && (h(this,
|
|
4587
|
+
t instanceof ShadowRoot && (h(this, _e, t.host.closest("vindral-controller")), (i = e(this, _e)) == null || i.connectListener(this), n(this, D, hl).call(this), n(this, D, Ur).call(this), h(this, Ds, t.host), this.addEventListener("keydown", this));
|
|
4578
4588
|
}
|
|
4579
4589
|
disconnectedCallback() {
|
|
4580
4590
|
var t;
|
|
4581
|
-
(t = e(this,
|
|
4591
|
+
(t = e(this, _e)) == null || t.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
4582
4592
|
}
|
|
4583
4593
|
attributeChangedCallback(t, i, s) {
|
|
4584
4594
|
i !== s && (t === r.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === r.MAX_VIDEO_BITRATE && s && (this.maxVideoBitrate = s ? parseInt(s) : Number.MAX_SAFE_INTEGER));
|
|
4585
4595
|
}
|
|
4586
4596
|
set list(t) {
|
|
4587
|
-
h(this,
|
|
4597
|
+
h(this, Re, t), n(this, D, Ur).call(this);
|
|
4588
4598
|
}
|
|
4589
4599
|
set maxVideoBitrate(t) {
|
|
4590
|
-
h(this,
|
|
4600
|
+
h(this, Ps, t), n(this, D, Pr).call(this);
|
|
4591
4601
|
}
|
|
4592
4602
|
get keysUsed() {
|
|
4593
4603
|
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
4594
4604
|
}
|
|
4595
4605
|
focus() {
|
|
4596
4606
|
var t;
|
|
4597
|
-
(t = e(this,
|
|
4607
|
+
(t = e(this, ae)) == null || t.focus();
|
|
4598
4608
|
}
|
|
4599
4609
|
}
|
|
4600
|
-
|
|
4610
|
+
Re = new WeakMap(), Ps = new WeakMap(), ae = new WeakMap(), Dt = new WeakMap(), _e = new WeakMap(), Ds = new WeakMap(), D = new WeakSet(), hl = function() {
|
|
4601
4611
|
const t = (s) => {
|
|
4602
|
-
s.forEach((
|
|
4603
|
-
if (
|
|
4604
|
-
if (
|
|
4605
|
-
const u = this.offsetHeight, c =
|
|
4606
|
-
this.style.height = `${
|
|
4612
|
+
s.forEach((o) => {
|
|
4613
|
+
if (o.intersectionRatio !== 1)
|
|
4614
|
+
if (o.intersectionRatio > 0) {
|
|
4615
|
+
const u = this.offsetHeight, c = o.intersectionRatio, E = u * c - 24;
|
|
4616
|
+
this.style.height = `${E}px`;
|
|
4607
4617
|
} else
|
|
4608
4618
|
this.style.height = "auto";
|
|
4609
4619
|
});
|
|
4610
4620
|
};
|
|
4611
4621
|
new IntersectionObserver(t, {
|
|
4612
|
-
root: e(this,
|
|
4622
|
+
root: e(this, _e),
|
|
4613
4623
|
// The parent element to use as the viewport
|
|
4614
4624
|
threshold: 0
|
|
4615
4625
|
// 0 means any intersection is enough to be considered "inside"
|
|
4616
4626
|
}).observe(this);
|
|
4617
|
-
},
|
|
4627
|
+
}, Ur = function() {
|
|
4618
4628
|
var i;
|
|
4619
4629
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
4620
|
-
t && (h(this, Dt, []), t.innerHTML = "", e(this,
|
|
4630
|
+
t && (h(this, Dt, []), t.innerHTML = "", e(this, Re).sort((s, o) => {
|
|
4621
4631
|
var u, c;
|
|
4622
|
-
return (u = s.video) != null && u.bitRate && ((c =
|
|
4632
|
+
return (u = s.video) != null && u.bitRate && ((c = o.video) != null && c.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
4623
4633
|
}).forEach((s) => {
|
|
4624
|
-
var m,
|
|
4625
|
-
const
|
|
4626
|
-
|
|
4627
|
-
const u = n(this, D,
|
|
4628
|
-
|
|
4634
|
+
var m, E, N, H, G, vt, ft, gt;
|
|
4635
|
+
const o = document.createElement("div");
|
|
4636
|
+
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((m = s.video) == null ? void 0 : m.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
4637
|
+
const u = n(this, D, dl).call(this, (E = s.video) == null ? void 0 : E.frameRate);
|
|
4638
|
+
o.textContent = s.video ? ua(s.video) : "";
|
|
4629
4639
|
const c = document.createElement("span");
|
|
4630
|
-
c.classList.add("menu-item-subtitle"), c.textContent = `${
|
|
4631
|
-
}), n(this, D,
|
|
4632
|
-
},
|
|
4640
|
+
c.classList.add("menu-item-subtitle"), c.textContent = `${ca(((H = (N = s.video) == null ? void 0 : N.bitRate) != null ? H : 0) + ((vt = (G = s.audio) == null ? void 0 : G.bitRate) != null ? vt : 0))}, ${u}p`, o.appendChild(c), o.addEventListener("click", () => n(this, D, cl).call(this, s)), e(this, Dt).push({ el: o, id: (gt = (ft = s.video) == null ? void 0 : ft.id) != null ? gt : -1 }), t.appendChild(o);
|
|
4641
|
+
}), n(this, D, Pr).call(this));
|
|
4642
|
+
}, dl = function(t) {
|
|
4633
4643
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
4634
|
-
},
|
|
4635
|
-
e(this,
|
|
4636
|
-
const t = e(this,
|
|
4637
|
-
(s,
|
|
4644
|
+
}, Pr = function() {
|
|
4645
|
+
e(this, ae) && (e(this, ae).removeAttribute("aria-selected"), e(this, ae).tabIndex = -1);
|
|
4646
|
+
const t = e(this, Re).sort(
|
|
4647
|
+
(s, o) => {
|
|
4638
4648
|
var u, c;
|
|
4639
|
-
return (u = s.video) != null && u.bitRate && ((c =
|
|
4649
|
+
return (u = s.video) != null && u.bitRate && ((c = o.video) != null && c.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
4640
4650
|
}
|
|
4641
|
-
), i = e(this,
|
|
4651
|
+
), i = e(this, Re).filter(
|
|
4642
4652
|
(s) => {
|
|
4643
|
-
var
|
|
4644
|
-
return ((
|
|
4653
|
+
var o;
|
|
4654
|
+
return ((o = s.video) == null ? void 0 : o.bitRate) && s.video.bitRate <= e(this, Ps);
|
|
4645
4655
|
}
|
|
4646
4656
|
)[0] || t[t.length - 1];
|
|
4647
4657
|
if (i) {
|
|
4648
|
-
const s = e(this, Dt).find((
|
|
4658
|
+
const s = e(this, Dt).find((o) => {
|
|
4649
4659
|
var u;
|
|
4650
|
-
return
|
|
4660
|
+
return o.id === ((u = i.video) == null ? void 0 : u.id);
|
|
4651
4661
|
});
|
|
4652
|
-
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), h(this,
|
|
4662
|
+
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), h(this, ae, s.el));
|
|
4653
4663
|
}
|
|
4654
|
-
},
|
|
4664
|
+
}, cl = function(t) {
|
|
4655
4665
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
4656
4666
|
new CustomEvent(y.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
4657
4667
|
);
|
|
4658
|
-
},
|
|
4659
|
-
var c, m,
|
|
4660
|
-
const { key: i, ctrlKey: s, altKey:
|
|
4661
|
-
s ||
|
|
4662
|
-
},
|
|
4663
|
-
var
|
|
4664
|
-
const { key: i } = t, s = e(this, Dt),
|
|
4665
|
-
if (!
|
|
4666
|
-
const u = s.indexOf(
|
|
4668
|
+
}, ul = function(t) {
|
|
4669
|
+
var c, m, E;
|
|
4670
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: u } = t;
|
|
4671
|
+
s || o || u || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (c = e(this, Ds)) == null || c.hide() : i === "Enter" || i === " " ? (E = (m = n(this, D, Dr).call(this)) == null ? void 0 : m.el) == null || E.click() : n(this, D, pl).call(this, t));
|
|
4672
|
+
}, pl = function(t) {
|
|
4673
|
+
var E;
|
|
4674
|
+
const { key: i } = t, s = e(this, Dt), o = (E = n(this, D, Dr).call(this)) != null ? E : s[0];
|
|
4675
|
+
if (!o) return;
|
|
4676
|
+
const u = s.indexOf(o);
|
|
4667
4677
|
let c = Math.max(0, u);
|
|
4668
4678
|
i === "ArrowDown" ? c++ : i === "ArrowUp" ? c-- : t.key === "Home" ? c = 0 : t.key === "End" && (c = s.length - 1), c < 0 && (c = s.length - 1), c > s.length - 1 && (c = 0);
|
|
4669
4679
|
const m = s[c];
|
|
4670
|
-
m && (n(this, D,
|
|
4671
|
-
},
|
|
4680
|
+
m && (n(this, D, bl).call(this, m.id), m.el.focus());
|
|
4681
|
+
}, Dr = function() {
|
|
4672
4682
|
return e(this, Dt).find((t) => t.el.tabIndex === 0);
|
|
4673
|
-
},
|
|
4683
|
+
}, bl = function(t) {
|
|
4674
4684
|
for (const i of e(this, Dt))
|
|
4675
4685
|
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
4676
|
-
}, v(
|
|
4677
|
-
const
|
|
4678
|
-
|
|
4686
|
+
}, v(ll, "observedAttributes", [r.RENDITION_LEVELS, r.MAX_VIDEO_BITRATE]);
|
|
4687
|
+
const ml = document.createElement("template");
|
|
4688
|
+
ml.innerHTML = /* HTML */
|
|
4679
4689
|
`
|
|
4680
4690
|
<style>
|
|
4681
4691
|
:host {
|
|
@@ -4744,65 +4754,65 @@ ul.innerHTML = /* HTML */
|
|
|
4744
4754
|
<div id="scroll-area"></div>
|
|
4745
4755
|
<slot id="content"></slot>
|
|
4746
4756
|
`;
|
|
4747
|
-
var at, Mt, ut,
|
|
4748
|
-
class
|
|
4757
|
+
var at, Mt, ut, oe, li, Ms, Ue, C, fl, gl, El, Al, Os, Mr, Ei, yl, kl, Il, Ll, Or, Fr, Hr, Br;
|
|
4758
|
+
class vl extends HTMLElement {
|
|
4749
4759
|
constructor() {
|
|
4750
4760
|
super();
|
|
4751
4761
|
l(this, C);
|
|
4752
4762
|
l(this, at, null);
|
|
4753
4763
|
l(this, Mt, null);
|
|
4754
4764
|
l(this, ut, !1);
|
|
4755
|
-
l(this,
|
|
4765
|
+
l(this, oe, !1);
|
|
4756
4766
|
l(this, li, !1);
|
|
4757
|
-
l(this,
|
|
4767
|
+
l(this, Ms, () => {
|
|
4758
4768
|
this.open && (this.open = !1);
|
|
4759
4769
|
});
|
|
4760
|
-
l(this,
|
|
4770
|
+
l(this, Ue, null);
|
|
4761
4771
|
v(this, "handleEvent", (t) => {
|
|
4762
4772
|
switch (t.type) {
|
|
4763
4773
|
case "touchstart":
|
|
4764
|
-
n(this, C,
|
|
4774
|
+
n(this, C, gl).call(this, t);
|
|
4765
4775
|
break;
|
|
4766
4776
|
case "touchmove":
|
|
4767
|
-
n(this, C,
|
|
4777
|
+
n(this, C, El).call(this, t);
|
|
4768
4778
|
break;
|
|
4769
4779
|
case "touchend":
|
|
4770
|
-
n(this, C,
|
|
4780
|
+
n(this, C, Al).call(this, t);
|
|
4771
4781
|
break;
|
|
4772
4782
|
}
|
|
4773
4783
|
});
|
|
4774
|
-
l(this,
|
|
4784
|
+
l(this, Os, () => {
|
|
4775
4785
|
const t = e(this, li);
|
|
4776
4786
|
if (this.scrollTop === 0) {
|
|
4777
|
-
n(this, C,
|
|
4787
|
+
n(this, C, Fr).call(this, t);
|
|
4778
4788
|
return;
|
|
4779
4789
|
}
|
|
4780
|
-
if (!t && !n(this, C,
|
|
4781
|
-
n(this, C,
|
|
4790
|
+
if (!t && !n(this, C, Mr).call(this)) {
|
|
4791
|
+
n(this, C, Ll).call(this), n(this, C, Fr).call(this);
|
|
4782
4792
|
return;
|
|
4783
4793
|
}
|
|
4784
|
-
!this.visible && this.scrollTop > 0 && !e(this, ut) ? n(this, C,
|
|
4794
|
+
!this.visible && this.scrollTop > 0 && !e(this, ut) ? n(this, C, Hr).call(this) : !e(this, ut) && n(this, C, yl).call(this) && (this.open || (this.open = !0), t && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4785
4795
|
});
|
|
4786
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
4796
|
+
this.attachShadow({ mode: "open" }).appendChild(ml.content.cloneNode(!0));
|
|
4787
4797
|
}
|
|
4788
4798
|
connectedCallback() {
|
|
4789
|
-
var i, s,
|
|
4799
|
+
var i, s, o, u, c, m;
|
|
4790
4800
|
const t = this.getRootNode();
|
|
4791
4801
|
if (t instanceof Document || t instanceof ShadowRoot) {
|
|
4792
|
-
h(this, at, t.querySelector("vindral-controller")), (i = e(this, at)) == null || i.connectListener(this), h(this, Mt, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#scroll-area")), (
|
|
4793
|
-
const
|
|
4794
|
-
h(this, li,
|
|
4802
|
+
h(this, at, t.querySelector("vindral-controller")), (i = e(this, at)) == null || i.connectListener(this), h(this, Mt, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#scroll-area")), (o = e(this, Mt)) == null || o.addEventListener("click", e(this, Ms));
|
|
4803
|
+
const E = this.hasAttribute("touch-enabled");
|
|
4804
|
+
h(this, li, kh() && E), e(this, li) ? ((u = e(this, at)) == null || u.addEventListener("touchstart", this, { passive: !0 }), (c = e(this, at)) == null || c.addEventListener("touchmove", this, { passive: !1 }), (m = e(this, at)) == null || m.addEventListener("touchend", this, { passive: !0 })) : this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, Os));
|
|
4795
4805
|
}
|
|
4796
4806
|
}
|
|
4797
4807
|
disconnectedCallback() {
|
|
4798
|
-
var t, i, s,
|
|
4799
|
-
(t = e(this, Mt)) == null || t.removeEventListener("click", e(this,
|
|
4808
|
+
var t, i, s, o, u;
|
|
4809
|
+
(t = e(this, Mt)) == null || t.removeEventListener("click", e(this, Ms)), this.removeEventListener("scroll", e(this, Os)), (i = e(this, at)) == null || i.removeEventListener("touchstart", this), (s = e(this, at)) == null || s.removeEventListener("touchmove", this), (o = e(this, at)) == null || o.removeEventListener("touchend", this), (u = e(this, at)) == null || u.disconnectListener(this);
|
|
4800
4810
|
}
|
|
4801
4811
|
attributeChangedCallback(t, i, s) {
|
|
4802
|
-
var
|
|
4812
|
+
var o;
|
|
4803
4813
|
i !== s && (t === r.USER_INTERACTING && s === null && n(this, C, Ei).call(this) && setTimeout(() => {
|
|
4804
4814
|
this.open = !1;
|
|
4805
|
-
}, 300), t === "open" && (s !== null ? (h(this, ut, !1), this.scrollTop > 0 && n(this, C,
|
|
4815
|
+
}, 300), t === "open" && (s !== null ? (h(this, ut, !1), this.scrollTop > 0 && n(this, C, Hr).call(this), this.scrollTo({ top: (o = e(this, Mt)) == null ? void 0 : o.clientHeight, behavior: "smooth" })) : n(this, C, Or).call(this)));
|
|
4806
4816
|
}
|
|
4807
4817
|
set open(t) {
|
|
4808
4818
|
if (t) {
|
|
@@ -4810,7 +4820,7 @@ class pl extends HTMLElement {
|
|
|
4810
4820
|
return;
|
|
4811
4821
|
}
|
|
4812
4822
|
const i = this.hasAttribute("open"), s = this.visible || n(this, C, Ei).call(this);
|
|
4813
|
-
i ? this.removeAttribute("open") : s ? n(this, C,
|
|
4823
|
+
i ? this.removeAttribute("open") : s ? n(this, C, Or).call(this) : (h(this, ut, !1), this.removeAttribute("snap-touch"));
|
|
4814
4824
|
}
|
|
4815
4825
|
get open() {
|
|
4816
4826
|
return this.hasAttribute("open");
|
|
@@ -4822,46 +4832,46 @@ class pl extends HTMLElement {
|
|
|
4822
4832
|
return this.hasAttribute("visible");
|
|
4823
4833
|
}
|
|
4824
4834
|
}
|
|
4825
|
-
at = new WeakMap(), Mt = new WeakMap(), ut = new WeakMap(),
|
|
4826
|
-
return n(this, C,
|
|
4827
|
-
},
|
|
4835
|
+
at = new WeakMap(), Mt = new WeakMap(), ut = new WeakMap(), oe = new WeakMap(), li = new WeakMap(), Ms = new WeakMap(), Ue = new WeakMap(), C = new WeakSet(), fl = function() {
|
|
4836
|
+
return n(this, C, Mr).call(this) || n(this, C, Il).call(this) || n(this, C, Ei).call(this);
|
|
4837
|
+
}, gl = function(t) {
|
|
4828
4838
|
const i = t.touches[0];
|
|
4829
|
-
i && (h(this,
|
|
4830
|
-
},
|
|
4831
|
-
if (!(!e(this,
|
|
4832
|
-
const i = t.touches[0].clientY, s = e(this,
|
|
4839
|
+
i && (h(this, oe, n(this, C, fl).call(this)), e(this, oe) && (h(this, ut, !1), h(this, Ue, i.clientY)));
|
|
4840
|
+
}, El = function(t) {
|
|
4841
|
+
if (!(!e(this, oe) || e(this, Ue) === null || this.hasAttribute("snap-touch") && this.open) && (t.preventDefault(), t.touches[0])) {
|
|
4842
|
+
const i = t.touches[0].clientY, s = e(this, Ue) - i;
|
|
4833
4843
|
this.scrollTop = Math.max(0, s);
|
|
4834
4844
|
}
|
|
4835
|
-
},
|
|
4836
|
-
e(this,
|
|
4837
|
-
},
|
|
4845
|
+
}, Al = function(t) {
|
|
4846
|
+
e(this, oe) && !e(this, ut) && n(this, C, Ei).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), h(this, Ue, null), h(this, oe, !1);
|
|
4847
|
+
}, Os = new WeakMap(), Mr = function() {
|
|
4838
4848
|
return this.hasAttribute(r.USER_INTERACTING);
|
|
4839
4849
|
}, Ei = function() {
|
|
4840
4850
|
return this.scrollTop > 0;
|
|
4841
|
-
},
|
|
4851
|
+
}, yl = function() {
|
|
4842
4852
|
var t;
|
|
4843
4853
|
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, Mt)) == null ? void 0 : t.clientHeight);
|
|
4844
|
-
},
|
|
4854
|
+
}, kl = function() {
|
|
4845
4855
|
var i;
|
|
4846
4856
|
const t = (i = e(this, Mt)) == null ? void 0 : i.clientHeight;
|
|
4847
4857
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4848
|
-
},
|
|
4858
|
+
}, Il = function() {
|
|
4849
4859
|
const t = getComputedStyle(this), i = Number.parseFloat(t.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4850
|
-
return Number.isNaN(i) ? n(this, C,
|
|
4851
|
-
},
|
|
4860
|
+
return Number.isNaN(i) ? n(this, C, kl).call(this) > 0 : i > 0;
|
|
4861
|
+
}, Ll = function() {
|
|
4852
4862
|
const t = this.style.scrollBehavior;
|
|
4853
4863
|
this.style.scrollBehavior = "auto", this.scrollTo({ top: 0, behavior: "auto" }), this.style.scrollBehavior = t;
|
|
4854
|
-
},
|
|
4855
|
-
h(this, ut, !0), this.removeAttribute("snap-touch"), n(this, C,
|
|
4856
|
-
},
|
|
4857
|
-
this.open = !1, t && this.removeAttribute("snap-touch"), h(this, ut, !1), n(this, C,
|
|
4858
|
-
}, Fr = function() {
|
|
4859
|
-
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(y.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
4864
|
+
}, Or = function() {
|
|
4865
|
+
h(this, ut, !0), this.removeAttribute("snap-touch"), n(this, C, Br).call(this), this.scrollTo({ top: 0, behavior: "smooth" });
|
|
4866
|
+
}, Fr = function(t = !1) {
|
|
4867
|
+
this.open = !1, t && this.removeAttribute("snap-touch"), h(this, ut, !1), n(this, C, Br).call(this);
|
|
4860
4868
|
}, Hr = function() {
|
|
4869
|
+
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(y.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
4870
|
+
}, Br = function() {
|
|
4861
4871
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(y.UNLOCK_UI, { bubbles: !0, composed: !0 })));
|
|
4862
|
-
}, v(
|
|
4863
|
-
const
|
|
4864
|
-
|
|
4872
|
+
}, v(vl, "observedAttributes", [r.USER_INTERACTING, "open", "touch-enabled"]);
|
|
4873
|
+
const Tl = document.createElement("template");
|
|
4874
|
+
Tl.innerHTML = /* HTML */
|
|
4865
4875
|
`
|
|
4866
4876
|
<style>
|
|
4867
4877
|
:host {
|
|
@@ -4921,8 +4931,8 @@ kl.innerHTML = /* HTML */
|
|
|
4921
4931
|
<div id="hover-preview"></div>
|
|
4922
4932
|
<div id="time-tooltip"></div>
|
|
4923
4933
|
`;
|
|
4924
|
-
var P, It, Ot, pt, Ft,
|
|
4925
|
-
class
|
|
4934
|
+
var P, It, Ot, pt, Ft, le, he, Ht, I, hn, zr, fe, Oe, Fs, Hs, Pe, Bs, zs, $r, Gr, Kr, qr, wl, Vr, ge, dn, $s;
|
|
4935
|
+
class Sl extends Ui {
|
|
4926
4936
|
constructor() {
|
|
4927
4937
|
var t, i, s;
|
|
4928
4938
|
super();
|
|
@@ -4932,25 +4942,25 @@ class Il extends Ui {
|
|
|
4932
4942
|
l(this, Ot);
|
|
4933
4943
|
l(this, pt, !1);
|
|
4934
4944
|
l(this, Ft, null);
|
|
4935
|
-
l(this,
|
|
4936
|
-
l(this,
|
|
4945
|
+
l(this, le, null);
|
|
4946
|
+
l(this, he, !1);
|
|
4937
4947
|
l(this, Ht, !1);
|
|
4938
|
-
l(this,
|
|
4939
|
-
if (!n(this, I,
|
|
4948
|
+
l(this, Fs, (t) => {
|
|
4949
|
+
if (!n(this, I, zr).call(this) || n(this, I, fe).call(this)) {
|
|
4940
4950
|
t.preventDefault();
|
|
4941
4951
|
return;
|
|
4942
4952
|
}
|
|
4943
|
-
h(this, pt, !0), h(this,
|
|
4953
|
+
h(this, pt, !0), h(this, le, t.pointerId);
|
|
4944
4954
|
try {
|
|
4945
4955
|
this.setPointerCapture(t.pointerId);
|
|
4946
4956
|
} catch (i) {
|
|
4947
4957
|
}
|
|
4948
|
-
n(this, I,
|
|
4958
|
+
n(this, I, Gr).call(this, t);
|
|
4949
4959
|
});
|
|
4950
|
-
l(this,
|
|
4951
|
-
if (!(!n(this, I,
|
|
4952
|
-
if (e(this, Ft) && (cancelAnimationFrame(e(this, Ft)), h(this, Ft, null)), e(this, pt) && t.pointerId === e(this,
|
|
4953
|
-
t.preventDefault(), n(this, I,
|
|
4960
|
+
l(this, Hs, (t) => {
|
|
4961
|
+
if (!(!n(this, I, zr).call(this) || n(this, I, fe).call(this))) {
|
|
4962
|
+
if (e(this, Ft) && (cancelAnimationFrame(e(this, Ft)), h(this, Ft, null)), e(this, pt) && t.pointerId === e(this, le)) {
|
|
4963
|
+
t.preventDefault(), n(this, I, Gr).call(this, t);
|
|
4954
4964
|
return;
|
|
4955
4965
|
}
|
|
4956
4966
|
h(this, Ft, requestAnimationFrame(() => {
|
|
@@ -4958,87 +4968,87 @@ class Il extends Ui {
|
|
|
4958
4968
|
e(this, Ot).style.opacity = "0", h(this, Ft, null);
|
|
4959
4969
|
return;
|
|
4960
4970
|
}
|
|
4961
|
-
const i = n(this, I,
|
|
4971
|
+
const i = n(this, I, $r).call(this, t.clientX);
|
|
4962
4972
|
if (n(this, I, qr).call(this, i, t.clientX), i > this.range.valueAsNumber) {
|
|
4963
|
-
const s = this.range.valueAsNumber * 100,
|
|
4964
|
-
e(this, Ot).style.transform = `translateX(${s}%) scaleX(${
|
|
4973
|
+
const s = this.range.valueAsNumber * 100, o = (i - this.range.valueAsNumber) * 100;
|
|
4974
|
+
e(this, Ot).style.transform = `translateX(${s}%) scaleX(${o / 100})`, e(this, Ot).style.opacity = "1";
|
|
4965
4975
|
} else
|
|
4966
4976
|
e(this, Ot).style.opacity = "0";
|
|
4967
4977
|
h(this, Ft, null);
|
|
4968
4978
|
}));
|
|
4969
4979
|
}
|
|
4970
4980
|
});
|
|
4971
|
-
l(this,
|
|
4972
|
-
if (t.pointerId === e(this,
|
|
4981
|
+
l(this, Pe, (t) => {
|
|
4982
|
+
if (t.pointerId === e(this, le)) {
|
|
4973
4983
|
try {
|
|
4974
4984
|
this.releasePointerCapture(t.pointerId);
|
|
4975
4985
|
} catch (i) {
|
|
4976
4986
|
}
|
|
4977
|
-
h(this, pt, !1), h(this,
|
|
4987
|
+
h(this, pt, !1), h(this, le, null), t.pointerType !== "mouse" && (e(this, It).style.opacity = "0"), e(this, Ht) && n(this, I, ge).call(this) && (h(this, he, !1), h(this, Ht, !1));
|
|
4978
4988
|
}
|
|
4979
4989
|
});
|
|
4980
|
-
l(this, Hs, () => {
|
|
4981
|
-
this.duration && !n(this, I, ve).call(this) && (e(this, It).style.opacity = "1");
|
|
4982
|
-
});
|
|
4983
4990
|
l(this, Bs, () => {
|
|
4991
|
+
this.duration && !n(this, I, fe).call(this) && (e(this, It).style.opacity = "1");
|
|
4992
|
+
});
|
|
4993
|
+
l(this, zs, () => {
|
|
4984
4994
|
e(this, It).style.opacity = "0", e(this, Ot).style.opacity = "0";
|
|
4985
4995
|
});
|
|
4986
|
-
l(this,
|
|
4987
|
-
if (n(this, I,
|
|
4996
|
+
l(this, $s, (t) => {
|
|
4997
|
+
if (n(this, I, fe).call(this) || !e(this, P) || e(this, P) <= 0 || !isFinite(e(this, P)))
|
|
4988
4998
|
return;
|
|
4989
|
-
const i = n(this, I,
|
|
4999
|
+
const i = n(this, I, hn).call(this);
|
|
4990
5000
|
if (i <= 0) return;
|
|
4991
5001
|
const s = this.range.valueAsNumber * i;
|
|
4992
|
-
let
|
|
5002
|
+
let o = s;
|
|
4993
5003
|
const u = 5;
|
|
4994
5004
|
switch (t.preventDefault(), t.key) {
|
|
4995
5005
|
case "ArrowLeft":
|
|
4996
|
-
|
|
5006
|
+
o = Math.max(0, s - u);
|
|
4997
5007
|
break;
|
|
4998
5008
|
case "ArrowRight":
|
|
4999
|
-
if (n(this, I,
|
|
5009
|
+
if (n(this, I, ge).call(this))
|
|
5000
5010
|
return;
|
|
5001
|
-
|
|
5011
|
+
o = Math.min(i, s + u);
|
|
5002
5012
|
break;
|
|
5003
5013
|
case "Home":
|
|
5004
|
-
|
|
5014
|
+
o = 0;
|
|
5005
5015
|
break;
|
|
5006
5016
|
case "End":
|
|
5007
|
-
if (n(this, I,
|
|
5017
|
+
if (n(this, I, ge).call(this))
|
|
5008
5018
|
return;
|
|
5009
|
-
|
|
5019
|
+
o = i;
|
|
5010
5020
|
break;
|
|
5011
5021
|
default:
|
|
5012
5022
|
return;
|
|
5013
5023
|
}
|
|
5014
|
-
const c = Math.min(
|
|
5015
|
-
n(this, I,
|
|
5024
|
+
const c = Math.min(o / i, 1);
|
|
5025
|
+
n(this, I, Kr).call(this, c);
|
|
5016
5026
|
});
|
|
5017
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
5027
|
+
(t = this.shadowRoot) == null || t.appendChild(Tl.content.cloneNode(!0)), h(this, It, (i = this.shadowRoot) == null ? void 0 : i.getElementById("time-tooltip")), h(this, Ot, (s = this.shadowRoot) == null ? void 0 : s.getElementById("hover-preview")), this.addEventListener("pointerdown", e(this, Fs)), this.addEventListener("pointermove", e(this, Hs)), this.addEventListener("pointerup", e(this, Pe)), this.addEventListener("pointercancel", e(this, Pe)), this.addEventListener("mouseenter", e(this, Bs)), this.addEventListener("mouseleave", e(this, zs));
|
|
5018
5028
|
}
|
|
5019
5029
|
connectedCallback() {
|
|
5020
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), n(this, I,
|
|
5030
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), n(this, I, Oe).call(this), this.addEventListener("keydown", e(this, $s)), n(this, I, ge).call(this) && (this.range.value = "1", n(this, I, Oe).call(this));
|
|
5021
5031
|
}
|
|
5022
5032
|
disconnectedCallback() {
|
|
5023
|
-
super.disconnectedCallback(), this.removeEventListener("pointerdown", e(this,
|
|
5033
|
+
super.disconnectedCallback(), this.removeEventListener("pointerdown", e(this, Fs)), this.removeEventListener("pointermove", e(this, Hs)), this.removeEventListener("pointerup", e(this, Pe)), this.removeEventListener("pointercancel", e(this, Pe)), this.removeEventListener("mouseenter", e(this, Bs)), this.removeEventListener("mouseleave", e(this, zs)), this.removeEventListener("keydown", e(this, $s)), h(this, le, null);
|
|
5024
5034
|
}
|
|
5025
5035
|
attributeChangedCallback(t, i, s) {
|
|
5026
5036
|
if (super.attributeChangedCallback(t, i, s), i !== s)
|
|
5027
5037
|
switch (t) {
|
|
5028
5038
|
case r.TIMESHIFT_POSITION:
|
|
5029
|
-
if (n(this, I,
|
|
5030
|
-
e(this, pt) ? h(this, Ht, !0) : (h(this,
|
|
5039
|
+
if (n(this, I, ge).call(this)) {
|
|
5040
|
+
e(this, pt) ? h(this, Ht, !0) : (h(this, he, !1), h(this, Ht, !1)), this.range.value = "1", n(this, I, Oe).call(this);
|
|
5031
5041
|
return;
|
|
5032
5042
|
}
|
|
5033
5043
|
if (e(this, P)) {
|
|
5034
5044
|
h(this, Ht, !1);
|
|
5035
|
-
const
|
|
5036
|
-
this.range.value =
|
|
5045
|
+
const o = Math.max(parseFloat(s) / e(this, P), 0);
|
|
5046
|
+
this.range.value = o.toString(), n(this, I, Oe).call(this);
|
|
5037
5047
|
}
|
|
5038
5048
|
break;
|
|
5039
5049
|
case r.DURATION: {
|
|
5040
|
-
const
|
|
5041
|
-
h(this, P,
|
|
5050
|
+
const o = parseFloat(s) || 0;
|
|
5051
|
+
h(this, P, o), n(this, I, Oe).call(this);
|
|
5042
5052
|
break;
|
|
5043
5053
|
}
|
|
5044
5054
|
}
|
|
@@ -5053,37 +5063,37 @@ class Il extends Ui {
|
|
|
5053
5063
|
this.setAttribute(r.DURATION, t.toString());
|
|
5054
5064
|
}
|
|
5055
5065
|
}
|
|
5056
|
-
P = new WeakMap(), It = new WeakMap(), Ot = new WeakMap(), pt = new WeakMap(), Ft = new WeakMap(),
|
|
5066
|
+
P = new WeakMap(), It = new WeakMap(), Ot = new WeakMap(), pt = new WeakMap(), Ft = new WeakMap(), le = new WeakMap(), he = new WeakMap(), Ht = new WeakMap(), I = new WeakSet(), hn = function() {
|
|
5057
5067
|
return e(this, P) ? e(this, P) : 1;
|
|
5058
|
-
},
|
|
5068
|
+
}, zr = function() {
|
|
5059
5069
|
return !!e(this, P) && e(this, P) > 0 && isFinite(e(this, P));
|
|
5060
|
-
},
|
|
5061
|
-
return e(this,
|
|
5062
|
-
},
|
|
5063
|
-
const t = n(this, I,
|
|
5070
|
+
}, fe = function() {
|
|
5071
|
+
return e(this, he);
|
|
5072
|
+
}, Oe = function() {
|
|
5073
|
+
const t = n(this, I, hn).call(this);
|
|
5064
5074
|
!e(this, P) || e(this, P) <= 0 || !isFinite(e(this, P)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), e(this, pt) || (this.updateBar(), this.setAttribute(
|
|
5065
5075
|
"aria-valuetext",
|
|
5066
|
-
`${n(this, I,
|
|
5067
|
-
), !e(this, pt) && !n(this, I,
|
|
5068
|
-
},
|
|
5076
|
+
`${n(this, I, dn).call(this, this.range.valueAsNumber * t)} of ${n(this, I, dn).call(this, t)}`
|
|
5077
|
+
), !e(this, pt) && !n(this, I, fe).call(this) && n(this, I, Vr).call(this, this.range.valueAsNumber));
|
|
5078
|
+
}, Fs = new WeakMap(), Hs = new WeakMap(), Pe = new WeakMap(), Bs = new WeakMap(), zs = new WeakMap(), $r = function(t) {
|
|
5069
5079
|
const i = this.getBoundingClientRect(), s = (t - i.left) / i.width;
|
|
5070
5080
|
return Math.max(0, Math.min(1, s));
|
|
5071
|
-
}, $r = function(t) {
|
|
5072
|
-
const i = n(this, I, zr).call(this, t.clientX);
|
|
5073
|
-
n(this, I, qr).call(this, i, t.clientX), e(this, pt) || (e(this, It).style.opacity = "1"), n(this, I, Gr).call(this, i);
|
|
5074
5081
|
}, Gr = function(t) {
|
|
5075
|
-
|
|
5082
|
+
const i = n(this, I, $r).call(this, t.clientX);
|
|
5083
|
+
n(this, I, qr).call(this, i, t.clientX), e(this, pt) || (e(this, It).style.opacity = "1"), n(this, I, Kr).call(this, i);
|
|
5084
|
+
}, Kr = function(t) {
|
|
5085
|
+
if (n(this, I, fe).call(this) || n(this, I, Vr).call(this, t))
|
|
5076
5086
|
return;
|
|
5077
|
-
const i = n(this, I,
|
|
5078
|
-
this.range.value = t.toString(), this.updateBar(), n(this, I,
|
|
5087
|
+
const i = n(this, I, hn).call(this), s = t * i;
|
|
5088
|
+
this.range.value = t.toString(), this.updateBar(), n(this, I, wl).call(this, s);
|
|
5079
5089
|
}, qr = function(t, i) {
|
|
5080
5090
|
if (!e(this, P) || !isFinite(e(this, P)))
|
|
5081
5091
|
return;
|
|
5082
|
-
const s = t * e(this, P),
|
|
5083
|
-
e(this, It).textContent = `-${n(this, I,
|
|
5092
|
+
const s = t * e(this, P), o = e(this, P) - s;
|
|
5093
|
+
e(this, It).textContent = `-${n(this, I, dn).call(this, o)}`;
|
|
5084
5094
|
const u = this.getBoundingClientRect(), c = (i - u.left) / u.width * 100;
|
|
5085
5095
|
e(this, It).style.left = `${Math.min(Math.max(c, 2), 98)}%`;
|
|
5086
|
-
},
|
|
5096
|
+
}, wl = function(t) {
|
|
5087
5097
|
this.dispatchEvent(
|
|
5088
5098
|
new CustomEvent("seek", {
|
|
5089
5099
|
bubbles: !0,
|
|
@@ -5091,30 +5101,30 @@ P = new WeakMap(), It = new WeakMap(), Ot = new WeakMap(), pt = new WeakMap(), F
|
|
|
5091
5101
|
detail: t
|
|
5092
5102
|
})
|
|
5093
5103
|
);
|
|
5094
|
-
},
|
|
5095
|
-
return e(this,
|
|
5096
|
-
},
|
|
5104
|
+
}, Vr = function(t) {
|
|
5105
|
+
return e(this, he) || n(this, I, ge).call(this) || t < 0.999 ? !1 : (h(this, he, !0), h(this, Ht, !1), this.dispatchEvent(new CustomEvent(y.GO_LIVE, { bubbles: !0, composed: !0 })), !0);
|
|
5106
|
+
}, ge = function() {
|
|
5097
5107
|
return !this.hasAttribute(r.TIMESHIFT_POSITION);
|
|
5098
|
-
},
|
|
5099
|
-
const i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60),
|
|
5100
|
-
return e(this, P) && e(this, P) >= 3600 ? `${i}:${s.toString().padStart(2, "0")}:${
|
|
5101
|
-
},
|
|
5108
|
+
}, dn = function(t) {
|
|
5109
|
+
const i = Math.floor(t / 3600), s = Math.floor(t % 3600 / 60), o = Math.floor(t % 60);
|
|
5110
|
+
return e(this, P) && e(this, P) >= 3600 ? `${i}:${s.toString().padStart(2, "0")}:${o.toString().padStart(2, "0")}` : `${s}:${o.toString().padStart(2, "0")}`;
|
|
5111
|
+
}, $s = new WeakMap(), v(Sl, "observedAttributes", [
|
|
5102
5112
|
...Ui.observedAttributes,
|
|
5103
5113
|
r.TIMESHIFT_POSITION,
|
|
5104
5114
|
r.DURATION
|
|
5105
5115
|
]);
|
|
5106
|
-
const
|
|
5116
|
+
const Cl = document.createElement("template"), ad = (
|
|
5107
5117
|
/* SVG */
|
|
5108
5118
|
`
|
|
5109
5119
|
<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>
|
|
5110
5120
|
`
|
|
5111
|
-
),
|
|
5121
|
+
), od = (
|
|
5112
5122
|
/* SVG */
|
|
5113
5123
|
`
|
|
5114
5124
|
<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>
|
|
5115
5125
|
`
|
|
5116
5126
|
);
|
|
5117
|
-
|
|
5127
|
+
Cl.innerHTML = /* HTML */
|
|
5118
5128
|
`
|
|
5119
5129
|
<style>
|
|
5120
5130
|
:host {
|
|
@@ -5167,35 +5177,35 @@ wl.innerHTML = /* HTML */
|
|
|
5167
5177
|
</style>
|
|
5168
5178
|
|
|
5169
5179
|
<slot name="icon">
|
|
5170
|
-
<slot name="play">${
|
|
5171
|
-
<slot name="unmute">${
|
|
5180
|
+
<slot name="play">${ad}</slot>
|
|
5181
|
+
<slot name="unmute">${od}</slot>
|
|
5172
5182
|
</slot>
|
|
5173
5183
|
`;
|
|
5174
|
-
var hi,
|
|
5175
|
-
class
|
|
5184
|
+
var hi, Gs, De, Ks;
|
|
5185
|
+
class xl extends HTMLElement {
|
|
5176
5186
|
constructor() {
|
|
5177
5187
|
super();
|
|
5178
5188
|
l(this, hi, null);
|
|
5179
|
-
l(this,
|
|
5189
|
+
l(this, Gs, () => {
|
|
5180
5190
|
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
5181
5191
|
});
|
|
5182
|
-
l(this,
|
|
5192
|
+
l(this, De, (t) => {
|
|
5183
5193
|
const { key: i } = t;
|
|
5184
5194
|
if (!this.keysUsed.includes(i)) {
|
|
5185
|
-
this.removeEventListener("keyup", e(this,
|
|
5195
|
+
this.removeEventListener("keyup", e(this, De));
|
|
5186
5196
|
return;
|
|
5187
5197
|
}
|
|
5188
5198
|
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
5189
5199
|
});
|
|
5190
|
-
l(this,
|
|
5191
|
-
const { metaKey: i, altKey: s, key:
|
|
5192
|
-
if (i || s || !this.keysUsed.includes(
|
|
5193
|
-
this.removeEventListener("keyup", e(this,
|
|
5200
|
+
l(this, Ks, (t) => {
|
|
5201
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
5202
|
+
if (i || s || !this.keysUsed.includes(o)) {
|
|
5203
|
+
this.removeEventListener("keyup", e(this, De));
|
|
5194
5204
|
return;
|
|
5195
5205
|
}
|
|
5196
|
-
this.addEventListener("keyup", e(this,
|
|
5206
|
+
this.addEventListener("keyup", e(this, De), { once: !0 });
|
|
5197
5207
|
});
|
|
5198
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
5208
|
+
this.attachShadow({ mode: "open" }).appendChild(Cl.content.cloneNode(!0));
|
|
5199
5209
|
}
|
|
5200
5210
|
get keysUsed() {
|
|
5201
5211
|
return ["Enter", " "];
|
|
@@ -5205,24 +5215,24 @@ class Sl extends HTMLElement {
|
|
|
5205
5215
|
h(this, hi, this.closest("vindral-controller")), (t = e(this, hi)) == null || t.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
5206
5216
|
}
|
|
5207
5217
|
enable() {
|
|
5208
|
-
this.addEventListener("click", e(this,
|
|
5218
|
+
this.addEventListener("click", e(this, Gs)), this.addEventListener("keydown", e(this, Ks)), this.tabIndex = 0;
|
|
5209
5219
|
}
|
|
5210
5220
|
disable() {
|
|
5211
|
-
this.removeEventListener("click", e(this,
|
|
5221
|
+
this.removeEventListener("click", e(this, Gs)), this.removeEventListener("keydown", e(this, Ks)), this.removeEventListener("keyup", e(this, De)), this.tabIndex = -1;
|
|
5212
5222
|
}
|
|
5213
5223
|
disconnectedCallback() {
|
|
5214
5224
|
var t;
|
|
5215
5225
|
(t = e(this, hi)) == null || t.disconnectListener(this), this.disable();
|
|
5216
5226
|
}
|
|
5217
5227
|
}
|
|
5218
|
-
hi = new WeakMap(),
|
|
5228
|
+
hi = new WeakMap(), Gs = new WeakMap(), De = new WeakMap(), Ks = new WeakMap(), v(xl, "observedAttributes", [
|
|
5219
5229
|
"hidden",
|
|
5220
5230
|
r.NEEDS_USER_INPUT_VIDEO,
|
|
5221
5231
|
r.NEEDS_USER_INPUT_AUDIO,
|
|
5222
5232
|
r.PAUSED
|
|
5223
5233
|
]);
|
|
5224
|
-
const
|
|
5225
|
-
|
|
5234
|
+
const Nl = document.createElement("template");
|
|
5235
|
+
Nl.innerHTML = /* HTML */
|
|
5226
5236
|
`
|
|
5227
5237
|
<style>
|
|
5228
5238
|
:host,
|
|
@@ -5310,32 +5320,32 @@ Tl.innerHTML = /* HTML */
|
|
|
5310
5320
|
<p id="description"></p>
|
|
5311
5321
|
</div>
|
|
5312
5322
|
`;
|
|
5313
|
-
var qs,
|
|
5314
|
-
class
|
|
5323
|
+
var qs, Vs, Xs;
|
|
5324
|
+
class Rl extends HTMLElement {
|
|
5315
5325
|
constructor() {
|
|
5316
5326
|
super();
|
|
5317
5327
|
l(this, qs);
|
|
5318
|
-
l(this, Ks);
|
|
5319
5328
|
l(this, Vs);
|
|
5329
|
+
l(this, Xs);
|
|
5320
5330
|
const t = this.attachShadow({ mode: "open" });
|
|
5321
|
-
t.appendChild(
|
|
5331
|
+
t.appendChild(Nl.content.cloneNode(!0)), h(this, qs, t.querySelector("#title")), h(this, Vs, t.querySelector("#description")), h(this, Xs, t.querySelector("#background"));
|
|
5322
5332
|
}
|
|
5323
5333
|
connectedCallback() {
|
|
5324
5334
|
}
|
|
5325
5335
|
disconnectedCallback() {
|
|
5326
5336
|
}
|
|
5327
5337
|
attributeChangedCallback(t, i, s) {
|
|
5328
|
-
i !== s && (t === "title" ? e(this, qs).textContent = s : t === "description" ? e(this,
|
|
5338
|
+
i !== s && (t === "title" ? e(this, qs).textContent = s : t === "description" ? e(this, Vs).textContent = s : t === "background-image" && (e(this, Xs).style.backgroundImage = `url(${s})`));
|
|
5329
5339
|
}
|
|
5330
5340
|
}
|
|
5331
|
-
qs = new WeakMap(),
|
|
5332
|
-
const
|
|
5341
|
+
qs = new WeakMap(), Vs = new WeakMap(), Xs = new WeakMap(), v(Rl, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
5342
|
+
const _l = document.createElement("template"), ld = (
|
|
5333
5343
|
/* SVG */
|
|
5334
5344
|
`
|
|
5335
5345
|
<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>
|
|
5336
5346
|
`
|
|
5337
5347
|
);
|
|
5338
|
-
|
|
5348
|
+
_l.innerHTML = /* HTML */
|
|
5339
5349
|
`
|
|
5340
5350
|
<style>
|
|
5341
5351
|
:host {
|
|
@@ -5385,14 +5395,14 @@ xl.innerHTML = /* HTML */
|
|
|
5385
5395
|
}
|
|
5386
5396
|
</style>
|
|
5387
5397
|
|
|
5388
|
-
<slot id="play" name="icon">${
|
|
5398
|
+
<slot id="play" name="icon">${ld}</slot>
|
|
5389
5399
|
`;
|
|
5390
5400
|
var di;
|
|
5391
|
-
class
|
|
5401
|
+
class Ul extends HTMLElement {
|
|
5392
5402
|
constructor() {
|
|
5393
5403
|
super();
|
|
5394
5404
|
l(this, di, null);
|
|
5395
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
5405
|
+
this.attachShadow({ mode: "open" }).appendChild(_l.content.cloneNode(!0));
|
|
5396
5406
|
}
|
|
5397
5407
|
connectedCallback() {
|
|
5398
5408
|
var t;
|
|
@@ -5406,9 +5416,9 @@ class Nl extends HTMLElement {
|
|
|
5406
5416
|
i !== s && t === "hidden" && !U(s) && this.focus();
|
|
5407
5417
|
}
|
|
5408
5418
|
}
|
|
5409
|
-
di = new WeakMap(), v(
|
|
5410
|
-
const
|
|
5411
|
-
|
|
5419
|
+
di = new WeakMap(), v(Ul, "observedAttributes", ["hidden"]);
|
|
5420
|
+
const Pl = document.createElement("template");
|
|
5421
|
+
Pl.innerHTML = /* HTML */
|
|
5412
5422
|
`
|
|
5413
5423
|
<style>
|
|
5414
5424
|
:host {
|
|
@@ -5427,26 +5437,26 @@ Rl.innerHTML = /* HTML */
|
|
|
5427
5437
|
}
|
|
5428
5438
|
</style>
|
|
5429
5439
|
`;
|
|
5430
|
-
const
|
|
5431
|
-
var
|
|
5440
|
+
const hd = (p) => `${Math.round(p * 100)}%`;
|
|
5441
|
+
var js;
|
|
5432
5442
|
const _i = class _i extends Ui {
|
|
5433
5443
|
constructor() {
|
|
5434
5444
|
var t;
|
|
5435
5445
|
super();
|
|
5436
|
-
l(this,
|
|
5446
|
+
l(this, js, () => {
|
|
5437
5447
|
const t = this.range.valueAsNumber;
|
|
5438
5448
|
this.dispatchEvent(new CustomEvent(y.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
5439
5449
|
});
|
|
5440
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
5450
|
+
(t = this.shadowRoot) == null || t.appendChild(Pl.content.cloneNode(!0));
|
|
5441
5451
|
}
|
|
5442
5452
|
connectedCallback() {
|
|
5443
|
-
super.connectedCallback(), this.range.addEventListener("input", e(this,
|
|
5453
|
+
super.connectedCallback(), this.range.addEventListener("input", e(this, js)), this.range.setAttribute("aria-label", "volume");
|
|
5444
5454
|
}
|
|
5445
5455
|
disconnectedCallback() {
|
|
5446
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", e(this,
|
|
5456
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, js));
|
|
5447
5457
|
}
|
|
5448
5458
|
attributeChangedCallback(t, i, s) {
|
|
5449
|
-
super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
5459
|
+
super.attributeChangedCallback(t, i, s), (t === r.MUTED || t === r.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", hd(this.range.valueAsNumber)), this.updateBar());
|
|
5450
5460
|
}
|
|
5451
5461
|
get volume() {
|
|
5452
5462
|
var t;
|
|
@@ -5456,11 +5466,11 @@ const _i = class _i extends Ui {
|
|
|
5456
5466
|
return this.hasAttribute(r.MUTED);
|
|
5457
5467
|
}
|
|
5458
5468
|
};
|
|
5459
|
-
|
|
5460
|
-
let
|
|
5461
|
-
function
|
|
5462
|
-
customElements.define("vindral-controller", Pi), customElements.define("vindral-control-bar",
|
|
5469
|
+
js = new WeakMap(), v(_i, "observedAttributes", [...W(_i, _i, "observedAttributes"), r.MUTED, r.VOLUME]);
|
|
5470
|
+
let Xr = _i;
|
|
5471
|
+
function md() {
|
|
5472
|
+
customElements.define("vindral-controller", Pi), customElements.define("vindral-control-bar", co), customElements.define("vindral-advanced-rendition-menu", $n), customElements.define("vindral-advanced-rendition-menu-list", Ia), customElements.define("vindral-play-button", Tr), customElements.define("vindral-mute-button", Ir), customElements.define("vindral-buffering-overlay", Oa), customElements.define("vindral-scroll-overlay", vl), customElements.define("vindral-play-overlay", Ul), customElements.define("vindral-user-input-play-overlay", xl), customElements.define("vindral-fullscreen-button", mr), customElements.define("vindral-rendition-levels-menu", Rr), customElements.define("vindral-rendition-levels-menu-list", ll), customElements.define("vindral-channel-grid-button", Wn), customElements.define("vindral-channel-grid", qa), customElements.define("vindral-channel-grid-item", jr), customElements.define("vindral-pip-button", Lr), customElements.define("vindral-airplay-button", Bn), customElements.define("vindral-cast-button", Vn), customElements.define("vindral-cast-overlay", za), customElements.define("vindral-buffering-icon", Da), customElements.define("vindral-language-menu", vr), customElements.define("vindral-language-menu-list", zo), customElements.define("vindral-message", Rl), customElements.define("vindral-volume-range", Xr), customElements.define("vindral-poster-overlay", nl), customElements.define("vindral-player", tl), customElements.define("vindral-seek-bar", Sl), customElements.define("vindral-live-button", kr);
|
|
5463
5473
|
}
|
|
5464
5474
|
export {
|
|
5465
|
-
|
|
5475
|
+
md as registerComponents
|
|
5466
5476
|
};
|