@vindral/web-sdk 4.0.0 → 4.1.0-2-gc61db412
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/{BzSm3HsC.js → 2L0DSQOb.js} +1 -1
- package/{BTxJOjm9.js → Bx7s5QdT.js} +3 -0
- package/{C291RiDK.js → DVUAErme.js} +1 -1
- package/Ds9gK5k6.js +11797 -0
- package/api-client.d.ts +121 -42
- package/api-client.js +1 -1
- package/cast-sender.d.ts +34 -6
- package/cast-sender.js +1 -1
- package/core.d.ts +489 -345
- package/core.js +4 -5
- package/hRzek83o.js +234 -0
- package/legacy.d.ts +499 -355
- package/legacy.es.js +10199 -4366
- package/legacy.umd.js +9 -8
- package/package.json +5 -1
- package/player.d.ts +596 -354
- package/player.js +2078 -1421
- package/react.d.ts +1855 -0
- package/react.js +1 -0
- package/style.css +1 -1
- package/B7jz034g.js +0 -147
- package/DwDXQwR0.js +0 -6037
package/player.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var Br = Object.defineProperty;
|
|
2
|
+
var Kr = Object.getPrototypeOf;
|
|
3
|
+
var qr = Reflect.get;
|
|
4
|
+
var Fs = (d) => {
|
|
5
5
|
throw TypeError(d);
|
|
6
6
|
};
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var e = (d,
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
7
|
+
var Xr = (d, a, t) => a in d ? Br(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
|
|
8
|
+
var m = (d, a, t) => Xr(d, typeof a != "symbol" ? a + "" : a, t), Hi = (d, a, t) => a.has(d) || Fs("Cannot " + t);
|
|
9
|
+
var e = (d, a, t) => (Hi(d, a, "read from private field"), t ? t.call(d) : a.get(d)), l = (d, a, t) => a.has(d) ? Fs("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(d) : a.set(d, t), c = (d, a, t, i) => (Hi(d, a, "write to private field"), i ? i.call(d, t) : a.set(d, t), t), r = (d, a, t) => (Hi(d, a, "access private method"), t);
|
|
10
|
+
var q = (d, a, t) => qr(Kr(d), t, a);
|
|
11
|
+
var G = (d, a, t) => new Promise((i, s) => {
|
|
12
|
+
var o = (v) => {
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
} catch (
|
|
16
|
-
|
|
14
|
+
u(t.next(v));
|
|
15
|
+
} catch (g) {
|
|
16
|
+
s(g);
|
|
17
17
|
}
|
|
18
|
-
},
|
|
18
|
+
}, p = (v) => {
|
|
19
19
|
try {
|
|
20
|
-
|
|
21
|
-
} catch (
|
|
22
|
-
|
|
20
|
+
u(t.throw(v));
|
|
21
|
+
} catch (g) {
|
|
22
|
+
s(g);
|
|
23
23
|
}
|
|
24
|
-
},
|
|
25
|
-
|
|
24
|
+
}, u = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, p);
|
|
25
|
+
u((t = t.apply(d, a)).next());
|
|
26
26
|
});
|
|
27
|
-
import { L as
|
|
28
|
-
import { E as
|
|
29
|
-
import { CastSender as
|
|
30
|
-
import { A as
|
|
31
|
-
const
|
|
27
|
+
import { L as Vr, V as jr, i as Yr, A as Jr, C as Qr, a as Wr } from "./Ds9gK5k6.js";
|
|
28
|
+
import { E as li } from "./Bx7s5QdT.js";
|
|
29
|
+
import { CastSender as Zr } from "./cast-sender.js";
|
|
30
|
+
import { A as to, d as eo } from "./hRzek83o.js";
|
|
31
|
+
const Bi = 1e3, Ki = Bi * 1e3, Hs = Ki * 1e3, zi = (d, a, t) => d % a === 0 ? d / a : (d / a).toFixed(t), io = (d, a = 1) => d >= Hs ? `${zi(d, Hs, a)} Gbit/s` : d >= Ki ? `${zi(d, Ki, a)} Mbit/s` : d >= Bi ? `${zi(d, Bi, a)} Kbit/s` : `${d} bit/s`, so = ({ width: d, height: a }) => `${d}x${a}`, no = ({
|
|
32
32
|
title: d,
|
|
33
|
-
subTitle:
|
|
33
|
+
subTitle: a = "Live stream",
|
|
34
34
|
poster: t
|
|
35
35
|
}) => {
|
|
36
36
|
document.title = d, "mediaSession" in navigator && (navigator.mediaSession.metadata = new MediaMetadata({
|
|
37
37
|
title: d,
|
|
38
|
-
artist:
|
|
38
|
+
artist: a,
|
|
39
39
|
artwork: t ? [{ src: t }] : []
|
|
40
40
|
}));
|
|
41
|
-
},
|
|
41
|
+
}, n = {
|
|
42
42
|
PAUSED: "paused",
|
|
43
43
|
MUTED: "muted",
|
|
44
44
|
USER_INTERACTING: "user-interacting",
|
|
@@ -47,6 +47,7 @@ const di = 1e3, hi = di * 1e3, Zi = hi * 1e3, li = (d, r, t) => d % r === 0 ? d
|
|
|
47
47
|
CAST_RECEIVER_NAME: "cast-receiver-name",
|
|
48
48
|
BUFFERING: "buffering",
|
|
49
49
|
UI_LOCKED: "ui-locked",
|
|
50
|
+
HIDE_UI_ON_PAUSE: "hide-ui-on-pause",
|
|
50
51
|
FULLSCREEN: "is-fullscreen",
|
|
51
52
|
FULLSCREEN_FALLBACK: "is-fullscreen-fallback",
|
|
52
53
|
RENDITION_LEVELS: "rendition-levels",
|
|
@@ -55,7 +56,8 @@ const di = 1e3, hi = di * 1e3, Zi = hi * 1e3, li = (d, r, t) => d % r === 0 ? d
|
|
|
55
56
|
CHANNELS: "channels",
|
|
56
57
|
CHANNEL_ID: "channel-id",
|
|
57
58
|
CHANNEL_GROUP_ID: "channel-group-id",
|
|
58
|
-
|
|
59
|
+
PIP_AVAILABLE: "pip-available",
|
|
60
|
+
IS_PIP: "is-pip",
|
|
59
61
|
AIRPLAY_AVAILABLE: "airplay-available",
|
|
60
62
|
IS_AIRPLAYING: "is-airplaying",
|
|
61
63
|
MEDIA: "media",
|
|
@@ -63,14 +65,18 @@ const di = 1e3, hi = di * 1e3, Zi = hi * 1e3, li = (d, r, t) => d % r === 0 ? d
|
|
|
63
65
|
LANGUAGE: "language",
|
|
64
66
|
TEXT_TRACKS: "text-tracks",
|
|
65
67
|
TEXT_TRACK: "text-track",
|
|
66
|
-
|
|
68
|
+
NEEDS_USER_INPUT_VIDEO: "needs-user-input-video",
|
|
69
|
+
NEEDS_USER_INPUT_AUDIO: "needs-user-input-audio",
|
|
67
70
|
AUTHENTICATION_TOKEN: "authentication-token",
|
|
68
71
|
VOLUME: "volume",
|
|
72
|
+
VOLUME_LEVEL: "volume-level",
|
|
69
73
|
CAST_ENABLED: "cast",
|
|
70
74
|
AIRPLAY_ENABLED: "airplay",
|
|
71
75
|
PIP_ENABLED: "pip",
|
|
72
|
-
FULLSCREEN_ENABLED: "fullscreen"
|
|
73
|
-
|
|
76
|
+
FULLSCREEN_ENABLED: "fullscreen",
|
|
77
|
+
VU_METER_ENABLED: "vu-meter",
|
|
78
|
+
POSTER_SRC: "poster-src"
|
|
79
|
+
}, Ks = Object.values(n), f = {
|
|
74
80
|
PLAY: "play",
|
|
75
81
|
PAUSE: "pause",
|
|
76
82
|
MUTE: "mute",
|
|
@@ -81,6 +87,7 @@ const di = 1e3, hi = di * 1e3, Zi = hi * 1e3, li = (d, r, t) => d % r === 0 ? d
|
|
|
81
87
|
EXIT_FULLSCREEN: "exit-fullscreen",
|
|
82
88
|
SET_RENDITION: "set-rendition",
|
|
83
89
|
CHANNEL_GRID_OPENED: "channel-grid-opened",
|
|
90
|
+
CHANNEL_GRID_CLOSED: "channel-grid-closed",
|
|
84
91
|
ENTER_PIP: "enter-pip",
|
|
85
92
|
EXIT_PIP: "exit-pip",
|
|
86
93
|
REQUEST_AIRPLAY: "request-airplay",
|
|
@@ -89,50 +96,80 @@ const di = 1e3, hi = di * 1e3, Zi = hi * 1e3, li = (d, r, t) => d % r === 0 ? d
|
|
|
89
96
|
REQUEST_USER_INPUT: "request-user-input",
|
|
90
97
|
SET_VOLUME: "set-volume"
|
|
91
98
|
};
|
|
92
|
-
function
|
|
99
|
+
function qs(d) {
|
|
93
100
|
return d === "audio" || d === "video" || d === "audio+video" ? d : "audio+video";
|
|
94
101
|
}
|
|
95
|
-
function
|
|
102
|
+
function Gi(d) {
|
|
96
103
|
return d === "trace" || d === "debug" || d === "info" || d === "warn" || d === "error" || d === "off" ? d : "off";
|
|
97
104
|
}
|
|
98
|
-
function
|
|
99
|
-
if (d
|
|
100
|
-
return
|
|
105
|
+
function ro(d) {
|
|
106
|
+
if (d === null)
|
|
107
|
+
return;
|
|
108
|
+
const a = d.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
|
|
109
|
+
if (a.length !== 0)
|
|
110
|
+
return a;
|
|
101
111
|
}
|
|
102
|
-
function
|
|
112
|
+
function Xs(d) {
|
|
103
113
|
if (d !== null)
|
|
104
114
|
return d === "" ? !0 : d;
|
|
105
115
|
}
|
|
106
|
-
function
|
|
116
|
+
function oo(d) {
|
|
107
117
|
if (d !== null)
|
|
108
118
|
try {
|
|
109
|
-
const
|
|
110
|
-
if (typeof
|
|
111
|
-
const t =
|
|
119
|
+
const a = JSON.parse(d);
|
|
120
|
+
if (typeof a == "object" && a !== null) {
|
|
121
|
+
const t = a;
|
|
112
122
|
if (typeof t.width == "number" && typeof t.height == "number")
|
|
113
123
|
return t;
|
|
114
124
|
}
|
|
115
|
-
} catch (
|
|
125
|
+
} catch (a) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function ao(d) {
|
|
130
|
+
if (d !== null)
|
|
131
|
+
try {
|
|
132
|
+
const a = JSON.parse(d);
|
|
133
|
+
if (typeof a == "object" && a !== null) {
|
|
134
|
+
const t = a;
|
|
135
|
+
if (t.wasmDecodingConstraint) {
|
|
136
|
+
const i = t.wasmDecodingConstraint;
|
|
137
|
+
if (typeof i.width != "number" || typeof i.height != "number" || typeof i.bitRate != "number")
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
return t;
|
|
141
|
+
}
|
|
142
|
+
} catch (a) {
|
|
116
143
|
return;
|
|
117
144
|
}
|
|
118
145
|
}
|
|
119
|
-
function
|
|
146
|
+
function ui(d) {
|
|
120
147
|
if (d === null)
|
|
121
148
|
return;
|
|
122
|
-
const
|
|
123
|
-
return isNaN(
|
|
149
|
+
const a = parseInt(d, 10);
|
|
150
|
+
return isNaN(a) ? void 0 : a;
|
|
124
151
|
}
|
|
125
|
-
function
|
|
152
|
+
function L(d) {
|
|
126
153
|
return typeof d == "string";
|
|
127
154
|
}
|
|
128
|
-
function
|
|
155
|
+
function x(d, a) {
|
|
129
156
|
if (d === null)
|
|
130
|
-
return
|
|
157
|
+
return a != null ? a : void 0;
|
|
131
158
|
const t = d.toLowerCase();
|
|
132
|
-
return t === "false" ? !1 : t === "true" || t === "" ? !0 :
|
|
159
|
+
return t === "false" ? !1 : t === "true" || t === "" ? !0 : a != null ? a : !0;
|
|
160
|
+
}
|
|
161
|
+
function pi(d) {
|
|
162
|
+
if (d === null)
|
|
163
|
+
return;
|
|
164
|
+
const a = {}, t = d.split(",");
|
|
165
|
+
for (const i of t) {
|
|
166
|
+
const [s, o] = i.split(":");
|
|
167
|
+
s && o && (a[s.trim()] = o.trim());
|
|
168
|
+
}
|
|
169
|
+
return Object.keys(a).length > 0 ? a : void 0;
|
|
133
170
|
}
|
|
134
|
-
const
|
|
135
|
-
|
|
171
|
+
const Vs = document.createElement("template");
|
|
172
|
+
Vs.innerHTML = /* HTML */
|
|
136
173
|
`
|
|
137
174
|
<style>
|
|
138
175
|
:host {
|
|
@@ -172,129 +209,204 @@ as.innerHTML = /* HTML */
|
|
|
172
209
|
opacity: 0.5;
|
|
173
210
|
background: transparent;
|
|
174
211
|
}
|
|
212
|
+
|
|
213
|
+
slot > svg {
|
|
214
|
+
display: block;
|
|
215
|
+
width: var(--button-icon-size);
|
|
216
|
+
height: var(--button-icon-size);
|
|
217
|
+
}
|
|
175
218
|
</style>
|
|
176
219
|
`;
|
|
177
|
-
var
|
|
178
|
-
class
|
|
220
|
+
var Gt, Te, Nt, xe;
|
|
221
|
+
class tt extends HTMLElement {
|
|
179
222
|
constructor() {
|
|
180
223
|
super();
|
|
181
|
-
l(this,
|
|
182
|
-
l(this,
|
|
224
|
+
l(this, Gt, null);
|
|
225
|
+
l(this, Te, (t) => {
|
|
183
226
|
this.handleClick(t);
|
|
184
227
|
});
|
|
185
|
-
l(this,
|
|
186
|
-
const { key:
|
|
187
|
-
if (!this.keysUsed.includes(
|
|
188
|
-
this.removeEventListener("keyup", e(this,
|
|
228
|
+
l(this, Nt, (t) => {
|
|
229
|
+
const { key: i } = t;
|
|
230
|
+
if (!this.keysUsed.includes(i)) {
|
|
231
|
+
this.removeEventListener("keyup", e(this, Nt));
|
|
189
232
|
return;
|
|
190
233
|
}
|
|
191
234
|
this.handleClick(t);
|
|
192
235
|
});
|
|
193
|
-
l(this,
|
|
194
|
-
const { metaKey:
|
|
195
|
-
if (
|
|
196
|
-
this.removeEventListener("keyup", e(this,
|
|
236
|
+
l(this, xe, (t) => {
|
|
237
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
238
|
+
if (i || s || !this.keysUsed.includes(o)) {
|
|
239
|
+
this.removeEventListener("keyup", e(this, Nt));
|
|
197
240
|
return;
|
|
198
241
|
}
|
|
199
|
-
this.addEventListener("keyup", e(this,
|
|
242
|
+
this.addEventListener("keyup", e(this, Nt), { once: !0 });
|
|
200
243
|
});
|
|
201
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
244
|
+
this.attachShadow({ mode: "open" }).appendChild(Vs.content.cloneNode(!0));
|
|
202
245
|
}
|
|
203
246
|
get keysUsed() {
|
|
204
247
|
return ["Enter", " "];
|
|
205
248
|
}
|
|
206
249
|
connectedCallback() {
|
|
207
|
-
var
|
|
208
|
-
|
|
209
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, Ct, t.querySelector("vindral-controller")), (n = e(this, Ct)) == null || n.connectListener(this)), this.hasAttribute("disabled") || this.enable(), this.setAttribute("role", "button");
|
|
250
|
+
var t;
|
|
251
|
+
c(this, Gt, this.closest("vindral-controller")), (t = e(this, Gt)) == null || t.connectListener(this), this.hasAttribute("disabled") || this.enable(), this.setAttribute("role", "button");
|
|
210
252
|
}
|
|
211
253
|
enable() {
|
|
212
|
-
this.addEventListener("click", e(this,
|
|
254
|
+
this.addEventListener("click", e(this, Te)), this.addEventListener("keydown", e(this, xe)), this.tabIndex = 0;
|
|
213
255
|
}
|
|
214
256
|
disable() {
|
|
215
|
-
this.removeEventListener("click", e(this,
|
|
257
|
+
this.removeEventListener("click", e(this, Te)), this.removeEventListener("keydown", e(this, xe)), this.removeEventListener("keyup", e(this, Nt)), this.tabIndex = -1;
|
|
216
258
|
}
|
|
217
259
|
disconnectedCallback() {
|
|
218
260
|
var t;
|
|
219
|
-
(t = e(this,
|
|
261
|
+
(t = e(this, Gt)) == null || t.disconnectListener(this);
|
|
220
262
|
}
|
|
221
|
-
attributeChangedCallback(t,
|
|
222
|
-
t === "disabled" && (
|
|
263
|
+
attributeChangedCallback(t, i, s) {
|
|
264
|
+
t === "disabled" && (L(s) ? this.disable() : this.enable());
|
|
223
265
|
}
|
|
224
266
|
}
|
|
225
|
-
|
|
226
|
-
const
|
|
267
|
+
Gt = new WeakMap(), Te = new WeakMap(), Nt = new WeakMap(), xe = new WeakMap(), m(tt, "observedAttributes", ["disabled"]);
|
|
268
|
+
const js = document.createElement("template"), zs = (
|
|
227
269
|
/* SVG */
|
|
228
270
|
`
|
|
229
271
|
<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>
|
|
230
272
|
`
|
|
231
273
|
);
|
|
232
|
-
|
|
274
|
+
js.innerHTML = /* HTML */
|
|
233
275
|
`
|
|
234
276
|
<style>
|
|
235
277
|
:host {
|
|
236
278
|
display: var(--airplay-button-display);
|
|
237
279
|
}
|
|
238
280
|
|
|
239
|
-
|
|
240
|
-
display: block;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
:host(:not([${s.AIRPLAY_AVAILABLE}])) {
|
|
281
|
+
:host(:not([${n.AIRPLAY_AVAILABLE}])) {
|
|
244
282
|
display: none !important;
|
|
245
283
|
}
|
|
246
284
|
|
|
247
|
-
:host([${
|
|
285
|
+
:host([${n.IS_AIRPLAYING}]) slot[name="exit"] {
|
|
248
286
|
display: none !important;
|
|
249
287
|
}
|
|
250
288
|
|
|
251
|
-
:host(:not([${
|
|
289
|
+
:host(:not([${n.IS_AIRPLAYING}])) slot[name="enter"] {
|
|
252
290
|
display: none !important;
|
|
253
291
|
}
|
|
254
292
|
</style>
|
|
255
293
|
|
|
256
294
|
<slot name="icon">
|
|
257
|
-
<slot name="enter">${
|
|
258
|
-
<slot name="exit">${
|
|
295
|
+
<slot name="enter">${zs}</slot>
|
|
296
|
+
<slot name="exit">${zs}</slot>
|
|
259
297
|
</slot>
|
|
260
298
|
`;
|
|
261
|
-
var
|
|
262
|
-
const
|
|
299
|
+
var Se, Xi;
|
|
300
|
+
const me = class me extends tt {
|
|
263
301
|
constructor() {
|
|
264
302
|
var t;
|
|
265
303
|
super();
|
|
266
|
-
l(this,
|
|
267
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
304
|
+
l(this, Se);
|
|
305
|
+
(t = this.shadowRoot) == null || t.appendChild(js.content.cloneNode(!0));
|
|
268
306
|
}
|
|
269
307
|
connectedCallback() {
|
|
270
|
-
super.connectedCallback(),
|
|
308
|
+
super.connectedCallback(), r(this, Se, Xi).call(this);
|
|
271
309
|
}
|
|
272
310
|
disconnectedCallback() {
|
|
273
311
|
super.disconnectedCallback();
|
|
274
312
|
}
|
|
275
|
-
attributeChangedCallback(t,
|
|
276
|
-
super.attributeChangedCallback(t,
|
|
313
|
+
attributeChangedCallback(t, i, s) {
|
|
314
|
+
super.attributeChangedCallback(t, i, s), t === n.IS_AIRPLAYING && r(this, Se, Xi).call(this);
|
|
277
315
|
}
|
|
278
316
|
set isAirPlaying(t) {
|
|
279
|
-
t ? this.setAttribute(
|
|
317
|
+
t ? this.setAttribute(n.IS_AIRPLAYING, "") : this.removeAttribute(n.IS_AIRPLAYING);
|
|
280
318
|
}
|
|
281
319
|
get isAirPlaying() {
|
|
282
|
-
return this.hasAttribute(
|
|
320
|
+
return this.hasAttribute(n.IS_AIRPLAYING);
|
|
283
321
|
}
|
|
284
322
|
handleClick(t) {
|
|
285
|
-
this.dispatchEvent(new CustomEvent(
|
|
323
|
+
this.dispatchEvent(new CustomEvent(f.REQUEST_AIRPLAY, { bubbles: !0, composed: !0 }));
|
|
286
324
|
}
|
|
287
325
|
};
|
|
288
|
-
|
|
326
|
+
Se = new WeakSet(), Xi = function() {
|
|
289
327
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
290
|
-
},
|
|
291
|
-
...
|
|
292
|
-
|
|
293
|
-
|
|
328
|
+
}, m(me, "observedAttributes", [
|
|
329
|
+
...q(me, me, "observedAttributes"),
|
|
330
|
+
n.AIRPLAY_AVAILABLE,
|
|
331
|
+
n.IS_AIRPLAYING
|
|
294
332
|
]);
|
|
295
|
-
let
|
|
296
|
-
const
|
|
297
|
-
|
|
333
|
+
let qi = me;
|
|
334
|
+
const Ys = document.createElement("template"), lo = (
|
|
335
|
+
/* SVG */
|
|
336
|
+
`
|
|
337
|
+
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
338
|
+
<style>
|
|
339
|
+
.spinner-container {
|
|
340
|
+
transform-origin: center;
|
|
341
|
+
animation: rotate 2s linear infinite;
|
|
342
|
+
}
|
|
343
|
+
.spinner-circle {
|
|
344
|
+
stroke-linecap: round;
|
|
345
|
+
animation: dash 1.5s ease-in-out infinite;
|
|
346
|
+
}
|
|
347
|
+
@keyframes rotate {
|
|
348
|
+
100% {
|
|
349
|
+
transform: rotate(360deg);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
@keyframes dash {
|
|
353
|
+
0% {
|
|
354
|
+
stroke-dasharray: 0 150;
|
|
355
|
+
stroke-dashoffset: 0;
|
|
356
|
+
}
|
|
357
|
+
47.5% {
|
|
358
|
+
stroke-dasharray: 42 150;
|
|
359
|
+
stroke-dashoffset: -16;
|
|
360
|
+
}
|
|
361
|
+
95%, 100% {
|
|
362
|
+
stroke-dasharray: 42 150;
|
|
363
|
+
stroke-dashoffset: -59;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
</style>
|
|
367
|
+
<g class="spinner-container">
|
|
368
|
+
<circle class="spinner-circle" cx="12" cy="12" r="9.5" fill="none" stroke-width="3"></circle>
|
|
369
|
+
</g>
|
|
370
|
+
</svg>
|
|
371
|
+
`
|
|
372
|
+
);
|
|
373
|
+
Ys.innerHTML = /* HTML */
|
|
374
|
+
`
|
|
375
|
+
<style>
|
|
376
|
+
:host {
|
|
377
|
+
color: var(--fg-strong);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
slot > svg {
|
|
381
|
+
display: block;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:host(:not([${n.BUFFERING}])) {
|
|
385
|
+
visibility: hidden !important;
|
|
386
|
+
}
|
|
387
|
+
</style>
|
|
388
|
+
|
|
389
|
+
<slot name="icon">${lo}</slot>
|
|
390
|
+
`;
|
|
391
|
+
var $t;
|
|
392
|
+
class Js extends HTMLElement {
|
|
393
|
+
constructor() {
|
|
394
|
+
super();
|
|
395
|
+
l(this, $t, null);
|
|
396
|
+
this.attachShadow({ mode: "open" }).appendChild(Ys.content.cloneNode(!0));
|
|
397
|
+
}
|
|
398
|
+
connectedCallback() {
|
|
399
|
+
var t;
|
|
400
|
+
c(this, $t, this.closest("vindral-controller")), (t = e(this, $t)) == null || t.connectListener(this);
|
|
401
|
+
}
|
|
402
|
+
disconnectedCallback() {
|
|
403
|
+
var t;
|
|
404
|
+
(t = e(this, $t)) == null || t.disconnectListener(this);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
$t = new WeakMap(), m(Js, "observedAttributes", [n.BUFFERING]);
|
|
408
|
+
const Qs = document.createElement("template");
|
|
409
|
+
Qs.innerHTML = /* HTML */
|
|
298
410
|
`
|
|
299
411
|
<style>
|
|
300
412
|
:host {
|
|
@@ -344,7 +456,7 @@ cs.innerHTML = /* HTML */
|
|
|
344
456
|
}
|
|
345
457
|
}
|
|
346
458
|
|
|
347
|
-
:host(:not([${
|
|
459
|
+
:host(:not([${n.BUFFERING}])) {
|
|
348
460
|
transition-delay: 0s;
|
|
349
461
|
opacity: 0 !important;
|
|
350
462
|
}
|
|
@@ -352,26 +464,25 @@ cs.innerHTML = /* HTML */
|
|
|
352
464
|
|
|
353
465
|
<div id="buffering-indicator"></div>
|
|
354
466
|
`;
|
|
355
|
-
var
|
|
356
|
-
class
|
|
467
|
+
var Bt;
|
|
468
|
+
class Ws extends HTMLElement {
|
|
357
469
|
constructor() {
|
|
358
470
|
super();
|
|
359
|
-
l(this,
|
|
360
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
471
|
+
l(this, Bt, null);
|
|
472
|
+
this.attachShadow({ mode: "open" }).appendChild(Qs.content.cloneNode(!0));
|
|
361
473
|
}
|
|
362
474
|
connectedCallback() {
|
|
363
|
-
var
|
|
364
|
-
|
|
365
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, Tt, t.querySelector("vindral-controller")), (n = e(this, Tt)) == null || n.connectListener(this));
|
|
475
|
+
var t;
|
|
476
|
+
c(this, Bt, this.closest("vindral-controller")), (t = e(this, Bt)) == null || t.connectListener(this);
|
|
366
477
|
}
|
|
367
478
|
disconnectedCallback() {
|
|
368
479
|
var t;
|
|
369
|
-
(t = e(this,
|
|
480
|
+
(t = e(this, Bt)) == null || t.disconnectListener(this);
|
|
370
481
|
}
|
|
371
482
|
}
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
|
|
483
|
+
Bt = new WeakMap(), m(Ws, "observedAttributes", [n.BUFFERING]);
|
|
484
|
+
const Zs = document.createElement("template");
|
|
485
|
+
Zs.innerHTML = /* HTML */
|
|
375
486
|
`
|
|
376
487
|
<style>
|
|
377
488
|
:host {
|
|
@@ -380,8 +491,8 @@ hs.innerHTML = /* HTML */
|
|
|
380
491
|
|
|
381
492
|
google-cast-launcher {
|
|
382
493
|
display: block;
|
|
383
|
-
width:
|
|
384
|
-
height:
|
|
494
|
+
width: var(--button-icon-size);
|
|
495
|
+
height: var(--button-icon-size);
|
|
385
496
|
cursor: pointer;
|
|
386
497
|
--connected-color: var(--fg-strong);
|
|
387
498
|
--disconnected-color: var(--fg-strong);
|
|
@@ -391,53 +502,53 @@ hs.innerHTML = /* HTML */
|
|
|
391
502
|
transform: scale(0.9);
|
|
392
503
|
}
|
|
393
504
|
|
|
394
|
-
:host(:not([${
|
|
505
|
+
:host(:not([${n.CAST_AVAILABLE}])) {
|
|
395
506
|
display: none !important;
|
|
396
507
|
}
|
|
397
508
|
</style>
|
|
398
509
|
`;
|
|
399
|
-
var
|
|
400
|
-
const
|
|
510
|
+
var zt, ji, tn;
|
|
511
|
+
const ve = class ve extends tt {
|
|
401
512
|
constructor() {
|
|
402
513
|
var t;
|
|
403
514
|
super();
|
|
404
|
-
l(this,
|
|
405
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
515
|
+
l(this, zt);
|
|
516
|
+
(t = this.shadowRoot) == null || t.appendChild(Zs.content.cloneNode(!0));
|
|
406
517
|
}
|
|
407
518
|
connectedCallback() {
|
|
408
|
-
super.connectedCallback(),
|
|
519
|
+
super.connectedCallback(), r(this, zt, ji).call(this);
|
|
409
520
|
}
|
|
410
521
|
disconnectedCallback() {
|
|
411
522
|
super.disconnectedCallback();
|
|
412
523
|
}
|
|
413
|
-
attributeChangedCallback(t,
|
|
414
|
-
super.attributeChangedCallback(t,
|
|
524
|
+
attributeChangedCallback(t, i, s) {
|
|
525
|
+
super.attributeChangedCallback(t, i, s), t === n.CAST_AVAILABLE && r(this, zt, tn).call(this), t === n.IS_CASTING && r(this, zt, ji).call(this);
|
|
415
526
|
}
|
|
416
527
|
set isCasting(t) {
|
|
417
|
-
t ? this.setAttribute(
|
|
528
|
+
t ? this.setAttribute(n.IS_CASTING, "") : this.removeAttribute(n.IS_CASTING);
|
|
418
529
|
}
|
|
419
530
|
get isCasting() {
|
|
420
|
-
return this.hasAttribute(
|
|
531
|
+
return this.hasAttribute(n.IS_CASTING);
|
|
421
532
|
}
|
|
422
533
|
handleClick(t) {
|
|
423
534
|
}
|
|
424
535
|
};
|
|
425
|
-
|
|
536
|
+
zt = new WeakSet(), ji = function() {
|
|
426
537
|
this.setAttribute("aria-label", this.isCasting ? "Exit cast" : "Enter cast");
|
|
427
|
-
},
|
|
428
|
-
var t,
|
|
538
|
+
}, tn = function() {
|
|
539
|
+
var t, i;
|
|
429
540
|
if (!((t = this.shadowRoot) != null && t.querySelector("google-cast-launcher"))) {
|
|
430
|
-
const
|
|
431
|
-
(
|
|
541
|
+
const s = document.createElement("google-cast-launcher");
|
|
542
|
+
(i = this.shadowRoot) == null || i.appendChild(s);
|
|
432
543
|
}
|
|
433
|
-
},
|
|
434
|
-
...
|
|
435
|
-
|
|
436
|
-
|
|
544
|
+
}, m(ve, "observedAttributes", [
|
|
545
|
+
...q(ve, ve, "observedAttributes"),
|
|
546
|
+
n.CAST_AVAILABLE,
|
|
547
|
+
n.IS_CASTING
|
|
437
548
|
]);
|
|
438
|
-
let
|
|
439
|
-
const
|
|
440
|
-
|
|
549
|
+
let Vi = ve;
|
|
550
|
+
const en = document.createElement("template");
|
|
551
|
+
en.innerHTML = /* HTML */
|
|
441
552
|
`
|
|
442
553
|
<style>
|
|
443
554
|
:host {
|
|
@@ -462,7 +573,7 @@ ps.innerHTML = /* HTML */
|
|
|
462
573
|
}
|
|
463
574
|
}
|
|
464
575
|
|
|
465
|
-
:host(:not([${
|
|
576
|
+
:host(:not([${n.IS_CASTING}])) {
|
|
466
577
|
display: none;
|
|
467
578
|
}
|
|
468
579
|
|
|
@@ -473,30 +584,38 @@ ps.innerHTML = /* HTML */
|
|
|
473
584
|
</style>
|
|
474
585
|
<span id="text"></span>
|
|
475
586
|
`;
|
|
476
|
-
var
|
|
477
|
-
class
|
|
587
|
+
var Kt, qt;
|
|
588
|
+
class sn extends HTMLElement {
|
|
478
589
|
constructor() {
|
|
479
590
|
super();
|
|
480
|
-
l(this,
|
|
481
|
-
l(this,
|
|
482
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
591
|
+
l(this, Kt, null);
|
|
592
|
+
l(this, qt, null);
|
|
593
|
+
this.attachShadow({ mode: "open" }).appendChild(en.content.cloneNode(!0));
|
|
483
594
|
}
|
|
484
595
|
connectedCallback() {
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, wt, t.querySelector("vindral-controller")), (n = e(this, wt)) == null || n.connectListener(this)), h(this, It, (i = this.shadowRoot) == null ? void 0 : i.querySelector("#text"));
|
|
596
|
+
var t, i;
|
|
597
|
+
c(this, Kt, this.closest("vindral-controller")), (t = e(this, Kt)) == null || t.connectListener(this), c(this, qt, (i = this.shadowRoot) == null ? void 0 : i.querySelector("#text"));
|
|
488
598
|
}
|
|
489
599
|
disconnectedCallback() {
|
|
490
600
|
var t;
|
|
491
|
-
(t = e(this,
|
|
601
|
+
(t = e(this, Kt)) == null || t.disconnectListener(this);
|
|
492
602
|
}
|
|
493
|
-
attributeChangedCallback(t,
|
|
494
|
-
|
|
603
|
+
attributeChangedCallback(t, i, s) {
|
|
604
|
+
i === s || !e(this, qt) || t === "cast-receiver-name" && typeof s == "string" && (e(this, qt).innerText = `Casting to ${s || "device"}`);
|
|
495
605
|
}
|
|
496
606
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
607
|
+
Kt = new WeakMap(), qt = new WeakMap(), m(sn, "observedAttributes", [n.IS_CASTING, n.CAST_RECEIVER_NAME]);
|
|
608
|
+
function nn(d = document) {
|
|
609
|
+
const a = d == null ? void 0 : d.activeElement;
|
|
610
|
+
if (!a) return null;
|
|
611
|
+
if (a.shadowRoot) {
|
|
612
|
+
const t = nn(a.shadowRoot);
|
|
613
|
+
return t != null ? t : a;
|
|
614
|
+
}
|
|
615
|
+
return a;
|
|
616
|
+
}
|
|
617
|
+
const rn = document.createElement("template");
|
|
618
|
+
rn.innerHTML = /* HTML */
|
|
500
619
|
`
|
|
501
620
|
<style>
|
|
502
621
|
:host {
|
|
@@ -563,36 +682,36 @@ ms.innerHTML = /* HTML */
|
|
|
563
682
|
</style>
|
|
564
683
|
<slot></slot>
|
|
565
684
|
`;
|
|
566
|
-
var
|
|
567
|
-
class
|
|
685
|
+
var Rt;
|
|
686
|
+
class Rs extends HTMLElement {
|
|
568
687
|
constructor() {
|
|
569
688
|
super();
|
|
570
|
-
l(this,
|
|
571
|
-
|
|
689
|
+
l(this, Rt);
|
|
690
|
+
m(this, "lastThumbnailUpdate");
|
|
572
691
|
const t = this.attachShadow({ mode: "open" });
|
|
573
|
-
|
|
692
|
+
c(this, Rt, document.createElement("span")), e(this, Rt).className = "channel-title", t.appendChild(e(this, Rt)), t.appendChild(rn.content.cloneNode(!0));
|
|
574
693
|
}
|
|
575
|
-
attributeChangedCallback(t,
|
|
576
|
-
if (
|
|
694
|
+
attributeChangedCallback(t, i, s) {
|
|
695
|
+
if (i !== s)
|
|
577
696
|
switch (t) {
|
|
578
697
|
case "url":
|
|
579
698
|
this.updateThumbnail();
|
|
580
699
|
break;
|
|
581
700
|
case "title":
|
|
582
|
-
e(this,
|
|
701
|
+
e(this, Rt).textContent = s;
|
|
583
702
|
break;
|
|
584
703
|
}
|
|
585
704
|
}
|
|
586
705
|
updateThumbnail() {
|
|
587
|
-
const t = this.getAttribute("url"),
|
|
588
|
-
if (
|
|
589
|
-
const
|
|
590
|
-
|
|
706
|
+
const t = this.getAttribute("url"), i = this.hasAttribute("offline"), s = this.hasAttribute("visible");
|
|
707
|
+
if (i || !t || !s || this.lastThumbnailUpdate && Date.now() - this.lastThumbnailUpdate < 1e4) return;
|
|
708
|
+
const o = new URL(t), p = new Image(), u = this.getAttribute("authentication-token");
|
|
709
|
+
u && o.searchParams.set("auth.token", u), o.searchParams.set("t", Date.now().toString()), p.src = o.toString(), p.onload = () => this.style.backgroundImage = `url(${o.toString()})`;
|
|
591
710
|
}
|
|
592
711
|
}
|
|
593
|
-
|
|
594
|
-
const
|
|
595
|
-
|
|
712
|
+
Rt = new WeakMap(), m(Rs, "observedAttributes", ["url", "title", "offline", "authentication-token", "visible"]);
|
|
713
|
+
const on = document.createElement("template");
|
|
714
|
+
on.innerHTML = /* HTML */
|
|
596
715
|
`
|
|
597
716
|
<style>
|
|
598
717
|
:host {
|
|
@@ -631,6 +750,7 @@ vs.innerHTML = /* HTML */
|
|
|
631
750
|
slot#grid {
|
|
632
751
|
display: grid;
|
|
633
752
|
gap: var(--padding-2);
|
|
753
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
634
754
|
|
|
635
755
|
@container (width < 768px) {
|
|
636
756
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -643,6 +763,13 @@ vs.innerHTML = /* HTML */
|
|
|
643
763
|
}
|
|
644
764
|
}
|
|
645
765
|
|
|
766
|
+
/* Smart TV */
|
|
767
|
+
@media (width < 1024px) and (width >= 768px) and (-webkit-min-device-pixel-ratio: 2) {
|
|
768
|
+
slot#grid {
|
|
769
|
+
grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
646
773
|
:host([mode="list"]) slot#grid {
|
|
647
774
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
648
775
|
}
|
|
@@ -652,82 +779,176 @@ vs.innerHTML = /* HTML */
|
|
|
652
779
|
<slot name="grid" id="grid"></slot>
|
|
653
780
|
</div>
|
|
654
781
|
`;
|
|
655
|
-
var
|
|
656
|
-
class
|
|
782
|
+
var bt, mt, Xt, O, T, Vt, Ne, Re, Ue, k, ln, hn, dn, Yi, cn, un, pn, bn, mn, vn, gn, ce;
|
|
783
|
+
class an extends HTMLElement {
|
|
657
784
|
constructor() {
|
|
658
785
|
super();
|
|
659
|
-
l(this,
|
|
660
|
-
l(this,
|
|
661
|
-
l(this,
|
|
662
|
-
l(this,
|
|
663
|
-
l(this,
|
|
664
|
-
l(this,
|
|
665
|
-
l(this,
|
|
666
|
-
l(this,
|
|
667
|
-
this
|
|
786
|
+
l(this, k);
|
|
787
|
+
l(this, bt, null);
|
|
788
|
+
l(this, mt, null);
|
|
789
|
+
l(this, Xt, []);
|
|
790
|
+
l(this, O, []);
|
|
791
|
+
l(this, T);
|
|
792
|
+
l(this, Vt);
|
|
793
|
+
l(this, Ne);
|
|
794
|
+
l(this, Re);
|
|
795
|
+
l(this, Ue);
|
|
796
|
+
m(this, "handleEvent", (t) => {
|
|
797
|
+
switch (t.type) {
|
|
798
|
+
case "keydown":
|
|
799
|
+
r(this, k, vn).call(this, t);
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
this.attachShadow({ mode: "open" }).appendChild(on.content.cloneNode(!0));
|
|
668
804
|
}
|
|
669
805
|
connectedCallback() {
|
|
670
|
-
var
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
o(this, H, Es).call(this);
|
|
806
|
+
var t, i, s;
|
|
807
|
+
c(this, mt, this.closest("vindral-controller")), (t = e(this, mt)) == null || t.connectListener(this), r(this, k, ln).call(this), (s = e(this, bt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), r(this, k, Yi).call(this), c(this, Ne, window.setInterval(() => {
|
|
808
|
+
r(this, k, bn).call(this);
|
|
674
809
|
}, 1e4));
|
|
675
810
|
}
|
|
676
811
|
disconnectedCallback() {
|
|
677
812
|
var t;
|
|
678
|
-
clearInterval(e(this,
|
|
813
|
+
clearInterval(e(this, Ne)), this.removeEventListener("keydown", this), (t = e(this, bt)) == null || t.disconnect();
|
|
679
814
|
}
|
|
680
|
-
attributeChangedCallback(t,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
815
|
+
attributeChangedCallback(t, i, s) {
|
|
816
|
+
if (i !== s)
|
|
817
|
+
switch (t) {
|
|
818
|
+
case n.CHANNEL_ID: {
|
|
819
|
+
r(this, k, pn).call(this, s);
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
case n.CHANNELS:
|
|
823
|
+
c(this, Xt, JSON.parse(s)), r(this, k, Yi).call(this);
|
|
824
|
+
break;
|
|
825
|
+
case "authentication-token":
|
|
826
|
+
c(this, Vt, s);
|
|
827
|
+
break;
|
|
687
828
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
h(this, Nt, i);
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
829
|
+
}
|
|
830
|
+
get keysUsed() {
|
|
831
|
+
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End"];
|
|
832
|
+
}
|
|
833
|
+
focus() {
|
|
834
|
+
var t;
|
|
835
|
+
c(this, Re, nn()), (t = e(this, T)) == null || t.focus();
|
|
698
836
|
}
|
|
699
837
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
t
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
},
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
838
|
+
bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T = new WeakMap(), Vt = new WeakMap(), Ne = new WeakMap(), Re = new WeakMap(), Ue = new WeakMap(), k = new WeakSet(), ln = function() {
|
|
839
|
+
c(this, bt, new IntersectionObserver(
|
|
840
|
+
(t) => {
|
|
841
|
+
t.forEach((i) => {
|
|
842
|
+
const { target: s, isIntersecting: o } = i;
|
|
843
|
+
s instanceof Rs ? r(this, k, dn).call(this, s, o) : r(this, k, hn).call(this, o);
|
|
844
|
+
});
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
root: e(this, mt)
|
|
848
|
+
}
|
|
849
|
+
));
|
|
850
|
+
}, hn = function(t) {
|
|
851
|
+
var i, s;
|
|
852
|
+
if (t) {
|
|
853
|
+
this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_OPENED, { bubbles: !0, composed: !0 }));
|
|
854
|
+
const o = () => {
|
|
855
|
+
window.clearTimeout(e(this, Ue)), c(this, Ue, window.setTimeout(() => {
|
|
856
|
+
var p;
|
|
857
|
+
this.focus(), (p = this.parentElement) == null || p.removeEventListener("scroll", o);
|
|
858
|
+
}, 100));
|
|
859
|
+
};
|
|
860
|
+
(i = this.parentElement) == null || i.addEventListener("scroll", o), this.addEventListener("keydown", this), e(this, T) && (e(this, T).tabIndex = 0);
|
|
861
|
+
} else
|
|
862
|
+
e(this, T) && (e(this, T).tabIndex = -1), this.dispatchEvent(new CustomEvent(f.CHANNEL_GRID_CLOSED, { bubbles: !0, composed: !0 })), (s = e(this, Re)) == null || s.focus(), this.removeEventListener("keydown", this);
|
|
863
|
+
}, dn = function(t, i) {
|
|
864
|
+
i ? (t.setAttribute("visible", ""), (!t.lastThumbnailUpdate || Date.now() - t.lastThumbnailUpdate >= 1e4) && (t.updateThumbnail(), t.lastThumbnailUpdate = Date.now())) : t.removeAttribute("visible");
|
|
865
|
+
}, Yi = function() {
|
|
866
|
+
var o;
|
|
867
|
+
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot[name=grid]"), i = new Map(e(this, O).map((p) => [p.id, p])), s = this.getAttribute("channel-id");
|
|
868
|
+
c(this, O, e(this, Xt).map((p) => {
|
|
869
|
+
var g;
|
|
870
|
+
const u = i.get(p.channelId);
|
|
871
|
+
if (u)
|
|
872
|
+
return r(this, k, cn).call(this, u.element, p), u;
|
|
873
|
+
const v = r(this, k, un).call(this, p, s);
|
|
874
|
+
return (g = e(this, bt)) == null || g.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
|
|
875
|
+
})), i.forEach((p, u) => {
|
|
876
|
+
var v;
|
|
877
|
+
e(this, Xt).some((g) => g.channelId === u) || ((v = e(this, bt)) == null || v.unobserve(p.element), p.element.remove());
|
|
878
|
+
}), e(this, O).sort((p, u) => p.element.hasAttribute("offline") && !u.element.hasAttribute("offline") ? 1 : -1).forEach((p) => {
|
|
879
|
+
t.contains(p.element) || t.appendChild(p.element);
|
|
717
880
|
});
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
},
|
|
721
|
-
|
|
722
|
-
(
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
881
|
+
}, cn = function(t, i) {
|
|
882
|
+
i.isLive ? t.removeAttribute("offline") : t.setAttribute("offline", ""), t.setAttribute("url", i.thumbnailUrls[0] || ""), t.setAttribute("title", i.name);
|
|
883
|
+
}, un = function(t, i) {
|
|
884
|
+
const s = document.createElement("vindral-channel-grid-item");
|
|
885
|
+
return s.setAttribute("url", t.thumbnailUrls[0] || ""), s.setAttribute("title", t.name), e(this, Vt) && s.setAttribute("authentication-token", e(this, Vt)), t.isLive || s.setAttribute("offline", ""), t.channelId === i && (s.setAttribute("aria-selected", "true"), c(this, T, s)), s.tabIndex = -1, s.onclick = () => r(this, k, mn).call(this, t), { element: s, thumbnail: t.thumbnailUrls[0] || "", id: t.channelId };
|
|
886
|
+
}, pn = function(t) {
|
|
887
|
+
e(this, O).forEach((i) => {
|
|
888
|
+
i.id === t ? (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, c(this, T, i.element)) : (i.element.tabIndex = -1, i.element.setAttribute("aria-selected", "false"));
|
|
889
|
+
});
|
|
890
|
+
}, bn = function() {
|
|
891
|
+
this.hasAttribute("hidden") || e(this, O).forEach((t) => t.element.updateThumbnail());
|
|
892
|
+
}, mn = function(t) {
|
|
893
|
+
var i;
|
|
894
|
+
(i = e(this, mt)) == null || i.setAttribute("channel-id", t.channelId);
|
|
895
|
+
}, vn = function(t) {
|
|
896
|
+
var u, v, g;
|
|
897
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
898
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((u = this.parentElement) == null || u.removeAttribute("open"), (v = e(this, mt)) == null || v.focus()) : i === "Enter" || i === " " ? (g = e(this, T)) == null || g.click() : r(this, k, gn).call(this, t));
|
|
899
|
+
}, gn = function(t) {
|
|
900
|
+
var u;
|
|
901
|
+
if (!e(this, T)) return;
|
|
902
|
+
const { key: i } = t;
|
|
903
|
+
let o = e(this, O).findIndex((v) => v.element === e(this, T));
|
|
904
|
+
const p = e(this, T).getBoundingClientRect();
|
|
905
|
+
switch (i) {
|
|
906
|
+
case "ArrowUp":
|
|
907
|
+
if (o = r(this, k, ce).call(this, p, -1, 0), o < 0) {
|
|
908
|
+
(u = this.parentElement) == null || u.removeAttribute("open");
|
|
909
|
+
return;
|
|
910
|
+
}
|
|
911
|
+
break;
|
|
912
|
+
case "ArrowDown":
|
|
913
|
+
o = r(this, k, ce).call(this, p, 1, 0);
|
|
914
|
+
break;
|
|
915
|
+
case "ArrowLeft":
|
|
916
|
+
o = r(this, k, ce).call(this, p, 0, -1);
|
|
917
|
+
break;
|
|
918
|
+
case "ArrowRight":
|
|
919
|
+
o = r(this, k, ce).call(this, p, 0, 1);
|
|
920
|
+
break;
|
|
921
|
+
case "Home":
|
|
922
|
+
o = 0;
|
|
923
|
+
break;
|
|
924
|
+
case "End":
|
|
925
|
+
o = e(this, O).length - 1;
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
if (o >= 0 && o < e(this, O).length) {
|
|
929
|
+
const v = e(this, O)[o];
|
|
930
|
+
if (!v) return;
|
|
931
|
+
e(this, T).setAttribute("aria-selected", "false"), e(this, T).tabIndex = -1, c(this, T, v.element), e(this, T).setAttribute("aria-selected", "true"), e(this, T).tabIndex = 0, e(this, T).focus();
|
|
932
|
+
}
|
|
933
|
+
}, ce = function(t, i, s) {
|
|
934
|
+
let o = -1, p = 1 / 0;
|
|
935
|
+
return e(this, O).filter((u) => u.element.getBoundingClientRect().width > 0).forEach((u, v) => {
|
|
936
|
+
const g = u.element.getBoundingClientRect(), P = i === 0 || i < 0 && g.top < t.top || i > 0 && g.top > t.top, et = s === 0 || s < 0 && g.left < t.left || s > 0 && g.left > t.left;
|
|
937
|
+
if (P && et) {
|
|
938
|
+
const Y = Math.sqrt(
|
|
939
|
+
Math.pow(g.top - t.top, 2) + Math.pow(g.left - t.left, 2)
|
|
940
|
+
);
|
|
941
|
+
Y < p && (p = Y, o = v);
|
|
942
|
+
}
|
|
943
|
+
}), o;
|
|
944
|
+
}, m(an, "observedAttributes", [
|
|
945
|
+
n.CHANNELS,
|
|
946
|
+
n.CHANNEL_ID,
|
|
947
|
+
n.AUTHENTICATION_TOKEN,
|
|
727
948
|
"mode",
|
|
728
949
|
"hidden"
|
|
729
950
|
]);
|
|
730
|
-
const
|
|
951
|
+
const ho = (
|
|
731
952
|
/* SVG */
|
|
732
953
|
`
|
|
733
954
|
<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">
|
|
@@ -738,8 +959,8 @@ const Jn = (
|
|
|
738
959
|
<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" />
|
|
739
960
|
</svg>
|
|
740
961
|
`
|
|
741
|
-
),
|
|
742
|
-
|
|
962
|
+
), fn = document.createElement("template");
|
|
963
|
+
fn.innerHTML = /* HTML */
|
|
743
964
|
`
|
|
744
965
|
<style>
|
|
745
966
|
:host {
|
|
@@ -752,76 +973,78 @@ ys.innerHTML = /* HTML */
|
|
|
752
973
|
:host([hidden]) {
|
|
753
974
|
display: none;
|
|
754
975
|
}
|
|
755
|
-
|
|
756
|
-
slot > svg {
|
|
757
|
-
display: block;
|
|
758
|
-
}
|
|
759
976
|
</style>
|
|
760
|
-
<slot name="button">${
|
|
977
|
+
<slot name="button">${ho}</slot>
|
|
761
978
|
`;
|
|
762
|
-
var
|
|
763
|
-
const
|
|
979
|
+
var jt, _, V, Ai, U, En, Qi, bi, Wi, Zi;
|
|
980
|
+
const ge = class ge extends tt {
|
|
764
981
|
constructor() {
|
|
765
|
-
var t,
|
|
982
|
+
var t, i;
|
|
766
983
|
super();
|
|
767
|
-
l(this,
|
|
768
|
-
l(this,
|
|
769
|
-
l(this,
|
|
770
|
-
l(this,
|
|
771
|
-
l(this,
|
|
772
|
-
t.composedPath().includes(this) ||
|
|
984
|
+
l(this, U);
|
|
985
|
+
l(this, jt);
|
|
986
|
+
l(this, _);
|
|
987
|
+
l(this, V);
|
|
988
|
+
l(this, Ai, (t) => {
|
|
989
|
+
t.composedPath().includes(this) || r(this, U, bi).call(this);
|
|
773
990
|
});
|
|
774
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
991
|
+
(t = this.shadowRoot) == null || t.appendChild(fn.content.cloneNode(!0)), c(this, jt, (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot[name=button]"));
|
|
775
992
|
}
|
|
776
993
|
connectedCallback() {
|
|
777
|
-
var
|
|
778
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(),
|
|
994
|
+
var i;
|
|
995
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), r(this, U, Wi).call(this);
|
|
779
996
|
const t = this.getRootNode();
|
|
780
|
-
(t instanceof Document || t instanceof ShadowRoot) && (
|
|
997
|
+
(t instanceof Document || t instanceof ShadowRoot) && (c(this, _, t.querySelector("vindral-channel-grid")), ((i = e(this, _).parentElement) == null ? void 0 : i.localName) === "vindral-scroll-overlay" && (e(this, _).hidden = !1, e(this, _).style.position = "relative", c(this, V, e(this, _).parentElement))), r(this, U, Zi).call(this);
|
|
781
998
|
}
|
|
782
999
|
disconnectedCallback() {
|
|
783
1000
|
}
|
|
784
|
-
attributeChangedCallback(t,
|
|
785
|
-
super.attributeChangedCallback(t,
|
|
1001
|
+
attributeChangedCallback(t, i, s) {
|
|
1002
|
+
super.attributeChangedCallback(t, i, s), (t === n.CHANNEL_GROUP_ID || t === n.CHANNELS) && r(this, U, Wi).call(this);
|
|
786
1003
|
}
|
|
787
1004
|
enable() {
|
|
788
|
-
super.enable(), document.addEventListener("click", e(this,
|
|
1005
|
+
super.enable(), document.addEventListener("click", e(this, Ai));
|
|
789
1006
|
}
|
|
790
1007
|
handleClick(t) {
|
|
791
|
-
|
|
1008
|
+
r(this, U, En).call(this);
|
|
1009
|
+
}
|
|
1010
|
+
get isOpen() {
|
|
1011
|
+
var t, i;
|
|
1012
|
+
return ((t = e(this, V)) == null ? void 0 : t.hasAttribute("open")) || !((i = e(this, _)) != null && i.hidden);
|
|
792
1013
|
}
|
|
793
1014
|
};
|
|
794
|
-
|
|
1015
|
+
jt = new WeakMap(), _ = new WeakMap(), V = new WeakMap(), Ai = new WeakMap(), U = new WeakSet(), En = function() {
|
|
795
1016
|
var t;
|
|
796
|
-
e(this,
|
|
797
|
-
},
|
|
1017
|
+
e(this, V) ? e(this, V).hasAttribute("open") ? r(this, U, bi).call(this) : r(this, U, Qi).call(this) : (t = e(this, _)) != null && t.hidden ? r(this, U, Qi).call(this) : r(this, U, bi).call(this), r(this, U, Zi).call(this);
|
|
1018
|
+
}, Qi = function() {
|
|
798
1019
|
var t;
|
|
799
|
-
if (e(this,
|
|
800
|
-
e(this,
|
|
1020
|
+
if (e(this, V))
|
|
1021
|
+
e(this, V).setAttribute("open", "");
|
|
801
1022
|
else {
|
|
802
|
-
if (!((t = e(this,
|
|
803
|
-
e(this,
|
|
1023
|
+
if (!((t = e(this, _)) != null && t.hidden)) return;
|
|
1024
|
+
e(this, _).hidden = !1, e(this, _).focus();
|
|
804
1025
|
}
|
|
805
|
-
e(this,
|
|
806
|
-
},
|
|
807
|
-
if (e(this,
|
|
808
|
-
e(this,
|
|
1026
|
+
e(this, jt).setAttribute("aria-expanded", "true");
|
|
1027
|
+
}, bi = function() {
|
|
1028
|
+
if (e(this, V))
|
|
1029
|
+
e(this, V).removeAttribute("open");
|
|
809
1030
|
else {
|
|
810
|
-
if (!e(this,
|
|
811
|
-
e(this,
|
|
812
|
-
}
|
|
813
|
-
e(this,
|
|
814
|
-
},
|
|
815
|
-
this.getAttribute(
|
|
816
|
-
},
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
1031
|
+
if (!e(this, _) || e(this, _).hidden) return;
|
|
1032
|
+
e(this, _).hidden = !0;
|
|
1033
|
+
}
|
|
1034
|
+
e(this, jt).setAttribute("aria-expanded", "false");
|
|
1035
|
+
}, Wi = function() {
|
|
1036
|
+
this.getAttribute(n.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(n.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
1037
|
+
}, Zi = function() {
|
|
1038
|
+
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
1039
|
+
}, m(ge, "observedAttributes", [
|
|
1040
|
+
...q(ge, ge, "observedAttributes"),
|
|
1041
|
+
n.CHANNEL_GROUP_ID,
|
|
1042
|
+
n.CHANNELS,
|
|
820
1043
|
"hidden"
|
|
821
1044
|
]);
|
|
822
|
-
let
|
|
823
|
-
const
|
|
824
|
-
|
|
1045
|
+
let Ji = ge;
|
|
1046
|
+
const An = document.createElement("template");
|
|
1047
|
+
An.innerHTML = /* HTML */
|
|
825
1048
|
`
|
|
826
1049
|
<style>
|
|
827
1050
|
:host {
|
|
@@ -850,48 +1073,48 @@ Cs.innerHTML = /* HTML */
|
|
|
850
1073
|
<slot name="right"></slot>
|
|
851
1074
|
</slot>
|
|
852
1075
|
`;
|
|
853
|
-
class
|
|
1076
|
+
class yn extends HTMLElement {
|
|
854
1077
|
constructor() {
|
|
855
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1078
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(An.content.cloneNode(!0));
|
|
856
1079
|
}
|
|
857
1080
|
connectedCallback() {
|
|
858
1081
|
}
|
|
859
1082
|
disconnectedCallback() {
|
|
860
1083
|
}
|
|
861
1084
|
}
|
|
862
|
-
|
|
863
|
-
class
|
|
1085
|
+
m(yn, "observedAttributes", []);
|
|
1086
|
+
class co extends li {
|
|
864
1087
|
constructor(t) {
|
|
865
1088
|
super();
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
1089
|
+
m(this, "config");
|
|
1090
|
+
m(this, "hlsUrl");
|
|
1091
|
+
m(this, "element");
|
|
1092
|
+
m(this, "connectingTimeout");
|
|
870
1093
|
/**
|
|
871
1094
|
* Update authentication token on an already established and authenticated connection.
|
|
872
1095
|
*/
|
|
873
|
-
|
|
1096
|
+
m(this, "updateAuthenticationToken", (t) => {
|
|
874
1097
|
});
|
|
875
1098
|
/**
|
|
876
1099
|
* Fully unloads the instance. This disconnects the current listeners.
|
|
877
1100
|
*/
|
|
878
|
-
|
|
1101
|
+
m(this, "unload", () => {
|
|
879
1102
|
this.element && (this.element.removeEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.element.remove());
|
|
880
1103
|
});
|
|
881
|
-
|
|
1104
|
+
m(this, "onAirPlayAvailable", (t) => {
|
|
882
1105
|
switch (t.availability) {
|
|
883
1106
|
case "available": {
|
|
884
|
-
this.element.src !== this.hlsUrl && this.checkHlsUrl(this.hlsUrl).then((
|
|
885
|
-
|
|
1107
|
+
this.element.src !== this.hlsUrl && this.checkHlsUrl(this.hlsUrl).then((s) => {
|
|
1108
|
+
s && (this.element.src = this.hlsUrl, this.emit("available"));
|
|
886
1109
|
});
|
|
887
1110
|
break;
|
|
888
1111
|
}
|
|
889
1112
|
}
|
|
890
1113
|
});
|
|
891
|
-
|
|
1114
|
+
m(this, "onAirPlayPlaybackChanged", () => {
|
|
892
1115
|
window.clearTimeout(this.connectingTimeout), this.element.webkitCurrentPlaybackTargetIsWireless ? (this.emit("connected"), this.element.style.display = "block", this.element.paused && this.element.play()) : (this.emit("disconnected"), this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl, this.element.style.display = "none");
|
|
893
1116
|
});
|
|
894
|
-
this.hlsUrl = new URL(`/api/hls?channelId=${t.channelId}`, t.url).toString(), this.config = t, this.element = document.createElement("video"), this.element.style.position = "absolute", this.element.style.top = "0", this.element.style.bottom = "0", this.element.style.left = "0", this.element.style.right = "0", this.element.style.width = "100%", this.element.style.height = "100%", this.element.style.zIndex = "1001", this.element.style.display = "none", this.element.id = "vindral-airplay-element", this.element.playsInline = !0, this.element.controls = !0, this.element.preload = "metadata", this.element.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.config.container.appendChild(this.element);
|
|
1117
|
+
this.hlsUrl = new URL(`/api/hls?channelId=${t.channelId}`, t.url).toString(), this.config = t, this.element = document.createElement("video"), this.element.style.position = "absolute", this.element.style.top = "0", this.element.style.bottom = "0", this.element.style.left = "0", this.element.style.right = "0", this.element.style.width = "100%", this.element.style.height = "100%", this.element.style.zIndex = "1001", this.element.style.display = "none", this.element.id = "vindral-airplay-element", this.element.slot = "overlay", this.element.playsInline = !0, this.element.controls = !0, this.element.preload = "metadata", this.element.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.config.container.appendChild(this.element);
|
|
895
1118
|
}
|
|
896
1119
|
/**
|
|
897
1120
|
* True if the instance is casting right now.
|
|
@@ -920,55 +1143,55 @@ class Wn extends ri {
|
|
|
920
1143
|
return !!window.WebKitPlaybackTargetAvailabilityEvent;
|
|
921
1144
|
}
|
|
922
1145
|
checkHlsUrl(t) {
|
|
923
|
-
return
|
|
1146
|
+
return G(this, null, function* () {
|
|
924
1147
|
try {
|
|
925
1148
|
return (yield fetch(t, { method: "HEAD" })).ok;
|
|
926
|
-
} catch (
|
|
1149
|
+
} catch (i) {
|
|
927
1150
|
return !1;
|
|
928
1151
|
}
|
|
929
1152
|
});
|
|
930
1153
|
}
|
|
931
1154
|
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-call */
|
|
932
1155
|
}
|
|
933
|
-
const
|
|
1156
|
+
const St = class St extends li {
|
|
934
1157
|
constructor(t) {
|
|
935
1158
|
super();
|
|
936
|
-
|
|
937
|
-
|
|
1159
|
+
m(this, "container");
|
|
1160
|
+
m(this, "unload", () => {
|
|
938
1161
|
document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
|
|
939
1162
|
});
|
|
940
|
-
|
|
1163
|
+
m(this, "request", () => G(this, null, function* () {
|
|
941
1164
|
try {
|
|
942
1165
|
yield this.requestFn();
|
|
943
1166
|
} catch (t) {
|
|
944
1167
|
throw this.onChange(), t;
|
|
945
1168
|
}
|
|
946
1169
|
}));
|
|
947
|
-
|
|
1170
|
+
m(this, "exit", () => G(this, null, function* () {
|
|
948
1171
|
try {
|
|
949
1172
|
yield this.exitFn();
|
|
950
1173
|
} catch (t) {
|
|
951
1174
|
throw this.onChange(), t;
|
|
952
1175
|
}
|
|
953
1176
|
}));
|
|
954
|
-
|
|
1177
|
+
m(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen()));
|
|
955
1178
|
// into the yolo zone
|
|
956
1179
|
/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/unbound-method */
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1180
|
+
m(this, "isFullscreen", () => !!(document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen));
|
|
1181
|
+
m(this, "isSupported", () => St.isFullscreenApiSupported(this.container) || !this.isInIframe());
|
|
1182
|
+
m(this, "isFullscreenApiSupported", () => St.isFullscreenApiSupported(this.container));
|
|
1183
|
+
m(this, "isInIframe", () => window.location !== window.parent.location);
|
|
961
1184
|
this.container = t, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
|
|
962
1185
|
}
|
|
963
1186
|
get requestFn() {
|
|
964
|
-
return
|
|
1187
|
+
return St.isFullscreenApiSupported(this.container) ? (this.container.requestFullscreen || this.container.webkitRequestFullscreen || this.container.webkitEnterFullscreen || this.container.mozRequestFullScreen).bind(this.container) : () => new Promise((t) => {
|
|
965
1188
|
t();
|
|
966
1189
|
});
|
|
967
1190
|
}
|
|
968
1191
|
get exitFn() {
|
|
969
|
-
if (
|
|
970
|
-
const t = document.exitFullscreen,
|
|
971
|
-
return
|
|
1192
|
+
if (St.isFullscreenApiSupported(this.container) && this.isFullscreen()) {
|
|
1193
|
+
const t = document.exitFullscreen, i = document.webkitFullscreenElement && document.webkitExitFullscreen, s = document.mozFullscreenElement && document.mozCancelFullScreen, o = t || i || s;
|
|
1194
|
+
return o ? o.bind(document) : this.container.webkitExitFullscreen.bind(this.container);
|
|
972
1195
|
}
|
|
973
1196
|
return () => new Promise((t) => {
|
|
974
1197
|
t();
|
|
@@ -976,166 +1199,373 @@ const pt = class pt extends ri {
|
|
|
976
1199
|
}
|
|
977
1200
|
/* eslint-enable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/unbound-method */
|
|
978
1201
|
};
|
|
979
|
-
|
|
980
|
-
let
|
|
981
|
-
var
|
|
982
|
-
class
|
|
1202
|
+
m(St, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
|
|
1203
|
+
let be = St;
|
|
1204
|
+
var yi, ki, wi, Ii, Yt, Ci, Li, _e, Jt;
|
|
1205
|
+
class uo extends li {
|
|
983
1206
|
constructor(t) {
|
|
984
1207
|
super();
|
|
985
|
-
|
|
1208
|
+
m(this, "unload", () => {
|
|
986
1209
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange);
|
|
987
1210
|
});
|
|
988
|
-
|
|
1211
|
+
m(this, "request", () => G(this, null, function* () {
|
|
989
1212
|
try {
|
|
990
|
-
return yield e(this,
|
|
1213
|
+
return yield e(this, yi).call(this);
|
|
991
1214
|
} catch (t) {
|
|
992
1215
|
throw this.onChange(), t;
|
|
993
1216
|
}
|
|
994
1217
|
}));
|
|
995
|
-
|
|
1218
|
+
m(this, "exit", () => G(this, null, function* () {
|
|
996
1219
|
try {
|
|
997
|
-
return yield e(this,
|
|
1220
|
+
return yield e(this, ki).call(this);
|
|
998
1221
|
} catch (t) {
|
|
999
1222
|
throw this.onChange(), t;
|
|
1000
1223
|
}
|
|
1001
1224
|
}));
|
|
1002
|
-
|
|
1225
|
+
m(this, "onChange", () => {
|
|
1003
1226
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1004
1227
|
});
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
l(this,
|
|
1008
|
-
l(this,
|
|
1009
|
-
l(this,
|
|
1228
|
+
m(this, "isPictureInPictureActive", () => e(this, Li).call(this) || e(this, Ci).call(this));
|
|
1229
|
+
m(this, "isSupported", () => e(this, Jt).call(this) || e(this, Yt).call(this));
|
|
1230
|
+
l(this, yi, () => e(this, Yt).call(this) ? e(this, wi).call(this) : e(this, Jt).call(this) ? e(this, _e).call(this, "picture-in-picture") : Promise.resolve());
|
|
1231
|
+
l(this, ki, () => this.isPictureInPictureActive() ? e(this, Yt).call(this) ? e(this, Ii).call(this) : e(this, Jt).call(this) ? e(this, _e).call(this, "inline") : Promise.resolve() : Promise.resolve());
|
|
1232
|
+
l(this, wi, () => G(this, null, function* () {
|
|
1010
1233
|
yield this.element.requestPictureInPicture();
|
|
1011
1234
|
}));
|
|
1012
|
-
l(this,
|
|
1235
|
+
l(this, Ii, () => G(this, null, function* () {
|
|
1013
1236
|
yield document.exitPictureInPicture();
|
|
1014
1237
|
}));
|
|
1015
|
-
l(this,
|
|
1016
|
-
l(this,
|
|
1017
|
-
l(this,
|
|
1018
|
-
l(this,
|
|
1019
|
-
l(this,
|
|
1238
|
+
l(this, Yt, () => !!this.element.requestPictureInPicture && !!document.pictureInPictureEnabled);
|
|
1239
|
+
l(this, Ci, () => !!document.pictureInPictureElement);
|
|
1240
|
+
l(this, Li, () => this.element.webkitPresentationMode === "picture-in-picture");
|
|
1241
|
+
l(this, _e, (t) => (this.element.webkitSetPresentationMode && this.element.webkitSetPresentationMode(t), Promise.resolve()));
|
|
1242
|
+
l(this, Jt, () => !!this.element.webkitSetPresentationMode);
|
|
1020
1243
|
this.element = t, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.setAttribute("autopictureinpicture", "");
|
|
1021
1244
|
}
|
|
1022
1245
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1246
|
+
yi = new WeakMap(), ki = new WeakMap(), wi = new WeakMap(), Ii = new WeakMap(), Yt = new WeakMap(), Ci = new WeakMap(), Li = new WeakMap(), _e = new WeakMap(), Jt = new WeakMap();
|
|
1247
|
+
class Gs extends li {
|
|
1248
|
+
constructor(t) {
|
|
1249
|
+
super();
|
|
1250
|
+
m(this, "audioContext");
|
|
1251
|
+
m(this, "audioNode");
|
|
1252
|
+
m(this, "bufferLength");
|
|
1253
|
+
m(this, "animationFrameId", null);
|
|
1254
|
+
m(this, "canUseFloatTimeDomainData");
|
|
1255
|
+
m(this, "byteSampleBuffer", null);
|
|
1256
|
+
m(this, "floatSampleBuffer", null);
|
|
1257
|
+
m(this, "leftAnalyser");
|
|
1258
|
+
m(this, "rightAnalyser");
|
|
1259
|
+
m(this, "mediaElementSource", null);
|
|
1260
|
+
m(this, "update", () => {
|
|
1261
|
+
const t = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), i = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
1262
|
+
this.emit("on decibel change", { left: t, right: i }), this.animationFrameId = requestAnimationFrame(this.update);
|
|
1263
|
+
});
|
|
1264
|
+
if (this.source = t, t instanceof HTMLMediaElement) {
|
|
1265
|
+
const i = new AudioContext();
|
|
1266
|
+
this.mediaElementSource = i.createMediaElementSource(t), this.audioNode = i.createChannelSplitter(2), this.mediaElementSource.connect(this.audioNode), this.audioContext = i, this.mediaElementSource.connect(this.audioContext.destination);
|
|
1267
|
+
} else
|
|
1268
|
+
this.audioNode = t, this.audioContext = this.audioNode.context;
|
|
1269
|
+
this.leftAnalyser = this.audioNode.context.createAnalyser(), this.rightAnalyser = this.audioNode.context.createAnalyser(), this.audioNode.connect(this.leftAnalyser, 0), this.audioNode.connect(this.rightAnalyser, 1), this.canUseFloatTimeDomainData = typeof this.leftAnalyser.getFloatTimeDomainData == "function", this.leftAnalyser.fftSize = 1024, this.rightAnalyser.fftSize = 1024, this.bufferLength = this.leftAnalyser.fftSize, this.canUseFloatTimeDomainData ? this.floatSampleBuffer = new Float32Array(this.bufferLength) : this.byteSampleBuffer = new Uint8Array(this.bufferLength);
|
|
1270
|
+
}
|
|
1271
|
+
getDecibel(t, i) {
|
|
1272
|
+
let s = 0;
|
|
1273
|
+
if (this.canUseFloatTimeDomainData) {
|
|
1274
|
+
t.getFloatTimeDomainData(i);
|
|
1275
|
+
for (let o = 0; o < i.length; o++) {
|
|
1276
|
+
const p = i[o];
|
|
1277
|
+
if (p) {
|
|
1278
|
+
const u = p ** 2;
|
|
1279
|
+
s = Math.max(u, s);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
} else {
|
|
1283
|
+
t.getByteTimeDomainData(i);
|
|
1284
|
+
for (let o = 0; o < i.length; o++) {
|
|
1285
|
+
const p = i[o];
|
|
1286
|
+
if (p) {
|
|
1287
|
+
const u = (p / 128 - 1) ** 2;
|
|
1288
|
+
s = Math.max(u, s);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
return 10 * Math.log10(s);
|
|
1293
|
+
}
|
|
1294
|
+
start() {
|
|
1295
|
+
this.animationFrameId === null && (this.audioContext instanceof AudioContext && this.audioContext.state === "suspended" ? this.audioContext.resume().then(() => {
|
|
1296
|
+
this.update();
|
|
1297
|
+
}) : this.update());
|
|
1298
|
+
}
|
|
1299
|
+
stop() {
|
|
1300
|
+
this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
|
|
1301
|
+
}
|
|
1302
|
+
unload() {
|
|
1303
|
+
var t;
|
|
1304
|
+
this.stop(), (t = this.mediaElementSource) == null || t.disconnect(), this.leftAnalyser.disconnect(), this.rightAnalyser.disconnect(), this.audioNode.disconnect();
|
|
1305
|
+
}
|
|
1306
|
+
get isMediaElementSource() {
|
|
1307
|
+
return this.source instanceof HTMLMediaElement;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
const $s = (d) => {
|
|
1025
1311
|
var t;
|
|
1026
|
-
let
|
|
1027
|
-
return !
|
|
1028
|
-
},
|
|
1029
|
-
|
|
1312
|
+
let a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0;
|
|
1313
|
+
return !a && ((t = d.nodeName) != null && t.includes("-")) && (globalThis.customElements.upgrade(d), a = "observedAttributes" in d.constructor ? d.constructor.observedAttributes : void 0), Array.isArray(a) ? a.filter((i) => Ks.includes(i)) : [];
|
|
1314
|
+
}, kn = document.createElement("template");
|
|
1315
|
+
kn.innerHTML = /* HTML */
|
|
1030
1316
|
`
|
|
1031
1317
|
<style>
|
|
1032
1318
|
:host {
|
|
1033
1319
|
position: relative;
|
|
1034
1320
|
}
|
|
1035
1321
|
|
|
1036
|
-
slot > svg {
|
|
1037
|
-
display: block;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
1322
|
:host([hidden]) {
|
|
1041
1323
|
display: none;
|
|
1042
1324
|
}
|
|
1043
1325
|
</style>
|
|
1044
1326
|
`;
|
|
1045
|
-
var
|
|
1046
|
-
class
|
|
1327
|
+
var Qt, Wt, $, Pe, Ti, xi, he, wn, In;
|
|
1328
|
+
class Us extends tt {
|
|
1047
1329
|
constructor() {
|
|
1048
1330
|
var t;
|
|
1049
1331
|
super();
|
|
1050
|
-
l(this,
|
|
1051
|
-
l(this,
|
|
1052
|
-
l(this,
|
|
1053
|
-
l(this,
|
|
1054
|
-
l(this,
|
|
1055
|
-
l(this,
|
|
1056
|
-
t.composedPath().includes(this) ||
|
|
1332
|
+
l(this, he);
|
|
1333
|
+
l(this, Qt);
|
|
1334
|
+
l(this, Wt);
|
|
1335
|
+
l(this, $);
|
|
1336
|
+
l(this, Pe, null);
|
|
1337
|
+
l(this, Ti, (t) => {
|
|
1338
|
+
t.composedPath().includes(this) || this.hide();
|
|
1057
1339
|
});
|
|
1058
|
-
l(this,
|
|
1059
|
-
|
|
1340
|
+
l(this, xi, () => {
|
|
1341
|
+
this.hide();
|
|
1060
1342
|
});
|
|
1061
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
1343
|
+
(t = this.shadowRoot) == null || t.appendChild(kn.content.cloneNode(!0));
|
|
1062
1344
|
}
|
|
1063
1345
|
connectedCallback() {
|
|
1064
|
-
var
|
|
1346
|
+
var p, u, v, g;
|
|
1065
1347
|
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-haspopup", "listbox");
|
|
1066
|
-
const t = (
|
|
1067
|
-
(
|
|
1068
|
-
const
|
|
1069
|
-
Promise.all(
|
|
1070
|
-
var
|
|
1071
|
-
(
|
|
1348
|
+
const t = (p = this.getAttribute("list-position")) != null ? p : "top";
|
|
1349
|
+
(u = e(this, Wt)) == null || u.setAttribute("list-position", t);
|
|
1350
|
+
const i = this.getRootNode(), o = [...(g = (v = this.shadowRoot) == null ? void 0 : v.querySelectorAll(":not(:defined)")) != null ? g : []].map((P) => customElements.whenDefined(P.localName));
|
|
1351
|
+
Promise.all(o).then(() => {
|
|
1352
|
+
var P;
|
|
1353
|
+
(i instanceof Document || i instanceof ShadowRoot) && (c(this, Pe, i.querySelector("vindral-controller")), (P = e(this, Pe)) == null || P.connectListener(this));
|
|
1072
1354
|
});
|
|
1073
1355
|
}
|
|
1074
1356
|
set button(t) {
|
|
1075
|
-
|
|
1357
|
+
c(this, Qt, t);
|
|
1076
1358
|
}
|
|
1077
1359
|
set listbox(t) {
|
|
1078
|
-
|
|
1360
|
+
c(this, Wt, t);
|
|
1079
1361
|
}
|
|
1080
1362
|
set listboxSlot(t) {
|
|
1081
|
-
|
|
1363
|
+
c(this, $, t);
|
|
1082
1364
|
}
|
|
1083
1365
|
enable() {
|
|
1084
|
-
super.enable(), this.addEventListener("change", e(this,
|
|
1366
|
+
super.enable(), this.addEventListener("change", e(this, xi)), document.addEventListener("click", e(this, Ti));
|
|
1367
|
+
}
|
|
1368
|
+
hide() {
|
|
1369
|
+
var t, i;
|
|
1370
|
+
!e(this, $) || (t = e(this, $)) != null && t.hidden || (e(this, $).hidden = !0, (i = e(this, Qt)) == null || i.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 })), this.focus());
|
|
1085
1371
|
}
|
|
1086
1372
|
handleClick(t) {
|
|
1087
|
-
e(this,
|
|
1373
|
+
e(this, $) && !t.composedPath().includes(e(this, $)) && r(this, he, wn).call(this);
|
|
1088
1374
|
}
|
|
1089
1375
|
}
|
|
1090
|
-
|
|
1376
|
+
Qt = new WeakMap(), Wt = new WeakMap(), $ = new WeakMap(), Pe = new WeakMap(), Ti = new WeakMap(), xi = new WeakMap(), he = new WeakSet(), wn = function() {
|
|
1091
1377
|
var t;
|
|
1092
|
-
(t = e(this,
|
|
1093
|
-
},
|
|
1094
|
-
var t,
|
|
1095
|
-
(t = e(this,
|
|
1096
|
-
}, Oe = function() {
|
|
1097
|
-
var t, n;
|
|
1098
|
-
!e(this, M) || (t = e(this, M)) != null && t.hidden || (e(this, M).hidden = !0, (n = e(this, _t)) == null || n.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(v.UNLOCK_UI, { bubbles: !0, composed: !0 })));
|
|
1378
|
+
(t = e(this, $)) != null && t.hidden ? r(this, he, In).call(this) : this.hide();
|
|
1379
|
+
}, In = function() {
|
|
1380
|
+
var t, i, s;
|
|
1381
|
+
(t = e(this, $)) != null && t.hidden && (e(this, $).hidden = !1, (i = e(this, Qt)) == null || i.setAttribute("aria-expanded", "true"), (s = e(this, Wt)) == null || s.focus(), this.dispatchEvent(new CustomEvent(f.LOCK_UI, { bubbles: !0, composed: !0 })));
|
|
1099
1382
|
};
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1383
|
+
const Cn = document.createElement("template");
|
|
1384
|
+
Cn.innerHTML = /* HTML */
|
|
1102
1385
|
`
|
|
1103
1386
|
<style>
|
|
1104
1387
|
:host {
|
|
1105
|
-
--
|
|
1106
|
-
--
|
|
1107
|
-
--
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1388
|
+
--value: 0;
|
|
1389
|
+
--_focus-box-shadow: none;
|
|
1390
|
+
height: calc(var(--button-icon-size) + 2 * var(--button-padding));
|
|
1391
|
+
width: 100%;
|
|
1392
|
+
display: flex;
|
|
1393
|
+
align-items: center;
|
|
1394
|
+
justify-content: center;
|
|
1395
|
+
padding: 0;
|
|
1396
|
+
margin: 0;
|
|
1397
|
+
position: relative;
|
|
1398
|
+
cursor: pointer;
|
|
1399
|
+
pointer-events: auto;
|
|
1400
|
+
touch-action: none;
|
|
1401
|
+
box-shadow: var(--_focus-visible-box-shadow, none);
|
|
1402
|
+
outline: 0;
|
|
1403
|
+
background: transparent;
|
|
1404
|
+
transition: background 0.2s linear;
|
|
1405
|
+
}
|
|
1112
1406
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1407
|
+
#range {
|
|
1408
|
+
-webkit-appearance: none;
|
|
1409
|
+
appearance: none;
|
|
1116
1410
|
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
--padding-5: var(--vindral-padding-5, 32px);
|
|
1411
|
+
height: 4px;
|
|
1412
|
+
width: 100%;
|
|
1413
|
+
margin: 0;
|
|
1414
|
+
padding: 0;
|
|
1122
1415
|
|
|
1123
|
-
|
|
1416
|
+
background-color: #00000000;
|
|
1417
|
+
outline: none;
|
|
1418
|
+
z-index: 1;
|
|
1419
|
+
cursor: pointer;
|
|
1420
|
+
}
|
|
1124
1421
|
|
|
1125
|
-
|
|
1422
|
+
#range-track {
|
|
1423
|
+
position: absolute;
|
|
1424
|
+
top: calc(50% - 2px);
|
|
1425
|
+
left: 1px;
|
|
1426
|
+
width: calc(100% - 1px);
|
|
1427
|
+
height: 4px;
|
|
1428
|
+
background-color: rgb(255 255 255 / 0.2);
|
|
1429
|
+
overflow: hidden;
|
|
1430
|
+
cursor: pointer;
|
|
1431
|
+
}
|
|
1126
1432
|
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1433
|
+
#range-track::before {
|
|
1434
|
+
position: absolute;
|
|
1435
|
+
content: "";
|
|
1436
|
+
left: calc(-100%);
|
|
1437
|
+
top: 0;
|
|
1438
|
+
width: calc(100%);
|
|
1439
|
+
height: 100%;
|
|
1440
|
+
background-color: var(--fg-strong);
|
|
1441
|
+
transition: background-color 300ms ease-out;
|
|
1442
|
+
transform-origin: 100% 0%;
|
|
1443
|
+
transform: translateX(calc(var(--value) * 100%)) scaleX(1.2);
|
|
1444
|
+
}
|
|
1138
1445
|
|
|
1446
|
+
#range::-webkit-slider-thumb {
|
|
1447
|
+
-webkit-appearance: none;
|
|
1448
|
+
appearance: none;
|
|
1449
|
+
width: 12px;
|
|
1450
|
+
height: 12px;
|
|
1451
|
+
border-radius: 50%;
|
|
1452
|
+
background-color: var(--fg-strong);
|
|
1453
|
+
cursor: pointer;
|
|
1454
|
+
z-index: 1;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
#range::-moz-range-thumb {
|
|
1458
|
+
-moz-appearance: none;
|
|
1459
|
+
appearance: none;
|
|
1460
|
+
width: 12px;
|
|
1461
|
+
height: 12px;
|
|
1462
|
+
border-radius: 50%;
|
|
1463
|
+
background-color: var(--fg-strong);
|
|
1464
|
+
cursor: pointer;
|
|
1465
|
+
z-index: 1;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
:host(:focus-visible) {
|
|
1469
|
+
box-shadow: inset 0 0 0 2px var(--fg-strong);
|
|
1470
|
+
outline: 0;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
@media (hover: hover) and (pointer: fine) {
|
|
1474
|
+
:host(:hover) {
|
|
1475
|
+
background: rgba(255, 255, 255, 0.15);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
:host(:active) {
|
|
1480
|
+
background: rgba(255, 255, 255, 0.25);
|
|
1481
|
+
}
|
|
1482
|
+
</style>
|
|
1483
|
+
|
|
1484
|
+
<input type="range" id="range" min="0" max="1" step="any" value="0" />
|
|
1485
|
+
<div id="range-track"></div>
|
|
1486
|
+
`;
|
|
1487
|
+
var Zt, te, Me, De;
|
|
1488
|
+
class _s extends HTMLElement {
|
|
1489
|
+
constructor() {
|
|
1490
|
+
super();
|
|
1491
|
+
l(this, Zt, null);
|
|
1492
|
+
l(this, te);
|
|
1493
|
+
m(this, "range");
|
|
1494
|
+
l(this, Me, () => {
|
|
1495
|
+
this.range.matches(":focus-visible") && this.style.setProperty("--_focus-visible-box-shadow", "inset 0 0 0 2px var(--fg-strong)");
|
|
1496
|
+
});
|
|
1497
|
+
l(this, De, () => {
|
|
1498
|
+
this.style.removeProperty("--_focus-visible-box-shadow");
|
|
1499
|
+
});
|
|
1500
|
+
c(this, te, this.attachShadow({ mode: "open" })), e(this, te).appendChild(Cn.content.cloneNode(!0)), this.range = e(this, te).getElementById("range");
|
|
1501
|
+
}
|
|
1502
|
+
connectedCallback() {
|
|
1503
|
+
var t;
|
|
1504
|
+
c(this, Zt, this.closest("vindral-controller")), (t = e(this, Zt)) == null || t.connectListener(this), this.hasAttribute("disabled") || this.enable(), this.range.addEventListener("focusin", e(this, Me)), this.range.addEventListener("focusout", e(this, De));
|
|
1505
|
+
}
|
|
1506
|
+
disconnectedCallback() {
|
|
1507
|
+
var t;
|
|
1508
|
+
(t = e(this, Zt)) == null || t.disconnectListener(this), this.range.removeEventListener("focusin", e(this, Me)), this.range.removeEventListener("focusout", e(this, De));
|
|
1509
|
+
}
|
|
1510
|
+
attributeChangedCallback(t, i, s) {
|
|
1511
|
+
i !== s && (t === "disabled" && s ? this.disable() : this.enable(), this.updateBar());
|
|
1512
|
+
}
|
|
1513
|
+
enable() {
|
|
1514
|
+
this.addEventListener("input", this);
|
|
1515
|
+
}
|
|
1516
|
+
disable() {
|
|
1517
|
+
this.range.removeEventListener("input", this);
|
|
1518
|
+
}
|
|
1519
|
+
handleEvent(t) {
|
|
1520
|
+
t.type === "input" && this.updateBar();
|
|
1521
|
+
}
|
|
1522
|
+
updateBar() {
|
|
1523
|
+
this.style.setProperty("--value", this.range.value);
|
|
1524
|
+
}
|
|
1525
|
+
get keysUsed() {
|
|
1526
|
+
return ["ArrowUp", "ArrowRight", "ArrowDown", "ArrowLeft"];
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
Zt = new WeakMap(), te = new WeakMap(), Me = new WeakMap(), De = new WeakMap(), m(_s, "observedAttributes", ["disabled"]);
|
|
1530
|
+
const Ln = document.createElement("template");
|
|
1531
|
+
Ln.innerHTML = /* HTML */
|
|
1532
|
+
`
|
|
1533
|
+
<style>
|
|
1534
|
+
:host {
|
|
1535
|
+
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
1536
|
+
--fg-subtle: var(--vindral-fg-subtle, #b4b4b4);
|
|
1537
|
+
--fg-extra-subtle: var(--vindral-fg-extra-subtle, #7b7b7b);
|
|
1538
|
+
--bg-strong: var(--vindral-bg-strong, #111111);
|
|
1539
|
+
--bg-subtle: var(--vindral-bg-subtle, #191919);
|
|
1540
|
+
--bg-extra-subtle: var(--vindral-bg-extra-subtle, #222222);
|
|
1541
|
+
--bg-component: var(--vindral-bg-component, #222222);
|
|
1542
|
+
--bg-component-hover: var(--vindral-bg-component-hover, #2a2a2a);
|
|
1543
|
+
--bg-component-active: var(--vindral-bg-component-active, #313131);
|
|
1544
|
+
|
|
1545
|
+
--padding-1: var(--vindral-padding-1, 4px);
|
|
1546
|
+
--padding-2: var(--vindral-padding-2, 8px);
|
|
1547
|
+
--padding-3: var(--vindral-padding-3, 16px);
|
|
1548
|
+
--padding-4: var(--vindral-padding-4, 24px);
|
|
1549
|
+
--padding-5: var(--vindral-padding-5, 32px);
|
|
1550
|
+
--padding-6: var(--vindral-padding-6, 40px);
|
|
1551
|
+
--control-padding: var(--vindral-control-padding, var(--padding-1));
|
|
1552
|
+
|
|
1553
|
+
--ui-font: var(
|
|
1554
|
+
--vindral-ui-font,
|
|
1555
|
+
-apple-system,
|
|
1556
|
+
BlinkMacSystemFont,
|
|
1557
|
+
"Segoe UI",
|
|
1558
|
+
Roboto,
|
|
1559
|
+
"Helvetica Neue",
|
|
1560
|
+
Arial,
|
|
1561
|
+
sans-serif
|
|
1562
|
+
);
|
|
1563
|
+
|
|
1564
|
+
--button-padding: var(--vindral-button-padding, var(--padding-2));
|
|
1565
|
+
--button-icon-size: var(--vindral-button-icon-size, 24px);
|
|
1566
|
+
--play-overlay-icon-size: var(--vindral-play-overlay-icon-size, 72px);
|
|
1567
|
+
|
|
1568
|
+
--ui-display: var(--vindral-ui-display, flex);
|
|
1139
1569
|
--play-button-display: var(--vindral-play-button-display, flex);
|
|
1140
1570
|
--mute-button-display: var(--vindral-mute-button-display, flex);
|
|
1141
1571
|
--airplay-button-display: var(--vindral-airplay-button-display, flex);
|
|
@@ -1145,10 +1575,12 @@ Ls.innerHTML = /* HTML */
|
|
|
1145
1575
|
--grid-button-display: var(--vindral-grid-button-display, flex);
|
|
1146
1576
|
--grid-item-offline-display: var(--vindral-grid-item-offline-display, flex);
|
|
1147
1577
|
--volume-range-display: var(--vindral-volume-range-display, flex);
|
|
1578
|
+
--volume-meter-display: var(--vindral-volume-meter-display, flex);
|
|
1148
1579
|
--rendition-menu-display: var(--vindral-rendition-menu-display, flex);
|
|
1149
1580
|
--language-menu-display: var(--vindral-language-menu-display, flex);
|
|
1150
1581
|
--play-overlay-display: var(--vindral-play-overlay-display, flex);
|
|
1151
1582
|
--buffering-overlay-display: var(--vindral-buffering-overlay-display, flex);
|
|
1583
|
+
--poster-overlay-display: var(--vindral-poster-overlay-display, flex);
|
|
1152
1584
|
|
|
1153
1585
|
position: relative;
|
|
1154
1586
|
display: flex;
|
|
@@ -1208,11 +1640,15 @@ Ls.innerHTML = /* HTML */
|
|
|
1208
1640
|
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
|
1209
1641
|
}
|
|
1210
1642
|
|
|
1643
|
+
:host(:focus-visible) {
|
|
1644
|
+
outline: none;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1211
1647
|
:host(
|
|
1212
|
-
:not([${
|
|
1213
|
-
):not([${
|
|
1214
|
-
):not([${
|
|
1215
|
-
):not([${
|
|
1648
|
+
:not([${n.USER_INTERACTING}]
|
|
1649
|
+
):not([${n.PAUSED}]:not([${n.HIDE_UI_ON_PAUSE}])
|
|
1650
|
+
):not([${n.IS_CASTING}]
|
|
1651
|
+
):not([${n.MEDIA}="audio"])
|
|
1216
1652
|
)
|
|
1217
1653
|
#ui {
|
|
1218
1654
|
opacity: 0;
|
|
@@ -1221,16 +1657,16 @@ Ls.innerHTML = /* HTML */
|
|
|
1221
1657
|
}
|
|
1222
1658
|
|
|
1223
1659
|
:host(
|
|
1224
|
-
:not([${
|
|
1225
|
-
):not([${
|
|
1226
|
-
):not([${
|
|
1227
|
-
):not([${
|
|
1660
|
+
:not([${n.USER_INTERACTING}]
|
|
1661
|
+
):not([${n.PAUSED}]:not([${n.HIDE_UI_ON_PAUSE}])
|
|
1662
|
+
):not([${n.IS_CASTING}]
|
|
1663
|
+
):not([${n.MEDIA}="audio"])
|
|
1228
1664
|
)
|
|
1229
1665
|
#ui > * {
|
|
1230
1666
|
pointer-events: none;
|
|
1231
1667
|
}
|
|
1232
1668
|
|
|
1233
|
-
:host([${
|
|
1669
|
+
:host([${n.FULLSCREEN}][${n.FULLSCREEN_FALLBACK}]) {
|
|
1234
1670
|
position: fixed !important;
|
|
1235
1671
|
inset: 0 !important;
|
|
1236
1672
|
margin: 0 !important;
|
|
@@ -1253,7 +1689,7 @@ Ls.innerHTML = /* HTML */
|
|
|
1253
1689
|
object-fit: contain;
|
|
1254
1690
|
}
|
|
1255
1691
|
|
|
1256
|
-
:host([${
|
|
1692
|
+
:host([${n.MEDIA}="audio"]) {
|
|
1257
1693
|
min-height: 100px;
|
|
1258
1694
|
overflow: visible;
|
|
1259
1695
|
}
|
|
@@ -1270,437 +1706,526 @@ Ls.innerHTML = /* HTML */
|
|
|
1270
1706
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1271
1707
|
</div>
|
|
1272
1708
|
`;
|
|
1273
|
-
|
|
1274
|
-
|
|
1709
|
+
const $i = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
1710
|
+
var Si, it, Oe, vt, gt, b, Fe, st, nt, ee, rt, B, J, F, ot, He, ze, N, ft, h, ts, Tn, xn, Sn, es, Nn, Rn, Un, Ge, _n, Pn, Mn, Dn, $e, Ni, Ri, On, Ut, is, ss, mi, pt, Fn, Hn, zn, ns, Ui, _i, rs, A, w;
|
|
1711
|
+
const fe = class fe extends HTMLElement {
|
|
1275
1712
|
constructor() {
|
|
1276
1713
|
super();
|
|
1277
|
-
l(this,
|
|
1278
|
-
l(this,
|
|
1279
|
-
l(this,
|
|
1280
|
-
l(this,
|
|
1281
|
-
l(this,
|
|
1282
|
-
l(this,
|
|
1283
|
-
l(this,
|
|
1284
|
-
l(this, et);
|
|
1285
|
-
l(this, X);
|
|
1286
|
-
l(this, Mt);
|
|
1287
|
-
l(this, it);
|
|
1288
|
-
l(this, D);
|
|
1714
|
+
l(this, h);
|
|
1715
|
+
l(this, it, /* @__PURE__ */ new Map());
|
|
1716
|
+
l(this, Oe, 2e3);
|
|
1717
|
+
l(this, vt, null);
|
|
1718
|
+
l(this, gt, null);
|
|
1719
|
+
l(this, b);
|
|
1720
|
+
l(this, Fe, e(fe, Si));
|
|
1289
1721
|
l(this, st);
|
|
1290
|
-
l(this,
|
|
1291
|
-
l(this,
|
|
1292
|
-
l(this,
|
|
1722
|
+
l(this, nt);
|
|
1723
|
+
l(this, ee);
|
|
1724
|
+
l(this, rt);
|
|
1725
|
+
l(this, B);
|
|
1726
|
+
l(this, J);
|
|
1727
|
+
l(this, F);
|
|
1728
|
+
l(this, ot);
|
|
1729
|
+
l(this, He);
|
|
1730
|
+
l(this, ze);
|
|
1293
1731
|
l(this, N);
|
|
1294
|
-
l(this,
|
|
1295
|
-
|
|
1732
|
+
l(this, ft, null);
|
|
1733
|
+
l(this, Ge, 0);
|
|
1734
|
+
m(this, "handleEvent", (t) => {
|
|
1296
1735
|
switch (t.type) {
|
|
1297
1736
|
case "pointerdown":
|
|
1298
|
-
|
|
1737
|
+
c(this, Ge, t.timeStamp);
|
|
1299
1738
|
break;
|
|
1300
1739
|
case "pointermove":
|
|
1301
|
-
|
|
1740
|
+
r(this, h, _n).call(this, t);
|
|
1302
1741
|
break;
|
|
1303
1742
|
case "pointerup":
|
|
1304
|
-
|
|
1743
|
+
r(this, h, Pn).call(this, t);
|
|
1305
1744
|
break;
|
|
1306
1745
|
case "mouseleave":
|
|
1307
|
-
|
|
1746
|
+
r(this, h, pt).call(this);
|
|
1308
1747
|
break;
|
|
1309
1748
|
case "dblclick":
|
|
1310
|
-
|
|
1749
|
+
r(this, h, Mn).call(this, t);
|
|
1311
1750
|
break;
|
|
1312
1751
|
case "mousemove":
|
|
1313
|
-
|
|
1752
|
+
r(this, h, Dn).call(this, t);
|
|
1753
|
+
break;
|
|
1754
|
+
case "keydown":
|
|
1755
|
+
e(this, Ri).call(this, t);
|
|
1756
|
+
break;
|
|
1757
|
+
case "keyup":
|
|
1758
|
+
r(this, h, pt).call(this), e(this, Ni).call(this, t);
|
|
1314
1759
|
break;
|
|
1315
1760
|
}
|
|
1316
1761
|
});
|
|
1317
|
-
l(this,
|
|
1318
|
-
var
|
|
1319
|
-
if (e(this,
|
|
1762
|
+
l(this, $e, (t) => {
|
|
1763
|
+
var i;
|
|
1764
|
+
if (e(this, b) && (e(this, N).debug("Vindral event", { type: t.type }), t instanceof CustomEvent))
|
|
1320
1765
|
switch (t.type) {
|
|
1321
|
-
case
|
|
1322
|
-
this.removeAttribute(
|
|
1766
|
+
case f.PLAY:
|
|
1767
|
+
this.removeAttribute(n.PAUSED);
|
|
1323
1768
|
break;
|
|
1324
|
-
case
|
|
1325
|
-
this.setAttribute(
|
|
1769
|
+
case f.PAUSE:
|
|
1770
|
+
this.setAttribute(n.PAUSED, "");
|
|
1326
1771
|
break;
|
|
1327
|
-
case
|
|
1328
|
-
this.setAttribute(
|
|
1772
|
+
case f.MUTE:
|
|
1773
|
+
this.setAttribute(n.MUTED, "");
|
|
1329
1774
|
break;
|
|
1330
|
-
case
|
|
1331
|
-
this.removeAttribute(
|
|
1775
|
+
case f.UNMUTE:
|
|
1776
|
+
this.removeAttribute(n.MUTED);
|
|
1332
1777
|
break;
|
|
1333
|
-
case
|
|
1334
|
-
this.setAttribute(
|
|
1778
|
+
case f.LOCK_UI:
|
|
1779
|
+
this.setAttribute(n.UI_LOCKED, "");
|
|
1335
1780
|
break;
|
|
1336
|
-
case
|
|
1337
|
-
this.removeAttribute(
|
|
1781
|
+
case f.UNLOCK_UI:
|
|
1782
|
+
this.removeAttribute(n.UI_LOCKED);
|
|
1338
1783
|
break;
|
|
1339
|
-
case
|
|
1340
|
-
this.setAttribute(
|
|
1784
|
+
case f.ENTER_FULLSCREEN:
|
|
1785
|
+
this.setAttribute(n.FULLSCREEN, "");
|
|
1341
1786
|
break;
|
|
1342
|
-
case
|
|
1343
|
-
this.removeAttribute(
|
|
1787
|
+
case f.EXIT_FULLSCREEN:
|
|
1788
|
+
this.removeAttribute(n.FULLSCREEN);
|
|
1344
1789
|
break;
|
|
1345
|
-
case
|
|
1790
|
+
case f.SET_RENDITION:
|
|
1346
1791
|
{
|
|
1347
|
-
const
|
|
1348
|
-
|
|
1792
|
+
const s = t.detail;
|
|
1793
|
+
s.audio && (e(this, b).maxAudioBitRate = s.audio.bitRate), s.video && (e(this, b).maxVideoBitRate = s.video.bitRate, e(this, b).maxSize = s.video, this.setAttribute(n.MAX_VIDEO_BITRATE, String(s.video.bitRate)));
|
|
1349
1794
|
}
|
|
1350
1795
|
break;
|
|
1351
|
-
case
|
|
1352
|
-
|
|
1796
|
+
case f.CHANNEL_GRID_OPENED: {
|
|
1797
|
+
e(this, ft) === null && r(this, h, is).call(this);
|
|
1353
1798
|
break;
|
|
1354
1799
|
}
|
|
1355
|
-
case
|
|
1356
|
-
this
|
|
1800
|
+
case f.CHANNEL_GRID_CLOSED: {
|
|
1801
|
+
e(this, ft) !== null && (clearTimeout(e(this, ft)), c(this, ft, null));
|
|
1357
1802
|
break;
|
|
1358
|
-
|
|
1359
|
-
|
|
1803
|
+
}
|
|
1804
|
+
case f.ENTER_PIP:
|
|
1805
|
+
this.setAttribute(n.IS_PIP, "");
|
|
1806
|
+
break;
|
|
1807
|
+
case f.EXIT_PIP:
|
|
1808
|
+
this.removeAttribute(n.IS_PIP);
|
|
1360
1809
|
break;
|
|
1361
|
-
case
|
|
1362
|
-
(
|
|
1810
|
+
case f.REQUEST_AIRPLAY:
|
|
1811
|
+
(i = e(this, J)) == null || i.showPlaybackTargetPicker();
|
|
1363
1812
|
break;
|
|
1364
|
-
case
|
|
1365
|
-
|
|
1813
|
+
case f.SET_LANGUAGE:
|
|
1814
|
+
L(t.detail) ? this.setAttribute(n.LANGUAGE, t.detail) : this.removeAttribute(n.LANGUAGE);
|
|
1366
1815
|
break;
|
|
1367
|
-
case
|
|
1368
|
-
|
|
1816
|
+
case f.SET_TEXT_TRACK:
|
|
1817
|
+
L(t.detail) ? this.setAttribute(n.TEXT_TRACK, t.detail) : this.removeAttribute(n.TEXT_TRACK);
|
|
1369
1818
|
break;
|
|
1370
|
-
case
|
|
1371
|
-
|
|
1819
|
+
case f.REQUEST_USER_INPUT:
|
|
1820
|
+
e(this, b).play(), e(this, b).muted = !1;
|
|
1372
1821
|
break;
|
|
1373
|
-
case
|
|
1822
|
+
case f.SET_VOLUME:
|
|
1374
1823
|
{
|
|
1375
|
-
const
|
|
1376
|
-
e(this,
|
|
1824
|
+
const s = t.detail;
|
|
1825
|
+
e(this, b).muted && s > 0 ? e(this, b).muted = !1 : s === 0 && (e(this, b).muted = !0), this.setAttribute(n.VOLUME, s.toString());
|
|
1377
1826
|
}
|
|
1378
1827
|
break;
|
|
1379
1828
|
}
|
|
1380
1829
|
});
|
|
1381
|
-
l(this,
|
|
1382
|
-
|
|
1830
|
+
l(this, Ni, (t) => {
|
|
1831
|
+
const { key: i } = t;
|
|
1832
|
+
if (!$i.includes(i)) {
|
|
1833
|
+
this.removeEventListener("keyup", this);
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
r(this, h, On).call(this, t);
|
|
1837
|
+
});
|
|
1838
|
+
l(this, Ri, (t) => {
|
|
1839
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
1840
|
+
i || s || !$i.includes(o) || this.addEventListener("keyup", this, { once: !0 });
|
|
1841
|
+
});
|
|
1842
|
+
l(this, Ut, null);
|
|
1843
|
+
l(this, Ui, () => {
|
|
1844
|
+
var i, s, o;
|
|
1383
1845
|
if (!("orientation" in screen) || !screen.orientation.lock)
|
|
1384
1846
|
return;
|
|
1385
|
-
const t = (
|
|
1386
|
-
t != null && t.video && screen.orientation.lock(((
|
|
1847
|
+
const t = (i = e(this, b)) == null ? void 0 : i.currentRenditionLevel;
|
|
1848
|
+
t != null && t.video && screen.orientation.lock(((s = t == null ? void 0 : t.video) == null ? void 0 : s.width) > ((o = t == null ? void 0 : t.video) == null ? void 0 : o.height) ? "landscape-primary" : "portrait-primary").catch(() => {
|
|
1387
1849
|
});
|
|
1388
1850
|
});
|
|
1389
|
-
l(this,
|
|
1851
|
+
l(this, _i, () => {
|
|
1390
1852
|
!("orientation" in screen) || !screen.orientation.unlock || screen.orientation.unlock();
|
|
1391
1853
|
});
|
|
1392
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1854
|
+
this.attachShadow({ mode: "open" }).appendChild(Ln.content.cloneNode(!0));
|
|
1855
|
+
const i = Gi(this.getAttribute("log-level"));
|
|
1856
|
+
c(this, N, Vr.get().createContext("VindralController")), e(this, N).setLevel(i);
|
|
1395
1857
|
}
|
|
1396
1858
|
connectedCallback() {
|
|
1397
|
-
return
|
|
1398
|
-
|
|
1399
|
-
for (const
|
|
1400
|
-
this.addEventListener(
|
|
1401
|
-
window.PointerEvent ? (this.addEventListener("pointerdown", this), this.addEventListener("pointermove", this), this.addEventListener("pointerup", this)) : this.addEventListener("mousemove", this), this.addEventListener("mouseleave", this), this.addEventListener("
|
|
1859
|
+
return G(this, null, function* () {
|
|
1860
|
+
x(this.getAttribute("auto-instance-enabled"), !0) && (yield r(this, h, ts).call(this));
|
|
1861
|
+
for (const i of Object.values(f))
|
|
1862
|
+
this.addEventListener(i, e(this, $e));
|
|
1863
|
+
window.PointerEvent ? (this.addEventListener("pointerdown", this), this.addEventListener("pointermove", this), this.addEventListener("pointerup", this)) : this.addEventListener("mousemove", this), this.addEventListener("mouseleave", this), this.addEventListener("keydown", this), this.addEventListener("resize", this), this.addEventListener("dblclick", this), this.connectListener(this);
|
|
1402
1864
|
});
|
|
1403
1865
|
}
|
|
1404
1866
|
disconnectedCallback() {
|
|
1405
|
-
var t,
|
|
1406
|
-
(t = e(this,
|
|
1407
|
-
for (const
|
|
1408
|
-
this.removeEventListener(
|
|
1867
|
+
var t, i, s, o;
|
|
1868
|
+
(t = e(this, b)) == null || t.unload(), (i = e(this, rt)) == null || i.unload(), (s = e(this, B)) == null || s.unload(), (o = e(this, F)) == null || o.unload();
|
|
1869
|
+
for (const p of Object.values(f))
|
|
1870
|
+
this.removeEventListener(p, e(this, $e));
|
|
1409
1871
|
this.disconnectListener(this);
|
|
1410
1872
|
}
|
|
1411
|
-
attributeChangedCallback(t,
|
|
1412
|
-
var
|
|
1413
|
-
if (
|
|
1414
|
-
switch (e(this, N).debug("Attribute changed", { name: t, oldValue:
|
|
1873
|
+
attributeChangedCallback(t, i, s) {
|
|
1874
|
+
var o, p, u, v, g, P, et, Y, Ct, Lt, Tt, hi, di;
|
|
1875
|
+
if (i != s)
|
|
1876
|
+
switch (e(this, N).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
1415
1877
|
case "channel-id":
|
|
1416
|
-
|
|
1878
|
+
c(this, st, s), e(this, b) && s && (e(this, b).channelId = s, e(this, b).play(), r(this, h, A).call(this, n.BUFFERING, ""), r(this, h, A).call(this, n.CHANNEL_ID, s), r(this, h, A).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl()));
|
|
1417
1879
|
break;
|
|
1418
1880
|
case "channel-group-id":
|
|
1419
|
-
|
|
1881
|
+
c(this, nt, s);
|
|
1420
1882
|
break;
|
|
1421
1883
|
case "url":
|
|
1422
|
-
|
|
1884
|
+
s && c(this, Fe, s);
|
|
1423
1885
|
break;
|
|
1424
1886
|
case "paused":
|
|
1425
|
-
|
|
1887
|
+
L(s) ? (o = e(this, b)) == null || o.pause() : (r(this, h, w).call(this, n.NEEDS_USER_INPUT_VIDEO), (p = e(this, b)) == null || p.play());
|
|
1426
1888
|
break;
|
|
1427
1889
|
case "target-buffer-time":
|
|
1428
|
-
if (e(this,
|
|
1429
|
-
const
|
|
1430
|
-
Number.isNaN(
|
|
1890
|
+
if (e(this, b) && s) {
|
|
1891
|
+
const z = parseInt(s, 10);
|
|
1892
|
+
Number.isNaN(z) || (e(this, b).targetBufferTime = z);
|
|
1431
1893
|
}
|
|
1432
1894
|
break;
|
|
1433
1895
|
case "user-interacting":
|
|
1434
|
-
|
|
1896
|
+
L(s) ? r(this, h, A).call(this, n.USER_INTERACTING, "") : r(this, h, w).call(this, n.USER_INTERACTING);
|
|
1435
1897
|
break;
|
|
1436
1898
|
case "muted":
|
|
1437
|
-
e(this,
|
|
1899
|
+
e(this, b) && (L(s) ? (e(this, b).muted = !0, r(this, h, A).call(this, n.MUTED, ""), (u = e(this, F)) != null && u.isMediaElementSource && ((v = e(this, F)) == null || v.stop(), r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })))) : (e(this, b).muted = !1, r(this, h, w).call(this, n.MUTED), r(this, h, w).call(this, n.NEEDS_USER_INPUT_AUDIO), e(this, b).volume === 0 && (e(this, b).volume = 0.3), (g = e(this, F)) == null || g.start()));
|
|
1438
1900
|
break;
|
|
1439
1901
|
case "ui-locked":
|
|
1440
|
-
|
|
1902
|
+
L(s) ? r(this, h, mi).call(this) : r(this, h, pt).call(this);
|
|
1441
1903
|
break;
|
|
1442
1904
|
case "is-fullscreen":
|
|
1443
|
-
|
|
1905
|
+
L(s) ? r(this, h, zn).call(this) : r(this, h, ns).call(this);
|
|
1444
1906
|
break;
|
|
1445
1907
|
case "max-video-bit-rate":
|
|
1446
|
-
|
|
1908
|
+
c(this, ee, s), L(s) ? r(this, h, A).call(this, n.MAX_VIDEO_BITRATE, s) : r(this, h, w).call(this, n.MAX_VIDEO_BITRATE);
|
|
1447
1909
|
break;
|
|
1448
|
-
case "
|
|
1449
|
-
|
|
1910
|
+
case "is-pip":
|
|
1911
|
+
L(s) ? r(this, h, Fn).call(this) : r(this, h, Hn).call(this);
|
|
1450
1912
|
break;
|
|
1451
1913
|
case "is-airplaying":
|
|
1452
|
-
|
|
1914
|
+
L(s) ? ((P = e(this, b)) != null && P.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (et = e(this, b)) == null || et.pause()) : (Y = e(this, b)) != null && Y.mediaElement && (e(this, b).mediaElement.style.display = "block");
|
|
1453
1915
|
break;
|
|
1454
1916
|
case "is-casting":
|
|
1455
|
-
|
|
1917
|
+
L(s) ? ((Ct = e(this, B)) != null && Ct.isFullscreen() && r(this, h, ns).call(this), (Lt = e(this, b)) == null || Lt.pause()) : document.hidden || (Tt = e(this, b)) == null || Tt.play();
|
|
1456
1918
|
break;
|
|
1457
1919
|
case "cast-receiver-id":
|
|
1458
|
-
|
|
1920
|
+
c(this, He, s);
|
|
1459
1921
|
break;
|
|
1460
1922
|
case "cast-background":
|
|
1461
|
-
|
|
1923
|
+
c(this, ze, s);
|
|
1462
1924
|
break;
|
|
1463
1925
|
case "language":
|
|
1464
|
-
e(this,
|
|
1926
|
+
e(this, b) && (e(this, b).language = s, L(s) ? r(this, h, A).call(this, n.LANGUAGE, s) : r(this, h, w).call(this, n.LANGUAGE));
|
|
1465
1927
|
break;
|
|
1466
1928
|
case "text-track":
|
|
1467
|
-
e(this,
|
|
1929
|
+
e(this, b) && (e(this, b).textTrack = s, L(s) ? r(this, h, A).call(this, n.TEXT_TRACK, s) : r(this, h, w).call(this, n.TEXT_TRACK));
|
|
1468
1930
|
break;
|
|
1469
1931
|
case "log-level":
|
|
1470
|
-
|
|
1932
|
+
L(s) && e(this, N).setLevel(Gi(s));
|
|
1471
1933
|
break;
|
|
1472
1934
|
case "authentication-token":
|
|
1473
|
-
|
|
1935
|
+
L(s) ? r(this, h, A).call(this, n.AUTHENTICATION_TOKEN, s) : r(this, h, w).call(this, n.AUTHENTICATION_TOKEN);
|
|
1474
1936
|
break;
|
|
1475
1937
|
case "volume":
|
|
1476
|
-
if (e(this,
|
|
1477
|
-
const
|
|
1478
|
-
e(this,
|
|
1938
|
+
if (e(this, b) && L(s)) {
|
|
1939
|
+
const z = parseFloat(s);
|
|
1940
|
+
e(this, b).volume = z;
|
|
1941
|
+
}
|
|
1942
|
+
break;
|
|
1943
|
+
case "drm-headers":
|
|
1944
|
+
if (L(s)) {
|
|
1945
|
+
const z = pi(s);
|
|
1946
|
+
z ? (hi = e(this, b)) == null || hi.drm.setHeaders(z) : e(this, N).warn("Invalid DRM headers format:", s);
|
|
1947
|
+
}
|
|
1948
|
+
break;
|
|
1949
|
+
case "drm-queryparams":
|
|
1950
|
+
if (L(s)) {
|
|
1951
|
+
const z = pi(s);
|
|
1952
|
+
z ? (di = e(this, b)) == null || di.drm.setQueryParams(z) : e(this, N).warn("Invalid DRM query parameters format:", s);
|
|
1479
1953
|
}
|
|
1480
1954
|
break;
|
|
1481
1955
|
}
|
|
1482
1956
|
}
|
|
1483
1957
|
connectListener(t) {
|
|
1484
|
-
|
|
1485
|
-
var
|
|
1486
|
-
const
|
|
1487
|
-
switch (
|
|
1488
|
-
case
|
|
1489
|
-
(((
|
|
1958
|
+
$s(t).forEach((s) => {
|
|
1959
|
+
var p, u;
|
|
1960
|
+
const o = e(this, it).get(s);
|
|
1961
|
+
switch (o ? o.push(t) : e(this, it).set(s, [t]), s) {
|
|
1962
|
+
case n.PAUSED:
|
|
1963
|
+
(((p = e(this, b)) == null ? void 0 : p.playbackState) === "paused" || this.hasAttribute(n.PAUSED)) && t.setAttribute(n.PAUSED, "");
|
|
1490
1964
|
break;
|
|
1491
|
-
case
|
|
1492
|
-
((
|
|
1965
|
+
case n.MUTED:
|
|
1966
|
+
((u = e(this, b)) != null && u.muted || this.hasAttribute(n.MUTED)) && t.setAttribute(n.MUTED, "");
|
|
1493
1967
|
break;
|
|
1494
|
-
case
|
|
1495
|
-
e(this,
|
|
1968
|
+
case n.MAX_VIDEO_BITRATE:
|
|
1969
|
+
e(this, ee) && t.setAttribute(n.MAX_VIDEO_BITRATE, e(this, ee));
|
|
1496
1970
|
break;
|
|
1497
|
-
case
|
|
1498
|
-
e(this,
|
|
1971
|
+
case n.CHANNEL_ID:
|
|
1972
|
+
e(this, st) && t.setAttribute(n.CHANNEL_ID, e(this, st));
|
|
1499
1973
|
break;
|
|
1500
|
-
case
|
|
1501
|
-
e(this,
|
|
1974
|
+
case n.CHANNEL_GROUP_ID:
|
|
1975
|
+
e(this, nt) && t.setAttribute(n.CHANNEL_GROUP_ID, e(this, nt));
|
|
1502
1976
|
break;
|
|
1503
|
-
case
|
|
1504
|
-
const
|
|
1505
|
-
|
|
1977
|
+
case n.AUTHENTICATION_TOKEN: {
|
|
1978
|
+
const v = this.getAttribute("authentication-token");
|
|
1979
|
+
v && t.setAttribute(n.AUTHENTICATION_TOKEN, v);
|
|
1506
1980
|
break;
|
|
1507
1981
|
}
|
|
1508
1982
|
}
|
|
1509
1983
|
});
|
|
1510
1984
|
}
|
|
1511
1985
|
disconnectListener(t) {
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1986
|
+
$s(t).forEach((s) => {
|
|
1987
|
+
const o = e(this, it).get(s);
|
|
1988
|
+
o && e(this, it).set(
|
|
1989
|
+
s,
|
|
1990
|
+
o.filter((p) => p != t)
|
|
1517
1991
|
);
|
|
1518
1992
|
});
|
|
1519
1993
|
}
|
|
1520
1994
|
get instance() {
|
|
1521
|
-
return e(this,
|
|
1995
|
+
return e(this, b);
|
|
1996
|
+
}
|
|
1997
|
+
get airPlay() {
|
|
1998
|
+
return e(this, J);
|
|
1522
1999
|
}
|
|
1523
2000
|
connect() {
|
|
1524
|
-
|
|
2001
|
+
r(this, h, ts).call(this);
|
|
1525
2002
|
}
|
|
1526
2003
|
};
|
|
1527
|
-
|
|
1528
|
-
return
|
|
1529
|
-
var
|
|
1530
|
-
if (!e(this,
|
|
1531
|
-
yield (
|
|
1532
|
-
const t = this.hasAttribute(
|
|
1533
|
-
|
|
1534
|
-
url: e(this,
|
|
1535
|
-
channelId: e(this,
|
|
1536
|
-
channelGroupId: e(this,
|
|
1537
|
-
edgeUrl:
|
|
1538
|
-
authenticationToken:
|
|
1539
|
-
muted:
|
|
1540
|
-
media:
|
|
1541
|
-
maxSize:
|
|
1542
|
-
maxVideoBitRate:
|
|
1543
|
-
minBufferTime:
|
|
1544
|
-
maxBufferTime:
|
|
1545
|
-
burstEnabled:
|
|
1546
|
-
mseEnabled:
|
|
1547
|
-
mseOpusEnabled:
|
|
1548
|
-
iosBackgroundPlayEnabled:
|
|
1549
|
-
iosWakeLockEnabled:
|
|
1550
|
-
iosMediaElementEnabled:
|
|
1551
|
-
abrEnabled:
|
|
1552
|
-
sizeBasedResolutionCapEnabled:
|
|
1553
|
-
telemetryEnabled:
|
|
1554
|
-
videoCodecs:
|
|
1555
|
-
poster:
|
|
1556
|
-
textTrack:
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
2004
|
+
Si = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(), gt = new WeakMap(), b = new WeakMap(), Fe = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), ee = new WeakMap(), rt = new WeakMap(), B = new WeakMap(), J = new WeakMap(), F = new WeakMap(), ot = new WeakMap(), He = new WeakMap(), ze = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), h = new WeakSet(), ts = function() {
|
|
2005
|
+
return G(this, null, function* () {
|
|
2006
|
+
var Ds, Os;
|
|
2007
|
+
if (!e(this, st)) return;
|
|
2008
|
+
yield (Ds = e(this, b)) == null ? void 0 : Ds.unload();
|
|
2009
|
+
const t = this.hasAttribute(n.PAUSED), i = this.hasAttribute(n.MUTED), s = qs(this.getAttribute(n.MEDIA)), o = this.getAttribute(n.TEXT_TRACK) || void 0, p = this.getAttribute("edge-url") || void 0, u = this.getAttribute("authentication-token") || void 0, v = ui(this.getAttribute("max-video-bit-rate")), g = oo(this.getAttribute("max-size")), P = ui(this.getAttribute("min-buffer-time")), et = ui(this.getAttribute("max-buffer-time")), Y = x(this.getAttribute("burst-enabled")), Ct = x(this.getAttribute("mse-enabled")), Lt = x(this.getAttribute("mse-opus-enabled")), Tt = x(this.getAttribute("ios-background-play-enabled")), hi = x(this.getAttribute("ios-wake-lock-enabled")), di = x(this.getAttribute("ios-media-element-enabled")), z = x(this.getAttribute("abr-enabled")), xr = x(this.getAttribute("size-based-resolution-cap-enabled")), Sr = x(this.getAttribute("telemetry-enabled")), Nr = ro(this.getAttribute("video-codecs")), Ps = Xs(this.getAttribute("poster")), Rr = ao(this.getAttribute("advanced")), Ur = Gi(this.getAttribute("log-level")), _r = pi(this.getAttribute("drm-headers")), Pr = pi(this.getAttribute("drm-queryparams")), Mr = x(this.getAttribute("webtransport-enabled")), Ms = ui(this.getAttribute("reconnect-retries")), Dr = Ms !== void 0 ? (y) => y.reconnectRetries < Ms : void 0, Or = this.getAttribute("language") || void 0;
|
|
2010
|
+
c(this, b, new jr({
|
|
2011
|
+
url: e(this, Fe),
|
|
2012
|
+
channelId: e(this, st),
|
|
2013
|
+
channelGroupId: e(this, nt),
|
|
2014
|
+
edgeUrl: p,
|
|
2015
|
+
authenticationToken: u,
|
|
2016
|
+
muted: i,
|
|
2017
|
+
media: s,
|
|
2018
|
+
maxSize: g,
|
|
2019
|
+
maxVideoBitRate: v,
|
|
2020
|
+
minBufferTime: P,
|
|
2021
|
+
maxBufferTime: et,
|
|
2022
|
+
burstEnabled: Y,
|
|
2023
|
+
mseEnabled: Ct,
|
|
2024
|
+
mseOpusEnabled: Lt,
|
|
2025
|
+
iosBackgroundPlayEnabled: Tt,
|
|
2026
|
+
iosWakeLockEnabled: hi,
|
|
2027
|
+
iosMediaElementEnabled: di,
|
|
2028
|
+
abrEnabled: z,
|
|
2029
|
+
sizeBasedResolutionCapEnabled: xr,
|
|
2030
|
+
telemetryEnabled: Sr,
|
|
2031
|
+
videoCodecs: Nr,
|
|
2032
|
+
poster: Ps,
|
|
2033
|
+
textTrack: o,
|
|
2034
|
+
advanced: Rr,
|
|
2035
|
+
logLevel: Ur,
|
|
2036
|
+
language: Or,
|
|
2037
|
+
drm: { headers: _r, queryParams: Pr },
|
|
2038
|
+
webtransportEnabled: Mr,
|
|
2039
|
+
reconnectHandler: Dr
|
|
2040
|
+
})), e(this, b).on("rendition levels", (y) => {
|
|
2041
|
+
const D = y.filter((ci) => {
|
|
2042
|
+
var de;
|
|
2043
|
+
return (de = ci.video) == null ? void 0 : de.width;
|
|
1561
2044
|
});
|
|
1562
|
-
|
|
1563
|
-
}), e(this,
|
|
1564
|
-
|
|
1565
|
-
}), e(this,
|
|
1566
|
-
switch (
|
|
2045
|
+
r(this, h, A).call(this, n.RENDITION_LEVELS, JSON.stringify(D));
|
|
2046
|
+
}), e(this, b).on("rendition level", (y) => {
|
|
2047
|
+
r(this, h, A).call(this, n.RENDITION_LEVEL, JSON.stringify(y));
|
|
2048
|
+
}), e(this, b).on("playback state", (y) => {
|
|
2049
|
+
switch (y) {
|
|
1567
2050
|
case "playing":
|
|
1568
|
-
|
|
2051
|
+
r(this, h, w).call(this, n.PAUSED), r(this, h, w).call(this, n.BUFFERING);
|
|
1569
2052
|
break;
|
|
1570
2053
|
case "paused":
|
|
1571
|
-
|
|
2054
|
+
r(this, h, A).call(this, n.PAUSED, ""), r(this, h, w).call(this, n.BUFFERING);
|
|
1572
2055
|
break;
|
|
1573
2056
|
case "buffering":
|
|
1574
|
-
|
|
2057
|
+
r(this, h, w).call(this, n.PAUSED), r(this, h, A).call(this, n.BUFFERING, "");
|
|
1575
2058
|
break;
|
|
1576
2059
|
}
|
|
1577
|
-
}), e(this,
|
|
1578
|
-
|
|
1579
|
-
}), e(this,
|
|
1580
|
-
var
|
|
1581
|
-
((
|
|
1582
|
-
}), e(this,
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
}), e(this,
|
|
1588
|
-
var
|
|
1589
|
-
|
|
1590
|
-
}), e(this,
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
2060
|
+
}), e(this, b).on("volume state", (y) => {
|
|
2061
|
+
r(this, h, A).call(this, n.VOLUME, y.volume.toString()), y.isMuted ? r(this, h, A).call(this, n.MUTED, "") : r(this, h, w).call(this, n.MUTED);
|
|
2062
|
+
}), e(this, b).on("channel switch failed", ({ channelId: y }) => {
|
|
2063
|
+
var D;
|
|
2064
|
+
this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h, w).call(this, n.BUFFERING);
|
|
2065
|
+
}), e(this, b).on("channel switch", ({ channelId: y }) => {
|
|
2066
|
+
var D;
|
|
2067
|
+
e(this, st) !== y && this.setAttribute(n.CHANNEL_ID, y), ((D = e(this, b)) == null ? void 0 : D.playbackState) !== "buffering" && r(this, h, w).call(this, n.BUFFERING);
|
|
2068
|
+
}), e(this, b).on("channels", (y) => {
|
|
2069
|
+
c(this, Ut, Date.now()), r(this, h, A).call(this, n.CHANNELS, JSON.stringify(y));
|
|
2070
|
+
}), e(this, b).on("languages", (y) => {
|
|
2071
|
+
var D;
|
|
2072
|
+
r(this, h, A).call(this, n.LANGUAGES, JSON.stringify(y)), (D = e(this, b)) != null && D.language && r(this, h, A).call(this, n.LANGUAGE, e(this, b).language);
|
|
2073
|
+
}), e(this, b).on("text tracks", (y) => {
|
|
2074
|
+
var D, ci, de;
|
|
2075
|
+
r(this, h, A).call(this, n.TEXT_TRACKS, JSON.stringify(y)), (D = e(this, b)) != null && D.textTrack && r(this, h, A).call(this, n.TEXT_TRACK, (de = (ci = e(this, b)) == null ? void 0 : ci.textTrack) != null ? de : "");
|
|
2076
|
+
}), e(this, b).on("needs user input", (y) => {
|
|
2077
|
+
y != null && y.forVideo ? (r(this, h, A).call(this, n.NEEDS_USER_INPUT_VIDEO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_AUDIO)) : y != null && y.forAudio && (r(this, h, A).call(this, n.NEEDS_USER_INPUT_AUDIO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_VIDEO));
|
|
2078
|
+
}), e(this, b).on("is live", (y) => {
|
|
2079
|
+
y || r(this, h, w).call(this, n.BUFFERING);
|
|
2080
|
+
}), c(this, gt, (Os = this.shadowRoot) == null ? void 0 : Os.querySelector("#video")), e(this, gt) && e(this, b).attach(e(this, gt)), this.setAttribute(n.MEDIA, e(this, b).media), e(this, b).muted && r(this, h, A).call(this, n.MUTED, ""), r(this, h, A).call(this, n.VOLUME, e(this, b).volume.toString()), L(Ps) || r(this, h, A).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
2081
|
+
const Fr = x(this.getAttribute(n.AIRPLAY_ENABLED), !1), Hr = x(this.getAttribute(n.CAST_ENABLED), !0), zr = x(this.getAttribute(n.FULLSCREEN_ENABLED), !0), Gr = x(this.getAttribute(n.PIP_ENABLED), !0), $r = x(this.getAttribute(n.VU_METER_ENABLED), !1);
|
|
2082
|
+
Fr && r(this, h, Rn).call(this, e(this, b)), Hr && r(this, h, Sn).call(this, e(this, b)), zr && r(this, h, xn).call(this, e(this, b)), Gr && r(this, h, Tn).call(this, e(this, b)), t || e(this, b).play(), $r && r(this, h, Un).call(this, e(this, b)), this.dispatchEvent(
|
|
2083
|
+
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
1596
2084
|
);
|
|
1597
2085
|
});
|
|
1598
|
-
},
|
|
1599
|
-
t.mediaElement instanceof HTMLVideoElement && (
|
|
1600
|
-
|
|
2086
|
+
}, Tn = function(t) {
|
|
2087
|
+
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new uo(t.mediaElement)), e(this, rt).isSupported() && (e(this, N).debug("PIP is supported"), r(this, h, A).call(this, n.PIP_AVAILABLE, "")), e(this, rt).on("on picture in picture change", (i) => {
|
|
2088
|
+
i ? r(this, h, A).call(this, n.IS_PIP, "") : r(this, h, w).call(this, n.IS_PIP);
|
|
1601
2089
|
}));
|
|
1602
|
-
},
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
|
|
2090
|
+
}, xn = function(t) {
|
|
2091
|
+
const i = !be.isFullscreenApiSupported(this) && be.isFullscreenApiSupported(t.mediaElement) ? t.mediaElement : this;
|
|
2092
|
+
c(this, B, new be(i)), e(this, B).on("on fullscreen change", (s) => {
|
|
2093
|
+
s ? r(this, h, A).call(this, n.FULLSCREEN, "") : r(this, h, w).call(this, n.FULLSCREEN);
|
|
1606
2094
|
});
|
|
1607
|
-
},
|
|
1608
|
-
|
|
1609
|
-
background: e(this,
|
|
1610
|
-
receiverApplicationId: e(this,
|
|
2095
|
+
}, Sn = function(t) {
|
|
2096
|
+
c(this, ot, new Zr({
|
|
2097
|
+
background: e(this, ze),
|
|
2098
|
+
receiverApplicationId: e(this, He),
|
|
1611
2099
|
options: t.getCastOptions()
|
|
1612
|
-
})), e(this,
|
|
1613
|
-
var
|
|
1614
|
-
|
|
1615
|
-
}).catch((
|
|
1616
|
-
e(this, N).warn("Failed to initialize CastSender",
|
|
2100
|
+
})), e(this, ot).init().then(() => {
|
|
2101
|
+
var i, s, o;
|
|
2102
|
+
r(this, h, A).call(this, n.CAST_AVAILABLE, ""), (i = e(this, ot)) == null || i.on("connected", r(this, h, es).bind(this)), (s = e(this, ot)) == null || s.on("resumed", r(this, h, es).bind(this)), (o = e(this, ot)) == null || o.on("disconnected", r(this, h, Nn).bind(this));
|
|
2103
|
+
}).catch((i) => {
|
|
2104
|
+
e(this, N).warn("Failed to initialize CastSender", i);
|
|
1617
2105
|
});
|
|
1618
|
-
},
|
|
1619
|
-
var
|
|
1620
|
-
|
|
1621
|
-
const t = (
|
|
1622
|
-
|
|
1623
|
-
},
|
|
1624
|
-
|
|
1625
|
-
},
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
2106
|
+
}, es = function() {
|
|
2107
|
+
var i, s;
|
|
2108
|
+
r(this, h, A).call(this, n.IS_CASTING, "");
|
|
2109
|
+
const t = (s = (i = e(this, ot)) == null ? void 0 : i.getReceiverName()) != null ? s : "device";
|
|
2110
|
+
r(this, h, A).call(this, n.CAST_RECEIVER_NAME, t);
|
|
2111
|
+
}, Nn = function() {
|
|
2112
|
+
r(this, h, w).call(this, n.IS_CASTING), r(this, h, w).call(this, n.CAST_RECEIVER_NAME);
|
|
2113
|
+
}, Rn = function(t) {
|
|
2114
|
+
var s;
|
|
2115
|
+
(s = e(this, J)) == null || s.unload();
|
|
2116
|
+
const i = t.getCastOptions();
|
|
2117
|
+
c(this, J, new co({
|
|
2118
|
+
url: i.url,
|
|
2119
|
+
channelId: i.channelId,
|
|
2120
|
+
authenticationToken: i.authenticationToken,
|
|
1631
2121
|
container: this
|
|
1632
|
-
})), e(this,
|
|
1633
|
-
|
|
1634
|
-
}), e(this,
|
|
1635
|
-
|
|
1636
|
-
}), e(this,
|
|
1637
|
-
|
|
2122
|
+
})), e(this, J).once("available", () => {
|
|
2123
|
+
r(this, h, A).call(this, n.AIRPLAY_AVAILABLE, "");
|
|
2124
|
+
}), e(this, J).on("connected", () => {
|
|
2125
|
+
r(this, h, A).call(this, n.IS_AIRPLAYING, "");
|
|
2126
|
+
}), e(this, J).on("disconnected", () => {
|
|
2127
|
+
r(this, h, w).call(this, n.IS_AIRPLAYING);
|
|
1638
2128
|
});
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
2129
|
+
}, Un = function(t) {
|
|
2130
|
+
var i;
|
|
2131
|
+
if ((i = e(this, F)) == null || i.unload(), !Yr()) {
|
|
2132
|
+
if (t.audioNode)
|
|
2133
|
+
c(this, F, new Gs(t.audioNode));
|
|
2134
|
+
else if (t.mediaElement instanceof HTMLMediaElement)
|
|
2135
|
+
c(this, F, new Gs(t.mediaElement));
|
|
2136
|
+
else
|
|
2137
|
+
return;
|
|
2138
|
+
e(this, F).on("on decibel change", (s) => {
|
|
2139
|
+
r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify(s));
|
|
2140
|
+
}), r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, F).isMediaElementSource || !this.hasAttribute(n.MUTED)) && e(this, F).start();
|
|
2141
|
+
}
|
|
2142
|
+
}, Ge = new WeakMap(), _n = function(t) {
|
|
2143
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, Ge) < 250 || (r(this, h, mi).call(this), e(this, vt) && clearTimeout(e(this, vt)), t.target instanceof HTMLElement && ([this, e(this, gt)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && r(this, h, pt).call(this));
|
|
2144
|
+
}, Pn = function(t) {
|
|
2145
|
+
const i = this.hasAttribute(n.USER_INTERACTING);
|
|
2146
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, gt)].includes(t.target) && i ? r(this, h, ss).call(this) : r(this, h, pt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && r(this, h, pt).call(this);
|
|
2147
|
+
}, Mn = function(t) {
|
|
2148
|
+
!e(this, B) || t.target instanceof tt || t.target instanceof Us || t.target instanceof _s || (this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, ""));
|
|
2149
|
+
}, Dn = function(t) {
|
|
2150
|
+
this.hasAttribute(n.USER_INTERACTING) || r(this, h, pt).call(this);
|
|
2151
|
+
}, $e = new WeakMap(), Ni = new WeakMap(), Ri = new WeakMap(), On = function(t) {
|
|
2152
|
+
var u, v;
|
|
2153
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
2154
|
+
if (!(i || s || !$i.includes(o) || (((u = t.target) == null ? void 0 : u.keysUsed) || []).includes(o)))
|
|
2155
|
+
switch (o) {
|
|
2156
|
+
case "f":
|
|
2157
|
+
this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, "");
|
|
2158
|
+
break;
|
|
2159
|
+
case "m":
|
|
2160
|
+
this.hasAttribute(n.MUTED) ? this.removeAttribute(n.MUTED) : this.setAttribute(n.MUTED, "");
|
|
2161
|
+
break;
|
|
2162
|
+
case "ArrowDown":
|
|
2163
|
+
(v = this.querySelector("vindral-scroll-overlay")) == null || v.setAttribute("open", "");
|
|
2164
|
+
break;
|
|
2165
|
+
}
|
|
2166
|
+
}, Ut = new WeakMap(), is = function() {
|
|
2167
|
+
return G(this, null, function* () {
|
|
2168
|
+
if (!e(this, b) || !e(this, nt))
|
|
1651
2169
|
return;
|
|
1652
|
-
const t =
|
|
1653
|
-
|
|
2170
|
+
const t = Date.now();
|
|
2171
|
+
if (e(this, Ut) && t - e(this, Ut) < 1e4)
|
|
2172
|
+
e(this, N).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2173
|
+
else {
|
|
2174
|
+
c(this, Ut, t);
|
|
2175
|
+
const i = yield e(this, b).getApiClient().getChannels(e(this, nt));
|
|
2176
|
+
r(this, h, A).call(this, n.CHANNELS, JSON.stringify(i));
|
|
2177
|
+
}
|
|
2178
|
+
c(this, ft, window.setTimeout(() => void r(this, h, is).call(this), 1e4));
|
|
1654
2179
|
});
|
|
1655
|
-
},
|
|
1656
|
-
!this.hasAttribute(
|
|
2180
|
+
}, ss = function() {
|
|
2181
|
+
!this.hasAttribute(n.USER_INTERACTING) || this.hasAttribute(n.UI_LOCKED) || (this.dispatchEvent(
|
|
1657
2182
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !1 } })
|
|
1658
|
-
), this.removeAttribute(
|
|
1659
|
-
},
|
|
1660
|
-
this.hasAttribute(
|
|
1661
|
-
this.setAttribute(
|
|
2183
|
+
), this.removeAttribute(n.USER_INTERACTING));
|
|
2184
|
+
}, mi = function() {
|
|
2185
|
+
this.hasAttribute(n.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2186
|
+
this.setAttribute(n.USER_INTERACTING, ""), this.dispatchEvent(
|
|
1662
2187
|
new CustomEvent("user-interacting", { bubbles: !0, composed: !0, detail: { active: !0 } })
|
|
1663
2188
|
);
|
|
1664
2189
|
});
|
|
1665
|
-
},
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
}, e(this,
|
|
1669
|
-
},
|
|
2190
|
+
}, pt = function() {
|
|
2191
|
+
r(this, h, mi).call(this), e(this, vt) && clearTimeout(e(this, vt)), e(this, Oe) && c(this, vt, self.setTimeout(() => {
|
|
2192
|
+
r(this, h, ss).call(this);
|
|
2193
|
+
}, e(this, Oe)));
|
|
2194
|
+
}, Fn = function() {
|
|
1670
2195
|
var t;
|
|
1671
|
-
|
|
1672
|
-
e(this, N).warn("Failed to enter picture in picture:",
|
|
2196
|
+
r(this, h, rs).call(this), (t = e(this, rt)) == null || t.request().catch((i) => {
|
|
2197
|
+
e(this, N).warn("Failed to enter picture in picture:", i);
|
|
1673
2198
|
});
|
|
1674
|
-
},
|
|
2199
|
+
}, Hn = function() {
|
|
1675
2200
|
var t;
|
|
1676
|
-
(t = e(this,
|
|
1677
|
-
e(this, N).warn("Failed to exit picture in picture:",
|
|
2201
|
+
(t = e(this, rt)) == null || t.exit().catch((i) => {
|
|
2202
|
+
e(this, N).warn("Failed to exit picture in picture:", i);
|
|
1678
2203
|
});
|
|
1679
|
-
},
|
|
1680
|
-
var t,
|
|
1681
|
-
(t = e(this,
|
|
1682
|
-
e(this,
|
|
1683
|
-
}).catch((
|
|
1684
|
-
e(this, N).warn("Failed to enter fullscreen:",
|
|
1685
|
-
})) : (this.setAttribute(
|
|
1686
|
-
},
|
|
1687
|
-
var t,
|
|
1688
|
-
(t = e(this,
|
|
1689
|
-
e(this,
|
|
1690
|
-
}).catch((
|
|
1691
|
-
e(this, N).warn("Failed to exit fullscreen:",
|
|
1692
|
-
}) : (this.removeAttribute(
|
|
1693
|
-
},
|
|
1694
|
-
if (!e(this,
|
|
1695
|
-
e(this,
|
|
1696
|
-
},
|
|
2204
|
+
}, zn = function() {
|
|
2205
|
+
var t, i;
|
|
2206
|
+
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (r(this, h, rs).call(this), (i = e(this, B)) == null || i.request().then(() => {
|
|
2207
|
+
e(this, Ui).call(this);
|
|
2208
|
+
}).catch((s) => {
|
|
2209
|
+
e(this, N).warn("Failed to enter fullscreen:", s);
|
|
2210
|
+
})) : (this.setAttribute(n.FULLSCREEN_FALLBACK, ""), r(this, h, A).call(this, n.FULLSCREEN, ""));
|
|
2211
|
+
}, ns = function() {
|
|
2212
|
+
var t, i;
|
|
2213
|
+
(t = e(this, B)) != null && t.isFullscreenApiSupported() ? (i = e(this, B)) == null || i.exit().then(() => {
|
|
2214
|
+
e(this, _i).call(this);
|
|
2215
|
+
}).catch((s) => {
|
|
2216
|
+
e(this, N).warn("Failed to exit fullscreen:", s);
|
|
2217
|
+
}) : (this.removeAttribute(n.FULLSCREEN_FALLBACK), r(this, h, w).call(this, n.FULLSCREEN));
|
|
2218
|
+
}, Ui = new WeakMap(), _i = new WeakMap(), rs = function() {
|
|
2219
|
+
if (!e(this, b)) return;
|
|
2220
|
+
e(this, b).emitter.emit("ios-hack: reset size");
|
|
2221
|
+
}, A = function(t, i) {
|
|
2222
|
+
var s;
|
|
2223
|
+
(s = e(this, it).get(t)) == null || s.forEach((o) => o.setAttribute(t, i));
|
|
2224
|
+
}, w = function(t) {
|
|
1697
2225
|
var i;
|
|
1698
|
-
(i = e(this,
|
|
1699
|
-
},
|
|
1700
|
-
|
|
1701
|
-
(n = e(this, K).get(t)) == null || n.forEach((i) => i.removeAttribute(t));
|
|
1702
|
-
}, p(te, "observedAttributes", [
|
|
1703
|
-
...ns,
|
|
2226
|
+
(i = e(this, it).get(t)) == null || i.forEach((s) => s.removeAttribute(t));
|
|
2227
|
+
}, m(fe, "observedAttributes", [
|
|
2228
|
+
...Ks,
|
|
1704
2229
|
"url",
|
|
1705
2230
|
"edge-url",
|
|
1706
2231
|
"target-buffer-time",
|
|
@@ -1722,49 +2247,51 @@ Ze = new WeakMap(), K = new WeakMap(), ge = new WeakMap(), Z = new WeakMap(), tt
|
|
|
1722
2247
|
"telemetry-enabled",
|
|
1723
2248
|
"video-codecs",
|
|
1724
2249
|
"poster",
|
|
1725
|
-
"
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
2250
|
+
"advanced",
|
|
2251
|
+
"drm-headers",
|
|
2252
|
+
"drm-queryparams",
|
|
2253
|
+
"webtransport-enabled",
|
|
2254
|
+
"reconnect-retries",
|
|
2255
|
+
"auto-instance-enabled",
|
|
2256
|
+
"language"
|
|
2257
|
+
]), l(fe, Si, "https://lb.cdn.vindral.com");
|
|
2258
|
+
let Le = fe;
|
|
2259
|
+
const Gn = document.createElement("template"), po = (
|
|
1729
2260
|
/* SVG */
|
|
1730
2261
|
`
|
|
1731
2262
|
<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>
|
|
1732
2263
|
`
|
|
1733
|
-
),
|
|
2264
|
+
), bo = (
|
|
1734
2265
|
/* SVG */
|
|
1735
2266
|
`
|
|
1736
2267
|
<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>
|
|
1737
2268
|
`
|
|
1738
2269
|
);
|
|
1739
|
-
|
|
2270
|
+
Gn.innerHTML = /* HTML */
|
|
1740
2271
|
`
|
|
1741
2272
|
<style>
|
|
1742
2273
|
:host {
|
|
1743
2274
|
display: var(--fullscreen-button-display);
|
|
1744
2275
|
}
|
|
1745
2276
|
|
|
1746
|
-
slot
|
|
1747
|
-
display: block;
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
:host([${s.FULLSCREEN}]) slot[name="enter"] {
|
|
2277
|
+
:host([${n.FULLSCREEN}]) slot[name="enter"] {
|
|
1751
2278
|
display: none !important;
|
|
1752
2279
|
}
|
|
1753
2280
|
|
|
1754
|
-
:host(:not([${
|
|
2281
|
+
:host(:not([${n.FULLSCREEN}])) slot[name="exit"] {
|
|
1755
2282
|
display: none !important;
|
|
1756
2283
|
}
|
|
1757
2284
|
</style>
|
|
1758
2285
|
|
|
1759
2286
|
<slot name="icon">
|
|
1760
|
-
<slot name="enter">${
|
|
1761
|
-
<slot name="exit">${
|
|
2287
|
+
<slot name="enter">${po}</slot>
|
|
2288
|
+
<slot name="exit">${bo}</slot>
|
|
1762
2289
|
</slot>
|
|
1763
2290
|
`;
|
|
1764
|
-
const
|
|
2291
|
+
const Ee = class Ee extends tt {
|
|
1765
2292
|
constructor() {
|
|
1766
|
-
var
|
|
1767
|
-
super(), (
|
|
2293
|
+
var a;
|
|
2294
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Gn.content.cloneNode(!0));
|
|
1768
2295
|
}
|
|
1769
2296
|
connectedCallback() {
|
|
1770
2297
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -1772,29 +2299,29 @@ const ee = class ee extends B {
|
|
|
1772
2299
|
disconnectedCallback() {
|
|
1773
2300
|
super.disconnectedCallback();
|
|
1774
2301
|
}
|
|
1775
|
-
attributeChangedCallback(
|
|
1776
|
-
super.attributeChangedCallback(
|
|
2302
|
+
attributeChangedCallback(a, t, i) {
|
|
2303
|
+
super.attributeChangedCallback(a, t, i), a === n.FULLSCREEN && this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
1777
2304
|
}
|
|
1778
|
-
set isFullscreen(
|
|
1779
|
-
|
|
2305
|
+
set isFullscreen(a) {
|
|
2306
|
+
a ? this.setAttribute(n.FULLSCREEN, "") : this.removeAttribute(n.FULLSCREEN);
|
|
1780
2307
|
}
|
|
1781
2308
|
get isFullscreen() {
|
|
1782
|
-
return this.hasAttribute(
|
|
2309
|
+
return this.hasAttribute(n.FULLSCREEN);
|
|
1783
2310
|
}
|
|
1784
|
-
handleClick(
|
|
1785
|
-
const t = this.isFullscreen ?
|
|
2311
|
+
handleClick(a) {
|
|
2312
|
+
const t = this.isFullscreen ? f.EXIT_FULLSCREEN : f.ENTER_FULLSCREEN;
|
|
1786
2313
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
1787
2314
|
}
|
|
1788
2315
|
};
|
|
1789
|
-
|
|
1790
|
-
let
|
|
1791
|
-
const
|
|
2316
|
+
m(Ee, "observedAttributes", [...q(Ee, Ee, "observedAttributes"), n.FULLSCREEN]);
|
|
2317
|
+
let os = Ee;
|
|
2318
|
+
const mo = (
|
|
1792
2319
|
/* SVG */
|
|
1793
2320
|
`
|
|
1794
2321
|
<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>
|
|
1795
2322
|
`
|
|
1796
|
-
),
|
|
1797
|
-
|
|
2323
|
+
), $n = document.createElement("template");
|
|
2324
|
+
$n.innerHTML = /* HTML */
|
|
1798
2325
|
`
|
|
1799
2326
|
<style>
|
|
1800
2327
|
:host(:not([hidden])) {
|
|
@@ -1802,38 +2329,38 @@ Bs.innerHTML = /* HTML */
|
|
|
1802
2329
|
}
|
|
1803
2330
|
</style>
|
|
1804
2331
|
|
|
1805
|
-
<slot name="button">${
|
|
2332
|
+
<slot name="button">${mo}</slot>
|
|
1806
2333
|
<slot name="listbox" hidden>
|
|
1807
2334
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
1808
2335
|
</slot>
|
|
1809
2336
|
`;
|
|
1810
|
-
var
|
|
1811
|
-
const
|
|
2337
|
+
var Be, ls;
|
|
2338
|
+
const Ae = class Ae extends Us {
|
|
1812
2339
|
constructor() {
|
|
1813
|
-
var t,
|
|
2340
|
+
var t, i, s, o;
|
|
1814
2341
|
super();
|
|
1815
|
-
l(this,
|
|
1816
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
2342
|
+
l(this, Be);
|
|
2343
|
+
(t = this.shadowRoot) == null || t.appendChild($n.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]");
|
|
1817
2344
|
}
|
|
1818
2345
|
connectedCallback() {
|
|
1819
|
-
super.connectedCallback(),
|
|
2346
|
+
super.connectedCallback(), r(this, Be, ls).call(this), this.setAttribute("aria-label", "Languages");
|
|
1820
2347
|
}
|
|
1821
|
-
attributeChangedCallback(t,
|
|
1822
|
-
super.attributeChangedCallback(t,
|
|
2348
|
+
attributeChangedCallback(t, i, s) {
|
|
2349
|
+
super.attributeChangedCallback(t, i, s), (t === n.LANGUAGES || t === n.TEXT_TRACKS) && r(this, Be, ls).call(this);
|
|
1823
2350
|
}
|
|
1824
2351
|
};
|
|
1825
|
-
|
|
1826
|
-
const t = this.getAttribute(
|
|
1827
|
-
|
|
1828
|
-
},
|
|
1829
|
-
let
|
|
1830
|
-
const
|
|
2352
|
+
Be = new WeakSet(), ls = function() {
|
|
2353
|
+
const t = (o) => (o ? JSON.parse(o) : []).length < 2, i = t(this.getAttribute(n.LANGUAGES)), s = t(this.getAttribute(n.TEXT_TRACKS));
|
|
2354
|
+
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2355
|
+
}, m(Ae, "observedAttributes", [...q(Ae, Ae, "observedAttributes"), n.LANGUAGES, n.TEXT_TRACKS]);
|
|
2356
|
+
let as = Ae;
|
|
2357
|
+
const Bn = document.createElement("template"), vo = (
|
|
1831
2358
|
/* SVG */
|
|
1832
2359
|
`
|
|
1833
2360
|
<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>
|
|
1834
2361
|
`
|
|
1835
2362
|
);
|
|
1836
|
-
|
|
2363
|
+
Bn.innerHTML = /* HTML */
|
|
1837
2364
|
`
|
|
1838
2365
|
<style>
|
|
1839
2366
|
:host {
|
|
@@ -1893,12 +2420,11 @@ qs.innerHTML = /* HTML */
|
|
|
1893
2420
|
cursor: pointer;
|
|
1894
2421
|
display: flex;
|
|
1895
2422
|
align-items: center;
|
|
1896
|
-
justify-content: center;
|
|
1897
2423
|
height: 44px;
|
|
1898
2424
|
padding: 0 var(--padding-3);
|
|
2425
|
+
padding-left: var(--padding-6);
|
|
1899
2426
|
border-radius: 4px;
|
|
1900
2427
|
font-size: 14px;
|
|
1901
|
-
text-transform: capitalize;
|
|
1902
2428
|
}
|
|
1903
2429
|
|
|
1904
2430
|
[role="menuitem"]:hover {
|
|
@@ -1910,12 +2436,17 @@ qs.innerHTML = /* HTML */
|
|
|
1910
2436
|
}
|
|
1911
2437
|
|
|
1912
2438
|
[role="menuitem"][aria-selected="true"]::before {
|
|
1913
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
2439
|
+
content: url("data:image/svg+xml,${encodeURIComponent(vo)}");
|
|
1914
2440
|
position: absolute;
|
|
1915
2441
|
left: var(--padding-3);
|
|
1916
2442
|
top: calc(50% - 8px);
|
|
1917
2443
|
}
|
|
1918
2444
|
|
|
2445
|
+
[role="menuitem"]:focus-visible {
|
|
2446
|
+
box-shadow: inset 0 0 0 2px var(--fg-strong);
|
|
2447
|
+
outline: 0;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
1919
2450
|
.heading {
|
|
1920
2451
|
text-transform: uppercase;
|
|
1921
2452
|
margin-bottom: var(--padding-2);
|
|
@@ -1924,13 +2455,13 @@ qs.innerHTML = /* HTML */
|
|
|
1924
2455
|
font-weight: bold;
|
|
1925
2456
|
}
|
|
1926
2457
|
|
|
1927
|
-
:host([${
|
|
1928
|
-
:host(:not([${
|
|
2458
|
+
:host([${n.LANGUAGES}="[]"]) #languages,
|
|
2459
|
+
:host(:not([${n.LANGUAGES}])) #languages {
|
|
1929
2460
|
display: none;
|
|
1930
2461
|
}
|
|
1931
2462
|
|
|
1932
|
-
:host([${
|
|
1933
|
-
:host(:not([${
|
|
2463
|
+
:host([${n.TEXT_TRACKS}="[]"]) #text-tracks,
|
|
2464
|
+
:host(:not([${n.TEXT_TRACKS}])) #text-tracks {
|
|
1934
2465
|
display: none;
|
|
1935
2466
|
}
|
|
1936
2467
|
</style>
|
|
@@ -1944,103 +2475,141 @@ qs.innerHTML = /* HTML */
|
|
|
1944
2475
|
<div class="menu"></div>
|
|
1945
2476
|
</div>
|
|
1946
2477
|
`;
|
|
1947
|
-
var
|
|
1948
|
-
class
|
|
2478
|
+
var Ke, qe, Xe, Ve, Q, K, _t, Et, ie, je, at, W, E, qn, Xn, hs, ds, vi, ue, pe, Vn, jn, Yn, cs, us, Jn;
|
|
2479
|
+
class Kn extends HTMLElement {
|
|
1949
2480
|
constructor() {
|
|
1950
2481
|
super();
|
|
1951
|
-
l(this,
|
|
1952
|
-
l(this,
|
|
1953
|
-
l(this,
|
|
1954
|
-
l(this,
|
|
1955
|
-
l(this,
|
|
1956
|
-
l(this,
|
|
1957
|
-
l(this,
|
|
1958
|
-
l(this,
|
|
1959
|
-
l(this,
|
|
1960
|
-
l(this,
|
|
1961
|
-
this
|
|
2482
|
+
l(this, E);
|
|
2483
|
+
l(this, Ke, []);
|
|
2484
|
+
l(this, qe, []);
|
|
2485
|
+
l(this, Xe);
|
|
2486
|
+
l(this, Ve);
|
|
2487
|
+
l(this, Q, []);
|
|
2488
|
+
l(this, K, []);
|
|
2489
|
+
l(this, _t, null);
|
|
2490
|
+
l(this, Et, null);
|
|
2491
|
+
l(this, ie, null);
|
|
2492
|
+
l(this, je, null);
|
|
2493
|
+
l(this, at, null);
|
|
2494
|
+
l(this, W, null);
|
|
2495
|
+
m(this, "handleEvent", (t) => {
|
|
2496
|
+
switch (t.type) {
|
|
2497
|
+
case "keydown":
|
|
2498
|
+
r(this, E, jn).call(this, t);
|
|
2499
|
+
break;
|
|
2500
|
+
}
|
|
2501
|
+
});
|
|
2502
|
+
this.attachShadow({ mode: "open" }).appendChild(Bn.content.cloneNode(!0));
|
|
1962
2503
|
}
|
|
1963
2504
|
connectedCallback() {
|
|
1964
|
-
var
|
|
2505
|
+
var i, s, o;
|
|
1965
2506
|
const t = this.getRootNode();
|
|
1966
|
-
t instanceof ShadowRoot && (
|
|
2507
|
+
t instanceof ShadowRoot && (c(this, ie, t.host.closest("vindral-controller")), (i = e(this, ie)) == null || i.connectListener(this), c(this, _t, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), c(this, Et, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), r(this, E, qn).call(this), r(this, E, Xn).call(this), c(this, je, t.host), this.addEventListener("keydown", this));
|
|
2508
|
+
}
|
|
2509
|
+
disconnectedCallback() {
|
|
2510
|
+
this.removeEventListener("keydown", this);
|
|
1967
2511
|
}
|
|
1968
|
-
attributeChangedCallback(t,
|
|
1969
|
-
|
|
2512
|
+
attributeChangedCallback(t, i, s) {
|
|
2513
|
+
i !== s && (t === n.LANGUAGES && s && (this.languages = JSON.parse(s)), t === n.TEXT_TRACKS && s && (this.textTracks = JSON.parse(s)), t === n.LANGUAGE && (this.language = s), t === n.TEXT_TRACK && (this.textTrack = s));
|
|
1970
2514
|
}
|
|
1971
2515
|
set languages(t) {
|
|
1972
|
-
|
|
2516
|
+
c(this, Ke, t), r(this, E, ds).call(this), r(this, E, ue).call(this);
|
|
1973
2517
|
}
|
|
1974
2518
|
set textTracks(t) {
|
|
1975
|
-
|
|
2519
|
+
c(this, qe, t), r(this, E, hs).call(this), r(this, E, pe).call(this);
|
|
1976
2520
|
}
|
|
1977
2521
|
set language(t) {
|
|
1978
|
-
|
|
2522
|
+
c(this, Xe, t), r(this, E, ue).call(this);
|
|
1979
2523
|
}
|
|
1980
2524
|
set textTrack(t) {
|
|
1981
|
-
|
|
2525
|
+
c(this, Ve, t), r(this, E, pe).call(this);
|
|
2526
|
+
}
|
|
2527
|
+
get keysUsed() {
|
|
2528
|
+
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End"];
|
|
2529
|
+
}
|
|
2530
|
+
focus() {
|
|
2531
|
+
e(this, at) ? e(this, at).focus() : e(this, W) && e(this, W).focus();
|
|
1982
2532
|
}
|
|
1983
2533
|
}
|
|
1984
|
-
|
|
1985
|
-
const t = (
|
|
1986
|
-
|
|
1987
|
-
if (
|
|
1988
|
-
if (
|
|
1989
|
-
const
|
|
1990
|
-
this.style.height = `${
|
|
2534
|
+
Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), Ve = new WeakMap(), Q = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), Et = new WeakMap(), ie = new WeakMap(), je = new WeakMap(), at = new WeakMap(), W = new WeakMap(), E = new WeakSet(), qn = function() {
|
|
2535
|
+
const t = (s) => {
|
|
2536
|
+
s.forEach((o) => {
|
|
2537
|
+
if (o.intersectionRatio !== 1)
|
|
2538
|
+
if (o.intersectionRatio > 0) {
|
|
2539
|
+
const p = this.offsetHeight, u = o.intersectionRatio, g = p * u - 24;
|
|
2540
|
+
this.style.height = `${g}px`;
|
|
1991
2541
|
} else
|
|
1992
2542
|
this.style.height = "auto";
|
|
1993
2543
|
});
|
|
1994
2544
|
};
|
|
1995
2545
|
new IntersectionObserver(t, {
|
|
1996
|
-
root: e(this,
|
|
2546
|
+
root: e(this, ie),
|
|
1997
2547
|
// The parent element to use as the viewport
|
|
1998
2548
|
threshold: 0
|
|
1999
2549
|
// 0 means any intersection is enough to be considered "inside"
|
|
2000
2550
|
}).observe(this);
|
|
2001
|
-
},
|
|
2002
|
-
e(this,
|
|
2003
|
-
},
|
|
2004
|
-
e(this,
|
|
2005
|
-
const t =
|
|
2006
|
-
e(this,
|
|
2007
|
-
const
|
|
2008
|
-
e(this,
|
|
2009
|
-
}),
|
|
2010
|
-
},
|
|
2011
|
-
e(this,
|
|
2012
|
-
const
|
|
2013
|
-
e(this,
|
|
2014
|
-
}),
|
|
2015
|
-
},
|
|
2016
|
-
const
|
|
2017
|
-
return
|
|
2018
|
-
},
|
|
2019
|
-
|
|
2020
|
-
t
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
const t = e(this,
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
if (n)
|
|
2028
|
-
n.element.setAttribute("aria-selected", "true");
|
|
2551
|
+
}, Xn = function() {
|
|
2552
|
+
e(this, _t) && (r(this, E, ds).call(this), r(this, E, ue).call(this)), e(this, Et) && (r(this, E, hs).call(this), r(this, E, pe).call(this));
|
|
2553
|
+
}, hs = function() {
|
|
2554
|
+
e(this, Et).innerHTML = "", c(this, K, []);
|
|
2555
|
+
const t = r(this, E, vi).call(this, "Off", "textTrack", void 0);
|
|
2556
|
+
e(this, Et).appendChild(t), e(this, K).push({ element: t, value: void 0 }), e(this, qe).forEach((i) => {
|
|
2557
|
+
const s = r(this, E, vi).call(this, i, "textTrack", i);
|
|
2558
|
+
e(this, Et).appendChild(s), e(this, K).push({ element: s, value: i });
|
|
2559
|
+
}), r(this, E, pe).call(this);
|
|
2560
|
+
}, ds = function() {
|
|
2561
|
+
e(this, _t).innerHTML = "", c(this, Q, []), e(this, Ke).forEach((t) => {
|
|
2562
|
+
const i = r(this, E, vi).call(this, t, "language", t);
|
|
2563
|
+
e(this, _t).appendChild(i), e(this, Q).push({ element: i, value: t });
|
|
2564
|
+
}), r(this, E, ue).call(this);
|
|
2565
|
+
}, vi = function(t, i, s) {
|
|
2566
|
+
const o = document.createElement("div");
|
|
2567
|
+
return o.setAttribute("role", "menuitem"), o.textContent = t, o.addEventListener("click", () => r(this, E, Vn).call(this, s, i)), o;
|
|
2568
|
+
}, ue = function() {
|
|
2569
|
+
e(this, at) && (e(this, at).removeAttribute("aria-selected"), e(this, at).tabIndex = -1);
|
|
2570
|
+
const t = e(this, Q).find((i) => i.value === e(this, Xe));
|
|
2571
|
+
t && (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, at, t.element));
|
|
2572
|
+
}, pe = function() {
|
|
2573
|
+
e(this, W) && (e(this, W).removeAttribute("aria-selected"), e(this, W).tabIndex = -1);
|
|
2574
|
+
const t = e(this, K).find((i) => i.value === e(this, Ve));
|
|
2575
|
+
if (t)
|
|
2576
|
+
t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, c(this, W, t.element);
|
|
2029
2577
|
else {
|
|
2030
|
-
const i = e(this,
|
|
2031
|
-
i
|
|
2578
|
+
const i = e(this, K).find((s) => s.value === void 0);
|
|
2579
|
+
i && (i.element.setAttribute("aria-selected", "true"), i.element.tabIndex = 0, c(this, W, i.element));
|
|
2032
2580
|
}
|
|
2033
|
-
},
|
|
2581
|
+
}, Vn = function(t, i) {
|
|
2034
2582
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
2035
|
-
const
|
|
2036
|
-
this.dispatchEvent(new CustomEvent(
|
|
2037
|
-
},
|
|
2038
|
-
|
|
2039
|
-
s
|
|
2040
|
-
s.
|
|
2041
|
-
|
|
2583
|
+
const s = i === "language" ? f.SET_LANGUAGE : f.SET_TEXT_TRACK;
|
|
2584
|
+
this.dispatchEvent(new CustomEvent(s, { bubbles: !0, composed: !0, detail: t }));
|
|
2585
|
+
}, jn = function(t) {
|
|
2586
|
+
var u, v, g;
|
|
2587
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
2588
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, je)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, E, us).call(this)) == null ? void 0 : v.element) == null || g.click() : r(this, E, Yn).call(this, t));
|
|
2589
|
+
}, Yn = function(t) {
|
|
2590
|
+
var g;
|
|
2591
|
+
const { key: i } = t, s = [...e(this, Q), ...e(this, K)], o = (g = r(this, E, us).call(this)) != null ? g : s[0];
|
|
2592
|
+
if (!o) return;
|
|
2593
|
+
const p = s.indexOf(o);
|
|
2594
|
+
let u = Math.max(0, p);
|
|
2595
|
+
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : i === "ArrowLeft" ? u = r(this, E, cs).call(this, p, "left") : i === "ArrowRight" ? u = r(this, E, cs).call(this, p, "right") : t.key === "Home" ? u = 0 : t.key === "End" && (u = s.length - 1), u < 0 && (u = s.length - 1), u > s.length - 1 && (u = 0);
|
|
2596
|
+
const v = s[u];
|
|
2597
|
+
v && (r(this, E, Jn).call(this, v.value), v.element.focus());
|
|
2598
|
+
}, cs = function(t, i) {
|
|
2599
|
+
const s = e(this, Q).length, o = e(this, K).length;
|
|
2600
|
+
return i === "left" ? t < s ? s + o - 1 : t - s - 1 : t >= s ? 0 : t + s;
|
|
2601
|
+
}, us = function() {
|
|
2602
|
+
return [...e(this, Q), ...e(this, K)].find((t) => t.element.tabIndex === 0);
|
|
2603
|
+
}, Jn = function(t) {
|
|
2604
|
+
for (const i of [...e(this, Q), ...e(this, K)])
|
|
2605
|
+
i.element.tabIndex = i.value === t ? 0 : -1;
|
|
2606
|
+
}, m(Kn, "observedAttributes", [
|
|
2607
|
+
n.LANGUAGES,
|
|
2608
|
+
n.TEXT_TRACKS,
|
|
2609
|
+
n.LANGUAGE,
|
|
2610
|
+
n.TEXT_TRACK
|
|
2042
2611
|
]);
|
|
2043
|
-
const
|
|
2612
|
+
const Qn = document.createElement("template"), go = (
|
|
2044
2613
|
/* SVG */
|
|
2045
2614
|
`
|
|
2046
2615
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -2048,42 +2617,38 @@ const Vs = document.createElement("template"), so = (
|
|
|
2048
2617
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
2049
2618
|
</g></svg>
|
|
2050
2619
|
`
|
|
2051
|
-
),
|
|
2620
|
+
), fo = (
|
|
2052
2621
|
/* SVG */
|
|
2053
2622
|
`
|
|
2054
2623
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
2055
2624
|
<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>
|
|
2056
2625
|
`
|
|
2057
2626
|
);
|
|
2058
|
-
|
|
2627
|
+
Qn.innerHTML = /* HTML */
|
|
2059
2628
|
`
|
|
2060
2629
|
<style>
|
|
2061
2630
|
:host {
|
|
2062
2631
|
display: var(--mute-button-display);
|
|
2063
2632
|
}
|
|
2064
2633
|
|
|
2065
|
-
slot
|
|
2066
|
-
display: block;
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
:host([${s.MUTED}]) slot[name="unmute"] {
|
|
2634
|
+
:host([${n.MUTED}]) slot[name="unmute"] {
|
|
2070
2635
|
display: none !important;
|
|
2071
2636
|
}
|
|
2072
2637
|
|
|
2073
|
-
:host(:not([${
|
|
2638
|
+
:host(:not([${n.MUTED}])) slot[name="mute"] {
|
|
2074
2639
|
display: none !important;
|
|
2075
2640
|
}
|
|
2076
2641
|
</style>
|
|
2077
2642
|
|
|
2078
2643
|
<slot name="icon">
|
|
2079
|
-
<slot name="mute">${
|
|
2080
|
-
<slot name="unmute">${
|
|
2644
|
+
<slot name="mute">${go}</slot>
|
|
2645
|
+
<slot name="unmute">${fo}</slot>
|
|
2081
2646
|
</slot>
|
|
2082
2647
|
`;
|
|
2083
|
-
const
|
|
2648
|
+
const ye = class ye extends tt {
|
|
2084
2649
|
constructor() {
|
|
2085
|
-
var
|
|
2086
|
-
super(), (
|
|
2650
|
+
var a;
|
|
2651
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Qn.content.cloneNode(!0));
|
|
2087
2652
|
}
|
|
2088
2653
|
connectedCallback() {
|
|
2089
2654
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -2091,45 +2656,45 @@ const se = class se extends B {
|
|
|
2091
2656
|
disconnectedCallback() {
|
|
2092
2657
|
super.disconnectedCallback();
|
|
2093
2658
|
}
|
|
2094
|
-
attributeChangedCallback(
|
|
2095
|
-
super.attributeChangedCallback(
|
|
2659
|
+
attributeChangedCallback(a, t, i) {
|
|
2660
|
+
super.attributeChangedCallback(a, t, i), a === n.MUTED && this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
2096
2661
|
}
|
|
2097
|
-
set muted(
|
|
2098
|
-
|
|
2662
|
+
set muted(a) {
|
|
2663
|
+
a ? this.setAttribute(n.MUTED, "") : this.removeAttribute(n.MUTED);
|
|
2099
2664
|
}
|
|
2100
2665
|
get muted() {
|
|
2101
|
-
return this.hasAttribute(
|
|
2666
|
+
return this.hasAttribute(n.MUTED);
|
|
2102
2667
|
}
|
|
2103
|
-
handleClick(
|
|
2104
|
-
const t = this.muted ?
|
|
2668
|
+
handleClick(a) {
|
|
2669
|
+
const t = this.muted ? f.UNMUTE : f.MUTE;
|
|
2105
2670
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2106
2671
|
}
|
|
2107
2672
|
};
|
|
2108
|
-
|
|
2109
|
-
let
|
|
2110
|
-
const
|
|
2673
|
+
m(ye, "observedAttributes", [...q(ye, ye, "observedAttributes"), n.MUTED]);
|
|
2674
|
+
let ps = ye;
|
|
2675
|
+
const Wn = document.createElement("template"), Eo = (
|
|
2111
2676
|
/* SVG */
|
|
2112
2677
|
`
|
|
2113
2678
|
<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>
|
|
2114
2679
|
`
|
|
2115
2680
|
);
|
|
2116
|
-
|
|
2681
|
+
Wn.innerHTML = /* HTML */
|
|
2117
2682
|
`
|
|
2118
2683
|
<style>
|
|
2119
2684
|
:host {
|
|
2120
2685
|
display: var(--pip-button-display);
|
|
2121
2686
|
}
|
|
2122
2687
|
|
|
2123
|
-
|
|
2124
|
-
display:
|
|
2688
|
+
:host(:not([${n.PIP_AVAILABLE}])) {
|
|
2689
|
+
display: none !important;
|
|
2125
2690
|
}
|
|
2126
2691
|
</style>
|
|
2127
|
-
<slot name="icon">${
|
|
2692
|
+
<slot name="icon">${Eo}</slot>
|
|
2128
2693
|
`;
|
|
2129
|
-
const
|
|
2694
|
+
const ke = class ke extends tt {
|
|
2130
2695
|
constructor() {
|
|
2131
|
-
var
|
|
2132
|
-
super(), (
|
|
2696
|
+
var a;
|
|
2697
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Wn.content.cloneNode(!0));
|
|
2133
2698
|
}
|
|
2134
2699
|
connectedCallback() {
|
|
2135
2700
|
super.connectedCallback(), this.setAttribute(
|
|
@@ -2140,65 +2705,61 @@ const ne = class ne extends B {
|
|
|
2140
2705
|
disconnectedCallback() {
|
|
2141
2706
|
super.disconnectedCallback();
|
|
2142
2707
|
}
|
|
2143
|
-
attributeChangedCallback(
|
|
2144
|
-
super.attributeChangedCallback(
|
|
2708
|
+
attributeChangedCallback(a, t, i) {
|
|
2709
|
+
super.attributeChangedCallback(a, t, i), a === n.IS_PIP && this.setAttribute(
|
|
2145
2710
|
"aria-label",
|
|
2146
2711
|
this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture"
|
|
2147
2712
|
);
|
|
2148
2713
|
}
|
|
2149
|
-
set isPictureInPictureActive(
|
|
2150
|
-
|
|
2714
|
+
set isPictureInPictureActive(a) {
|
|
2715
|
+
a ? this.setAttribute(n.IS_PIP, "") : this.removeAttribute(n.IS_PIP);
|
|
2151
2716
|
}
|
|
2152
2717
|
get isPictureInPictureActive() {
|
|
2153
|
-
return this.hasAttribute(
|
|
2718
|
+
return this.hasAttribute(n.IS_PIP);
|
|
2154
2719
|
}
|
|
2155
|
-
handleClick(
|
|
2156
|
-
const t = this.isPictureInPictureActive ?
|
|
2720
|
+
handleClick(a) {
|
|
2721
|
+
const t = this.isPictureInPictureActive ? f.EXIT_PIP : f.ENTER_PIP;
|
|
2157
2722
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2158
2723
|
}
|
|
2159
2724
|
};
|
|
2160
|
-
|
|
2161
|
-
let
|
|
2162
|
-
const
|
|
2725
|
+
m(ke, "observedAttributes", [...q(ke, ke, "observedAttributes"), n.IS_PIP, n.PIP_AVAILABLE]);
|
|
2726
|
+
let bs = ke;
|
|
2727
|
+
const Zn = document.createElement("template"), Ao = (
|
|
2163
2728
|
/* SVG */
|
|
2164
2729
|
`
|
|
2165
2730
|
<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>
|
|
2166
2731
|
`
|
|
2167
|
-
),
|
|
2732
|
+
), yo = (
|
|
2168
2733
|
/* SVG */
|
|
2169
2734
|
`
|
|
2170
2735
|
<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>
|
|
2171
2736
|
`
|
|
2172
2737
|
);
|
|
2173
|
-
|
|
2738
|
+
Zn.innerHTML = /* HTML */
|
|
2174
2739
|
`
|
|
2175
2740
|
<style>
|
|
2176
2741
|
:host {
|
|
2177
2742
|
display: var(--play-button-display);
|
|
2178
2743
|
}
|
|
2179
2744
|
|
|
2180
|
-
slot
|
|
2181
|
-
display: block;
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
:host([${s.PAUSED}]) slot[name="pause"] {
|
|
2745
|
+
:host([${n.PAUSED}]) slot[name="pause"] {
|
|
2185
2746
|
display: none !important;
|
|
2186
2747
|
}
|
|
2187
2748
|
|
|
2188
|
-
:host(:not([${
|
|
2749
|
+
:host(:not([${n.PAUSED}])) slot[name="play"] {
|
|
2189
2750
|
display: none !important;
|
|
2190
2751
|
}
|
|
2191
2752
|
</style>
|
|
2192
2753
|
|
|
2193
2754
|
<slot name="icon">
|
|
2194
|
-
<slot name="play">${
|
|
2195
|
-
<slot name="pause">${
|
|
2755
|
+
<slot name="play">${Ao}</slot>
|
|
2756
|
+
<slot name="pause">${yo}</slot>
|
|
2196
2757
|
</slot>
|
|
2197
2758
|
`;
|
|
2198
|
-
const
|
|
2759
|
+
const we = class we extends tt {
|
|
2199
2760
|
constructor() {
|
|
2200
|
-
var
|
|
2201
|
-
super(), (
|
|
2761
|
+
var a;
|
|
2762
|
+
super(), (a = this.shadowRoot) == null || a.appendChild(Zn.content.cloneNode(!0));
|
|
2202
2763
|
}
|
|
2203
2764
|
connectedCallback() {
|
|
2204
2765
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -2206,81 +2767,82 @@ const oe = class oe extends B {
|
|
|
2206
2767
|
disconnectedCallback() {
|
|
2207
2768
|
super.disconnectedCallback();
|
|
2208
2769
|
}
|
|
2209
|
-
attributeChangedCallback(
|
|
2210
|
-
super.attributeChangedCallback(
|
|
2770
|
+
attributeChangedCallback(a, t, i) {
|
|
2771
|
+
super.attributeChangedCallback(a, t, i), a === n.PAUSED && this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
2211
2772
|
}
|
|
2212
|
-
set paused(
|
|
2213
|
-
|
|
2773
|
+
set paused(a) {
|
|
2774
|
+
a ? this.setAttribute(n.PAUSED, "") : this.removeAttribute(n.PAUSED);
|
|
2214
2775
|
}
|
|
2215
2776
|
get paused() {
|
|
2216
|
-
return this.hasAttribute(
|
|
2777
|
+
return this.hasAttribute(n.PAUSED);
|
|
2217
2778
|
}
|
|
2218
|
-
handleClick(
|
|
2219
|
-
const t = this.paused ?
|
|
2779
|
+
handleClick(a) {
|
|
2780
|
+
const t = this.paused ? f.PLAY : f.PAUSE;
|
|
2220
2781
|
this.dispatchEvent(new CustomEvent(t, { bubbles: !0, composed: !0 }));
|
|
2221
2782
|
}
|
|
2222
2783
|
};
|
|
2223
|
-
|
|
2224
|
-
let
|
|
2225
|
-
const
|
|
2784
|
+
m(we, "observedAttributes", [...q(we, we, "observedAttributes"), n.PAUSED]);
|
|
2785
|
+
let ms = we;
|
|
2786
|
+
const X = {
|
|
2226
2787
|
TITLE: "title",
|
|
2227
|
-
OFFLINE: "offline"
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2788
|
+
OFFLINE: "offline",
|
|
2789
|
+
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
2790
|
+
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
2791
|
+
}, ko = Object.values(X);
|
|
2792
|
+
var Ye, se, At, Pt, yt, kt, lt, H, vs, tr, gs, fs;
|
|
2793
|
+
class wo extends li {
|
|
2231
2794
|
constructor(t) {
|
|
2232
2795
|
super();
|
|
2233
|
-
l(this,
|
|
2234
|
-
l(this,
|
|
2235
|
-
l(this,
|
|
2236
|
-
l(this,
|
|
2237
|
-
l(this,
|
|
2238
|
-
l(this,
|
|
2239
|
-
l(this,
|
|
2240
|
-
l(this,
|
|
2241
|
-
|
|
2796
|
+
l(this, H);
|
|
2797
|
+
l(this, Ye);
|
|
2798
|
+
l(this, se);
|
|
2799
|
+
l(this, At, !1);
|
|
2800
|
+
l(this, Pt, !1);
|
|
2801
|
+
l(this, yt, !0);
|
|
2802
|
+
l(this, kt, null);
|
|
2803
|
+
l(this, lt, null);
|
|
2804
|
+
c(this, se, t), c(this, Ye, new to({
|
|
2242
2805
|
publicEndpoint: t.url,
|
|
2243
2806
|
tokenFactory: () => t.authenticationToken
|
|
2244
2807
|
}));
|
|
2245
2808
|
}
|
|
2246
2809
|
start(t = 5e3) {
|
|
2247
|
-
e(this,
|
|
2248
|
-
!e(this,
|
|
2810
|
+
e(this, lt) && clearInterval(e(this, lt)), c(this, At, !1), c(this, Pt, !1), r(this, H, fs).call(this), r(this, H, vs).call(this), c(this, lt, window.setInterval(() => {
|
|
2811
|
+
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this, kt) && e(this, yt) && c(this, kt, window.setTimeout(() => r(this, H, tr).call(this), 5 * 60 * 1e3)), !e(this, Pt) && e(this, yt) && r(this, H, vs).call(this);
|
|
2249
2812
|
}, t));
|
|
2250
2813
|
}
|
|
2251
2814
|
stop() {
|
|
2252
|
-
|
|
2815
|
+
r(this, H, gs).call(this), e(this, lt) && (window.clearInterval(e(this, lt)), c(this, lt, null));
|
|
2253
2816
|
}
|
|
2254
2817
|
}
|
|
2255
|
-
|
|
2256
|
-
return
|
|
2257
|
-
|
|
2258
|
-
if (e(this, ot))
|
|
2818
|
+
Ye = new WeakMap(), se = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(), yt = new WeakMap(), kt = new WeakMap(), lt = new WeakMap(), H = new WeakSet(), vs = function() {
|
|
2819
|
+
return G(this, null, function* () {
|
|
2820
|
+
if (e(this, At))
|
|
2259
2821
|
return;
|
|
2260
|
-
|
|
2261
|
-
let t = "Stream is offline",
|
|
2822
|
+
c(this, At, !0);
|
|
2823
|
+
let t = "Stream is offline", i = "Please stand by";
|
|
2262
2824
|
try {
|
|
2263
|
-
const
|
|
2264
|
-
if (
|
|
2265
|
-
|
|
2825
|
+
const s = yield e(this, Ye).getChannel(e(this, se).channelId);
|
|
2826
|
+
if (s.isLive) {
|
|
2827
|
+
c(this, Pt, !0), r(this, H, fs).call(this), this.emit("live", s), c(this, At, !1);
|
|
2266
2828
|
return;
|
|
2267
2829
|
}
|
|
2268
|
-
} catch (
|
|
2269
|
-
|
|
2830
|
+
} catch (s) {
|
|
2831
|
+
eo(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
|
|
2270
2832
|
}
|
|
2271
|
-
e(this,
|
|
2833
|
+
e(this, yt) && this.emit("error", { title: t, message: i }), c(this, At, !1);
|
|
2272
2834
|
});
|
|
2273
|
-
},
|
|
2274
|
-
this.stop(),
|
|
2275
|
-
},
|
|
2276
|
-
e(this,
|
|
2277
|
-
},
|
|
2278
|
-
|
|
2835
|
+
}, tr = function() {
|
|
2836
|
+
this.stop(), c(this, yt, !1), this.emit("timeout");
|
|
2837
|
+
}, gs = function() {
|
|
2838
|
+
e(this, kt) && (window.clearTimeout(e(this, kt)), c(this, kt, null));
|
|
2839
|
+
}, fs = function() {
|
|
2840
|
+
r(this, H, gs).call(this), c(this, yt, !0);
|
|
2279
2841
|
};
|
|
2280
|
-
const
|
|
2842
|
+
const Io = new RegExp(
|
|
2281
2843
|
"/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/",
|
|
2282
2844
|
"i"
|
|
2283
|
-
),
|
|
2845
|
+
), Co = navigator.userAgent.toLowerCase(), Lo = Io.test(Co), To = (d) => Le.observedAttributes.includes(d), er = (
|
|
2284
2846
|
/* HTML */
|
|
2285
2847
|
`
|
|
2286
2848
|
<style>
|
|
@@ -2292,7 +2854,7 @@ const ho = new RegExp(
|
|
|
2292
2854
|
display: flex;
|
|
2293
2855
|
justify-content: center;
|
|
2294
2856
|
|
|
2295
|
-
--vindral-volume-range-display: ${
|
|
2857
|
+
--vindral-volume-range-display: ${Lo ? "none" : "flex"};
|
|
2296
2858
|
--vindral-airplay-button-display: none;
|
|
2297
2859
|
--vindral-play-overlay-display: none;
|
|
2298
2860
|
--vindral-grid-item-offline-display: none;
|
|
@@ -2307,6 +2869,7 @@ const ho = new RegExp(
|
|
|
2307
2869
|
--vindral-volume-range-display: none;
|
|
2308
2870
|
--vindral-control-padding: 0px;
|
|
2309
2871
|
--vindral-button-padding: 4px;
|
|
2872
|
+
--vindral-play-overlay-icon-size: 40px;
|
|
2310
2873
|
}
|
|
2311
2874
|
|
|
2312
2875
|
vindral-control-bar[slot="top-bar"] {
|
|
@@ -2320,45 +2883,46 @@ const ho = new RegExp(
|
|
|
2320
2883
|
}
|
|
2321
2884
|
}
|
|
2322
2885
|
|
|
2323
|
-
:host([${
|
|
2886
|
+
:host([${X.OFFLINE}]) {
|
|
2324
2887
|
aspect-ratio: 16 / 9;
|
|
2325
2888
|
vindral-controller {
|
|
2326
2889
|
--vindral-ui-display: none;
|
|
2890
|
+
--vindral-play-overlay-display: none;
|
|
2327
2891
|
}
|
|
2328
2892
|
}
|
|
2329
2893
|
|
|
2330
|
-
:host([${
|
|
2894
|
+
:host([${n.AIRPLAY_ENABLED}="false"]) {
|
|
2331
2895
|
--vindral-airplay-button-display: none;
|
|
2332
2896
|
}
|
|
2333
2897
|
|
|
2334
|
-
:host([${
|
|
2898
|
+
:host([${n.CAST_ENABLED}="false"]) {
|
|
2335
2899
|
--vindral-cast-button-display: none;
|
|
2336
2900
|
}
|
|
2337
2901
|
|
|
2338
|
-
:host([${
|
|
2902
|
+
:host([${n.FULLSCREEN_ENABLED}="false"]) {
|
|
2339
2903
|
--vindral-fullscreen-button-display: none;
|
|
2340
2904
|
}
|
|
2341
2905
|
|
|
2342
|
-
:host([${
|
|
2906
|
+
:host([${n.PIP_ENABLED}="false"]) {
|
|
2343
2907
|
--vindral-pip-button-display: none;
|
|
2344
2908
|
}
|
|
2345
2909
|
|
|
2346
|
-
:host(:not([${
|
|
2910
|
+
:host(:not([${n.CHANNEL_GROUP_ID}])) vindral-scroll-overlay {
|
|
2347
2911
|
display: none;
|
|
2348
2912
|
}
|
|
2349
2913
|
|
|
2350
|
-
:host([${
|
|
2351
|
-
:host([${
|
|
2914
|
+
:host([${n.MEDIA}="video"]) vindral-mute-button,
|
|
2915
|
+
:host([${n.MEDIA}="video"]) vindral-volume-range {
|
|
2352
2916
|
display: none;
|
|
2353
2917
|
}
|
|
2354
2918
|
</style>
|
|
2355
2919
|
`
|
|
2356
|
-
),
|
|
2920
|
+
), xo = (
|
|
2357
2921
|
/* HTML */
|
|
2358
2922
|
`
|
|
2359
|
-
${
|
|
2923
|
+
${er}
|
|
2360
2924
|
|
|
2361
|
-
<vindral-controller
|
|
2925
|
+
<vindral-controller>
|
|
2362
2926
|
<vindral-control-bar slot="top-bar">
|
|
2363
2927
|
<vindral-rendition-levels-menu list-position="bottom"></vindral-rendition-levels-menu>
|
|
2364
2928
|
<vindral-cast-button></vindral-cast-button>
|
|
@@ -2376,23 +2940,22 @@ const ho = new RegExp(
|
|
|
2376
2940
|
<vindral-airplay-button slot="right"></vindral-airplay-button>
|
|
2377
2941
|
<vindral-fullscreen-button slot="right"></vindral-fullscreen-button>
|
|
2378
2942
|
</vindral-control-bar>
|
|
2379
|
-
<vindral-scroll-overlay slot="overlay
|
|
2943
|
+
<vindral-scroll-overlay slot="overlay">
|
|
2380
2944
|
<vindral-channel-grid id="listbox" part="listbox"></vindral-channel-grid>
|
|
2381
2945
|
</vindral-scroll-overlay>
|
|
2382
2946
|
<vindral-cast-overlay slot="overlay"></vindral-cast-overlay>
|
|
2383
2947
|
<vindral-buffering-overlay slot="overlay"></vindral-buffering-overlay>
|
|
2384
2948
|
<vindral-user-input-play-overlay slot="overlay"></vindral-user-input-play-overlay>
|
|
2949
|
+
<vindral-poster-overlay slot="overlay" disabled></vindral-poster-overlay>
|
|
2385
2950
|
|
|
2386
2951
|
<vindral-play-overlay id="play-overlay" slot="overlay" hidden></vindral-play-overlay>
|
|
2387
2952
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
2388
|
-
|
|
2389
|
-
<slot slot="overlay"></slot>
|
|
2390
2953
|
</vindral-controller>
|
|
2391
2954
|
`
|
|
2392
|
-
),
|
|
2955
|
+
), So = (
|
|
2393
2956
|
/* HTML */
|
|
2394
2957
|
`
|
|
2395
|
-
${
|
|
2958
|
+
${er}
|
|
2396
2959
|
|
|
2397
2960
|
<style>
|
|
2398
2961
|
#control-bar {
|
|
@@ -2403,7 +2966,7 @@ const ho = new RegExp(
|
|
|
2403
2966
|
}
|
|
2404
2967
|
</style>
|
|
2405
2968
|
|
|
2406
|
-
<vindral-controller
|
|
2969
|
+
<vindral-controller>
|
|
2407
2970
|
<div id="control-bar" slot="middle">
|
|
2408
2971
|
<vindral-play-button></vindral-play-button>
|
|
2409
2972
|
<vindral-mute-button></vindral-mute-button>
|
|
@@ -2415,82 +2978,203 @@ const ho = new RegExp(
|
|
|
2415
2978
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
2416
2979
|
</vindral-controller>
|
|
2417
2980
|
`
|
|
2418
|
-
),
|
|
2419
|
-
var
|
|
2420
|
-
class
|
|
2981
|
+
), Bs = document.createElement("template");
|
|
2982
|
+
var Z, R, M, ht, dt, Pi, Je, Mi, S, Es, sr, Qe, gi, xt;
|
|
2983
|
+
class ir extends HTMLElement {
|
|
2421
2984
|
constructor() {
|
|
2422
2985
|
super();
|
|
2423
2986
|
l(this, S);
|
|
2424
|
-
l(this,
|
|
2425
|
-
l(this,
|
|
2426
|
-
l(this,
|
|
2427
|
-
l(this,
|
|
2428
|
-
l(this,
|
|
2429
|
-
l(this,
|
|
2987
|
+
l(this, Z);
|
|
2988
|
+
l(this, R);
|
|
2989
|
+
l(this, M);
|
|
2990
|
+
l(this, ht);
|
|
2991
|
+
l(this, dt);
|
|
2992
|
+
l(this, Pi, () => {
|
|
2430
2993
|
Array.from(this.attributes).forEach((t) => {
|
|
2431
|
-
|
|
2994
|
+
e(this, Je).call(this, t.name, t.value);
|
|
2432
2995
|
});
|
|
2433
2996
|
});
|
|
2434
|
-
l(this,
|
|
2435
|
-
|
|
2997
|
+
l(this, Je, (t, i) => {
|
|
2998
|
+
To(t) && (L(i) ? e(this, R).setAttribute(t, i) : e(this, R).removeAttribute(t));
|
|
2999
|
+
});
|
|
3000
|
+
l(this, Mi, () => qs(this.getAttribute(n.MEDIA)) === "audio" ? So : xo);
|
|
3001
|
+
l(this, Qe, () => {
|
|
3002
|
+
const t = e(this, R).instance;
|
|
3003
|
+
t && (t.on("is live", (i) => {
|
|
3004
|
+
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this, S, xt).call(this, "Stream is offline", "Please stand by"));
|
|
3005
|
+
}), t.on("channels", (i) => {
|
|
3006
|
+
const s = e(this, R).getAttribute("channel-id"), o = i.find((p) => p.channelId === s);
|
|
3007
|
+
o && r(this, S, gi).call(this, o.name);
|
|
3008
|
+
}), t.on("channel switch", ({ channelId: i }) => {
|
|
3009
|
+
const s = t.channels.find((o) => o.channelId === i);
|
|
3010
|
+
s && r(this, S, gi).call(this, s.name);
|
|
3011
|
+
}), t.on("error", (i) => {
|
|
3012
|
+
let s = "Stream is offline", o = "Please stand by";
|
|
3013
|
+
i.isFatal() ? (i.code() === Jr ? (s = "Forbidden", o = "You do not have permission to view this stream", r(this, S, xt).call(this, s, o)) : r(this, S, xt).call(this, "An error occurred", i.message), e(this, ht).removeAttribute("hidden"), this.setAttribute(X.OFFLINE, "")) : i.code() === Qr && r(this, S, xt).call(this, s, o);
|
|
3014
|
+
}));
|
|
3015
|
+
});
|
|
3016
|
+
c(this, Z, this.attachShadow({ mode: "open" })), r(this, S, Es).call(this), c(this, R, e(this, Z).querySelector("vindral-controller")), c(this, M, e(this, Z).querySelector("#vindral-message")), c(this, ht, e(this, Z).querySelector("#play-overlay"));
|
|
2436
3017
|
}
|
|
2437
3018
|
connectedCallback() {
|
|
2438
|
-
this.setAttribute(
|
|
3019
|
+
this.setAttribute(X.OFFLINE, ""), e(this, R).addEventListener("vindral-instance-ready", e(this, Qe)), r(this, S, sr).call(this);
|
|
2439
3020
|
}
|
|
2440
3021
|
disconnectedCallback() {
|
|
2441
3022
|
var t;
|
|
2442
|
-
(t = e(this,
|
|
2443
|
-
}
|
|
2444
|
-
attributeChangedCallback(t,
|
|
2445
|
-
|
|
3023
|
+
e(this, R).removeEventListener("vindral-instance-ready", e(this, Qe)), (t = e(this, dt)) == null || t.stop();
|
|
3024
|
+
}
|
|
3025
|
+
attributeChangedCallback(t, i, s) {
|
|
3026
|
+
if (i !== s)
|
|
3027
|
+
if (t === n.MEDIA)
|
|
3028
|
+
r(this, S, Es).call(this);
|
|
3029
|
+
else if (t === X.REFRESH_POSTER_ENABLED) {
|
|
3030
|
+
const o = e(this, Z).querySelector("vindral-poster-overlay");
|
|
3031
|
+
o && (o.disabled = x(this.getAttribute(X.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3032
|
+
} else
|
|
3033
|
+
e(this, Je).call(this, t, s);
|
|
2446
3034
|
}
|
|
2447
3035
|
get instance() {
|
|
2448
|
-
return e(this,
|
|
3036
|
+
return e(this, R).instance;
|
|
3037
|
+
}
|
|
3038
|
+
get airPlay() {
|
|
3039
|
+
return e(this, R).airPlay;
|
|
2449
3040
|
}
|
|
2450
3041
|
}
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
const t =
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
3042
|
+
Z = new WeakMap(), R = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Pi = new WeakMap(), Je = new WeakMap(), Mi = new WeakMap(), S = new WeakSet(), Es = function() {
|
|
3043
|
+
Bs.innerHTML = e(this, Mi).call(this);
|
|
3044
|
+
const t = Bs.content.cloneNode(!0);
|
|
3045
|
+
c(this, R, t.querySelector("vindral-controller")), c(this, M, t.querySelector("#vindral-message")), c(this, ht, t.querySelector("#play-overlay")), this.children.length > 0 && Array.from(this.children).forEach((i) => {
|
|
3046
|
+
e(this, R).appendChild(i);
|
|
3047
|
+
}), e(this, Pi).call(this), e(this, Z).innerHTML = "", e(this, Z).appendChild(t);
|
|
3048
|
+
}, sr = function() {
|
|
3049
|
+
var u;
|
|
3050
|
+
if (x(this.getAttribute(X.STREAM_POLL_ENABLED), !0) === !1)
|
|
3051
|
+
return;
|
|
3052
|
+
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"), p = x(this.getAttribute("title"), !1);
|
|
3053
|
+
if (!t || !i) {
|
|
3054
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, xt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
2460
3055
|
return;
|
|
2461
3056
|
}
|
|
2462
|
-
|
|
3057
|
+
c(this, dt, new wo({
|
|
2463
3058
|
url: t,
|
|
2464
|
-
channelId:
|
|
2465
|
-
authenticationToken:
|
|
2466
|
-
infiniteReconnect:
|
|
2467
|
-
})), e(this,
|
|
2468
|
-
e(this,
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
(t = e(this, G).instance) == null || t.on("error", (n) => {
|
|
2483
|
-
if (n.isFatal()) {
|
|
2484
|
-
let i = "Stream is offline", a = "Please stand by";
|
|
2485
|
-
n.code() === "access_forbidden" && (i = "Forbidden", a = "You do not have permission to view this stream"), o(this, S, ze).call(this, i, a);
|
|
2486
|
-
}
|
|
3059
|
+
channelId: i,
|
|
3060
|
+
authenticationToken: s,
|
|
3061
|
+
infiniteReconnect: o
|
|
3062
|
+
})), e(this, dt).on("live", (v) => {
|
|
3063
|
+
e(this, R).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), p && r(this, S, gi).call(this, v.name);
|
|
3064
|
+
}), e(this, dt).on("timeout", () => {
|
|
3065
|
+
e(this, M).setAttribute("hidden", ""), e(this, ht).removeAttribute("hidden");
|
|
3066
|
+
}), e(this, dt).on("error", (v) => {
|
|
3067
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, xt).call(this, v.title, v.message);
|
|
3068
|
+
}), e(this, ht).addEventListener("click", () => {
|
|
3069
|
+
e(this, R).connect(), e(this, ht).setAttribute("hidden", ""), e(this, M).setAttribute("hidden", ""), e(this, R).focus();
|
|
3070
|
+
}), this.hasAttribute("paused") && e(this, dt).start();
|
|
3071
|
+
}, Qe = new WeakMap(), gi = function(t) {
|
|
3072
|
+
if (!x(this.getAttribute("title"), !0)) return;
|
|
3073
|
+
const i = Xs(this.getAttribute("poster"));
|
|
3074
|
+
no({
|
|
3075
|
+
title: t,
|
|
3076
|
+
poster: typeof i == "string" ? i : void 0
|
|
2487
3077
|
});
|
|
2488
|
-
},
|
|
2489
|
-
e(this,
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2492
|
-
},
|
|
2493
|
-
const
|
|
3078
|
+
}, xt = function(t, i) {
|
|
3079
|
+
e(this, M).setAttribute("title", t), e(this, M).setAttribute("description", i);
|
|
3080
|
+
const s = this.getAttribute("poster");
|
|
3081
|
+
s && e(this, M).setAttribute("background-image", s), e(this, M).removeAttribute("hidden");
|
|
3082
|
+
}, m(ir, "observedAttributes", [...Le.observedAttributes, ...ko]);
|
|
3083
|
+
const nr = document.createElement("template");
|
|
3084
|
+
nr.innerHTML = /* HTML */
|
|
3085
|
+
`
|
|
3086
|
+
<style>
|
|
3087
|
+
:host {
|
|
3088
|
+
display: var(--poster-overlay-display);
|
|
3089
|
+
position: absolute;
|
|
3090
|
+
top: 0;
|
|
3091
|
+
left: 0;
|
|
3092
|
+
max-width: 100%;
|
|
3093
|
+
max-height: 100%;
|
|
3094
|
+
min-width: 100%;
|
|
3095
|
+
min-height: 100%;
|
|
3096
|
+
background-repeat: no-repeat;
|
|
3097
|
+
background-position: 50% 50%;
|
|
3098
|
+
background-size: contain;
|
|
3099
|
+
transition-property: background-image;
|
|
3100
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
3101
|
+
transition-duration: 200ms;
|
|
3102
|
+
}
|
|
3103
|
+
|
|
3104
|
+
:host::before {
|
|
3105
|
+
content: "";
|
|
3106
|
+
position: absolute;
|
|
3107
|
+
top: 0;
|
|
3108
|
+
left: 0;
|
|
3109
|
+
right: 0;
|
|
3110
|
+
bottom: 0;
|
|
3111
|
+
background: rgba(255, 255, 255, 0);
|
|
3112
|
+
transition: background 0.2s ease;
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
:host(:not([${n.PAUSED}])) {
|
|
3116
|
+
display: none;
|
|
3117
|
+
}
|
|
3118
|
+
</style>
|
|
3119
|
+
`;
|
|
3120
|
+
const No = 6e3;
|
|
3121
|
+
var ne, wt, Mt, re, j, or, fi, As, Di;
|
|
3122
|
+
class rr extends HTMLElement {
|
|
3123
|
+
constructor() {
|
|
3124
|
+
super();
|
|
3125
|
+
l(this, j);
|
|
3126
|
+
l(this, ne, null);
|
|
3127
|
+
l(this, wt, null);
|
|
3128
|
+
l(this, Mt, null);
|
|
3129
|
+
l(this, re, () => {
|
|
3130
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this, j, or).call(this) : r(this, j, fi).call(this);
|
|
3131
|
+
});
|
|
3132
|
+
l(this, Di, (t) => {
|
|
3133
|
+
t.forEach((i) => {
|
|
3134
|
+
i.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3135
|
+
});
|
|
3136
|
+
});
|
|
3137
|
+
this.attachShadow({ mode: "open" }).appendChild(nr.content.cloneNode(!0));
|
|
3138
|
+
}
|
|
3139
|
+
connectedCallback() {
|
|
3140
|
+
var t;
|
|
3141
|
+
c(this, ne, this.closest("vindral-controller")), (t = e(this, ne)) == null || t.connectListener(this), document.addEventListener("visibilitychange", e(this, re)), c(this, Mt, new IntersectionObserver(e(this, Di))), e(this, Mt).observe(this);
|
|
3142
|
+
}
|
|
3143
|
+
disconnectedCallback() {
|
|
3144
|
+
var t, i;
|
|
3145
|
+
(t = e(this, ne)) == null || t.disconnectListener(this), document.removeEventListener("visibilitychange", e(this, re)), (i = e(this, Mt)) == null || i.disconnect(), c(this, Mt, null), r(this, j, fi).call(this);
|
|
3146
|
+
}
|
|
3147
|
+
attributeChangedCallback(t, i, s) {
|
|
3148
|
+
i !== s && (t === n.POSTER_SRC && this.paused && !this.disabled && r(this, j, As).call(this), (t === n.PAUSED || t === "disabled" || t === "intersecting") && e(this, re).call(this));
|
|
3149
|
+
}
|
|
3150
|
+
get disabled() {
|
|
3151
|
+
return this.hasAttribute("disabled");
|
|
3152
|
+
}
|
|
3153
|
+
set disabled(t) {
|
|
3154
|
+
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3155
|
+
}
|
|
3156
|
+
get posterSrc() {
|
|
3157
|
+
return this.getAttribute(n.POSTER_SRC);
|
|
3158
|
+
}
|
|
3159
|
+
get paused() {
|
|
3160
|
+
return this.hasAttribute(n.PAUSED);
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(), j = new WeakSet(), or = function() {
|
|
3164
|
+
e(this, wt) === null && (r(this, j, fi).call(this), c(this, wt, window.setInterval(() => r(this, j, As).call(this), No)));
|
|
3165
|
+
}, fi = function() {
|
|
3166
|
+
e(this, wt) !== null && (clearInterval(e(this, wt)), c(this, wt, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3167
|
+
}, As = function() {
|
|
3168
|
+
if (!this.posterSrc) return;
|
|
3169
|
+
const t = new URL(this.posterSrc), i = new Image();
|
|
3170
|
+
t.searchParams.set("t", Date.now().toString()), i.src = t.toString(), i.onload = () => this.style.backgroundImage = `url(${t.toString()})`;
|
|
3171
|
+
}, Di = new WeakMap(), m(rr, "observedAttributes", [
|
|
3172
|
+
n.POSTER_SRC,
|
|
3173
|
+
n.PAUSED,
|
|
3174
|
+
"disabled",
|
|
3175
|
+
"intersecting"
|
|
3176
|
+
]);
|
|
3177
|
+
const Ro = (
|
|
2494
3178
|
/* SVG */
|
|
2495
3179
|
`
|
|
2496
3180
|
<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">
|
|
@@ -2498,8 +3182,8 @@ const go = (
|
|
|
2498
3182
|
<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" />
|
|
2499
3183
|
</svg>
|
|
2500
3184
|
`
|
|
2501
|
-
),
|
|
2502
|
-
|
|
3185
|
+
), ar = document.createElement("template");
|
|
3186
|
+
ar.innerHTML = /* HTML */
|
|
2503
3187
|
`
|
|
2504
3188
|
<style>
|
|
2505
3189
|
:host {
|
|
@@ -2507,38 +3191,38 @@ nn.innerHTML = /* HTML */
|
|
|
2507
3191
|
}
|
|
2508
3192
|
</style>
|
|
2509
3193
|
|
|
2510
|
-
<slot name="button">${
|
|
3194
|
+
<slot name="button">${Ro}</slot>
|
|
2511
3195
|
<slot name="listbox" hidden>
|
|
2512
3196
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
2513
3197
|
</slot>
|
|
2514
3198
|
`;
|
|
2515
|
-
var
|
|
2516
|
-
const
|
|
3199
|
+
var We, ks;
|
|
3200
|
+
const Ie = class Ie extends Us {
|
|
2517
3201
|
constructor() {
|
|
2518
|
-
var t,
|
|
3202
|
+
var t, i, s, o;
|
|
2519
3203
|
super();
|
|
2520
|
-
l(this,
|
|
2521
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3204
|
+
l(this, We);
|
|
3205
|
+
(t = this.shadowRoot) == null || t.appendChild(ar.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]");
|
|
2522
3206
|
}
|
|
2523
3207
|
connectedCallback() {
|
|
2524
|
-
super.connectedCallback(),
|
|
3208
|
+
super.connectedCallback(), r(this, We, ks).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
2525
3209
|
}
|
|
2526
|
-
attributeChangedCallback(t,
|
|
2527
|
-
super.attributeChangedCallback(t,
|
|
3210
|
+
attributeChangedCallback(t, i, s) {
|
|
3211
|
+
super.attributeChangedCallback(t, i, s), t === n.RENDITION_LEVELS && r(this, We, ks).call(this);
|
|
2528
3212
|
}
|
|
2529
3213
|
};
|
|
2530
|
-
|
|
2531
|
-
const t = this.getAttribute(
|
|
3214
|
+
We = new WeakSet(), ks = function() {
|
|
3215
|
+
const t = this.getAttribute(n.RENDITION_LEVELS);
|
|
2532
3216
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
2533
|
-
},
|
|
2534
|
-
let
|
|
2535
|
-
const
|
|
3217
|
+
}, m(Ie, "observedAttributes", [...q(Ie, Ie, "observedAttributes"), n.RENDITION_LEVELS]);
|
|
3218
|
+
let ys = Ie;
|
|
3219
|
+
const lr = document.createElement("template"), Uo = (
|
|
2536
3220
|
/* SVG */
|
|
2537
3221
|
`
|
|
2538
3222
|
<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>
|
|
2539
3223
|
`
|
|
2540
3224
|
);
|
|
2541
|
-
|
|
3225
|
+
lr.innerHTML = /* HTML */
|
|
2542
3226
|
`
|
|
2543
3227
|
<style>
|
|
2544
3228
|
:host {
|
|
@@ -2611,12 +3295,17 @@ on.innerHTML = /* HTML */
|
|
|
2611
3295
|
}
|
|
2612
3296
|
|
|
2613
3297
|
[role="menuitem"][aria-selected="true"]::before {
|
|
2614
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3298
|
+
content: url("data:image/svg+xml,${encodeURIComponent(Uo)}");
|
|
2615
3299
|
position: absolute;
|
|
2616
3300
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
2617
3301
|
top: calc(50% - 8px);
|
|
2618
3302
|
}
|
|
2619
3303
|
|
|
3304
|
+
[role="menuitem"]:focus-visible {
|
|
3305
|
+
box-shadow: inset 0 0 0 2px var(--fg-strong);
|
|
3306
|
+
outline: 0;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
2620
3309
|
.menu-item-subtitle {
|
|
2621
3310
|
font-size: 11px;
|
|
2622
3311
|
opacity: 0.6;
|
|
@@ -2636,94 +3325,131 @@ on.innerHTML = /* HTML */
|
|
|
2636
3325
|
<div class="menu"></div>
|
|
2637
3326
|
</slot>
|
|
2638
3327
|
`;
|
|
2639
|
-
var
|
|
2640
|
-
class
|
|
3328
|
+
var Dt, Ze, It, ct, Ot, ti, C, dr, ws, cr, Is, ur, pr, br, Cs, mr;
|
|
3329
|
+
class hr extends HTMLElement {
|
|
2641
3330
|
constructor() {
|
|
2642
3331
|
super();
|
|
2643
|
-
l(this,
|
|
2644
|
-
l(this,
|
|
2645
|
-
l(this,
|
|
2646
|
-
l(this,
|
|
2647
|
-
l(this,
|
|
2648
|
-
l(this,
|
|
2649
|
-
this
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
3332
|
+
l(this, C);
|
|
3333
|
+
l(this, Dt, []);
|
|
3334
|
+
l(this, Ze, Number.MAX_SAFE_INTEGER);
|
|
3335
|
+
l(this, It, null);
|
|
3336
|
+
l(this, ct, []);
|
|
3337
|
+
l(this, Ot, null);
|
|
3338
|
+
l(this, ti, null);
|
|
3339
|
+
m(this, "handleEvent", (t) => {
|
|
3340
|
+
switch (t.type) {
|
|
3341
|
+
case "keydown":
|
|
3342
|
+
r(this, C, pr).call(this, t);
|
|
3343
|
+
break;
|
|
3344
|
+
}
|
|
3345
|
+
});
|
|
3346
|
+
this.attachShadow({ mode: "open" }).appendChild(lr.content.cloneNode(!0));
|
|
3347
|
+
}
|
|
3348
|
+
connectedCallback() {
|
|
3349
|
+
var i;
|
|
3350
|
+
const t = this.getRootNode();
|
|
3351
|
+
t instanceof ShadowRoot && (c(this, Ot, t.host.closest("vindral-controller")), (i = e(this, Ot)) == null || i.connectListener(this), r(this, C, dr).call(this), r(this, C, ws).call(this), c(this, ti, t.host), this.addEventListener("keydown", this));
|
|
3352
|
+
}
|
|
3353
|
+
disconnectedCallback() {
|
|
3354
|
+
var t;
|
|
3355
|
+
(t = e(this, Ot)) == null || t.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3356
|
+
}
|
|
3357
|
+
attributeChangedCallback(t, i, s) {
|
|
3358
|
+
i !== s && (t === n.RENDITION_LEVELS && s && (this.list = JSON.parse(s)), t === n.MAX_VIDEO_BITRATE && s && (this.maxVideoBitrate = s ? parseInt(s) : Number.MAX_SAFE_INTEGER));
|
|
2658
3359
|
}
|
|
2659
3360
|
set list(t) {
|
|
2660
|
-
|
|
3361
|
+
c(this, Dt, t), r(this, C, ws).call(this);
|
|
2661
3362
|
}
|
|
2662
3363
|
set maxVideoBitrate(t) {
|
|
2663
|
-
|
|
3364
|
+
c(this, Ze, t), r(this, C, Is).call(this);
|
|
3365
|
+
}
|
|
3366
|
+
get keysUsed() {
|
|
3367
|
+
return ["Enter", "Escape", "Tab", " ", "ArrowDown", "ArrowUp", "Home", "End"];
|
|
3368
|
+
}
|
|
3369
|
+
focus() {
|
|
3370
|
+
var t;
|
|
3371
|
+
(t = e(this, It)) == null || t.focus();
|
|
2664
3372
|
}
|
|
2665
3373
|
}
|
|
2666
|
-
|
|
2667
|
-
const t = (
|
|
2668
|
-
|
|
2669
|
-
if (
|
|
2670
|
-
if (
|
|
2671
|
-
const
|
|
2672
|
-
this.style.height = `${
|
|
3374
|
+
Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(), Ot = new WeakMap(), ti = new WeakMap(), C = new WeakSet(), dr = function() {
|
|
3375
|
+
const t = (s) => {
|
|
3376
|
+
s.forEach((o) => {
|
|
3377
|
+
if (o.intersectionRatio !== 1)
|
|
3378
|
+
if (o.intersectionRatio > 0) {
|
|
3379
|
+
const p = this.offsetHeight, u = o.intersectionRatio, g = p * u - 24;
|
|
3380
|
+
this.style.height = `${g}px`;
|
|
2673
3381
|
} else
|
|
2674
3382
|
this.style.height = "auto";
|
|
2675
3383
|
});
|
|
2676
3384
|
};
|
|
2677
3385
|
new IntersectionObserver(t, {
|
|
2678
|
-
root: e(this,
|
|
3386
|
+
root: e(this, Ot),
|
|
2679
3387
|
// The parent element to use as the viewport
|
|
2680
3388
|
threshold: 0
|
|
2681
3389
|
// 0 means any intersection is enough to be considered "inside"
|
|
2682
3390
|
}).observe(this);
|
|
2683
|
-
},
|
|
2684
|
-
var
|
|
2685
|
-
const t = (
|
|
2686
|
-
t && (
|
|
2687
|
-
var
|
|
2688
|
-
return (
|
|
2689
|
-
}).forEach((
|
|
2690
|
-
var
|
|
2691
|
-
const
|
|
2692
|
-
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
}),
|
|
2698
|
-
},
|
|
3391
|
+
}, ws = function() {
|
|
3392
|
+
var i;
|
|
3393
|
+
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".menu");
|
|
3394
|
+
t && (c(this, ct, []), t.innerHTML = "", e(this, Dt).sort((s, o) => {
|
|
3395
|
+
var p, u;
|
|
3396
|
+
return (p = s.video) != null && p.bitRate && ((u = o.video) != null && u.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
3397
|
+
}).forEach((s) => {
|
|
3398
|
+
var v, g, P, et, Y, Ct, Lt, Tt;
|
|
3399
|
+
const o = document.createElement("div");
|
|
3400
|
+
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
3401
|
+
const p = r(this, C, cr).call(this, (g = s.video) == null ? void 0 : g.frameRate);
|
|
3402
|
+
o.textContent = s.video ? so(s.video) : "";
|
|
3403
|
+
const u = document.createElement("span");
|
|
3404
|
+
u.classList.add("menu-item-subtitle"), u.textContent = `${io(((et = (P = s.video) == null ? void 0 : P.bitRate) != null ? et : 0) + ((Ct = (Y = s.audio) == null ? void 0 : Y.bitRate) != null ? Ct : 0))}, ${p}p`, o.appendChild(u), o.addEventListener("click", () => r(this, C, ur).call(this, s)), e(this, ct).push({ el: o, id: (Tt = (Lt = s.video) == null ? void 0 : Lt.id) != null ? Tt : -1 }), t.appendChild(o);
|
|
3405
|
+
}), r(this, C, Is).call(this));
|
|
3406
|
+
}, cr = function(t) {
|
|
2699
3407
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
2700
|
-
},
|
|
2701
|
-
e(this,
|
|
2702
|
-
const t = e(this,
|
|
2703
|
-
(
|
|
2704
|
-
var
|
|
2705
|
-
return (
|
|
2706
|
-
}
|
|
2707
|
-
),
|
|
2708
|
-
(
|
|
2709
|
-
var
|
|
2710
|
-
return ((
|
|
3408
|
+
}, Is = function() {
|
|
3409
|
+
e(this, It) && (e(this, It).removeAttribute("aria-selected"), e(this, It).tabIndex = -1);
|
|
3410
|
+
const t = e(this, Dt).sort(
|
|
3411
|
+
(s, o) => {
|
|
3412
|
+
var p, u;
|
|
3413
|
+
return (p = s.video) != null && p.bitRate && ((u = o.video) != null && u.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
3414
|
+
}
|
|
3415
|
+
), i = e(this, Dt).filter(
|
|
3416
|
+
(s) => {
|
|
3417
|
+
var o;
|
|
3418
|
+
return ((o = s.video) == null ? void 0 : o.bitRate) && s.video.bitRate <= e(this, Ze);
|
|
2711
3419
|
}
|
|
2712
3420
|
)[0] || t[t.length - 1];
|
|
2713
|
-
if (
|
|
2714
|
-
const
|
|
2715
|
-
var
|
|
2716
|
-
return
|
|
3421
|
+
if (i) {
|
|
3422
|
+
const s = e(this, ct).find((o) => {
|
|
3423
|
+
var p;
|
|
3424
|
+
return o.id === ((p = i.video) == null ? void 0 : p.id);
|
|
2717
3425
|
});
|
|
2718
|
-
|
|
3426
|
+
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this, It, s.el));
|
|
2719
3427
|
}
|
|
2720
|
-
},
|
|
3428
|
+
}, ur = function(t) {
|
|
2721
3429
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
2722
|
-
new CustomEvent(
|
|
3430
|
+
new CustomEvent(f.SET_RENDITION, { bubbles: !0, composed: !0, detail: t })
|
|
2723
3431
|
);
|
|
2724
|
-
},
|
|
2725
|
-
|
|
2726
|
-
|
|
3432
|
+
}, pr = function(t) {
|
|
3433
|
+
var u, v, g;
|
|
3434
|
+
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
3435
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? (u = e(this, ti)) == null || u.hide() : i === "Enter" || i === " " ? (g = (v = r(this, C, Cs).call(this)) == null ? void 0 : v.el) == null || g.click() : r(this, C, br).call(this, t));
|
|
3436
|
+
}, br = function(t) {
|
|
3437
|
+
var g;
|
|
3438
|
+
const { key: i } = t, s = e(this, ct), o = (g = r(this, C, Cs).call(this)) != null ? g : s[0];
|
|
3439
|
+
if (!o) return;
|
|
3440
|
+
const p = s.indexOf(o);
|
|
3441
|
+
let u = Math.max(0, p);
|
|
3442
|
+
i === "ArrowDown" ? u++ : i === "ArrowUp" ? u-- : t.key === "Home" ? u = 0 : t.key === "End" && (u = s.length - 1), u < 0 && (u = s.length - 1), u > s.length - 1 && (u = 0);
|
|
3443
|
+
const v = s[u];
|
|
3444
|
+
v && (r(this, C, mr).call(this, v.id), v.el.focus());
|
|
3445
|
+
}, Cs = function() {
|
|
3446
|
+
return e(this, ct).find((t) => t.el.tabIndex === 0);
|
|
3447
|
+
}, mr = function(t) {
|
|
3448
|
+
for (const i of e(this, ct))
|
|
3449
|
+
i.el.tabIndex = i.id === t ? 0 : -1;
|
|
3450
|
+
}, m(hr, "observedAttributes", [n.RENDITION_LEVELS, n.MAX_VIDEO_BITRATE]);
|
|
3451
|
+
const vr = document.createElement("template");
|
|
3452
|
+
vr.innerHTML = /* HTML */
|
|
2727
3453
|
`
|
|
2728
3454
|
<style>
|
|
2729
3455
|
:host {
|
|
@@ -2771,6 +3497,7 @@ dn.innerHTML = /* HTML */
|
|
|
2771
3497
|
height: calc(100% - var(--scroll-overlay-offset));
|
|
2772
3498
|
pointer-events: auto;
|
|
2773
3499
|
scroll-snap-align: start;
|
|
3500
|
+
min-height: 1px;
|
|
2774
3501
|
}
|
|
2775
3502
|
|
|
2776
3503
|
slot#content {
|
|
@@ -2782,7 +3509,7 @@ dn.innerHTML = /* HTML */
|
|
|
2782
3509
|
flex-direction: column;
|
|
2783
3510
|
}
|
|
2784
3511
|
|
|
2785
|
-
:host(:not([${
|
|
3512
|
+
:host(:not([${n.USER_INTERACTING}])) {
|
|
2786
3513
|
overflow: hidden !important;
|
|
2787
3514
|
}
|
|
2788
3515
|
</style>
|
|
@@ -2790,66 +3517,68 @@ dn.innerHTML = /* HTML */
|
|
|
2790
3517
|
<div id="scroll-area"></div>
|
|
2791
3518
|
<slot id="content"></slot>
|
|
2792
3519
|
`;
|
|
2793
|
-
var
|
|
2794
|
-
class
|
|
3520
|
+
var ut, Ft, oe, ei, I, fr, Er, Ar, Oi, Fi, Ei, Ls, Ts, xs, Ss;
|
|
3521
|
+
class gr extends HTMLElement {
|
|
2795
3522
|
constructor() {
|
|
2796
3523
|
super();
|
|
2797
|
-
l(this,
|
|
2798
|
-
l(this,
|
|
2799
|
-
l(this,
|
|
2800
|
-
l(this,
|
|
2801
|
-
|
|
3524
|
+
l(this, I);
|
|
3525
|
+
l(this, ut, null);
|
|
3526
|
+
l(this, Ft, null);
|
|
3527
|
+
l(this, oe, null);
|
|
3528
|
+
l(this, ei, 0);
|
|
3529
|
+
m(this, "handleEvent", (t) => {
|
|
2802
3530
|
switch (t.type) {
|
|
2803
3531
|
case "touchstart":
|
|
2804
|
-
|
|
3532
|
+
r(this, I, fr).call(this, t);
|
|
2805
3533
|
break;
|
|
2806
3534
|
case "touchmove":
|
|
2807
|
-
|
|
3535
|
+
r(this, I, Er).call(this, t);
|
|
2808
3536
|
break;
|
|
2809
3537
|
case "touchend":
|
|
2810
|
-
|
|
3538
|
+
r(this, I, Ar).call(this, t);
|
|
2811
3539
|
break;
|
|
2812
3540
|
}
|
|
2813
3541
|
});
|
|
2814
|
-
l(this,
|
|
2815
|
-
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"),
|
|
3542
|
+
l(this, Oi, () => {
|
|
3543
|
+
this.scrollTop === 0 ? (this.open = !1, this.removeAttribute("snap-touch"), r(this, I, Ss).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, I, xs).call(this) : (
|
|
2816
3544
|
// fully open
|
|
2817
|
-
!this.hasAttribute("snap-touch") &&
|
|
3545
|
+
!this.hasAttribute("snap-touch") && r(this, I, Ts).call(this) && (this.open = !0, this.setAttribute("snap-touch", ""))
|
|
2818
3546
|
);
|
|
2819
3547
|
});
|
|
2820
|
-
l(this,
|
|
2821
|
-
|
|
3548
|
+
l(this, Fi, () => {
|
|
3549
|
+
const t = e(this, ei);
|
|
3550
|
+
if (c(this, ei, this.scrollTop), !r(this, I, Ei).call(this)) {
|
|
2822
3551
|
this.scrollTop = 0;
|
|
2823
3552
|
return;
|
|
2824
3553
|
}
|
|
2825
|
-
this.scrollTop === 0 ? (this.open = !1,
|
|
3554
|
+
this.scrollTop === 0 ? (this.open = !1, r(this, I, Ss).call(this)) : !this.visible && this.scrollTop > 0 ? r(this, I, xs).call(this) : r(this, I, Ts).call(this) && t <= this.scrollTop && (this.open = !0);
|
|
2826
3555
|
});
|
|
2827
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3556
|
+
this.attachShadow({ mode: "open" }).appendChild(vr.content.cloneNode(!0));
|
|
2828
3557
|
}
|
|
2829
3558
|
connectedCallback() {
|
|
2830
|
-
var
|
|
3559
|
+
var i, s, o, p, u, v;
|
|
2831
3560
|
const t = this.getRootNode();
|
|
2832
3561
|
if (t instanceof Document || t instanceof ShadowRoot) {
|
|
2833
|
-
|
|
3562
|
+
c(this, ut, t.querySelector("vindral-controller")), (i = e(this, ut)) == null || i.connectListener(this), c(this, Ft, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#scroll-area")), (o = e(this, Ft)) == null || o.addEventListener("click", () => {
|
|
2834
3563
|
this.open && (this.open = !1);
|
|
2835
3564
|
});
|
|
2836
|
-
const
|
|
2837
|
-
if (!
|
|
2838
|
-
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this,
|
|
3565
|
+
const g = this.hasAttribute("touch-enabled");
|
|
3566
|
+
if (!Wr() || !g) {
|
|
3567
|
+
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, Fi));
|
|
2839
3568
|
return;
|
|
2840
3569
|
}
|
|
2841
|
-
this.addEventListener("scroll", e(this,
|
|
3570
|
+
this.addEventListener("scroll", e(this, Oi)), (p = e(this, ut)) == null || p.addEventListener("touchstart", this, { passive: !0 }), (u = e(this, ut)) == null || u.addEventListener("touchmove", this, { passive: !1 }), (v = e(this, ut)) == null || v.addEventListener("touchend", this, { passive: !0 });
|
|
2842
3571
|
}
|
|
2843
3572
|
}
|
|
2844
3573
|
disconnectedCallback() {
|
|
2845
3574
|
var t;
|
|
2846
|
-
(t = e(this,
|
|
3575
|
+
(t = e(this, ut)) == null || t.disconnectListener(this);
|
|
2847
3576
|
}
|
|
2848
|
-
attributeChangedCallback(t,
|
|
2849
|
-
var
|
|
2850
|
-
|
|
3577
|
+
attributeChangedCallback(t, i, s) {
|
|
3578
|
+
var o;
|
|
3579
|
+
i !== s && (t === n.USER_INTERACTING && s === null && r(this, I, Ls).call(this) && setTimeout(() => {
|
|
2851
3580
|
this.open = !1;
|
|
2852
|
-
}, 300), t === "open" && this.scrollTo({ top:
|
|
3581
|
+
}, 300), t === "open" && this.scrollTo({ top: s === null ? 0 : (o = e(this, Ft)) == null ? void 0 : o.clientHeight, behavior: "smooth" }));
|
|
2853
3582
|
}
|
|
2854
3583
|
set open(t) {
|
|
2855
3584
|
t ? this.setAttribute("open", "") : this.removeAttribute("open");
|
|
@@ -2864,269 +3593,265 @@ class hn extends HTMLElement {
|
|
|
2864
3593
|
return this.hasAttribute("visible");
|
|
2865
3594
|
}
|
|
2866
3595
|
}
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
},
|
|
2870
|
-
if (!(!
|
|
2871
|
-
const
|
|
2872
|
-
this.scrollTop =
|
|
2873
|
-
}
|
|
2874
|
-
},
|
|
2875
|
-
|
|
2876
|
-
},
|
|
2877
|
-
return this.hasAttribute(
|
|
2878
|
-
},
|
|
3596
|
+
ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(), ei = new WeakMap(), I = new WeakSet(), fr = function(t) {
|
|
3597
|
+
r(this, I, Ei).call(this) && t.touches[0] && c(this, oe, t.touches[0].clientY);
|
|
3598
|
+
}, Er = function(t) {
|
|
3599
|
+
if (!(!r(this, I, Ei).call(this) || !e(this, oe) || this.hasAttribute("snap-touch")) && (t.preventDefault(), t.touches[0])) {
|
|
3600
|
+
const i = t.touches[0].clientY, s = e(this, oe) - i;
|
|
3601
|
+
this.scrollTop = s;
|
|
3602
|
+
}
|
|
3603
|
+
}, Ar = function(t) {
|
|
3604
|
+
r(this, I, Ls).call(this) && !this.hasAttribute("snap-touch") && (this.open = !0);
|
|
3605
|
+
}, Oi = new WeakMap(), Fi = new WeakMap(), Ei = function() {
|
|
3606
|
+
return this.hasAttribute(n.USER_INTERACTING);
|
|
3607
|
+
}, Ls = function() {
|
|
2879
3608
|
return this.scrollTop > 0;
|
|
2880
|
-
},
|
|
3609
|
+
}, Ts = function() {
|
|
2881
3610
|
var t;
|
|
2882
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this,
|
|
2883
|
-
},
|
|
2884
|
-
this.visible = !0, this.dispatchEvent(new CustomEvent(
|
|
2885
|
-
},
|
|
2886
|
-
this.visible = !1, this.dispatchEvent(new CustomEvent(
|
|
2887
|
-
},
|
|
2888
|
-
const
|
|
2889
|
-
|
|
3611
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((t = e(this, Ft)) == null ? void 0 : t.clientHeight);
|
|
3612
|
+
}, xs = function() {
|
|
3613
|
+
this.visible = !0, this.dispatchEvent(new CustomEvent(f.LOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3614
|
+
}, Ss = function() {
|
|
3615
|
+
this.visible = !1, this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3616
|
+
}, m(gr, "observedAttributes", [n.USER_INTERACTING, "open", "touch-enabled"]);
|
|
3617
|
+
const yr = document.createElement("template"), _o = (
|
|
3618
|
+
/* SVG */
|
|
3619
|
+
`
|
|
3620
|
+
<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>
|
|
3621
|
+
`
|
|
3622
|
+
), Po = (
|
|
3623
|
+
/* SVG */
|
|
3624
|
+
`
|
|
3625
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" clip-rule="evenodd" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" /></g></svg>
|
|
3626
|
+
`
|
|
3627
|
+
);
|
|
3628
|
+
yr.innerHTML = /* HTML */
|
|
2890
3629
|
`
|
|
2891
3630
|
<style>
|
|
2892
3631
|
:host {
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
width: 100%;
|
|
2896
|
-
height: 5px;
|
|
2897
|
-
display: flex;
|
|
3632
|
+
display: var(--play-overlay-display);
|
|
2898
3633
|
align-items: center;
|
|
2899
3634
|
justify-content: center;
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
3635
|
+
position: absolute;
|
|
3636
|
+
top: 0;
|
|
3637
|
+
bottom: 0;
|
|
3638
|
+
left: 0;
|
|
3639
|
+
right: 0;
|
|
3640
|
+
z-index: 1;
|
|
3641
|
+
pointer-events: none;
|
|
2906
3642
|
}
|
|
2907
3643
|
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
3644
|
+
:host([hidden]) {
|
|
3645
|
+
display: none;
|
|
3646
|
+
}
|
|
2911
3647
|
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
3648
|
+
/* Make icon slots clickable */
|
|
3649
|
+
slot[name="play"],
|
|
3650
|
+
slot[name="unmute"] {
|
|
3651
|
+
color: var(--fg-strong);
|
|
3652
|
+
pointer-events: auto;
|
|
3653
|
+
cursor: pointer;
|
|
3654
|
+
}
|
|
2916
3655
|
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3656
|
+
:host(:focus-visible) svg {
|
|
3657
|
+
box-shadow: inset 0 0 0 2px var(--fg-strong);
|
|
3658
|
+
outline: 0;
|
|
2920
3659
|
}
|
|
2921
3660
|
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
top: calc(50% - 2px);
|
|
2925
|
-
left: 1px;
|
|
2926
|
-
width: calc(100% - 1px);
|
|
2927
|
-
height: 4px;
|
|
2928
|
-
background-color: rgb(255 255 255 / 0.2);
|
|
2929
|
-
overflow: hidden;
|
|
2930
|
-
cursor: pointer;
|
|
3661
|
+
:host(:active) svg {
|
|
3662
|
+
scale: 0.9;
|
|
2931
3663
|
}
|
|
2932
3664
|
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
left: calc(-100%);
|
|
2937
|
-
top: 0;
|
|
2938
|
-
width: calc(100%);
|
|
2939
|
-
height: 100%;
|
|
2940
|
-
background-color: var(--fg-strong);
|
|
2941
|
-
transition: background-color 300ms ease-out;
|
|
2942
|
-
transform-origin: 100% 0%;
|
|
2943
|
-
transform: translateX(calc(var(--value) * 100%)) scaleX(1.2);
|
|
3665
|
+
slot > svg {
|
|
3666
|
+
width: var(--play-overlay-icon-size);
|
|
3667
|
+
height: var(--play-overlay-icon-size);
|
|
2944
3668
|
}
|
|
2945
3669
|
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
appearance: none;
|
|
2949
|
-
width: 12px;
|
|
2950
|
-
height: 12px;
|
|
2951
|
-
border-radius: 50%;
|
|
2952
|
-
background-color: var(--fg-strong);
|
|
2953
|
-
cursor: pointer;
|
|
2954
|
-
z-index: 1;
|
|
3670
|
+
:host(:not([${n.NEEDS_USER_INPUT_VIDEO}]):not([${n.PAUSED}])) slot[name="play"] {
|
|
3671
|
+
display: none !important;
|
|
2955
3672
|
}
|
|
2956
3673
|
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
width: 12px;
|
|
2961
|
-
height: 12px;
|
|
2962
|
-
border-radius: 50%;
|
|
2963
|
-
background-color: var(--fg-strong);
|
|
2964
|
-
cursor: pointer;
|
|
2965
|
-
z-index: 1;
|
|
3674
|
+
:host([${n.PAUSED}]) slot[name="unmute"],
|
|
3675
|
+
:host(:not([${n.NEEDS_USER_INPUT_AUDIO}])) slot[name="unmute"] {
|
|
3676
|
+
display: none !important;
|
|
2966
3677
|
}
|
|
2967
3678
|
</style>
|
|
2968
3679
|
|
|
2969
|
-
<
|
|
2970
|
-
|
|
3680
|
+
<slot name="icon">
|
|
3681
|
+
<slot name="play">${_o}</slot>
|
|
3682
|
+
<slot name="unmute">${Po}</slot>
|
|
3683
|
+
</slot>
|
|
2971
3684
|
`;
|
|
2972
|
-
var
|
|
2973
|
-
class
|
|
3685
|
+
var ae, ii, Ht, si;
|
|
3686
|
+
class kr extends HTMLElement {
|
|
2974
3687
|
constructor() {
|
|
2975
3688
|
super();
|
|
2976
|
-
l(this,
|
|
2977
|
-
l(this,
|
|
2978
|
-
|
|
2979
|
-
|
|
3689
|
+
l(this, ae, null);
|
|
3690
|
+
l(this, ii, () => {
|
|
3691
|
+
this.dispatchEvent(new CustomEvent(f.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
3692
|
+
});
|
|
3693
|
+
l(this, Ht, (t) => {
|
|
3694
|
+
const { key: i } = t;
|
|
3695
|
+
if (!this.keysUsed.includes(i)) {
|
|
3696
|
+
this.removeEventListener("keyup", e(this, Ht));
|
|
3697
|
+
return;
|
|
3698
|
+
}
|
|
3699
|
+
this.dispatchEvent(new CustomEvent(f.REQUEST_USER_INPUT, { bubbles: !0, composed: !0 }));
|
|
3700
|
+
});
|
|
3701
|
+
l(this, si, (t) => {
|
|
3702
|
+
const { metaKey: i, altKey: s, key: o } = t;
|
|
3703
|
+
if (i || s || !this.keysUsed.includes(o)) {
|
|
3704
|
+
this.removeEventListener("keyup", e(this, Ht));
|
|
3705
|
+
return;
|
|
3706
|
+
}
|
|
3707
|
+
this.addEventListener("keyup", e(this, Ht), { once: !0 });
|
|
3708
|
+
});
|
|
3709
|
+
this.attachShadow({ mode: "open" }).appendChild(yr.content.cloneNode(!0));
|
|
2980
3710
|
}
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
const t = this.getRootNode();
|
|
2984
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, zt, t.querySelector("vindral-controller")), (n = e(this, zt)) == null || n.connectListener(this)), this.hasAttribute("disabled") || this.enable();
|
|
3711
|
+
get keysUsed() {
|
|
3712
|
+
return ["Enter", " "];
|
|
2985
3713
|
}
|
|
2986
|
-
|
|
3714
|
+
connectedCallback() {
|
|
2987
3715
|
var t;
|
|
2988
|
-
(t = e(this,
|
|
2989
|
-
}
|
|
2990
|
-
attributeChangedCallback(t, n, i) {
|
|
2991
|
-
n !== i && (t === "disabled" && i ? this.disable() : this.enable(), this.updateBar());
|
|
3716
|
+
c(this, ae, this.closest("vindral-controller")), (t = e(this, ae)) == null || t.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
2992
3717
|
}
|
|
2993
3718
|
enable() {
|
|
2994
|
-
this.
|
|
3719
|
+
this.addEventListener("click", e(this, ii)), this.addEventListener("keydown", e(this, si)), this.tabIndex = 0;
|
|
2995
3720
|
}
|
|
2996
3721
|
disable() {
|
|
2997
|
-
this.
|
|
2998
|
-
}
|
|
2999
|
-
handleEvent(t) {
|
|
3000
|
-
t.type === "input" && this.updateBar();
|
|
3722
|
+
this.removeEventListener("click", e(this, ii)), this.removeEventListener("keydown", e(this, si)), this.removeEventListener("keyup", e(this, Ht)), this.tabIndex = -1;
|
|
3001
3723
|
}
|
|
3002
|
-
|
|
3003
|
-
|
|
3724
|
+
disconnectedCallback() {
|
|
3725
|
+
var t;
|
|
3726
|
+
(t = e(this, ae)) == null || t.disconnectListener(this), this.disable();
|
|
3004
3727
|
}
|
|
3005
3728
|
}
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3729
|
+
ae = new WeakMap(), ii = new WeakMap(), Ht = new WeakMap(), si = new WeakMap(), m(kr, "observedAttributes", [
|
|
3730
|
+
"hidden",
|
|
3731
|
+
n.NEEDS_USER_INPUT_VIDEO,
|
|
3732
|
+
n.NEEDS_USER_INPUT_AUDIO,
|
|
3733
|
+
n.PAUSED
|
|
3734
|
+
]);
|
|
3735
|
+
const wr = document.createElement("template");
|
|
3736
|
+
wr.innerHTML = /* HTML */
|
|
3009
3737
|
`
|
|
3010
3738
|
<style>
|
|
3011
|
-
:host
|
|
3012
|
-
|
|
3013
|
-
|
|
3739
|
+
:host,
|
|
3740
|
+
#background {
|
|
3741
|
+
position: absolute;
|
|
3742
|
+
overflow: hidden;
|
|
3743
|
+
display: flex;
|
|
3744
|
+
flex-direction: column;
|
|
3745
|
+
height: 100%;
|
|
3746
|
+
width: 100%;
|
|
3747
|
+
top: 0;
|
|
3748
|
+
left: 0;
|
|
3749
|
+
background-repeat: no-repeat;
|
|
3750
|
+
background-position: 50% 50%;
|
|
3751
|
+
background-size: contain;
|
|
3752
|
+
font-size: 20px;
|
|
3753
|
+
color: var(--fg-strong);
|
|
3754
|
+
pointer-events: none;
|
|
3014
3755
|
}
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
var Ue;
|
|
3019
|
-
const ae = class ae extends vn {
|
|
3020
|
-
constructor() {
|
|
3021
|
-
var t;
|
|
3022
|
-
super();
|
|
3023
|
-
l(this, Ue, () => {
|
|
3024
|
-
const t = this.range.valueAsNumber;
|
|
3025
|
-
this.dispatchEvent(new CustomEvent(v.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
3026
|
-
});
|
|
3027
|
-
(t = this.shadowRoot) == null || t.appendChild(gn.content.cloneNode(!0));
|
|
3028
|
-
}
|
|
3029
|
-
connectedCallback() {
|
|
3030
|
-
super.connectedCallback(), this.range.addEventListener("input", e(this, Ue)), this.range.setAttribute("aria-label", "volume");
|
|
3031
|
-
}
|
|
3032
|
-
disconnectedCallback() {
|
|
3033
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, Ue));
|
|
3034
|
-
}
|
|
3035
|
-
attributeChangedCallback(t, n, i) {
|
|
3036
|
-
super.attributeChangedCallback(t, n, i), (t === s.MUTED || t === s.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Eo(this.range.valueAsNumber)), this.updateBar());
|
|
3037
|
-
}
|
|
3038
|
-
get volume() {
|
|
3039
|
-
var t;
|
|
3040
|
-
return (t = this.getAttribute(s.VOLUME)) != null ? t : "1";
|
|
3041
|
-
}
|
|
3042
|
-
get muted() {
|
|
3043
|
-
return this.hasAttribute(s.MUTED);
|
|
3044
|
-
}
|
|
3045
|
-
};
|
|
3046
|
-
Ue = new WeakMap(), p(ae, "observedAttributes", [..._(ae, ae, "observedAttributes"), s.MUTED, s.VOLUME]);
|
|
3047
|
-
let Ki = ae;
|
|
3048
|
-
const fn = document.createElement("template"), Ao = (
|
|
3049
|
-
/* SVG */
|
|
3050
|
-
`
|
|
3051
|
-
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
3052
|
-
<style>
|
|
3053
|
-
.spinner-container {
|
|
3054
|
-
transform-origin: center;
|
|
3055
|
-
animation: rotate 2s linear infinite;
|
|
3756
|
+
|
|
3757
|
+
:host([hidden]) {
|
|
3758
|
+
display: none;
|
|
3056
3759
|
}
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3760
|
+
|
|
3761
|
+
#background {
|
|
3762
|
+
opacity: 0.7;
|
|
3060
3763
|
}
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3764
|
+
|
|
3765
|
+
#message-container {
|
|
3766
|
+
position: absolute;
|
|
3767
|
+
left: 50%;
|
|
3768
|
+
bottom: calc(50% + var(--play-overlay-icon-size));
|
|
3769
|
+
transform: translateX(-50%);
|
|
3770
|
+
display: flex;
|
|
3771
|
+
flex-direction: column;
|
|
3772
|
+
align-items: center;
|
|
3773
|
+
width: max-content;
|
|
3774
|
+
max-width: 90%;
|
|
3775
|
+
pointer-events: none;
|
|
3065
3776
|
}
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3777
|
+
|
|
3778
|
+
#title,
|
|
3779
|
+
#description {
|
|
3780
|
+
position: static;
|
|
3781
|
+
width: 100%;
|
|
3782
|
+
text-align: center;
|
|
3783
|
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
|
|
3784
|
+
margin: 0;
|
|
3785
|
+
pointer-events: none;
|
|
3786
|
+
}
|
|
3787
|
+
|
|
3788
|
+
#title {
|
|
3789
|
+
margin-bottom: var(--padding-2);
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
@container (max-width: 600px) {
|
|
3793
|
+
:host {
|
|
3794
|
+
font-size: 15px;
|
|
3074
3795
|
}
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3796
|
+
#message-container {
|
|
3797
|
+
bottom: 0;
|
|
3798
|
+
top: var(--padding-1);
|
|
3078
3799
|
}
|
|
3079
3800
|
}
|
|
3080
|
-
</style>
|
|
3081
|
-
<g class="spinner-container">
|
|
3082
|
-
<circle class="spinner-circle" cx="12" cy="12" r="9.5" fill="none" stroke-width="3"></circle>
|
|
3083
|
-
</g>
|
|
3084
|
-
</svg>
|
|
3085
|
-
`
|
|
3086
|
-
);
|
|
3087
|
-
fn.innerHTML = /* HTML */
|
|
3088
|
-
`
|
|
3089
|
-
<style>
|
|
3090
|
-
:host {
|
|
3091
|
-
color: var(--fg-strong);
|
|
3092
|
-
}
|
|
3093
3801
|
|
|
3094
|
-
|
|
3095
|
-
|
|
3802
|
+
@container (max-width: 400px) {
|
|
3803
|
+
:host {
|
|
3804
|
+
font-size: 12px;
|
|
3805
|
+
}
|
|
3806
|
+
#title {
|
|
3807
|
+
margin-bottom: 0;
|
|
3808
|
+
}
|
|
3096
3809
|
}
|
|
3097
3810
|
|
|
3098
|
-
|
|
3099
|
-
|
|
3811
|
+
@container (max-width: 150px) {
|
|
3812
|
+
:host {
|
|
3813
|
+
font-size: 10px;
|
|
3814
|
+
}
|
|
3815
|
+
#title,
|
|
3816
|
+
#description {
|
|
3817
|
+
font-size: 1.2em;
|
|
3818
|
+
margin: 0;
|
|
3819
|
+
}
|
|
3100
3820
|
}
|
|
3101
3821
|
</style>
|
|
3102
3822
|
|
|
3103
|
-
<
|
|
3823
|
+
<div id="background"></div>
|
|
3824
|
+
<div id="message-container">
|
|
3825
|
+
<h1 id="title"></h1>
|
|
3826
|
+
<p id="description"></p>
|
|
3827
|
+
</div>
|
|
3104
3828
|
`;
|
|
3105
|
-
var
|
|
3106
|
-
class
|
|
3829
|
+
var ni, ri, oi;
|
|
3830
|
+
class Ir extends HTMLElement {
|
|
3107
3831
|
constructor() {
|
|
3108
3832
|
super();
|
|
3109
|
-
l(this,
|
|
3110
|
-
this
|
|
3833
|
+
l(this, ni);
|
|
3834
|
+
l(this, ri);
|
|
3835
|
+
l(this, oi);
|
|
3836
|
+
const t = this.attachShadow({ mode: "open" });
|
|
3837
|
+
t.appendChild(wr.content.cloneNode(!0)), c(this, ni, t.querySelector("#title")), c(this, ri, t.querySelector("#description")), c(this, oi, t.querySelector("#background"));
|
|
3111
3838
|
}
|
|
3112
3839
|
connectedCallback() {
|
|
3113
|
-
var n;
|
|
3114
|
-
const t = this.getRootNode();
|
|
3115
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, qt, t.querySelector("vindral-controller")), (n = e(this, qt)) == null || n.connectListener(this));
|
|
3116
3840
|
}
|
|
3117
3841
|
disconnectedCallback() {
|
|
3118
|
-
|
|
3119
|
-
|
|
3842
|
+
}
|
|
3843
|
+
attributeChangedCallback(t, i, s) {
|
|
3844
|
+
i !== s && (t === "title" ? e(this, ni).textContent = s : t === "description" ? e(this, ri).textContent = s : t === "background-image" && (e(this, oi).style.backgroundImage = `url(${s})`));
|
|
3120
3845
|
}
|
|
3121
3846
|
}
|
|
3122
|
-
|
|
3123
|
-
const
|
|
3847
|
+
ni = new WeakMap(), ri = new WeakMap(), oi = new WeakMap(), m(Ir, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
3848
|
+
const Cr = document.createElement("template"), Mo = (
|
|
3124
3849
|
/* SVG */
|
|
3125
3850
|
`
|
|
3126
3851
|
<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>
|
|
3127
3852
|
`
|
|
3128
3853
|
);
|
|
3129
|
-
|
|
3854
|
+
Cr.innerHTML = /* HTML */
|
|
3130
3855
|
`
|
|
3131
3856
|
<style>
|
|
3132
3857
|
:host {
|
|
@@ -3146,165 +3871,97 @@ An.innerHTML = /* HTML */
|
|
|
3146
3871
|
display: none;
|
|
3147
3872
|
}
|
|
3148
3873
|
|
|
3874
|
+
:host(:focus-visible) {
|
|
3875
|
+
outline: none;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
:host(:focus-visible) svg {
|
|
3879
|
+
box-shadow: inset 0 0 0 2px var(--fg-strong);
|
|
3880
|
+
outline: 0;
|
|
3881
|
+
}
|
|
3882
|
+
|
|
3883
|
+
:host(:active) svg {
|
|
3884
|
+
scale: 0.9;
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3149
3887
|
slot#play {
|
|
3888
|
+
color: var(--fg-strong);
|
|
3150
3889
|
pointer-events: auto;
|
|
3151
3890
|
cursor: pointer;
|
|
3152
|
-
color: var(--fg-strong);
|
|
3153
3891
|
}
|
|
3154
3892
|
|
|
3155
3893
|
slot#play > svg {
|
|
3156
|
-
width:
|
|
3157
|
-
height:
|
|
3894
|
+
width: var(--play-overlay-icon-size);
|
|
3895
|
+
height: var(--play-overlay-icon-size);
|
|
3158
3896
|
}
|
|
3159
3897
|
</style>
|
|
3160
3898
|
|
|
3161
|
-
<slot id="play" name="icon">${
|
|
3899
|
+
<slot id="play" name="icon">${Mo}</slot>
|
|
3162
3900
|
`;
|
|
3163
|
-
var
|
|
3164
|
-
class
|
|
3901
|
+
var le;
|
|
3902
|
+
class Lr extends HTMLElement {
|
|
3165
3903
|
constructor() {
|
|
3166
3904
|
super();
|
|
3167
|
-
l(this,
|
|
3168
|
-
this.attachShadow({ mode: "open" }).appendChild(
|
|
3905
|
+
l(this, le, null);
|
|
3906
|
+
this.attachShadow({ mode: "open" }).appendChild(Cr.content.cloneNode(!0));
|
|
3169
3907
|
}
|
|
3170
3908
|
connectedCallback() {
|
|
3171
|
-
var
|
|
3172
|
-
|
|
3173
|
-
(t instanceof Document || t instanceof ShadowRoot) && (h(this, Kt, t.querySelector("vindral-controller")), (n = e(this, Kt)) == null || n.connectListener(this)), this.setAttribute("arial-label", "Play");
|
|
3909
|
+
var t;
|
|
3910
|
+
c(this, le, this.closest("vindral-controller")), (t = e(this, le)) == null || t.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
3174
3911
|
}
|
|
3175
3912
|
disconnectedCallback() {
|
|
3176
3913
|
var t;
|
|
3177
|
-
(t = e(this,
|
|
3914
|
+
(t = e(this, le)) == null || t.disconnectListener(this);
|
|
3915
|
+
}
|
|
3916
|
+
attributeChangedCallback(t, i, s) {
|
|
3917
|
+
i !== s && t === "hidden" && !L(s) && this.focus();
|
|
3178
3918
|
}
|
|
3179
3919
|
}
|
|
3180
|
-
|
|
3181
|
-
const
|
|
3182
|
-
|
|
3920
|
+
le = new WeakMap(), m(Lr, "observedAttributes", ["hidden"]);
|
|
3921
|
+
const Tr = document.createElement("template");
|
|
3922
|
+
Tr.innerHTML = /* HTML */
|
|
3183
3923
|
`
|
|
3184
3924
|
<style>
|
|
3185
3925
|
:host {
|
|
3186
|
-
display: var(--
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
:host(:not([${s.NEEDS_USER_INPUT}]):not([${s.PAUSED}])) #play {
|
|
3190
|
-
display: none;
|
|
3926
|
+
display: var(--volume-range-display);
|
|
3927
|
+
width: 80px;
|
|
3191
3928
|
}
|
|
3192
3929
|
</style>
|
|
3193
3930
|
`;
|
|
3194
|
-
|
|
3195
|
-
|
|
3931
|
+
const Do = (d) => `${Math.round(d * 100)}%`;
|
|
3932
|
+
var ai;
|
|
3933
|
+
const Ce = class Ce extends _s {
|
|
3196
3934
|
constructor() {
|
|
3197
3935
|
var t;
|
|
3198
3936
|
super();
|
|
3199
|
-
l(this,
|
|
3200
|
-
this.
|
|
3937
|
+
l(this, ai, () => {
|
|
3938
|
+
const t = this.range.valueAsNumber;
|
|
3939
|
+
this.dispatchEvent(new CustomEvent(f.SET_VOLUME, { bubbles: !0, composed: !0, detail: t }));
|
|
3201
3940
|
});
|
|
3202
|
-
(t = this.shadowRoot) == null || t.appendChild(
|
|
3941
|
+
(t = this.shadowRoot) == null || t.appendChild(Tr.content.cloneNode(!0));
|
|
3203
3942
|
}
|
|
3204
3943
|
connectedCallback() {
|
|
3205
|
-
super.connectedCallback(), this.addEventListener("
|
|
3944
|
+
super.connectedCallback(), this.range.addEventListener("input", e(this, ai)), this.range.setAttribute("aria-label", "volume");
|
|
3206
3945
|
}
|
|
3207
3946
|
disconnectedCallback() {
|
|
3208
|
-
super.disconnectedCallback();
|
|
3947
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, ai));
|
|
3209
3948
|
}
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
..._(le, le, "observedAttributes"),
|
|
3213
|
-
s.NEEDS_USER_INPUT,
|
|
3214
|
-
s.PAUSED
|
|
3215
|
-
]);
|
|
3216
|
-
let Xi = le;
|
|
3217
|
-
const kn = document.createElement("template");
|
|
3218
|
-
kn.innerHTML = /* HTML */
|
|
3219
|
-
`
|
|
3220
|
-
<style>
|
|
3221
|
-
:host,
|
|
3222
|
-
#background {
|
|
3223
|
-
position: absolute;
|
|
3224
|
-
overflow: hidden;
|
|
3225
|
-
display: flex;
|
|
3226
|
-
flex-direction: column;
|
|
3227
|
-
height: 100%;
|
|
3228
|
-
width: 100%;
|
|
3229
|
-
top: 0;
|
|
3230
|
-
left: 0;
|
|
3231
|
-
justify-content: center;
|
|
3232
|
-
align-items: center;
|
|
3233
|
-
background-repeat: no-repeat;
|
|
3234
|
-
background-position: 50% 50%;
|
|
3235
|
-
background-size: contain;
|
|
3236
|
-
font-size: 20px;
|
|
3237
|
-
color: var(--fg-strong);
|
|
3238
|
-
pointer-events: none;
|
|
3239
|
-
}
|
|
3240
|
-
|
|
3241
|
-
:host([hidden]) {
|
|
3242
|
-
display: none;
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
#background {
|
|
3246
|
-
opacity: 0.7;
|
|
3247
|
-
}
|
|
3248
|
-
|
|
3249
|
-
#title,
|
|
3250
|
-
#description {
|
|
3251
|
-
position: relative;
|
|
3252
|
-
text-align: center;
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
@container (max-width: 600px) {
|
|
3256
|
-
:host {
|
|
3257
|
-
font-size: 15px;
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3261
|
-
@container (max-width: 400px) {
|
|
3262
|
-
:host {
|
|
3263
|
-
font-size: 12px;
|
|
3264
|
-
}
|
|
3265
|
-
#title {
|
|
3266
|
-
margin: 0;
|
|
3267
|
-
}
|
|
3268
|
-
}
|
|
3269
|
-
|
|
3270
|
-
@container (max-width: 150px) {
|
|
3271
|
-
:host {
|
|
3272
|
-
font-size: 10px;
|
|
3273
|
-
}
|
|
3274
|
-
#title,
|
|
3275
|
-
#description {
|
|
3276
|
-
font-size: 1.2em;
|
|
3277
|
-
margin: 0;
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
</style>
|
|
3281
|
-
|
|
3282
|
-
<div id="background"></div>
|
|
3283
|
-
<h1 id="title"></h1>
|
|
3284
|
-
<p id="description"></p>
|
|
3285
|
-
`;
|
|
3286
|
-
var _e, Pe, Me;
|
|
3287
|
-
class Cn extends HTMLElement {
|
|
3288
|
-
constructor() {
|
|
3289
|
-
super();
|
|
3290
|
-
l(this, _e);
|
|
3291
|
-
l(this, Pe);
|
|
3292
|
-
l(this, Me);
|
|
3293
|
-
const t = this.attachShadow({ mode: "open" });
|
|
3294
|
-
t.appendChild(kn.content.cloneNode(!0)), h(this, _e, t.querySelector("#title")), h(this, Pe, t.querySelector("#description")), h(this, Me, t.querySelector("#background"));
|
|
3949
|
+
attributeChangedCallback(t, i, s) {
|
|
3950
|
+
super.attributeChangedCallback(t, i, s), (t === n.MUTED || t === n.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Do(this.range.valueAsNumber)), this.updateBar());
|
|
3295
3951
|
}
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3952
|
+
get volume() {
|
|
3953
|
+
var t;
|
|
3954
|
+
return (t = this.getAttribute(n.VOLUME)) != null ? t : "1";
|
|
3299
3955
|
}
|
|
3300
|
-
|
|
3301
|
-
|
|
3956
|
+
get muted() {
|
|
3957
|
+
return this.hasAttribute(n.MUTED);
|
|
3302
3958
|
}
|
|
3303
|
-
}
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3959
|
+
};
|
|
3960
|
+
ai = new WeakMap(), m(Ce, "observedAttributes", [...q(Ce, Ce, "observedAttributes"), n.MUTED, n.VOLUME]);
|
|
3961
|
+
let Ns = Ce;
|
|
3962
|
+
function $o() {
|
|
3963
|
+
customElements.define("vindral-controller", Le), customElements.define("vindral-control-bar", yn), customElements.define("vindral-play-button", ms), customElements.define("vindral-mute-button", ps), customElements.define("vindral-buffering-overlay", Ws), customElements.define("vindral-scroll-overlay", gr), customElements.define("vindral-play-overlay", Lr), customElements.define("vindral-user-input-play-overlay", kr), customElements.define("vindral-fullscreen-button", os), customElements.define("vindral-rendition-levels-menu", ys), customElements.define("vindral-rendition-levels-menu-list", hr), customElements.define("vindral-channel-grid-button", Ji), customElements.define("vindral-channel-grid", an), customElements.define("vindral-channel-grid-item", Rs), customElements.define("vindral-pip-button", bs), customElements.define("vindral-airplay-button", qi), customElements.define("vindral-cast-button", Vi), customElements.define("vindral-cast-overlay", sn), customElements.define("vindral-buffering-icon", Js), customElements.define("vindral-language-menu", as), customElements.define("vindral-language-menu-list", Kn), customElements.define("vindral-message", Ir), customElements.define("vindral-volume-range", Ns), customElements.define("vindral-poster-overlay", rr), customElements.define("vindral-player", ir);
|
|
3307
3964
|
}
|
|
3308
3965
|
export {
|
|
3309
|
-
|
|
3966
|
+
$o as registerComponents
|
|
3310
3967
|
};
|