@vindral/web-sdk 4.7.1-1-g9d41bb8aa → 4.7.1
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/{DKr8WNnY.js → BZbYOX-0.js} +1 -1
- package/core.js +1 -1
- package/legacy.es.js +1 -1
- package/legacy.umd.js +1 -1
- package/package.json +1 -1
- package/player.js +2 -2
- package/vindral-player-component.js +2 -2
- package/{DIsNeRuI.js → wRfUpHJt.js} +771 -772
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { C as n, D as r, E as i, O as a, S as o, T as s, _ as c, b as l, g as u, h as ee, k as d, m as te, p as ne, t as re, v as ie, w as ae, x as oe, y as se } from "./
|
|
2
|
+
import { C as n, D as r, E as i, O as a, S as o, T as s, _ as c, b as l, g as u, h as ee, k as d, m as te, p as ne, t as re, v as ie, w as ae, x as oe, y as se } from "./BZbYOX-0.js";
|
|
3
3
|
import { t as ce } from "./CuYn2z5X.js";
|
|
4
4
|
import { i as f, n as p, r as m, t as h } from "./DSw1XhvD.js";
|
|
5
5
|
import { c as le, n as ue, t as de } from "./D40eQS8l.js";
|
|
@@ -1074,25 +1074,22 @@ function Gn(e) {
|
|
|
1074
1074
|
return [];
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
var Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn =
|
|
1077
|
+
var Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn = class {
|
|
1078
1078
|
constructor(t) {
|
|
1079
1079
|
f(this, Kn, void 0), f(this, qn, null), f(this, Jn, null), f(this, Yn, null), f(this, Xn, !0), e(this, "observe", (e) => {
|
|
1080
|
-
h(Yn, this) || (p(Yn, this, e),
|
|
1081
|
-
}),
|
|
1082
|
-
var t;
|
|
1083
|
-
e.target instanceof HTMLMediaElement && h(Qn, this).call(this, ((t = ie(e.target)) == null ? "inline" : t) === "inline");
|
|
1084
|
-
}), f(this, Qn, (e) => {
|
|
1080
|
+
h(Yn, this) || (p(Yn, this, e), window.ResizeObserver && (p(qn, this, new ResizeObserver(() => h(Zn, this).call(this))), h(qn, this).observe(e)));
|
|
1081
|
+
}), e(this, "setEnabled", (e) => {
|
|
1085
1082
|
if (h(Xn, this) !== e) {
|
|
1086
1083
|
if (p(Xn, this, e), p(Jn, this, null), e) {
|
|
1087
|
-
h(
|
|
1084
|
+
h(Zn, this).call(this);
|
|
1088
1085
|
return;
|
|
1089
1086
|
}
|
|
1090
1087
|
for (let e of h(Kn, this)) e.style.removeProperty("font-size");
|
|
1091
1088
|
}
|
|
1092
1089
|
}), e(this, "unload", () => {
|
|
1093
|
-
var e
|
|
1094
|
-
(e = h(
|
|
1095
|
-
}), f(this,
|
|
1090
|
+
var e;
|
|
1091
|
+
(e = h(qn, this)) == null || e.disconnect(), p(qn, this, null), p(Yn, this, null), p(Xn, this, !0);
|
|
1092
|
+
}), f(this, Zn, () => {
|
|
1096
1093
|
if (!h(Xn, this) || h(Kn, this).length === 0 || !h(Yn, this)) return;
|
|
1097
1094
|
let { clientWidth: e, clientHeight: t } = h(Yn, this);
|
|
1098
1095
|
if (e <= 0 || t <= 0) return;
|
|
@@ -1103,7 +1100,7 @@ var Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn =
|
|
|
1103
1100
|
}
|
|
1104
1101
|
}), p(Kn, this, Gn(t));
|
|
1105
1102
|
}
|
|
1106
|
-
},
|
|
1103
|
+
}, $n = class n extends pe {
|
|
1107
1104
|
constructor(r) {
|
|
1108
1105
|
var i;
|
|
1109
1106
|
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1134,35 +1131,35 @@ var Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn =
|
|
|
1134
1131
|
return () => Promise.resolve();
|
|
1135
1132
|
}
|
|
1136
1133
|
};
|
|
1137
|
-
e(
|
|
1134
|
+
e($n, "isFullscreenApiSupported", (e) => l(e));
|
|
1138
1135
|
//#endregion
|
|
1139
1136
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1140
|
-
var
|
|
1137
|
+
var er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), sr = /* @__PURE__ */ new WeakMap(), cr = class extends pe {
|
|
1141
1138
|
constructor(r) {
|
|
1142
1139
|
var a;
|
|
1143
1140
|
super(), a = this, e(this, "unload", () => {
|
|
1144
1141
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), this.element.removeEventListener("webkitpresentationmodechanged", this.onChange), n(this.element, !1);
|
|
1145
1142
|
}), e(this, "request", t(function* () {
|
|
1146
1143
|
try {
|
|
1147
|
-
return yield h(
|
|
1144
|
+
return yield h(er, a).call(a);
|
|
1148
1145
|
} catch (e) {
|
|
1149
1146
|
throw a.onChange(), e;
|
|
1150
1147
|
}
|
|
1151
1148
|
})), e(this, "exit", t(function* () {
|
|
1152
1149
|
try {
|
|
1153
|
-
return yield h(
|
|
1150
|
+
return yield h(tr, a).call(a);
|
|
1154
1151
|
} catch (e) {
|
|
1155
1152
|
throw a.onChange(), e;
|
|
1156
1153
|
}
|
|
1157
1154
|
})), e(this, "onChange", () => {
|
|
1158
1155
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1159
|
-
}), e(this, "isPictureInPictureActive", () =>
|
|
1156
|
+
}), e(this, "isPictureInPictureActive", () => this.isWebkitPresentationModeActive() || h(ar, this).call(this)), e(this, "isSupported", () => h(sr, this).call(this) || h(ir, this).call(this)), f(this, er, () => h(ir, this).call(this) ? h(nr, this).call(this) : h(sr, this).call(this) ? h(or, this).call(this, "picture-in-picture") : Promise.resolve()), f(this, tr, () => this.isPictureInPictureActive() ? h(ir, this).call(this) ? h(rr, this).call(this) : h(sr, this).call(this) ? h(or, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), f(this, nr, t(function* () {
|
|
1160
1157
|
let e = c(a.element);
|
|
1161
1158
|
e && (yield e());
|
|
1162
|
-
})), f(this,
|
|
1159
|
+
})), f(this, rr, t(function* () {
|
|
1163
1160
|
let e = ee();
|
|
1164
1161
|
e && (yield e());
|
|
1165
|
-
})), f(this,
|
|
1162
|
+
})), f(this, ir, () => s(this.element)), f(this, ar, () => oe()), e(this, "isWebkitPresentationModeActive", () => ie(this.element) === "picture-in-picture"), f(this, or, (e) => (i(this.element) && ae(this.element, e), Promise.resolve())), f(this, sr, () => i(this.element)), this.element = r, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.addEventListener("webkitpresentationmodechanged", this.onChange), n(this.element, !0);
|
|
1166
1163
|
}
|
|
1167
1164
|
get videoElement() {
|
|
1168
1165
|
return this.element;
|
|
@@ -1170,7 +1167,7 @@ var nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir =
|
|
|
1170
1167
|
};
|
|
1171
1168
|
//#endregion
|
|
1172
1169
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1173
|
-
function
|
|
1170
|
+
function lr(e, t) {
|
|
1174
1171
|
let n = e.split("\n").map((e) => e.trim());
|
|
1175
1172
|
for (let e = 0; e < n.length; e++) {
|
|
1176
1173
|
var r;
|
|
@@ -1182,7 +1179,7 @@ function fr(e, t) {
|
|
|
1182
1179
|
}
|
|
1183
1180
|
//#endregion
|
|
1184
1181
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1185
|
-
function
|
|
1182
|
+
function ur(e) {
|
|
1186
1183
|
let t = 0;
|
|
1187
1184
|
for (let n of e.split("\n")) {
|
|
1188
1185
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1192,90 +1189,90 @@ function pr(e) {
|
|
|
1192
1189
|
}
|
|
1193
1190
|
//#endregion
|
|
1194
1191
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1195
|
-
var
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1192
|
+
var dr = 5e3;
|
|
1193
|
+
function fr(e, t) {
|
|
1194
|
+
return pr.apply(this, arguments);
|
|
1198
1195
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1201
|
-
let { signal: r, timeoutMs: i =
|
|
1196
|
+
function pr() {
|
|
1197
|
+
return pr = t(function* (e, t, n = {}) {
|
|
1198
|
+
let { signal: r, timeoutMs: i = dr } = n, a = new AbortController(), o = () => a.abort();
|
|
1202
1199
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1203
1200
|
let s = setTimeout(o, i);
|
|
1204
1201
|
try {
|
|
1205
1202
|
let n = yield fetch(e, { signal: a.signal });
|
|
1206
1203
|
if (!n.ok) return;
|
|
1207
|
-
let r =
|
|
1204
|
+
let r = lr(yield n.text(), e);
|
|
1208
1205
|
if (!r) return;
|
|
1209
1206
|
let i = new URL(r);
|
|
1210
1207
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1211
1208
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1212
|
-
return o.ok ?
|
|
1209
|
+
return o.ok ? ur(yield o.text()) : void 0;
|
|
1213
1210
|
} catch (e) {
|
|
1214
1211
|
return;
|
|
1215
1212
|
} finally {
|
|
1216
1213
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1217
1214
|
}
|
|
1218
|
-
}),
|
|
1215
|
+
}), pr.apply(this, arguments);
|
|
1219
1216
|
}
|
|
1220
1217
|
//#endregion
|
|
1221
1218
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1222
|
-
var
|
|
1223
|
-
constructor({ onChange: e, probe: t =
|
|
1224
|
-
S(this, A), f(this,
|
|
1219
|
+
var mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), _r = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), wr = class {
|
|
1220
|
+
constructor({ onChange: e, probe: t = fr, now: n = () => performance.now() }) {
|
|
1221
|
+
S(this, A), f(this, mr, void 0), f(this, hr, void 0), f(this, gr, void 0), f(this, _r, void 0), f(this, vr, !0), f(this, yr, !1), f(this, br, 0), f(this, xr, 0), f(this, Sr, 0), f(this, Cr, null), p(mr, this, e), p(hr, this, t), p(gr, this, n);
|
|
1225
1222
|
}
|
|
1226
1223
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1227
|
-
if (m(A, this,
|
|
1228
|
-
h(
|
|
1224
|
+
if (m(A, this, Tr).call(this), !(n > 0)) {
|
|
1225
|
+
h(mr, this).call(this, n);
|
|
1229
1226
|
return;
|
|
1230
1227
|
}
|
|
1231
1228
|
let r = new AbortController();
|
|
1232
|
-
p(
|
|
1229
|
+
p(_r, this, r);
|
|
1233
1230
|
let { signal: i } = r;
|
|
1234
|
-
h(
|
|
1231
|
+
h(hr, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1235
1232
|
if (!i.aborted) {
|
|
1236
1233
|
if (e === void 0) {
|
|
1237
|
-
h(
|
|
1234
|
+
h(mr, this).call(this, n);
|
|
1238
1235
|
return;
|
|
1239
1236
|
}
|
|
1240
|
-
p(
|
|
1237
|
+
p(xr, this, n), p(br, this, Math.min(Math.max(e, 0), n)), p(Sr, this, h(gr, this).call(this)), p(yr, this, !0), m(A, this, Er).call(this), h(vr, this) && m(A, this, Dr).call(this);
|
|
1241
1238
|
}
|
|
1242
1239
|
});
|
|
1243
1240
|
}
|
|
1244
1241
|
setLive(e) {
|
|
1245
|
-
p(
|
|
1242
|
+
p(vr, this, e), !(!h(_r, this) || e) && (m(A, this, Or).call(this), m(A, this, Er).call(this));
|
|
1246
1243
|
}
|
|
1247
1244
|
applyLoadedDuration(e) {
|
|
1248
|
-
m(A, this,
|
|
1245
|
+
m(A, this, Tr).call(this), h(mr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1249
1246
|
}
|
|
1250
1247
|
stop() {
|
|
1251
|
-
m(A, this,
|
|
1248
|
+
m(A, this, Tr).call(this);
|
|
1252
1249
|
}
|
|
1253
1250
|
};
|
|
1254
|
-
function
|
|
1251
|
+
function Tr() {
|
|
1255
1252
|
var e;
|
|
1256
|
-
(e = h(
|
|
1253
|
+
(e = h(_r, this)) == null || e.abort(), p(_r, this, void 0), m(A, this, Or).call(this), p(yr, this, !1);
|
|
1257
1254
|
}
|
|
1258
|
-
function
|
|
1259
|
-
if (!h(
|
|
1260
|
-
let e = h(
|
|
1261
|
-
h(
|
|
1255
|
+
function Er() {
|
|
1256
|
+
if (!h(yr, this)) return;
|
|
1257
|
+
let e = h(br, this) + Math.max(0, (h(gr, this).call(this) - h(Sr, this)) / 1e3), t = Math.min(h(xr, this), e);
|
|
1258
|
+
h(mr, this).call(this, t), t >= h(xr, this) && m(A, this, Or).call(this);
|
|
1262
1259
|
}
|
|
1263
|
-
function
|
|
1264
|
-
h(
|
|
1260
|
+
function Dr() {
|
|
1261
|
+
h(Cr, this) === null && p(Cr, this, window.setInterval(() => m(A, this, Er).call(this), 1e3));
|
|
1265
1262
|
}
|
|
1266
|
-
function
|
|
1267
|
-
h(
|
|
1263
|
+
function Or() {
|
|
1264
|
+
h(Cr, this) !== null && (clearInterval(h(Cr, this)), p(Cr, this, null));
|
|
1268
1265
|
}
|
|
1269
1266
|
//#endregion
|
|
1270
1267
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1271
|
-
var
|
|
1268
|
+
var kr = (e) => {
|
|
1272
1269
|
var t;
|
|
1273
1270
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1274
1271
|
return !n && (t = e.nodeName) != null && t.includes("-") && (globalThis.customElements.upgrade(e), n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0), Array.isArray(n) ? n.filter((e) => Ae.includes(e)) : [];
|
|
1275
1272
|
};
|
|
1276
1273
|
//#endregion
|
|
1277
1274
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1278
|
-
function
|
|
1275
|
+
function Ar(e) {
|
|
1279
1276
|
if (typeof e != "string") return NaN;
|
|
1280
1277
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1281
1278
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1291,37 +1288,37 @@ function Nr(e) {
|
|
|
1291
1288
|
}
|
|
1292
1289
|
//#endregion
|
|
1293
1290
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1294
|
-
var
|
|
1295
|
-
|
|
1296
|
-
},
|
|
1291
|
+
var jr = fe.get().createContext("TimelineMarkers"), Mr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Nr = (e) => {
|
|
1292
|
+
jr.warn(`Timeline marker time "${e}" has no timezone and is interpreted in the viewer's local timezone, so it can land at a different position for viewers in other timezones. Provide an ISO 8601 time with an offset (e.g. "${e}Z") or epoch milliseconds.`);
|
|
1293
|
+
}, Pr = (e) => {
|
|
1297
1294
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1298
1295
|
if (typeof e == "string") {
|
|
1299
1296
|
let t = Date.parse(e);
|
|
1300
|
-
return Number.isNaN(t) ? null : (
|
|
1297
|
+
return Number.isNaN(t) ? null : (Mr.test(e) && Nr(e), t);
|
|
1301
1298
|
}
|
|
1302
1299
|
if (e instanceof Date) {
|
|
1303
1300
|
let t = e.getTime();
|
|
1304
1301
|
return Number.isNaN(t) ? null : t;
|
|
1305
1302
|
}
|
|
1306
1303
|
return null;
|
|
1307
|
-
},
|
|
1304
|
+
}, Fr = (e) => {
|
|
1308
1305
|
if (typeof e != "object" || !e) return null;
|
|
1309
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1306
|
+
let { time: t, label: n, type: r } = e, i = Pr(t);
|
|
1310
1307
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1311
1308
|
let a = {
|
|
1312
1309
|
time: i,
|
|
1313
1310
|
label: n
|
|
1314
1311
|
};
|
|
1315
1312
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1316
|
-
},
|
|
1313
|
+
}, Ir = (e) => {
|
|
1317
1314
|
if (!Array.isArray(e)) return [];
|
|
1318
|
-
let t = e.map(
|
|
1319
|
-
return n > 0 &&
|
|
1320
|
-
},
|
|
1315
|
+
let t = e.map(Fr).filter((e) => e !== null), n = e.length - t.length;
|
|
1316
|
+
return n > 0 && jr.warn(`Dropped ${n} invalid timeline marker(s). Each marker needs a non-empty "label" and a valid "time" (epoch milliseconds, a Date, or an ISO 8601 string).`), t;
|
|
1317
|
+
}, Lr = (e) => e ? Ir(le(e)) : [], Rr = (e, t, n) => {
|
|
1321
1318
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1322
1319
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1323
1320
|
return r < 0 || r > 1 ? null : r;
|
|
1324
|
-
},
|
|
1321
|
+
}, zr = class extends pe {
|
|
1325
1322
|
constructor(t) {
|
|
1326
1323
|
if (super(), e(this, "audioContext", void 0), e(this, "audioNode", void 0), e(this, "bufferLength", void 0), e(this, "animationFrameId", null), e(this, "canUseFloatTimeDomainData", void 0), e(this, "byteSampleBuffer", null), e(this, "floatSampleBuffer", null), e(this, "leftAnalyser", void 0), e(this, "rightAnalyser", void 0), e(this, "mediaElementSource", null), e(this, "update", () => {
|
|
1327
1324
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1373,18 +1370,18 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1373
1370
|
get isMediaElementSource() {
|
|
1374
1371
|
return this.source instanceof HTMLMediaElement;
|
|
1375
1372
|
}
|
|
1376
|
-
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(),
|
|
1373
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Yr = /* @__PURE__ */ new WeakMap(), Xr = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), $r = class {
|
|
1377
1374
|
constructor(t, n) {
|
|
1378
|
-
S(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this,
|
|
1379
|
-
h(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !h(j, this).paused && m(F, this,
|
|
1380
|
-
}), f(this,
|
|
1381
|
-
h(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && m(F, this,
|
|
1382
|
-
}), p(M, this, t), p(
|
|
1375
|
+
S(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this, Br, void 0), f(this, Vr, void 0), e(this, "userPaused", !0), f(this, Hr, void 0), f(this, Ur, void 0), f(this, Wr, !1), f(this, Gr, !1), f(this, Kr, null), f(this, qr, 0), f(this, Jr, !1), f(this, P, fe.get().createContext("HlsPlayer")), f(this, Yr, () => m(F, this, fi).call(this, !0)), f(this, Xr, () => m(F, this, fi).call(this, !1)), f(this, Zr, () => {
|
|
1376
|
+
h(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !h(j, this).paused && m(F, this, fi).call(this, !1);
|
|
1377
|
+
}), f(this, Qr, () => {
|
|
1378
|
+
h(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && m(F, this, fi).call(this, !1);
|
|
1379
|
+
}), p(M, this, t), p(Ur, this, n == null ? void 0 : n.maxVideoBitRate), h(M, this).style.position = "absolute", h(M, this).style.top = "0", h(M, this).style.left = "0", h(M, this).style.width = "100%", h(M, this).style.height = "100%", h(M, this).style.opacity = "0", h(M, this).style.pointerEvents = "none", h(M, this).style.transition = "opacity 0.12s linear";
|
|
1383
1380
|
let r = document.createElement("video");
|
|
1384
|
-
p(j, this, r), t.appendChild(h(j, this)), h(j, this).style.width = "100%", h(j, this).style.height = "100%", h(j, this).setAttribute("playsinline", ""), h(j, this).setAttribute("webkit-playsinline", ""), h(j, this).setAttribute("preload", "metadata"), m(F, this,
|
|
1381
|
+
p(j, this, r), t.appendChild(h(j, this)), h(j, this).style.width = "100%", h(j, this).style.height = "100%", h(j, this).setAttribute("playsinline", ""), h(j, this).setAttribute("webkit-playsinline", ""), h(j, this).setAttribute("preload", "metadata"), m(F, this, ui).call(this), p(Jr, this, h(j, this).muted), (n == null ? void 0 : n.volume) !== void 0 && (this.volume = n.volume), (n == null ? void 0 : n.muted) !== void 0 && (this.muted = n.muted);
|
|
1385
1382
|
}
|
|
1386
1383
|
hide() {
|
|
1387
|
-
p(
|
|
1384
|
+
p(Wr, this, !0), p(Gr, this, !1), h(M, this).classList.remove("active"), h(M, this).style.opacity = "0", h(M, this).style.pointerEvents = "none", p(Kr, this, null);
|
|
1388
1385
|
}
|
|
1389
1386
|
play() {
|
|
1390
1387
|
var e = this;
|
|
@@ -1400,17 +1397,17 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1400
1397
|
var n = this;
|
|
1401
1398
|
return t(function* () {
|
|
1402
1399
|
if (h(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1403
|
-
p(
|
|
1400
|
+
p(Kr, n, null);
|
|
1404
1401
|
return;
|
|
1405
1402
|
}
|
|
1406
|
-
if (p(
|
|
1407
|
-
else return m(F, n,
|
|
1403
|
+
if (p(Kr, n, e.time > .1 ? e.time : null), n.isActive() && h(N, n)) m(F, n, ii).call(n, e.time);
|
|
1404
|
+
else return m(F, n, ai).call(n, e);
|
|
1408
1405
|
})();
|
|
1409
1406
|
}
|
|
1410
1407
|
shouldIgnoreTimeupdate() {
|
|
1411
|
-
if (h(
|
|
1408
|
+
if (h(Kr, this) == null) return !1;
|
|
1412
1409
|
let e = h(j, this).currentTime;
|
|
1413
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (p(
|
|
1410
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (p(Kr, this, null), !1);
|
|
1414
1411
|
}
|
|
1415
1412
|
isPipSupported() {
|
|
1416
1413
|
return "pictureInPictureEnabled" in document && !h(j, this).disablePictureInPicture;
|
|
@@ -1425,7 +1422,7 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1425
1422
|
return h(M, this).style.opacity === "1" || h(M, this).classList.contains("active");
|
|
1426
1423
|
}
|
|
1427
1424
|
cleanup() {
|
|
1428
|
-
m(F, this,
|
|
1425
|
+
m(F, this, di).call(this), m(F, this, ri).call(this), h(Hr, this) && (cancelAnimationFrame(h(Hr, this)), p(Hr, this, void 0)), p(Kr, this, null), h(j, this).remove();
|
|
1429
1426
|
}
|
|
1430
1427
|
addEventListener(e, t) {
|
|
1431
1428
|
h(j, this).addEventListener(e, t);
|
|
@@ -1437,7 +1434,7 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1437
1434
|
return h(j, this).dispatchEvent(e);
|
|
1438
1435
|
}
|
|
1439
1436
|
setTimeshiftUrl(e) {
|
|
1440
|
-
h(
|
|
1437
|
+
h(Vr, this) !== e && (h(P, this).debug("HLSPlayer Setting timeshift URL to", e), p(Vr, this, e));
|
|
1441
1438
|
}
|
|
1442
1439
|
get videoElement() {
|
|
1443
1440
|
return h(j, this);
|
|
@@ -1455,10 +1452,10 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1455
1452
|
return h(j, this).volume;
|
|
1456
1453
|
}
|
|
1457
1454
|
set muted(e) {
|
|
1458
|
-
p(
|
|
1455
|
+
p(Jr, this, e), h(j, this).muted = e;
|
|
1459
1456
|
}
|
|
1460
1457
|
get muted() {
|
|
1461
|
-
return h(
|
|
1458
|
+
return h(Jr, this);
|
|
1462
1459
|
}
|
|
1463
1460
|
set currentTime(e) {
|
|
1464
1461
|
h(j, this).currentTime = e;
|
|
@@ -1473,17 +1470,17 @@ var Pr = fe.get().createContext("TimelineMarkers"), Fr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1473
1470
|
return h(j, this).duration;
|
|
1474
1471
|
}
|
|
1475
1472
|
get maxVideoBitRate() {
|
|
1476
|
-
return h(
|
|
1473
|
+
return h(Ur, this);
|
|
1477
1474
|
}
|
|
1478
1475
|
set maxVideoBitRate(e) {
|
|
1479
|
-
p(
|
|
1476
|
+
p(Ur, this, e), e !== void 0 && h(N, this) && m(F, this, ti).call(this, e);
|
|
1480
1477
|
}
|
|
1481
1478
|
};
|
|
1482
|
-
function
|
|
1479
|
+
function ei() {
|
|
1483
1480
|
var e = this;
|
|
1484
1481
|
return t(function* () {
|
|
1485
1482
|
let { default: t } = yield import("./Ct8GqCxq.js");
|
|
1486
|
-
if (p(
|
|
1483
|
+
if (p(Br, e, t), !t.isSupported()) {
|
|
1487
1484
|
h(P, e).warn("HLS not supported");
|
|
1488
1485
|
return;
|
|
1489
1486
|
}
|
|
@@ -1507,17 +1504,17 @@ function ri() {
|
|
|
1507
1504
|
testBandwidth: !1,
|
|
1508
1505
|
debug: !1
|
|
1509
1506
|
})), h(N, e).attachMedia(h(j, e)), h(N, e).on(t.Events.MEDIA_ATTACHED, () => h(P, e).debug("[HLS] media attached")), h(N, e).on(t.Events.MANIFEST_PARSED, () => h(P, e).debug("[HLS] manifest parsed")), h(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1510
|
-
h(P, e).error("[HLS] error:", n), n.fatal && m(F, e,
|
|
1507
|
+
h(P, e).error("[HLS] error:", n), n.fatal && m(F, e, ni).call(e, n);
|
|
1511
1508
|
}), h(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1512
1509
|
var t;
|
|
1513
|
-
!h(
|
|
1510
|
+
!h(Ur, e) || ((t = h(N, e)) == null ? void 0 : t.levels.length) === 0 || m(F, e, ti).call(e, h(Ur, e));
|
|
1514
1511
|
}), h(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1515
1512
|
var t, n;
|
|
1516
1513
|
h(P, e).debug("Level switched:", (t = h(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = h(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1517
1514
|
});
|
|
1518
1515
|
})();
|
|
1519
1516
|
}
|
|
1520
|
-
function
|
|
1517
|
+
function ti(e) {
|
|
1521
1518
|
if (!h(N, this)) {
|
|
1522
1519
|
h(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1523
1520
|
return;
|
|
@@ -1533,12 +1530,12 @@ function ii(e) {
|
|
|
1533
1530
|
let r = h(N, this).currentLevel;
|
|
1534
1531
|
h(N, this).autoLevelCapping = t, r !== t && (h(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), h(N, this).currentLevel = t);
|
|
1535
1532
|
}
|
|
1536
|
-
function
|
|
1537
|
-
if (!h(
|
|
1533
|
+
function ni(e) {
|
|
1534
|
+
if (!h(Br, this)) {
|
|
1538
1535
|
h(P, this).error("Hls class not available for error handling");
|
|
1539
1536
|
return;
|
|
1540
1537
|
}
|
|
1541
|
-
let t = h(
|
|
1538
|
+
let t = h(Br, this);
|
|
1542
1539
|
switch (e.type) {
|
|
1543
1540
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1544
1541
|
var n;
|
|
@@ -1549,39 +1546,39 @@ function ai(e) {
|
|
|
1549
1546
|
h(P, this).warn("[HLS] media error -> recoverMediaError"), (r = h(N, this)) == null || r.recoverMediaError();
|
|
1550
1547
|
break;
|
|
1551
1548
|
default:
|
|
1552
|
-
h(P, this).error("[HLS] fatal -> destroy"), m(F, this,
|
|
1549
|
+
h(P, this).error("[HLS] fatal -> destroy"), m(F, this, ri).call(this);
|
|
1553
1550
|
break;
|
|
1554
1551
|
}
|
|
1555
1552
|
}
|
|
1556
|
-
function
|
|
1553
|
+
function ri() {
|
|
1557
1554
|
h(N, this) && (h(N, this).destroy(), p(N, this, void 0));
|
|
1558
1555
|
}
|
|
1559
|
-
function
|
|
1556
|
+
function ii(e) {
|
|
1560
1557
|
if (!Number.isFinite(e)) {
|
|
1561
|
-
p(
|
|
1558
|
+
p(Kr, this, null);
|
|
1562
1559
|
return;
|
|
1563
1560
|
}
|
|
1564
|
-
let t = m(F, this,
|
|
1565
|
-
p(
|
|
1561
|
+
let t = m(F, this, li).call(this, h(j, this), e);
|
|
1562
|
+
p(Kr, this, t > .1 ? t : null), h(Hr, this) && cancelAnimationFrame(h(Hr, this)), p(Hr, this, requestAnimationFrame(() => {
|
|
1566
1563
|
h(j, this).currentTime = t;
|
|
1567
1564
|
}));
|
|
1568
1565
|
}
|
|
1569
|
-
function
|
|
1566
|
+
function ai(e) {
|
|
1570
1567
|
var n = this;
|
|
1571
1568
|
return t(function* () {
|
|
1572
1569
|
var t;
|
|
1573
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = p(
|
|
1574
|
-
if (!h(
|
|
1570
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = p(qr, n, (t = h(qr, n), ++t));
|
|
1571
|
+
if (!h(Vr, n)) {
|
|
1575
1572
|
h(P, n).warn("No timeshift URL");
|
|
1576
1573
|
return;
|
|
1577
1574
|
}
|
|
1578
|
-
if (!h(N, n) && (yield m(F, n,
|
|
1579
|
-
p(
|
|
1575
|
+
if (!h(N, n) && (yield m(F, n, ei).call(n), !m(F, n, pi).call(n, a))) return;
|
|
1576
|
+
p(Wr, n, !1), p(Gr, n, !1), h(N, n) && (!h(N, n).url || h(N, n).url !== h(Vr, n)) && (h(P, n).debug("Loading timeshift URL", h(Vr, n)), h(N, n).loadSource(h(Vr, n)));
|
|
1580
1577
|
let o = n.muted;
|
|
1581
|
-
h(j, n).muted = !0, yield m(F, n,
|
|
1578
|
+
h(j, n).muted = !0, yield m(F, n, oi).call(n), m(F, n, pi).call(n, a) && (m(F, n, ii).call(n, r), !(i && (yield n.play(), !m(F, n, pi).call(n, a))) && m(F, n, si).call(n, o, a));
|
|
1582
1579
|
})();
|
|
1583
1580
|
}
|
|
1584
|
-
function
|
|
1581
|
+
function oi() {
|
|
1585
1582
|
return h(j, this).duration && !Number.isNaN(h(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1586
1583
|
h(P, this).debug("Waiting for duration...");
|
|
1587
1584
|
let t = () => {
|
|
@@ -1592,11 +1589,11 @@ function li() {
|
|
|
1592
1589
|
h(j, this).addEventListener("loadedmetadata", t);
|
|
1593
1590
|
});
|
|
1594
1591
|
}
|
|
1595
|
-
function
|
|
1592
|
+
function si(e, t) {
|
|
1596
1593
|
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => h(j, this).readyState >= n && h(j, this).videoWidth > 0 && h(j, this).videoHeight > 0, i = () => {
|
|
1597
|
-
h(
|
|
1594
|
+
h(Wr, this) || h(Gr, this) || !m(F, this, pi).call(this, t) || (p(Gr, this, !0), h(P, this).debug("Revealing timeshift video"), h(M, this).classList.add("active"), h(M, this).style.opacity = "1", h(M, this).style.pointerEvents = "auto", h(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || m(F, this, ci).call(this, t));
|
|
1598
1595
|
}, a = () => {
|
|
1599
|
-
h(
|
|
1596
|
+
h(Wr, this) || h(Gr, this) || !m(F, this, pi).call(this, t) || r() && (s(), i());
|
|
1600
1597
|
}, o = !1, s = () => {
|
|
1601
1598
|
o || (o = !0, h(j, this).removeEventListener("canplay", a), h(j, this).removeEventListener("canplaythrough", a), h(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1602
1599
|
};
|
|
@@ -1609,9 +1606,9 @@ function ui(e, t) {
|
|
|
1609
1606
|
h(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1610
1607
|
}, 2e3);
|
|
1611
1608
|
}
|
|
1612
|
-
function
|
|
1609
|
+
function ci(e) {
|
|
1613
1610
|
let t = () => {
|
|
1614
|
-
m(F, this,
|
|
1611
|
+
m(F, this, pi).call(this, e) && (h(j, this).muted = !1);
|
|
1615
1612
|
};
|
|
1616
1613
|
"requestVideoFrameCallback" in h(j, this) ? h(j, this).requestVideoFrameCallback(() => {
|
|
1617
1614
|
setTimeout(() => {
|
|
@@ -1621,43 +1618,43 @@ function di(e) {
|
|
|
1621
1618
|
t();
|
|
1622
1619
|
}, 120);
|
|
1623
1620
|
}
|
|
1624
|
-
function
|
|
1621
|
+
function li(e, t) {
|
|
1625
1622
|
let n = e.seekable;
|
|
1626
1623
|
if (!n || n.length === 0) return t;
|
|
1627
1624
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1628
1625
|
return h(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1629
1626
|
}
|
|
1630
|
-
function
|
|
1631
|
-
for (let e of
|
|
1632
|
-
for (let e of
|
|
1633
|
-
h(j, this).addEventListener("timeupdate", h(
|
|
1627
|
+
function ui() {
|
|
1628
|
+
for (let e of mi._) h(j, this).addEventListener(e, h(Yr, this));
|
|
1629
|
+
for (let e of hi._) h(j, this).addEventListener(e, h(Xr, this));
|
|
1630
|
+
h(j, this).addEventListener("timeupdate", h(Zr, this)), h(j, this).addEventListener("progress", h(Qr, this));
|
|
1634
1631
|
}
|
|
1635
|
-
function
|
|
1636
|
-
for (let e of
|
|
1637
|
-
for (let e of
|
|
1638
|
-
h(j, this).removeEventListener("timeupdate", h(
|
|
1632
|
+
function di() {
|
|
1633
|
+
for (let e of mi._) h(j, this).removeEventListener(e, h(Yr, this));
|
|
1634
|
+
for (let e of hi._) h(j, this).removeEventListener(e, h(Xr, this));
|
|
1635
|
+
h(j, this).removeEventListener("timeupdate", h(Zr, this)), h(j, this).removeEventListener("progress", h(Qr, this));
|
|
1639
1636
|
}
|
|
1640
|
-
function
|
|
1637
|
+
function fi(e) {
|
|
1641
1638
|
let t = e && (h(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || h(j, this).seeking || h(j, this).paused && !this.userPaused);
|
|
1642
1639
|
h(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1643
1640
|
bubbles: !0,
|
|
1644
1641
|
composed: !0
|
|
1645
1642
|
}));
|
|
1646
1643
|
}
|
|
1647
|
-
function
|
|
1648
|
-
return h(
|
|
1644
|
+
function pi(e) {
|
|
1645
|
+
return h(qr, this) === e;
|
|
1649
1646
|
}
|
|
1650
|
-
var
|
|
1647
|
+
var mi = { _: [
|
|
1651
1648
|
"waiting",
|
|
1652
1649
|
"seeking",
|
|
1653
1650
|
"stalled",
|
|
1654
1651
|
"loadstart"
|
|
1655
|
-
] },
|
|
1652
|
+
] }, hi = { _: [
|
|
1656
1653
|
"canplay",
|
|
1657
1654
|
"canplaythrough",
|
|
1658
1655
|
"seeked",
|
|
1659
1656
|
"loadeddata"
|
|
1660
|
-
] },
|
|
1657
|
+
] }, gi = class {
|
|
1661
1658
|
constructor(e) {
|
|
1662
1659
|
this.vindral = e;
|
|
1663
1660
|
}
|
|
@@ -1677,19 +1674,19 @@ var _i = { _: [
|
|
|
1677
1674
|
pause() {
|
|
1678
1675
|
this.vindral.pause();
|
|
1679
1676
|
}
|
|
1680
|
-
},
|
|
1681
|
-
|
|
1682
|
-
var
|
|
1677
|
+
}, _i = document.createElement("template");
|
|
1678
|
+
_i.innerHTML = "\n <style>\n :host {\n --value: 0;\n --range-thickness: var(--vindral-range-thickness, 4px);\n --range-hover-thickness: var(--vindral-range-hover-thickness, var(--range-thickness));\n --range-thumb-size: var(--vindral-range-thumb-size, 12px);\n --range-thumb-hover-size: var(--vindral-range-thumb-hover-size, var(--range-thumb-size));\n --range-fill-color: var(--vindral-range-fill-color, var(--fg-strong));\n --range-thumb-color: var(--vindral-range-thumb-color, var(--fg-strong));\n --_focus-box-shadow: none;\n height: calc(var(--button-icon-size) + 2 * var(--button-padding));\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 !important;\n margin: 0;\n position: relative;\n cursor: pointer;\n touch-action: none;\n box-shadow: var(--_focus-visible-box-shadow, none);\n outline: 0;\n background: transparent;\n }\n\n :host > * {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range {\n -webkit-appearance: none;\n appearance: none;\n\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n\n background-color: #00000000;\n outline: none;\n z-index: 1;\n cursor: pointer;\n }\n\n #range-track {\n position: absolute;\n top: calc(50% - calc(var(--range-thickness) / 2));\n left: 1px;\n width: calc(100% - 2px);\n height: var(--range-thickness);\n background-color: rgb(255 255 255 / 0.2);\n overflow: hidden;\n cursor: pointer;\n transition-property: height, top;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range-track {\n height: var(--range-hover-thickness);\n top: calc(50% - calc(var(--range-hover-thickness) / 2));\n }\n }\n\n #range-track::before {\n position: absolute;\n content: \"\";\n left: calc(-100%);\n top: 0;\n width: calc(100%);\n height: 100%;\n background: var(--range-fill-color);\n transition: background-color 300ms ease-out;\n transform-origin: 100% 0%;\n transform: translateX(calc(var(--value) * 100%)) scaleX(1.2);\n }\n\n #range::-webkit-slider-runnable-track {\n background: transparent;\n }\n\n #range::-moz-range-track {\n background: transparent;\n }\n\n #range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range::-moz-range-thumb {\n -moz-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n border: none;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n :host:has(#range:focus-visible) {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range::-webkit-slider-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n\n :host(:hover) #range::-moz-range-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n }\n </style>\n\n <input type=\"range\" id=\"range\" min=\"0\" max=\"1\" step=\"any\" value=\"0\" />\n <div id=\"range-track\"></div>\n";
|
|
1679
|
+
var vi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), bi = class extends HTMLElement {
|
|
1683
1680
|
constructor() {
|
|
1684
|
-
super(), f(this,
|
|
1681
|
+
super(), f(this, vi, null), f(this, yi, void 0), e(this, "range", void 0), p(yi, this, this.attachShadow({ mode: "open" })), h(yi, this).appendChild(_i.content.cloneNode(!0)), this.range = h(yi, this).getElementById("range");
|
|
1685
1682
|
}
|
|
1686
1683
|
connectedCallback() {
|
|
1687
1684
|
var e;
|
|
1688
|
-
p(
|
|
1685
|
+
p(vi, this, this.closest("vindral-controller")), (e = h(vi, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1689
1686
|
}
|
|
1690
1687
|
disconnectedCallback() {
|
|
1691
1688
|
var e;
|
|
1692
|
-
(e = h(
|
|
1689
|
+
(e = h(vi, this)) == null || e.disconnectListener(this);
|
|
1693
1690
|
}
|
|
1694
1691
|
attributeChangedCallback(e, t, n) {
|
|
1695
1692
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1715,11 +1712,11 @@ var xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci =
|
|
|
1715
1712
|
];
|
|
1716
1713
|
}
|
|
1717
1714
|
};
|
|
1718
|
-
e(
|
|
1715
|
+
e(bi, "observedAttributes", ["disabled"]);
|
|
1719
1716
|
//#endregion
|
|
1720
1717
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1721
|
-
var
|
|
1722
|
-
|
|
1718
|
+
var xi = document.createElement("template");
|
|
1719
|
+
xi.innerHTML = `
|
|
1723
1720
|
<style>
|
|
1724
1721
|
:host {
|
|
1725
1722
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1932,7 +1929,7 @@ wi.innerHTML = `
|
|
|
1932
1929
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1933
1930
|
</div>
|
|
1934
1931
|
`;
|
|
1935
|
-
var
|
|
1932
|
+
var Si = [
|
|
1936
1933
|
"ArrowDown",
|
|
1937
1934
|
"ArrowLeft",
|
|
1938
1935
|
"ArrowRight",
|
|
@@ -1941,27 +1938,27 @@ var Ti = [
|
|
|
1941
1938
|
" ",
|
|
1942
1939
|
"f",
|
|
1943
1940
|
"m"
|
|
1944
|
-
],
|
|
1941
|
+
], Ci = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Gi = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = /* @__PURE__ */ new WeakMap(), ya = /* @__PURE__ */ new WeakMap(), ba = /* @__PURE__ */ new WeakMap(), xa = /* @__PURE__ */ new WeakMap(), Sa = /* @__PURE__ */ new WeakMap(), Ca = /* @__PURE__ */ new WeakMap(), wa = /* @__PURE__ */ new WeakMap(), Ta = class extends HTMLElement {
|
|
1945
1942
|
constructor() {
|
|
1946
1943
|
var t;
|
|
1947
|
-
super(), S(this, H), f(this,
|
|
1944
|
+
super(), S(this, H), f(this, Ci, /* @__PURE__ */ new Map()), f(this, wi, 2e3), f(this, Ti, null), f(this, Ei, new wr({ onChange: (e) => m(H, this, U).call(this, g.DURATION, e.toString()) })), f(this, Di, null), f(this, Oi, void 0), f(this, I, void 0), f(this, L, void 0), f(this, ki, void 0), f(this, R, void 0), f(this, Ai, we), f(this, ji, void 0), f(this, Mi, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, z, void 0), f(this, Fi, void 0), f(this, Ii, void 0), f(this, Li, void 0), f(this, B, void 0), f(this, Ri, void 0), f(this, zi, void 0), f(this, Bi, void 0), f(this, V, void 0), f(this, Vi, null), f(this, Hi, !1), f(this, Ui, null), f(this, Wi, void 0), f(this, Gi, (e) => {
|
|
1948
1945
|
let t = e.filter((e) => {
|
|
1949
1946
|
var t;
|
|
1950
1947
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1951
1948
|
});
|
|
1952
1949
|
m(H, this, U).call(this, g.RENDITION_LEVELS, JSON.stringify(t));
|
|
1953
|
-
}), f(this,
|
|
1950
|
+
}), f(this, Ki, (e) => {
|
|
1954
1951
|
m(H, this, U).call(this, g.RENDITION_LEVEL, JSON.stringify(e));
|
|
1955
|
-
}), f(this,
|
|
1956
|
-
let t = h(
|
|
1957
|
-
p(
|
|
1952
|
+
}), f(this, qi, !1), f(this, Ji, (e) => {
|
|
1953
|
+
let t = h(qi, this);
|
|
1954
|
+
p(qi, this, !0);
|
|
1958
1955
|
try {
|
|
1959
1956
|
e();
|
|
1960
1957
|
} finally {
|
|
1961
|
-
p(
|
|
1958
|
+
p(qi, this, t);
|
|
1962
1959
|
}
|
|
1963
|
-
}), f(this,
|
|
1964
|
-
h(
|
|
1960
|
+
}), f(this, Yi, (e) => {
|
|
1961
|
+
h(Ji, this).call(this, () => {
|
|
1965
1962
|
switch (e) {
|
|
1966
1963
|
case "playing":
|
|
1967
1964
|
m(H, this, W).call(this, g.PAUSED), m(H, this, W).call(this, g.BUFFERING);
|
|
@@ -1975,40 +1972,40 @@ var Ti = [
|
|
|
1975
1972
|
default: break;
|
|
1976
1973
|
}
|
|
1977
1974
|
});
|
|
1978
|
-
}), f(this,
|
|
1979
|
-
h(
|
|
1975
|
+
}), f(this, Xi, (e) => {
|
|
1976
|
+
h(Ji, this).call(this, () => {
|
|
1980
1977
|
m(H, this, U).call(this, g.VOLUME, e.volume.toString()), e.isMuted ? m(H, this, U).call(this, g.MUTED, "") : m(H, this, W).call(this, g.MUTED);
|
|
1981
1978
|
});
|
|
1982
|
-
}), f(this,
|
|
1979
|
+
}), f(this, Zi, ({ channelId: e }) => {
|
|
1983
1980
|
var t;
|
|
1984
1981
|
this.setAttribute(g.CHANNEL_ID, e), ((t = h(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && m(H, this, W).call(this, g.BUFFERING);
|
|
1985
|
-
}), f(this,
|
|
1982
|
+
}), f(this, Qi, ({ channelId: e }) => {
|
|
1986
1983
|
var t;
|
|
1987
|
-
h(
|
|
1988
|
-
}), f(this,
|
|
1989
|
-
p(
|
|
1990
|
-
}), f(this,
|
|
1984
|
+
h(ji, this) !== e && this.setAttribute(g.CHANNEL_ID, e), ((t = h(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && m(H, this, W).call(this, g.BUFFERING);
|
|
1985
|
+
}), f(this, $i, (e) => {
|
|
1986
|
+
p(xa, this, Date.now()), m(H, this, U).call(this, g.CHANNELS, JSON.stringify(e));
|
|
1987
|
+
}), f(this, ea, (e) => {
|
|
1991
1988
|
var t;
|
|
1992
1989
|
m(H, this, U).call(this, g.LANGUAGES, JSON.stringify(e)), (t = h(I, this)) != null && t.language && m(H, this, U).call(this, g.LANGUAGE, h(I, this).language);
|
|
1993
|
-
}), f(this,
|
|
1990
|
+
}), f(this, ta, (e) => {
|
|
1994
1991
|
var t;
|
|
1995
1992
|
if (m(H, this, U).call(this, g.TEXT_TRACKS, JSON.stringify(e)), (t = h(I, this)) != null && t.textTrack) {
|
|
1996
1993
|
var n, r;
|
|
1997
1994
|
m(H, this, U).call(this, g.TEXT_TRACK, (n = (r = h(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1998
1995
|
}
|
|
1999
|
-
}), f(this,
|
|
1996
|
+
}), f(this, na, (e) => {
|
|
2000
1997
|
e != null && e.forVideo ? (m(H, this, U).call(this, g.NEEDS_USER_INPUT_VIDEO, ""), m(H, this, W).call(this, g.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (m(H, this, U).call(this, g.NEEDS_USER_INPUT_AUDIO, ""), m(H, this, W).call(this, g.NEEDS_USER_INPUT_VIDEO));
|
|
2001
|
-
}), f(this,
|
|
2002
|
-
e || m(H, this, W).call(this, g.BUFFERING), h(
|
|
2003
|
-
}), f(this,
|
|
1998
|
+
}), f(this, ra, (e) => {
|
|
1999
|
+
e || m(H, this, W).call(this, g.BUFFERING), h(Ei, this).setLive(e);
|
|
2000
|
+
}), f(this, ia, (e) => {
|
|
2004
2001
|
var t, n;
|
|
2005
2002
|
let { urls: r, duration: i } = e;
|
|
2006
2003
|
if (!r[0] || !h(R, this)) return;
|
|
2007
2004
|
let a = new URL(r[0]);
|
|
2008
|
-
a.searchParams.set("channelId", (t = h(
|
|
2005
|
+
a.searchParams.set("channelId", (t = h(ji, this)) == null ? "" : t);
|
|
2009
2006
|
let o = this.getAttribute("authentication-token");
|
|
2010
2007
|
o && a.searchParams.set("authToken", o);
|
|
2011
|
-
let s =
|
|
2008
|
+
let s = Ar(i);
|
|
2012
2009
|
if (Number.isNaN(s)) {
|
|
2013
2010
|
h(V, this).error(`Invalid duration format: ${i}`);
|
|
2014
2011
|
return;
|
|
@@ -2016,70 +2013,70 @@ var Ti = [
|
|
|
2016
2013
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
2017
2014
|
a.searchParams.set("from", l);
|
|
2018
2015
|
let u = a.toString();
|
|
2019
|
-
h(R, this).setTimeshiftUrl(u), h(
|
|
2016
|
+
h(R, this).setTimeshiftUrl(u), h(Ei, this).start({
|
|
2020
2017
|
multivariantUrl: u,
|
|
2021
2018
|
params: {
|
|
2022
|
-
channelId: (n = h(
|
|
2019
|
+
channelId: (n = h(ji, this)) == null ? "" : n,
|
|
2023
2020
|
authToken: o == null ? void 0 : o,
|
|
2024
2021
|
from: l
|
|
2025
2022
|
},
|
|
2026
2023
|
windowCapSeconds: s
|
|
2027
2024
|
});
|
|
2028
|
-
}), f(this,
|
|
2025
|
+
}), f(this, aa, () => {
|
|
2029
2026
|
m(H, this, W).call(this, g.PAUSED), m(H, this, W).call(this, g.BUFFERING);
|
|
2030
|
-
}), f(this,
|
|
2027
|
+
}), f(this, oa, () => {
|
|
2031
2028
|
m(H, this, U).call(this, g.PAUSED, ""), m(H, this, W).call(this, g.BUFFERING);
|
|
2032
|
-
}), f(this,
|
|
2033
|
-
h(
|
|
2034
|
-
}), f(this,
|
|
2035
|
-
h(R, this) && h(
|
|
2036
|
-
}), f(this,
|
|
2029
|
+
}), f(this, sa, () => {
|
|
2030
|
+
h(va, this).call(this), m(H, this, W).call(this, g.BUFFERING);
|
|
2031
|
+
}), f(this, ca, () => {
|
|
2032
|
+
h(R, this) && h(Ei, this).applyLoadedDuration(h(R, this).duration);
|
|
2033
|
+
}), f(this, la, () => {
|
|
2037
2034
|
var e, t;
|
|
2038
2035
|
if (!h(R, this) || h(R, this).seeking || (e = (t = h(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2039
2036
|
let n = h(R, this).currentTime;
|
|
2040
2037
|
n !== void 0 && m(H, this, U).call(this, g.TIMESHIFT_POSITION, n.toString());
|
|
2041
|
-
}), f(this,
|
|
2038
|
+
}), f(this, ua, () => {
|
|
2042
2039
|
h(R, this) && (m(H, this, U).call(this, g.VOLUME, h(R, this).volume.toString()), h(R, this).muted ? m(H, this, U).call(this, g.MUTED, "") : m(H, this, W).call(this, g.MUTED));
|
|
2043
|
-
}), f(this,
|
|
2040
|
+
}), f(this, da, () => {
|
|
2044
2041
|
m(H, this, U).call(this, g.BUFFERING, "");
|
|
2045
|
-
}), f(this,
|
|
2042
|
+
}), f(this, fa, () => {
|
|
2046
2043
|
m(H, this, W).call(this, g.BUFFERING);
|
|
2047
|
-
}), f(this,
|
|
2048
|
-
if (h(
|
|
2044
|
+
}), f(this, pa, () => {
|
|
2045
|
+
if (h(Hi, this)) {
|
|
2049
2046
|
if (h(L, this) !== h(R, this)) {
|
|
2050
|
-
p(
|
|
2047
|
+
p(Hi, this, !1);
|
|
2051
2048
|
return;
|
|
2052
2049
|
}
|
|
2053
|
-
p(
|
|
2050
|
+
p(Hi, this, !1), m(H, this, ro).call(this);
|
|
2054
2051
|
}
|
|
2055
|
-
}), f(this,
|
|
2052
|
+
}), f(this, ma, 0), e(this, "handleEvent", (e) => {
|
|
2056
2053
|
switch (e.type) {
|
|
2057
2054
|
case "pointerdown":
|
|
2058
|
-
p(
|
|
2055
|
+
p(ma, this, e.timeStamp);
|
|
2059
2056
|
break;
|
|
2060
2057
|
case "pointermove":
|
|
2061
|
-
m(H, this,
|
|
2058
|
+
m(H, this, Ka).call(this, e);
|
|
2062
2059
|
break;
|
|
2063
2060
|
case "pointerup":
|
|
2064
|
-
m(H, this,
|
|
2061
|
+
m(H, this, qa).call(this, e);
|
|
2065
2062
|
break;
|
|
2066
2063
|
case "mouseleave":
|
|
2067
|
-
m(H, this,
|
|
2064
|
+
m(H, this, to).call(this);
|
|
2068
2065
|
break;
|
|
2069
2066
|
case "dblclick":
|
|
2070
|
-
m(H, this,
|
|
2067
|
+
m(H, this, Ya).call(this, e);
|
|
2071
2068
|
break;
|
|
2072
2069
|
case "mousemove":
|
|
2073
|
-
m(H, this,
|
|
2070
|
+
m(H, this, Xa).call(this, e);
|
|
2074
2071
|
break;
|
|
2075
2072
|
case "keydown":
|
|
2076
|
-
h(
|
|
2073
|
+
h(_a, this).call(this, e);
|
|
2077
2074
|
break;
|
|
2078
2075
|
case "keyup":
|
|
2079
|
-
m(H, this,
|
|
2076
|
+
m(H, this, to).call(this), h(ga, this).call(this, e);
|
|
2080
2077
|
break;
|
|
2081
2078
|
}
|
|
2082
|
-
}), f(this,
|
|
2079
|
+
}), f(this, ha, (e) => {
|
|
2083
2080
|
if (h(I, this) && (h(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2084
2081
|
case x.PLAY:
|
|
2085
2082
|
this.removeAttribute(g.PAUSED);
|
|
@@ -2124,10 +2121,10 @@ var Ti = [
|
|
|
2124
2121
|
}
|
|
2125
2122
|
break;
|
|
2126
2123
|
case x.CHANNEL_GRID_OPENED:
|
|
2127
|
-
h(
|
|
2124
|
+
h(Vi, this) === null && m(H, this, Qa).call(this);
|
|
2128
2125
|
break;
|
|
2129
2126
|
case x.CHANNEL_GRID_CLOSED:
|
|
2130
|
-
h(
|
|
2127
|
+
h(Vi, this) !== null && (clearTimeout(h(Vi, this)), p(Vi, this, null));
|
|
2131
2128
|
break;
|
|
2132
2129
|
case x.ENTER_PIP:
|
|
2133
2130
|
this.setAttribute(g.IS_PIP, "");
|
|
@@ -2137,7 +2134,7 @@ var Ti = [
|
|
|
2137
2134
|
break;
|
|
2138
2135
|
case x.REQUEST_AIRPLAY:
|
|
2139
2136
|
var t;
|
|
2140
|
-
(t = h(
|
|
2137
|
+
(t = h(Li, this)) == null || t.showPlaybackTargetPicker();
|
|
2141
2138
|
break;
|
|
2142
2139
|
case x.SET_LANGUAGE:
|
|
2143
2140
|
_(e.detail) ? this.setAttribute(g.LANGUAGE, e.detail) : this.removeAttribute(g.LANGUAGE);
|
|
@@ -2158,7 +2155,7 @@ var Ti = [
|
|
|
2158
2155
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2159
2156
|
break;
|
|
2160
2157
|
case x.GO_LIVE:
|
|
2161
|
-
h(
|
|
2158
|
+
h(va, this).call(this);
|
|
2162
2159
|
break;
|
|
2163
2160
|
case x.TOGGLE_DEBUG_PANEL:
|
|
2164
2161
|
this.hasAttribute(g.DEBUG_PANEL_OPEN) ? this.removeAttribute(g.DEBUG_PANEL_OPEN) : this.setAttribute(g.DEBUG_PANEL_OPEN, "");
|
|
@@ -2170,64 +2167,64 @@ var Ti = [
|
|
|
2170
2167
|
}
|
|
2171
2168
|
break;
|
|
2172
2169
|
}
|
|
2173
|
-
}), f(this,
|
|
2170
|
+
}), f(this, ga, (e) => {
|
|
2174
2171
|
let { key: t } = e;
|
|
2175
|
-
if (!
|
|
2172
|
+
if (!Si.includes(t)) {
|
|
2176
2173
|
this.removeEventListener("keyup", this);
|
|
2177
2174
|
return;
|
|
2178
2175
|
}
|
|
2179
|
-
m(H, this,
|
|
2180
|
-
}), f(this,
|
|
2176
|
+
m(H, this, Za).call(this, e);
|
|
2177
|
+
}), f(this, _a, (e) => {
|
|
2181
2178
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2182
|
-
t || n || !
|
|
2183
|
-
}), f(this,
|
|
2179
|
+
t || n || !Si.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2180
|
+
}), f(this, va, () => {
|
|
2184
2181
|
this.removeAttribute(g.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2185
|
-
}), f(this,
|
|
2182
|
+
}), f(this, ya, (e) => {
|
|
2186
2183
|
var t;
|
|
2187
|
-
h(R, this) || m(H, this,
|
|
2188
|
-
}), f(this,
|
|
2184
|
+
h(R, this) || m(H, this, Aa).call(this), h(L, this) !== h(R, this) && (e && m(H, this, io).call(this), p(L, this, h(R, this)), m(H, this, Oa).call(this), m(H, this, ka).call(this), m(H, this, Pa).call(this), (t = h(I, this)) == null || t.pause(), p(Hi, this, e));
|
|
2185
|
+
}), f(this, ba, (e) => {
|
|
2189
2186
|
var t, n, r, i;
|
|
2190
|
-
e && m(H, this,
|
|
2191
|
-
m(H, this,
|
|
2187
|
+
e && m(H, this, io).call(this), (t = h(R, this)) == null || t.hide(), p(L, this, h(ki, this)), m(H, this, Pa).call(this), this.hasAttribute(g.PAUSED) ? (n = h(L, this)) == null || n.pause() : (r = h(L, this)) == null || r.play(), m(H, this, Ma).call(this), m(H, this, Da).call(this), (i = h(R, this)) == null || i.pause(), e && (p(Hi, this, !1), setTimeout(() => {
|
|
2188
|
+
m(H, this, ro).call(this);
|
|
2192
2189
|
}, 100));
|
|
2193
2190
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2194
2191
|
let t = this.hasAttribute(g.IS_PIP);
|
|
2195
2192
|
if (e !== !1) {
|
|
2196
2193
|
var n;
|
|
2197
|
-
h(
|
|
2194
|
+
h(ya, this).call(this, t), (n = h(R, this)) == null || n.seek({
|
|
2198
2195
|
time: parseFloat(e),
|
|
2199
2196
|
playWhenReady: !this.hasAttribute(g.PAUSED)
|
|
2200
2197
|
});
|
|
2201
2198
|
return;
|
|
2202
2199
|
}
|
|
2203
|
-
h(L, this) !== h(
|
|
2204
|
-
}), f(this,
|
|
2200
|
+
h(L, this) !== h(ki, this) && h(ba, this).call(this, t);
|
|
2201
|
+
}), f(this, xa, null), f(this, Sa, () => {
|
|
2205
2202
|
var e;
|
|
2206
2203
|
let t = (e = h(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2207
2204
|
if (!(t != null && t.video)) return;
|
|
2208
2205
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2209
2206
|
n && n.catch(() => {});
|
|
2210
|
-
}), f(this,
|
|
2207
|
+
}), f(this, Ca, () => {
|
|
2211
2208
|
r();
|
|
2212
|
-
}), f(this,
|
|
2209
|
+
}), f(this, wa, null);
|
|
2213
2210
|
let n = this.attachShadow({ mode: "open" });
|
|
2214
|
-
n.appendChild(
|
|
2211
|
+
n.appendChild(xi.content.cloneNode(!0));
|
|
2215
2212
|
let i = ye(this.getAttribute("log-level"));
|
|
2216
|
-
p(V, this, fe.get().createContext("VindralController")), h(V, this).setLevel(i), p(
|
|
2213
|
+
p(V, this, fe.get().createContext("VindralController")), h(V, this).setLevel(i), p(Oi, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), p(Wi, this, new Qn(n));
|
|
2217
2214
|
}
|
|
2218
2215
|
connectedCallback() {
|
|
2219
2216
|
var e = this;
|
|
2220
2217
|
return t(function* () {
|
|
2221
|
-
b(e.getAttribute("auto-instance-enabled"), !0) && (yield m(H, e,
|
|
2222
|
-
for (let t of Object.values(x)) e.addEventListener(t, h(
|
|
2223
|
-
window.PointerEvent ? (e.addEventListener("pointerdown", e), e.addEventListener("pointermove", e), e.addEventListener("pointerup", e)) : e.addEventListener("mousemove", e), e.addEventListener("mouseleave", e), e.addEventListener("keydown", e), e.addEventListener("resize", e), e.addEventListener("dblclick", e), h(
|
|
2218
|
+
b(e.getAttribute("auto-instance-enabled"), !0) && (yield m(H, e, Ea).call(e));
|
|
2219
|
+
for (let t of Object.values(x)) e.addEventListener(t, h(ha, e));
|
|
2220
|
+
window.PointerEvent ? (e.addEventListener("pointerdown", e), e.addEventListener("pointermove", e), e.addEventListener("pointerup", e)) : e.addEventListener("mousemove", e), e.addEventListener("mouseleave", e), e.addEventListener("keydown", e), e.addEventListener("resize", e), e.addEventListener("dblclick", e), h(Ji, e).call(e, () => e.connectListener(e)), m(H, e, Wa).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2224
2221
|
})();
|
|
2225
2222
|
}
|
|
2226
2223
|
disconnectedCallback() {
|
|
2227
2224
|
var e, t, n, r, i;
|
|
2228
|
-
m(H, this,
|
|
2229
|
-
for (let e of Object.values(x)) this.removeEventListener(e, h(
|
|
2230
|
-
m(H, this,
|
|
2225
|
+
m(H, this, Ga).call(this), m(H, this, fo).call(this), h(Wi, this).unload(), (e = h(I, this)) == null || e.unload(), (t = h(z, this)) == null || t.unload(), (n = h(Fi, this)) == null || n.unload(), (r = h(Ii, this)) == null || r.unload(), (i = h(B, this)) == null || i.unload(), m(H, this, ja).call(this);
|
|
2226
|
+
for (let e of Object.values(x)) this.removeEventListener(e, h(ha, this));
|
|
2227
|
+
m(H, this, Oa).call(this), h(Ti, this) && (clearTimeout(h(Ti, this)), p(Ti, this, null)), h(Ei, this).stop(), this.disconnectListener(this);
|
|
2231
2228
|
}
|
|
2232
2229
|
attributeChangedCallback(e, t, n) {
|
|
2233
2230
|
if (t !== n) {
|
|
@@ -2237,22 +2234,22 @@ var Ti = [
|
|
|
2237
2234
|
newValue: n
|
|
2238
2235
|
}), e) {
|
|
2239
2236
|
case "channel-id":
|
|
2240
|
-
p(
|
|
2237
|
+
p(ji, this, n), h(I, this) && n && (h(I, this).channelId = n, h(I, this).play(), m(H, this, U).call(this, g.BUFFERING, ""), m(H, this, U).call(this, g.CHANNEL_ID, n), m(H, this, U).call(this, g.POSTER_SRC, h(I, this).getThumbnailUrl()));
|
|
2241
2238
|
break;
|
|
2242
2239
|
case "channel-group-id":
|
|
2243
|
-
p(
|
|
2240
|
+
p(Mi, this, n);
|
|
2244
2241
|
break;
|
|
2245
2242
|
case "url":
|
|
2246
|
-
n && p(
|
|
2243
|
+
n && p(Ai, this, n);
|
|
2247
2244
|
break;
|
|
2248
2245
|
case "paused":
|
|
2249
2246
|
if (_(n)) {
|
|
2250
|
-
if (!h(
|
|
2247
|
+
if (!h(qi, this)) {
|
|
2251
2248
|
var r;
|
|
2252
2249
|
(r = h(L, this)) == null || r.pause();
|
|
2253
2250
|
}
|
|
2254
2251
|
m(H, this, U).call(this, g.PAUSED, "");
|
|
2255
|
-
} else if (m(H, this, W).call(this, g.NEEDS_USER_INPUT_VIDEO), m(H, this, W).call(this, g.PAUSED), !h(
|
|
2252
|
+
} else if (m(H, this, W).call(this, g.NEEDS_USER_INPUT_VIDEO), m(H, this, W).call(this, g.PAUSED), !h(qi, this)) {
|
|
2256
2253
|
var i;
|
|
2257
2254
|
(i = h(L, this)) == null || i.play();
|
|
2258
2255
|
}
|
|
@@ -2276,7 +2273,7 @@ var Ti = [
|
|
|
2276
2273
|
}
|
|
2277
2274
|
break;
|
|
2278
2275
|
case g.DEBUG_PANEL_OPEN:
|
|
2279
|
-
_(n) ? m(H, this, U).call(this, g.DEBUG_PANEL_OPEN, "") : m(H, this, W).call(this, g.DEBUG_PANEL_OPEN), m(H, this,
|
|
2276
|
+
_(n) ? m(H, this, U).call(this, g.DEBUG_PANEL_OPEN, "") : m(H, this, W).call(this, g.DEBUG_PANEL_OPEN), m(H, this, lo).call(this);
|
|
2280
2277
|
break;
|
|
2281
2278
|
case "user-interacting":
|
|
2282
2279
|
_(n) ? m(H, this, U).call(this, g.USER_INTERACTING, "") : m(H, this, W).call(this, g.USER_INTERACTING);
|
|
@@ -2284,7 +2281,7 @@ var Ti = [
|
|
|
2284
2281
|
case "muted":
|
|
2285
2282
|
if (h(I, this)) if (_(n)) {
|
|
2286
2283
|
var a;
|
|
2287
|
-
if (h(
|
|
2284
|
+
if (h(qi, this) || (h(I, this).muted = !0, h(R, this) && (h(R, this).muted = !0)), m(H, this, U).call(this, g.MUTED, ""), (a = h(B, this)) != null && a.isMediaElementSource) {
|
|
2288
2285
|
var o;
|
|
2289
2286
|
(o = h(B, this)) == null || o.stop(), m(H, this, U).call(this, g.VOLUME_LEVEL, JSON.stringify({
|
|
2290
2287
|
left: null,
|
|
@@ -2293,14 +2290,14 @@ var Ti = [
|
|
|
2293
2290
|
}
|
|
2294
2291
|
} else {
|
|
2295
2292
|
var s;
|
|
2296
|
-
h(
|
|
2293
|
+
h(qi, this) || (h(I, this).muted = !1, h(R, this) && (h(R, this).muted = !1), h(I, this).volume === 0 && (h(I, this).volume = .3)), m(H, this, W).call(this, g.MUTED), m(H, this, W).call(this, g.NEEDS_USER_INPUT_AUDIO), (s = h(B, this)) == null || s.start();
|
|
2297
2294
|
}
|
|
2298
2295
|
break;
|
|
2299
2296
|
case "ui-locked":
|
|
2300
|
-
_(n) ? m(H, this,
|
|
2297
|
+
_(n) ? m(H, this, eo).call(this) : m(H, this, to).call(this);
|
|
2301
2298
|
break;
|
|
2302
2299
|
case "is-fullscreen":
|
|
2303
|
-
_(n) ? m(H, this,
|
|
2300
|
+
_(n) ? m(H, this, ao).call(this) : m(H, this, oo).call(this);
|
|
2304
2301
|
break;
|
|
2305
2302
|
case "abr-enabled":
|
|
2306
2303
|
{
|
|
@@ -2315,13 +2312,13 @@ var Ti = [
|
|
|
2315
2312
|
}
|
|
2316
2313
|
break;
|
|
2317
2314
|
case "max-video-bit-rate":
|
|
2318
|
-
p(
|
|
2315
|
+
p(Ni, this, n), _(n) ? m(H, this, U).call(this, g.MAX_VIDEO_BITRATE, n) : m(H, this, W).call(this, g.MAX_VIDEO_BITRATE), h(R, this) && (h(R, this).maxVideoBitRate = n ? be(n) : void 0);
|
|
2319
2316
|
break;
|
|
2320
2317
|
case "max-initial-bit-rate":
|
|
2321
|
-
p(
|
|
2318
|
+
p(Pi, this, n), _(n) ? m(H, this, U).call(this, g.MAX_INITIAL_BITRATE, n) : m(H, this, W).call(this, g.MAX_INITIAL_BITRATE);
|
|
2322
2319
|
break;
|
|
2323
2320
|
case "is-pip":
|
|
2324
|
-
_(n) ? m(H, this,
|
|
2321
|
+
_(n) ? m(H, this, ro).call(this) : m(H, this, io).call(this);
|
|
2325
2322
|
break;
|
|
2326
2323
|
case "is-airplaying":
|
|
2327
2324
|
if (_(n)) {
|
|
@@ -2335,17 +2332,17 @@ var Ti = [
|
|
|
2335
2332
|
case "is-casting":
|
|
2336
2333
|
if (_(n)) {
|
|
2337
2334
|
var ee, d;
|
|
2338
|
-
(ee = h(
|
|
2335
|
+
(ee = h(Fi, this)) != null && ee.isFullscreen() && m(H, this, oo).call(this), (d = h(I, this)) == null || d.pause();
|
|
2339
2336
|
} else if (!document.hidden) {
|
|
2340
2337
|
var te;
|
|
2341
2338
|
(te = h(I, this)) == null || te.play();
|
|
2342
2339
|
}
|
|
2343
2340
|
break;
|
|
2344
2341
|
case "cast-receiver-id":
|
|
2345
|
-
p(
|
|
2342
|
+
p(zi, this, n);
|
|
2346
2343
|
break;
|
|
2347
2344
|
case "cast-background":
|
|
2348
|
-
p(
|
|
2345
|
+
p(Bi, this, n);
|
|
2349
2346
|
break;
|
|
2350
2347
|
case "language":
|
|
2351
2348
|
h(I, this) && (h(I, this).language = n, _(n) ? m(H, this, U).call(this, g.LANGUAGE, n) : m(H, this, W).call(this, g.LANGUAGE));
|
|
@@ -2359,7 +2356,7 @@ var Ti = [
|
|
|
2359
2356
|
case "authentication-token":
|
|
2360
2357
|
if (_(n)) {
|
|
2361
2358
|
var ne, re;
|
|
2362
|
-
(ne = h(I, this)) == null || ne.updateAuthenticationToken(n), (re = h(
|
|
2359
|
+
(ne = h(I, this)) == null || ne.updateAuthenticationToken(n), (re = h(Li, this)) == null || re.updateAuthenticationToken(n), m(H, this, U).call(this, g.AUTHENTICATION_TOKEN, n);
|
|
2363
2360
|
} else m(H, this, W).call(this, g.AUTHENTICATION_TOKEN);
|
|
2364
2361
|
break;
|
|
2365
2362
|
case "volume":
|
|
@@ -2397,13 +2394,13 @@ var Ti = [
|
|
|
2397
2394
|
g.USER_INTERACTING,
|
|
2398
2395
|
g.PAUSED,
|
|
2399
2396
|
g.HIDE_UI_ON_PAUSE
|
|
2400
|
-
].includes(e) && m(H, this,
|
|
2397
|
+
].includes(e) && m(H, this, no).call(this);
|
|
2401
2398
|
}
|
|
2402
2399
|
}
|
|
2403
2400
|
connectListener(e) {
|
|
2404
|
-
|
|
2405
|
-
let n = h(
|
|
2406
|
-
switch (n ? n.push(e) : h(
|
|
2401
|
+
kr(e).forEach((t) => {
|
|
2402
|
+
let n = h(Ci, this).get(t);
|
|
2403
|
+
switch (n ? n.push(e) : h(Ci, this).set(t, [e]), t) {
|
|
2407
2404
|
case g.PAUSED:
|
|
2408
2405
|
var r;
|
|
2409
2406
|
(((r = h(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(g.PAUSED)) && e.setAttribute(g.PAUSED, "");
|
|
@@ -2413,7 +2410,7 @@ var Ti = [
|
|
|
2413
2410
|
((i = h(I, this)) != null && i.muted || this.hasAttribute(g.MUTED)) && e.setAttribute(g.MUTED, "");
|
|
2414
2411
|
break;
|
|
2415
2412
|
case g.MAX_VIDEO_BITRATE:
|
|
2416
|
-
h(
|
|
2413
|
+
h(Ni, this) && e.setAttribute(g.MAX_VIDEO_BITRATE, h(Ni, this));
|
|
2417
2414
|
break;
|
|
2418
2415
|
case g.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2419
2416
|
{
|
|
@@ -2423,10 +2420,10 @@ var Ti = [
|
|
|
2423
2420
|
}
|
|
2424
2421
|
break;
|
|
2425
2422
|
case g.CHANNEL_ID:
|
|
2426
|
-
h(
|
|
2423
|
+
h(ji, this) && e.setAttribute(g.CHANNEL_ID, h(ji, this));
|
|
2427
2424
|
break;
|
|
2428
2425
|
case g.CHANNEL_GROUP_ID:
|
|
2429
|
-
h(
|
|
2426
|
+
h(Mi, this) && e.setAttribute(g.CHANNEL_GROUP_ID, h(Mi, this));
|
|
2430
2427
|
break;
|
|
2431
2428
|
case g.AUTHENTICATION_TOKEN: {
|
|
2432
2429
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2462,38 +2459,38 @@ var Ti = [
|
|
|
2462
2459
|
});
|
|
2463
2460
|
}
|
|
2464
2461
|
disconnectListener(e) {
|
|
2465
|
-
|
|
2466
|
-
let n = h(
|
|
2467
|
-
n && h(
|
|
2462
|
+
kr(e).forEach((t) => {
|
|
2463
|
+
let n = h(Ci, this).get(t);
|
|
2464
|
+
n && h(Ci, this).set(t, n.filter((t) => t !== e));
|
|
2468
2465
|
});
|
|
2469
2466
|
}
|
|
2470
2467
|
get instance() {
|
|
2471
2468
|
return h(I, this);
|
|
2472
2469
|
}
|
|
2473
2470
|
get fullscreen() {
|
|
2474
|
-
return m(H, this,
|
|
2471
|
+
return m(H, this, La).call(this);
|
|
2475
2472
|
}
|
|
2476
2473
|
get airPlay() {
|
|
2477
|
-
return h(
|
|
2474
|
+
return h(Li, this);
|
|
2478
2475
|
}
|
|
2479
2476
|
get timelineMarkers() {
|
|
2480
|
-
return
|
|
2477
|
+
return Lr(this.getAttribute(g.TIMELINE_MARKERS));
|
|
2481
2478
|
}
|
|
2482
2479
|
set timelineMarkers(e) {
|
|
2483
|
-
let t =
|
|
2480
|
+
let t = Ir(e);
|
|
2484
2481
|
t.length === 0 ? this.removeAttribute(g.TIMELINE_MARKERS) : this.setAttribute(g.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2485
2482
|
}
|
|
2486
2483
|
connect() {
|
|
2487
|
-
m(H, this,
|
|
2484
|
+
m(H, this, Ea).call(this);
|
|
2488
2485
|
}
|
|
2489
2486
|
};
|
|
2490
|
-
function
|
|
2487
|
+
function Ea() {
|
|
2491
2488
|
var e = this;
|
|
2492
2489
|
return t(function* () {
|
|
2493
2490
|
var t, n;
|
|
2494
|
-
if (!h(
|
|
2495
|
-
let r = h(L, e) === h(
|
|
2496
|
-
h(
|
|
2491
|
+
if (!h(ji, e)) return;
|
|
2492
|
+
let r = h(L, e) === h(ki, e);
|
|
2493
|
+
h(Ei, e).stop(), yield (t = h(I, e)) == null ? void 0 : t.unload(), r && p(L, e, void 0);
|
|
2497
2494
|
let i = e.hasAttribute(g.PAUSED), a = e.hasAttribute(g.MUTED), o = be(e.getAttribute(g.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = xe(e.getAttribute(g.MEDIA)), l = e.getAttribute(g.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = be(e.getAttribute("max-video-bit-rate")), te = be(e.getAttribute("max-initial-bit-rate")), ne = Ce(e.getAttribute("max-size")), ie = be(e.getAttribute("min-buffer-time")), ae = be(e.getAttribute("max-buffer-time")), oe = b(e.getAttribute("burst-enabled")), se = b(e.getAttribute("mse-enabled")), ce = b(e.getAttribute("mse-opus-enabled")), f = b(e.getAttribute("background-play-enabled")), le = b(e.getAttribute("ios-background-play-enabled")), ue = b(e.getAttribute("media-session-enabled")), de = b(e.getAttribute("ios-wake-lock-enabled")), fe = b(e.getAttribute("stream-to-media-element-enabled")), pe = b(e.getAttribute("ios-media-element-enabled")), me = b(e.getAttribute("abr-enabled"), !0), he = b(e.getAttribute("size-based-resolution-cap-enabled")), _e = b(e.getAttribute("telemetry-enabled")), v = ke(e.getAttribute("video-codecs")), we = ve(e.getAttribute("poster")), Te = Se(e.getAttribute("advanced")), y = ye(e.getAttribute("log-level")), De = {
|
|
2498
2495
|
headers: Ee(e.getAttribute("drm-headers")),
|
|
2499
2496
|
queryParams: Ee(e.getAttribute("drm-queryparams")),
|
|
@@ -2507,9 +2504,9 @@ function ka() {
|
|
|
2507
2504
|
}
|
|
2508
2505
|
}, Oe = Fe(e.getAttribute("webcodecs-hardware-acceleration")), Ae = Pe(e.getAttribute("decoders")), x = b(e.getAttribute("offscreen-canvas-enabled")), S = b(e.getAttribute("webtransport-enabled")), je = be(e.getAttribute("reconnect-retries")), Me = je === void 0 ? void 0 : (e) => e.reconnectRetries < je, Ne = e.getAttribute("language") || void 0;
|
|
2509
2506
|
p(I, e, new re({
|
|
2510
|
-
url: h(
|
|
2511
|
-
channelId: h(
|
|
2512
|
-
channelGroupId: h(
|
|
2507
|
+
url: h(Ai, e),
|
|
2508
|
+
channelId: h(ji, e),
|
|
2509
|
+
channelGroupId: h(Mi, e),
|
|
2513
2510
|
edgeUrl: u,
|
|
2514
2511
|
authenticationToken: ee,
|
|
2515
2512
|
muted: a,
|
|
@@ -2544,114 +2541,116 @@ function ka() {
|
|
|
2544
2541
|
decoders: Ae,
|
|
2545
2542
|
offscreenCanvasEnabled: x,
|
|
2546
2543
|
reconnectHandler: Me
|
|
2547
|
-
})), p(
|
|
2544
|
+
})), p(ki, e, new gi(h(I, e))), h(L, e) || p(L, e, h(ki, e)), m(H, e, Da).call(e), p(Di, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), h(Di, e) && (h(I, e).attach(h(Di, e)), h(Wi, e).observe(h(Di, e))), e.setAttribute(g.MEDIA, h(I, e).media);
|
|
2548
2545
|
let Ie = h(I, e);
|
|
2549
|
-
h(
|
|
2546
|
+
h(Ji, e).call(e, () => {
|
|
2550
2547
|
Ie.muted && m(H, e, U).call(e, g.MUTED, ""), Ie.abrEnabled ? m(H, e, U).call(e, g.ABR_ENABLED, "") : m(H, e, W).call(e, g.ABR_ENABLED), m(H, e, U).call(e, g.SIZE_BASED_RESOLUTION_CAP_ENABLED, Ie.sizeBasedResolutionCapEnabled ? "true" : "false"), m(H, e, U).call(e, g.VOLUME, Ie.volume.toString());
|
|
2551
2548
|
}), _(we) || m(H, e, U).call(e, g.POSTER_SRC, h(I, e).getThumbnailUrl());
|
|
2552
2549
|
let Le = b(e.getAttribute(g.AIRPLAY_ENABLED), !1), C = b(e.getAttribute(g.CAST_ENABLED), !0), Re = b(e.getAttribute(g.FULLSCREEN_ENABLED), !0), ze = b(e.getAttribute(g.PIP_ENABLED), !0), Be = b(e.getAttribute(g.VU_METER_ENABLED), !1), Ve = b(e.getAttribute(g.TIMESHIFT_ENABLED), !1);
|
|
2553
|
-
Le && m(H, e,
|
|
2550
|
+
Le && m(H, e, Ha).call(e, h(I, e)), C && m(H, e, Ra).call(e, h(I, e)), Re && m(H, e, Fa).call(e, h(I, e)), ze && m(H, e, Na).call(e, h(I, e)), i || h(I, e).play(), Be && m(H, e, Ua).call(e, h(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2554
2551
|
bubbles: !0,
|
|
2555
2552
|
composed: !0,
|
|
2556
2553
|
detail: h(I, e)
|
|
2557
|
-
})), Ve && (m(H, e,
|
|
2554
|
+
})), Ve && (m(H, e, Aa).call(e), Re && m(H, e, Ia).call(e));
|
|
2558
2555
|
})();
|
|
2559
2556
|
}
|
|
2560
|
-
function
|
|
2561
|
-
h(I, this) && (h(I, this).on("rendition levels", h(
|
|
2557
|
+
function Da() {
|
|
2558
|
+
h(I, this) && (h(I, this).on("rendition levels", h(Gi, this)), h(I, this).on("rendition level", h(Ki, this)), h(I, this).on("playback state", h(Yi, this)), h(I, this).on("volume state", h(Xi, this)), h(I, this).on("channel switch failed", h(Zi, this)), h(I, this).on("channel switch", h(Qi, this)), h(I, this).on("channels", h($i, this)), h(I, this).on("languages", h(ea, this)), h(I, this).on("text tracks", h(ta, this)), h(I, this).on("needs user input", h(na, this)), h(I, this).on("is live", h(ra, this)), h(I, this).on("timeshift info", h(ia, this)));
|
|
2562
2559
|
}
|
|
2563
|
-
function
|
|
2564
|
-
h(I, this) && (h(I, this).off("playback state", h(
|
|
2560
|
+
function Oa() {
|
|
2561
|
+
h(I, this) && (h(I, this).off("playback state", h(Yi, this)), h(I, this).off("volume state", h(Xi, this)), h(I, this).off("channel switch failed", h(Zi, this)), h(I, this).off("channel switch", h(Qi, this)), h(I, this).off("channels", h($i, this)), h(I, this).off("languages", h(ea, this)), h(I, this).off("text tracks", h(ta, this)), h(I, this).off("needs user input", h(na, this)), h(I, this).off("is live", h(ra, this)), h(I, this).off("timeshift info", h(ia, this)));
|
|
2565
2562
|
}
|
|
2566
|
-
function
|
|
2567
|
-
h(R, this) && (h(R, this).addEventListener("playing", h(
|
|
2563
|
+
function ka() {
|
|
2564
|
+
h(R, this) && (h(R, this).addEventListener("playing", h(aa, this)), h(R, this).addEventListener("pause", h(oa, this)), h(R, this).addEventListener("ended", h(sa, this)), h(R, this).addEventListener("timeupdate", h(la, this)), h(R, this).addEventListener("volumechange", h(ua, this)), h(R, this).addEventListener("hlsbuffering", h(da, this)), h(R, this).addEventListener("hlsnotbuffering", h(fa, this)), h(R, this).addEventListener("timeshiftready", h(pa, this)));
|
|
2568
2565
|
}
|
|
2569
|
-
function
|
|
2566
|
+
function Aa() {
|
|
2570
2567
|
var e, t, n, r;
|
|
2571
2568
|
let i = be(this.getAttribute(g.VOLUME)), a = i === void 0 ? (e = (t = h(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = b(this.getAttribute(g.MUTED), (n = (r = h(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2572
|
-
m(H, this,
|
|
2569
|
+
m(H, this, ja).call(this), p(R, this, new $r(h(Oi, this), {
|
|
2573
2570
|
volume: a,
|
|
2574
2571
|
muted: o,
|
|
2575
|
-
maxVideoBitRate: h(
|
|
2576
|
-
})), h(R, this).addEventListener("durationchange", h(
|
|
2572
|
+
maxVideoBitRate: h(Ni, this) ? parseInt(h(Ni, this), 10) : void 0
|
|
2573
|
+
})), h(R, this).addEventListener("durationchange", h(ca, this));
|
|
2577
2574
|
}
|
|
2578
|
-
function
|
|
2579
|
-
h(R, this) && (m(H, this,
|
|
2575
|
+
function ja() {
|
|
2576
|
+
h(R, this) && (m(H, this, Ma).call(this), h(R, this).removeEventListener("durationchange", h(ca, this)), h(R, this).cleanup(), h(L, this) === h(R, this) && p(L, this, void 0), p(R, this, void 0));
|
|
2580
2577
|
}
|
|
2581
|
-
function
|
|
2582
|
-
h(R, this) && (h(R, this).removeEventListener("playing", h(
|
|
2578
|
+
function Ma() {
|
|
2579
|
+
h(R, this) && (h(R, this).removeEventListener("playing", h(aa, this)), h(R, this).removeEventListener("pause", h(oa, this)), h(R, this).removeEventListener("ended", h(sa, this)), h(R, this).removeEventListener("timeupdate", h(la, this)), h(R, this).removeEventListener("volumechange", h(ua, this)), h(R, this).removeEventListener("hlsbuffering", h(da, this)), h(R, this).removeEventListener("hlsnotbuffering", h(fa, this)), h(R, this).removeEventListener("timeshiftready", h(pa, this)));
|
|
2583
2580
|
}
|
|
2584
|
-
function
|
|
2585
|
-
e.mediaElement instanceof HTMLVideoElement && (p(z, this, new
|
|
2586
|
-
|
|
2581
|
+
function Na(e) {
|
|
2582
|
+
e.mediaElement instanceof HTMLVideoElement && (p(z, this, new cr(e.mediaElement)), h(z, this).isSupported() && (h(V, this).debug("PIP is supported"), m(H, this, U).call(this, g.PIP_AVAILABLE, "")), h(z, this).on("on picture in picture change", (e) => {
|
|
2583
|
+
var t;
|
|
2584
|
+
e ? m(H, this, U).call(this, g.IS_PIP, "") : m(H, this, W).call(this, g.IS_PIP), h(Wi, this).setEnabled(!((t = h(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2587
2585
|
}));
|
|
2588
2586
|
}
|
|
2589
|
-
function
|
|
2587
|
+
function Pa() {
|
|
2590
2588
|
var e;
|
|
2591
2589
|
if (!h(z, this)) return;
|
|
2592
2590
|
let t = null;
|
|
2593
|
-
h(L, this) === h(R, this) && h(R, this) ? t = h(R, this).videoElement : ((e = h(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = h(I, this).mediaElement), t && t !== h(z, this).videoElement && (h(V, this).debug("Updating PIP target to", h(L, this) === h(R, this) ? "HLS" : "Vindral"), h(z, this).unload(), p(z, this, new
|
|
2594
|
-
|
|
2591
|
+
h(L, this) === h(R, this) && h(R, this) ? t = h(R, this).videoElement : ((e = h(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = h(I, this).mediaElement), t && t !== h(z, this).videoElement && (h(V, this).debug("Updating PIP target to", h(L, this) === h(R, this) ? "HLS" : "Vindral"), h(z, this).unload(), p(z, this, new cr(t)), h(z, this).on("on picture in picture change", (e) => {
|
|
2592
|
+
var t;
|
|
2593
|
+
e ? m(H, this, U).call(this, g.IS_PIP, "") : m(H, this, W).call(this, g.IS_PIP), h(Wi, this).setEnabled(!((t = h(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2595
2594
|
}));
|
|
2596
2595
|
}
|
|
2597
|
-
function
|
|
2598
|
-
let t =
|
|
2599
|
-
p(
|
|
2596
|
+
function Fa(e) {
|
|
2597
|
+
let t = !$n.isFullscreenApiSupported(this) && $n.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2598
|
+
p(Fi, this, new $n(t)), h(Fi, this).on("on fullscreen change", (e) => {
|
|
2600
2599
|
e ? m(H, this, U).call(this, g.FULLSCREEN, "") : m(H, this, W).call(this, g.FULLSCREEN);
|
|
2601
2600
|
});
|
|
2602
2601
|
}
|
|
2603
|
-
function
|
|
2602
|
+
function Ia() {
|
|
2604
2603
|
var e;
|
|
2605
|
-
h(R, this) && (p(
|
|
2604
|
+
h(R, this) && (p(Ii, this, !$n.isFullscreenApiSupported(this) && $n.isFullscreenApiSupported((e = h(R, this)) == null ? void 0 : e.videoElement) ? new $n(h(R, this).videoElement) : new $n(this)), h(Ii, this).on("on fullscreen change", (e) => {
|
|
2606
2605
|
e ? m(H, this, U).call(this, g.FULLSCREEN, "") : m(H, this, W).call(this, g.FULLSCREEN);
|
|
2607
2606
|
}));
|
|
2608
2607
|
}
|
|
2609
|
-
function
|
|
2610
|
-
return this.hasAttribute(g.TIMESHIFT_POSITION) ? h(
|
|
2608
|
+
function La() {
|
|
2609
|
+
return this.hasAttribute(g.TIMESHIFT_POSITION) ? h(Ii, this) : h(Fi, this);
|
|
2611
2610
|
}
|
|
2612
|
-
function
|
|
2613
|
-
p(
|
|
2614
|
-
background: h(
|
|
2615
|
-
receiverApplicationId: h(
|
|
2611
|
+
function Ra(e) {
|
|
2612
|
+
p(Ri, this, new je({
|
|
2613
|
+
background: h(Bi, this),
|
|
2614
|
+
receiverApplicationId: h(zi, this),
|
|
2616
2615
|
options: e.getCastOptions()
|
|
2617
|
-
})), h(
|
|
2616
|
+
})), h(Ri, this).on("devices available", m(H, this, za).bind(this)), h(Ri, this).on("connected", m(H, this, Ba).bind(this)), h(Ri, this).on("resumed", m(H, this, Ba).bind(this)), h(Ri, this).on("disconnected", m(H, this, Va).bind(this)), h(Ri, this).init().catch((e) => {
|
|
2618
2617
|
h(V, this).warn("Failed to initialize CastSender", e);
|
|
2619
2618
|
});
|
|
2620
2619
|
}
|
|
2621
|
-
function
|
|
2620
|
+
function za(e) {
|
|
2622
2621
|
e ? m(H, this, U).call(this, g.CAST_AVAILABLE, "") : m(H, this, W).call(this, g.CAST_AVAILABLE);
|
|
2623
2622
|
}
|
|
2624
|
-
function
|
|
2623
|
+
function Ba() {
|
|
2625
2624
|
var e, t;
|
|
2626
2625
|
m(H, this, U).call(this, g.IS_CASTING, "");
|
|
2627
|
-
let n = (e = (t = h(
|
|
2626
|
+
let n = (e = (t = h(Ri, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2628
2627
|
m(H, this, U).call(this, g.CAST_RECEIVER_NAME, n);
|
|
2629
2628
|
}
|
|
2630
|
-
function
|
|
2629
|
+
function Va() {
|
|
2631
2630
|
m(H, this, W).call(this, g.IS_CASTING), m(H, this, W).call(this, g.CAST_RECEIVER_NAME);
|
|
2632
2631
|
}
|
|
2633
|
-
function
|
|
2632
|
+
function Ha(e) {
|
|
2634
2633
|
var t;
|
|
2635
|
-
(t = h(
|
|
2634
|
+
(t = h(Li, this)) == null || t.unload();
|
|
2636
2635
|
let n = e.getCastOptions();
|
|
2637
|
-
p(
|
|
2636
|
+
p(Li, this, new Hn({
|
|
2638
2637
|
url: n.url,
|
|
2639
2638
|
channelId: n.channelId,
|
|
2640
2639
|
authenticationToken: n.authenticationToken,
|
|
2641
2640
|
container: this
|
|
2642
|
-
})), h(
|
|
2641
|
+
})), h(Li, this).once("available", () => {
|
|
2643
2642
|
m(H, this, U).call(this, g.AIRPLAY_AVAILABLE, "");
|
|
2644
|
-
}), h(
|
|
2643
|
+
}), h(Li, this).on("connected", () => {
|
|
2645
2644
|
m(H, this, U).call(this, g.IS_AIRPLAYING, "");
|
|
2646
|
-
}), h(
|
|
2645
|
+
}), h(Li, this).on("disconnected", () => {
|
|
2647
2646
|
m(H, this, W).call(this, g.IS_AIRPLAYING);
|
|
2648
2647
|
});
|
|
2649
2648
|
}
|
|
2650
|
-
function
|
|
2649
|
+
function Ua(e) {
|
|
2651
2650
|
var t;
|
|
2652
2651
|
if ((t = h(B, this)) == null || t.unload(), !a()) {
|
|
2653
|
-
if (e.audioNode) p(B, this, new
|
|
2654
|
-
else if (e.mediaElement instanceof HTMLMediaElement) p(B, this, new
|
|
2652
|
+
if (e.audioNode) p(B, this, new zr(e.audioNode));
|
|
2653
|
+
else if (e.mediaElement instanceof HTMLMediaElement) p(B, this, new zr(e.mediaElement));
|
|
2655
2654
|
else return;
|
|
2656
2655
|
h(B, this).on("on decibel change", (e) => {
|
|
2657
2656
|
m(H, this, U).call(this, g.VOLUME_LEVEL, JSON.stringify(e));
|
|
@@ -2661,37 +2660,37 @@ function Ka(e) {
|
|
|
2661
2660
|
})), (!h(B, this).isMediaElementSource || !this.hasAttribute(g.MUTED)) && h(B, this).start();
|
|
2662
2661
|
}
|
|
2663
2662
|
}
|
|
2664
|
-
function
|
|
2663
|
+
function Wa() {
|
|
2665
2664
|
let e = () => (customElements.get("vindral-debug-panel") || import("./XEQIIc9P.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(g.DEBUG_PANEL_OPEN, ""), h(I, this));
|
|
2666
|
-
window._vindralDebug = e, p(
|
|
2665
|
+
window._vindralDebug = e, p(Ui, this, e);
|
|
2667
2666
|
}
|
|
2668
|
-
function
|
|
2667
|
+
function Ga() {
|
|
2669
2668
|
let e = window;
|
|
2670
|
-
h(
|
|
2669
|
+
h(Ui, this) && e._vindralDebug === h(Ui, this) && delete e._vindralDebug, p(Ui, this, null);
|
|
2671
2670
|
}
|
|
2672
|
-
function
|
|
2673
|
-
e.pointerType !== "mouse" && e.timeStamp - h(
|
|
2671
|
+
function Ka(e) {
|
|
2672
|
+
e.pointerType !== "mouse" && e.timeStamp - h(ma, this) < 250 || (m(H, this, eo).call(this), h(Ti, this) && clearTimeout(h(Ti, this)), e.target instanceof HTMLElement && ([this, h(Di, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && m(H, this, to).call(this));
|
|
2674
2673
|
}
|
|
2675
|
-
function
|
|
2674
|
+
function qa(e) {
|
|
2676
2675
|
let t = this.hasAttribute(g.USER_INTERACTING);
|
|
2677
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, h(
|
|
2676
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, h(Di, this)].includes(e.target) && t ? m(H, this, $a).call(this) : m(H, this, to).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && m(H, this, to).call(this);
|
|
2678
2677
|
}
|
|
2679
|
-
function
|
|
2678
|
+
function Ja(e) {
|
|
2680
2679
|
switch (e) {
|
|
2681
2680
|
case "dblclick-fullscreen": return b(this.getAttribute(g.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2682
2681
|
default: return !0;
|
|
2683
2682
|
}
|
|
2684
2683
|
}
|
|
2685
|
-
function
|
|
2686
|
-
m(H, this,
|
|
2684
|
+
function Ya(e) {
|
|
2685
|
+
m(H, this, Ja).call(this, "dblclick-fullscreen") && (!h(Fi, this) || e.target instanceof v || e.target instanceof He || e.target instanceof bi || (this.hasAttribute(g.FULLSCREEN) ? this.removeAttribute(g.FULLSCREEN) : this.setAttribute(g.FULLSCREEN, "")));
|
|
2687
2686
|
}
|
|
2688
|
-
function
|
|
2689
|
-
this.hasAttribute(g.USER_INTERACTING) || m(H, this,
|
|
2687
|
+
function Xa(e) {
|
|
2688
|
+
this.hasAttribute(g.USER_INTERACTING) || m(H, this, to).call(this);
|
|
2690
2689
|
}
|
|
2691
|
-
function
|
|
2690
|
+
function Za(e) {
|
|
2692
2691
|
var t;
|
|
2693
2692
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2694
|
-
if (n || r || !
|
|
2693
|
+
if (n || r || !Si.includes(i)) return;
|
|
2695
2694
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2696
2695
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2697
2696
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2709,28 +2708,28 @@ function eo(e) {
|
|
|
2709
2708
|
break;
|
|
2710
2709
|
}
|
|
2711
2710
|
}
|
|
2712
|
-
function
|
|
2711
|
+
function Qa() {
|
|
2713
2712
|
var e = this;
|
|
2714
2713
|
return t(function* () {
|
|
2715
|
-
if (!h(I, e) || !h(
|
|
2714
|
+
if (!h(I, e) || !h(Mi, e)) return;
|
|
2716
2715
|
let t = Date.now();
|
|
2717
|
-
if (h(
|
|
2716
|
+
if (h(xa, e) && t - h(xa, e) < 1e4) h(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2718
2717
|
else {
|
|
2719
|
-
p(
|
|
2720
|
-
let n = yield h(I, e).getApiClient().getChannels(h(
|
|
2718
|
+
p(xa, e, t);
|
|
2719
|
+
let n = yield h(I, e).getApiClient().getChannels(h(Mi, e));
|
|
2721
2720
|
m(H, e, U).call(e, g.CHANNELS, JSON.stringify(n));
|
|
2722
2721
|
}
|
|
2723
|
-
p(
|
|
2722
|
+
p(Vi, e, window.setTimeout(() => void m(H, e, Qa).call(e), 1e4));
|
|
2724
2723
|
})();
|
|
2725
2724
|
}
|
|
2726
|
-
function
|
|
2725
|
+
function $a() {
|
|
2727
2726
|
!this.hasAttribute(g.USER_INTERACTING) || this.hasAttribute(g.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2728
2727
|
bubbles: !0,
|
|
2729
2728
|
composed: !0,
|
|
2730
2729
|
detail: { active: !1 }
|
|
2731
2730
|
})), this.removeAttribute(g.USER_INTERACTING));
|
|
2732
2731
|
}
|
|
2733
|
-
function
|
|
2732
|
+
function eo() {
|
|
2734
2733
|
this.hasAttribute(g.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2735
2734
|
this.setAttribute(g.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2736
2735
|
bubbles: !0,
|
|
@@ -2739,64 +2738,64 @@ function ro() {
|
|
|
2739
2738
|
}));
|
|
2740
2739
|
});
|
|
2741
2740
|
}
|
|
2742
|
-
function
|
|
2743
|
-
m(H, this,
|
|
2744
|
-
m(H, this,
|
|
2745
|
-
}, h(
|
|
2741
|
+
function to() {
|
|
2742
|
+
m(H, this, eo).call(this), h(Ti, this) && clearTimeout(h(Ti, this)), h(wi, this) && p(Ti, this, self.setTimeout(() => {
|
|
2743
|
+
m(H, this, $a).call(this);
|
|
2744
|
+
}, h(wi, this)));
|
|
2746
2745
|
}
|
|
2747
|
-
function
|
|
2746
|
+
function no() {
|
|
2748
2747
|
var e;
|
|
2749
2748
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2750
2749
|
(e = h(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2751
2750
|
}
|
|
2752
|
-
function
|
|
2751
|
+
function ro() {
|
|
2753
2752
|
var e;
|
|
2754
|
-
m(H, this,
|
|
2753
|
+
m(H, this, Pa).call(this), m(H, this, so).call(this), (e = h(z, this)) == null || e.request().catch((e) => {
|
|
2755
2754
|
h(V, this).warn("Failed to enter picture in picture:", e);
|
|
2756
2755
|
});
|
|
2757
2756
|
}
|
|
2758
|
-
function
|
|
2757
|
+
function io() {
|
|
2759
2758
|
var e;
|
|
2760
2759
|
(e = h(z, this)) == null || e.exit().catch((e) => {
|
|
2761
2760
|
h(V, this).warn("Failed to exit picture in picture:", e);
|
|
2762
2761
|
});
|
|
2763
2762
|
}
|
|
2764
|
-
function
|
|
2765
|
-
let e = m(H, this,
|
|
2763
|
+
function ao() {
|
|
2764
|
+
let e = m(H, this, La).call(this);
|
|
2766
2765
|
if (!e) {
|
|
2767
2766
|
console.warn("No fullscreen target available"), this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(H, this, U).call(this, g.FULLSCREEN, "");
|
|
2768
2767
|
return;
|
|
2769
2768
|
}
|
|
2770
|
-
e != null && e.isFullscreenApiSupported() ? (m(H, this,
|
|
2771
|
-
h(
|
|
2769
|
+
e != null && e.isFullscreenApiSupported() ? (m(H, this, so).call(this), e == null || e.request().then(() => {
|
|
2770
|
+
h(Sa, this).call(this);
|
|
2772
2771
|
}).catch((e) => {
|
|
2773
2772
|
h(V, this).warn("Failed to enter fullscreen:", e);
|
|
2774
2773
|
})) : (this.setAttribute(g.FULLSCREEN_FALLBACK, ""), m(H, this, U).call(this, g.FULLSCREEN, ""));
|
|
2775
2774
|
}
|
|
2776
|
-
function
|
|
2777
|
-
let e = m(H, this,
|
|
2775
|
+
function oo() {
|
|
2776
|
+
let e = m(H, this, La).call(this);
|
|
2778
2777
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2779
|
-
h(
|
|
2778
|
+
h(Ca, this).call(this);
|
|
2780
2779
|
}).catch((e) => {
|
|
2781
2780
|
h(V, this).warn("Failed to exit fullscreen:", e);
|
|
2782
2781
|
}) : (this.removeAttribute(g.FULLSCREEN_FALLBACK), m(H, this, W).call(this, g.FULLSCREEN));
|
|
2783
2782
|
}
|
|
2784
|
-
function
|
|
2783
|
+
function so() {
|
|
2785
2784
|
h(I, this) && h(I, this).emitter.emit("ios-hack: reset size");
|
|
2786
2785
|
}
|
|
2787
|
-
function
|
|
2786
|
+
function co() {
|
|
2788
2787
|
return this.hasAttribute(g.DEBUG_PANEL_OPEN);
|
|
2789
2788
|
}
|
|
2790
|
-
function
|
|
2791
|
-
m(H, this,
|
|
2789
|
+
function lo() {
|
|
2790
|
+
m(H, this, co).call(this) ? m(H, this, uo).call(this) : m(H, this, fo).call(this);
|
|
2792
2791
|
}
|
|
2793
|
-
function
|
|
2794
|
-
h(
|
|
2792
|
+
function uo() {
|
|
2793
|
+
h(wa, this) === null && (m(H, this, po).call(this), p(wa, this, window.setInterval(() => m(H, this, po).call(this), 1e3)));
|
|
2795
2794
|
}
|
|
2796
|
-
function
|
|
2797
|
-
h(
|
|
2795
|
+
function fo() {
|
|
2796
|
+
h(wa, this) && (clearInterval(h(wa, this)), p(wa, this, null)), this.removeAttribute(g.DRIFT), m(H, this, W).call(this, g.DRIFT), m(H, this, W).call(this, g.PLAYBACK_LATENCY), m(H, this, W).call(this, g.CONNECTION_STATE);
|
|
2798
2797
|
}
|
|
2799
|
-
function
|
|
2798
|
+
function po() {
|
|
2800
2799
|
if (!h(I, this)) return;
|
|
2801
2800
|
try {
|
|
2802
2801
|
let e = h(I, this).getStatistics().drift;
|
|
@@ -2812,13 +2811,13 @@ function go() {
|
|
|
2812
2811
|
}
|
|
2813
2812
|
function U(e, t) {
|
|
2814
2813
|
var n;
|
|
2815
|
-
(n = h(
|
|
2814
|
+
(n = h(Ci, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2816
2815
|
}
|
|
2817
2816
|
function W(e) {
|
|
2818
2817
|
var t;
|
|
2819
|
-
(t = h(
|
|
2818
|
+
(t = h(Ci, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2820
2819
|
}
|
|
2821
|
-
e(
|
|
2820
|
+
e(Ta, "observedAttributes", [
|
|
2822
2821
|
...Ae,
|
|
2823
2822
|
"url",
|
|
2824
2823
|
"edge-url",
|
|
@@ -2862,8 +2861,8 @@ e(Oa, "observedAttributes", [
|
|
|
2862
2861
|
]);
|
|
2863
2862
|
//#endregion
|
|
2864
2863
|
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2865
|
-
var
|
|
2866
|
-
|
|
2864
|
+
var mo, ho = document.createElement("template");
|
|
2865
|
+
ho.innerHTML = `
|
|
2867
2866
|
<style>
|
|
2868
2867
|
:host {
|
|
2869
2868
|
display: var(--fullscreen-button-display);
|
|
@@ -2887,10 +2886,10 @@ vo.innerHTML = `
|
|
|
2887
2886
|
</slot>
|
|
2888
2887
|
</slot>
|
|
2889
2888
|
`;
|
|
2890
|
-
var
|
|
2889
|
+
var go = class extends v {
|
|
2891
2890
|
constructor() {
|
|
2892
2891
|
var e;
|
|
2893
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2892
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(ho.content.cloneNode(!0));
|
|
2894
2893
|
}
|
|
2895
2894
|
connectedCallback() {
|
|
2896
2895
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Fullscreen");
|
|
@@ -2915,48 +2914,48 @@ var yo = class extends v {
|
|
|
2915
2914
|
}));
|
|
2916
2915
|
}
|
|
2917
2916
|
};
|
|
2918
|
-
|
|
2917
|
+
mo = go, e(go, "observedAttributes", [...y(mo, "observedAttributes", mo), g.FULLSCREEN]);
|
|
2919
2918
|
//#endregion
|
|
2920
2919
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2921
|
-
var
|
|
2922
|
-
|
|
2920
|
+
var _o, vo = "\n <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>\n", yo = document.createElement("template");
|
|
2921
|
+
yo.innerHTML = `
|
|
2923
2922
|
<style>
|
|
2924
2923
|
:host(:not([hidden])) {
|
|
2925
2924
|
display: var(--language-menu-display);
|
|
2926
2925
|
}
|
|
2927
2926
|
</style>
|
|
2928
2927
|
|
|
2929
|
-
<slot name="button">${
|
|
2928
|
+
<slot name="button">${vo}</slot>
|
|
2930
2929
|
<slot name="listbox" hidden>
|
|
2931
2930
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2932
2931
|
</slot>
|
|
2933
2932
|
`;
|
|
2934
|
-
var
|
|
2933
|
+
var bo = /* @__PURE__ */ new WeakSet(), xo = class extends He {
|
|
2935
2934
|
constructor() {
|
|
2936
2935
|
var e, t, n;
|
|
2937
|
-
super(), S(this,
|
|
2936
|
+
super(), S(this, bo), (e = this.shadowRoot) == null || e.appendChild(yo.content.cloneNode(!0)), this.listbox = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[part=listbox]"), this.listboxSlot = (n = this.shadowRoot) == null ? void 0 : n.querySelector("slot[name=listbox]");
|
|
2938
2937
|
}
|
|
2939
2938
|
connectedCallback() {
|
|
2940
|
-
super.connectedCallback(), m(
|
|
2939
|
+
super.connectedCallback(), m(bo, this, So).call(this), this.setAttribute("aria-label", "Audio & Subtitles");
|
|
2941
2940
|
}
|
|
2942
2941
|
attributeChangedCallback(e, t, n) {
|
|
2943
|
-
super.attributeChangedCallback(e, t, n), (e === g.LANGUAGES || e === g.TEXT_TRACKS) && m(
|
|
2942
|
+
super.attributeChangedCallback(e, t, n), (e === g.LANGUAGES || e === g.TEXT_TRACKS) && m(bo, this, So).call(this);
|
|
2944
2943
|
}
|
|
2945
2944
|
};
|
|
2946
|
-
|
|
2947
|
-
function
|
|
2945
|
+
_o = xo;
|
|
2946
|
+
function So() {
|
|
2948
2947
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(g.LANGUAGES)), n = e(this.getAttribute(g.TEXT_TRACKS));
|
|
2949
2948
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2950
2949
|
}
|
|
2951
|
-
e(
|
|
2952
|
-
...y(
|
|
2950
|
+
e(xo, "observedAttributes", [
|
|
2951
|
+
...y(_o, "observedAttributes", _o),
|
|
2953
2952
|
g.LANGUAGES,
|
|
2954
2953
|
g.TEXT_TRACKS
|
|
2955
2954
|
]);
|
|
2956
2955
|
//#endregion
|
|
2957
2956
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2958
|
-
var
|
|
2959
|
-
|
|
2957
|
+
var Co = document.createElement("template");
|
|
2958
|
+
Co.innerHTML = `
|
|
2960
2959
|
<style>
|
|
2961
2960
|
:host {
|
|
2962
2961
|
font: inherit;
|
|
@@ -3070,21 +3069,21 @@ Eo.innerHTML = `
|
|
|
3070
3069
|
<div class="menu"></div>
|
|
3071
3070
|
</div>
|
|
3072
3071
|
`;
|
|
3073
|
-
var
|
|
3072
|
+
var wo = /* @__PURE__ */ new WeakMap(), To = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), Ao = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap(), No = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), Fo = class extends HTMLElement {
|
|
3074
3073
|
constructor() {
|
|
3075
|
-
super(), S(this, K), f(this,
|
|
3074
|
+
super(), S(this, K), f(this, wo, []), f(this, To, []), f(this, Eo, void 0), f(this, Do, void 0), f(this, Oo, []), f(this, G, []), f(this, ko, null), f(this, Ao, null), f(this, jo, null), f(this, Mo, null), f(this, No, null), f(this, Po, null), e(this, "handleEvent", (e) => {
|
|
3076
3075
|
switch (e.type) {
|
|
3077
3076
|
case "keydown":
|
|
3078
|
-
m(K, this,
|
|
3077
|
+
m(K, this, Wo).call(this, e);
|
|
3079
3078
|
break;
|
|
3080
3079
|
}
|
|
3081
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3080
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Co.content.cloneNode(!0));
|
|
3082
3081
|
}
|
|
3083
3082
|
connectedCallback() {
|
|
3084
3083
|
let e = this.getRootNode();
|
|
3085
3084
|
if (e instanceof ShadowRoot) {
|
|
3086
3085
|
var t, n, r;
|
|
3087
|
-
p(
|
|
3086
|
+
p(jo, this, e.host.closest("vindral-controller")), (t = h(jo, this)) == null || t.connectListener(this), p(ko, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), p(Ao, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), m(K, this, Io).call(this), m(K, this, Lo).call(this), p(Mo, this, e.host), this.addEventListener("keydown", this);
|
|
3088
3087
|
}
|
|
3089
3088
|
}
|
|
3090
3089
|
disconnectedCallback() {
|
|
@@ -3094,16 +3093,16 @@ var Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), ko =
|
|
|
3094
3093
|
t !== n && (e === g.LANGUAGES && n && (this.languages = JSON.parse(n)), e === g.TEXT_TRACKS && n && (this.textTracks = JSON.parse(n)), e === g.LANGUAGE && (this.language = n), e === g.TEXT_TRACK && (this.textTrack = n));
|
|
3095
3094
|
}
|
|
3096
3095
|
set languages(e) {
|
|
3097
|
-
p(
|
|
3096
|
+
p(wo, this, e), m(K, this, zo).call(this), m(K, this, Vo).call(this);
|
|
3098
3097
|
}
|
|
3099
3098
|
set textTracks(e) {
|
|
3100
|
-
p(
|
|
3099
|
+
p(To, this, e), m(K, this, Ro).call(this), m(K, this, Ho).call(this);
|
|
3101
3100
|
}
|
|
3102
3101
|
set language(e) {
|
|
3103
|
-
p(
|
|
3102
|
+
p(Eo, this, e), m(K, this, Vo).call(this);
|
|
3104
3103
|
}
|
|
3105
3104
|
set textTrack(e) {
|
|
3106
|
-
p(
|
|
3105
|
+
p(Do, this, e), m(K, this, Ho).call(this);
|
|
3107
3106
|
}
|
|
3108
3107
|
get keysUsed() {
|
|
3109
3108
|
return [
|
|
@@ -3120,10 +3119,10 @@ var Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), ko =
|
|
|
3120
3119
|
];
|
|
3121
3120
|
}
|
|
3122
3121
|
focus() {
|
|
3123
|
-
h(
|
|
3122
|
+
h(No, this) ? h(No, this).focus() : h(Po, this) && h(Po, this).focus();
|
|
3124
3123
|
}
|
|
3125
3124
|
};
|
|
3126
|
-
function
|
|
3125
|
+
function Io() {
|
|
3127
3126
|
new IntersectionObserver((e) => {
|
|
3128
3127
|
e.forEach((e) => {
|
|
3129
3128
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3132,55 +3131,55 @@ function zo() {
|
|
|
3132
3131
|
} else this.style.height = "auto";
|
|
3133
3132
|
});
|
|
3134
3133
|
}, {
|
|
3135
|
-
root: h(
|
|
3134
|
+
root: h(jo, this),
|
|
3136
3135
|
threshold: 0
|
|
3137
3136
|
}).observe(this);
|
|
3138
3137
|
}
|
|
3139
|
-
function
|
|
3140
|
-
h(
|
|
3138
|
+
function Lo() {
|
|
3139
|
+
h(ko, this) && (m(K, this, zo).call(this), m(K, this, Vo).call(this)), h(Ao, this) && (m(K, this, Ro).call(this), m(K, this, Ho).call(this));
|
|
3141
3140
|
}
|
|
3142
|
-
function
|
|
3143
|
-
h(
|
|
3144
|
-
let e = m(K, this,
|
|
3145
|
-
h(
|
|
3141
|
+
function Ro() {
|
|
3142
|
+
h(Ao, this).innerHTML = "", p(G, this, []);
|
|
3143
|
+
let e = m(K, this, Bo).call(this, "Off", "textTrack", void 0);
|
|
3144
|
+
h(Ao, this).appendChild(e), h(G, this).push({
|
|
3146
3145
|
element: e,
|
|
3147
3146
|
value: void 0
|
|
3148
|
-
}), h(
|
|
3149
|
-
let t = m(K, this,
|
|
3150
|
-
h(
|
|
3147
|
+
}), h(To, this).forEach((e) => {
|
|
3148
|
+
let t = m(K, this, Bo).call(this, e, "textTrack", e);
|
|
3149
|
+
h(Ao, this).appendChild(t), h(G, this).push({
|
|
3151
3150
|
element: t,
|
|
3152
3151
|
value: e
|
|
3153
3152
|
});
|
|
3154
|
-
}), m(K, this,
|
|
3153
|
+
}), m(K, this, Ho).call(this);
|
|
3155
3154
|
}
|
|
3156
|
-
function
|
|
3157
|
-
h(
|
|
3158
|
-
let t = m(K, this,
|
|
3159
|
-
h(
|
|
3155
|
+
function zo() {
|
|
3156
|
+
h(ko, this).innerHTML = "", p(Oo, this, []), h(wo, this).forEach((e) => {
|
|
3157
|
+
let t = m(K, this, Bo).call(this, e, "language", e);
|
|
3158
|
+
h(ko, this).appendChild(t), h(Oo, this).push({
|
|
3160
3159
|
element: t,
|
|
3161
3160
|
value: e
|
|
3162
3161
|
});
|
|
3163
|
-
}), m(K, this,
|
|
3162
|
+
}), m(K, this, Vo).call(this);
|
|
3164
3163
|
}
|
|
3165
|
-
function
|
|
3164
|
+
function Bo(e, t, n) {
|
|
3166
3165
|
let r = document.createElement("div");
|
|
3167
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => m(K, this,
|
|
3166
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => m(K, this, Uo).call(this, n, t)), r;
|
|
3168
3167
|
}
|
|
3169
|
-
function
|
|
3170
|
-
h(
|
|
3171
|
-
let e = h(
|
|
3172
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3168
|
+
function Vo() {
|
|
3169
|
+
h(No, this) && (h(No, this).removeAttribute("aria-selected"), h(No, this).tabIndex = -1);
|
|
3170
|
+
let e = h(Oo, this).find((e) => e.value === h(Eo, this));
|
|
3171
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(No, this, e.element));
|
|
3173
3172
|
}
|
|
3174
|
-
function
|
|
3175
|
-
h(
|
|
3176
|
-
let e = h(G, this).find((e) => e.value === h(
|
|
3177
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3173
|
+
function Ho() {
|
|
3174
|
+
h(Po, this) && (h(Po, this).removeAttribute("aria-selected"), h(Po, this).tabIndex = -1);
|
|
3175
|
+
let e = h(G, this).find((e) => e.value === h(Do, this));
|
|
3176
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(Po, this, e.element);
|
|
3178
3177
|
else {
|
|
3179
3178
|
let e = h(G, this).find((e) => e.value === void 0);
|
|
3180
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(
|
|
3179
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, p(Po, this, e.element));
|
|
3181
3180
|
}
|
|
3182
3181
|
}
|
|
3183
|
-
function
|
|
3182
|
+
function Uo(e, t) {
|
|
3184
3183
|
this.dispatchEvent(new Event("change", {
|
|
3185
3184
|
bubbles: !0,
|
|
3186
3185
|
composed: !0
|
|
@@ -3192,36 +3191,36 @@ function Ko(e, t) {
|
|
|
3192
3191
|
detail: e
|
|
3193
3192
|
}));
|
|
3194
3193
|
}
|
|
3195
|
-
function
|
|
3194
|
+
function Wo(e) {
|
|
3196
3195
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3197
3196
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3198
3197
|
var a;
|
|
3199
|
-
(a = h(
|
|
3198
|
+
(a = h(Mo, this)) == null || a.hide();
|
|
3200
3199
|
} else if (t === "Enter" || t === " ") {
|
|
3201
3200
|
var o;
|
|
3202
|
-
(o = m(K, this,
|
|
3203
|
-
} else m(K, this,
|
|
3201
|
+
(o = m(K, this, qo).call(this)) == null || (o = o.element) == null || o.click();
|
|
3202
|
+
} else m(K, this, Go).call(this, e);
|
|
3204
3203
|
}
|
|
3205
|
-
function
|
|
3204
|
+
function Go(e) {
|
|
3206
3205
|
var t;
|
|
3207
|
-
let { key: n } = e, r = [...h(
|
|
3206
|
+
let { key: n } = e, r = [...h(Oo, this), ...h(G, this)], i = (t = m(K, this, qo).call(this)) == null ? r[0] : t;
|
|
3208
3207
|
if (!i) return;
|
|
3209
3208
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3210
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = m(K, this,
|
|
3209
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = m(K, this, Ko).call(this, a, "left") : n === "ArrowRight" ? o = m(K, this, Ko).call(this, a, "right") : e.key === "Home" ? o = 0 : e.key === "End" && (o = r.length - 1), o < 0 && (o = r.length - 1), o > r.length - 1 && (o = 0);
|
|
3211
3210
|
let s = r[o];
|
|
3212
|
-
s && (m(K, this,
|
|
3211
|
+
s && (m(K, this, Jo).call(this, s.value), s.element.focus());
|
|
3213
3212
|
}
|
|
3214
|
-
function
|
|
3215
|
-
let n = h(
|
|
3213
|
+
function Ko(e, t) {
|
|
3214
|
+
let n = h(Oo, this).length, r = h(G, this).length;
|
|
3216
3215
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3217
3216
|
}
|
|
3218
|
-
function
|
|
3219
|
-
return [...h(
|
|
3217
|
+
function qo() {
|
|
3218
|
+
return [...h(Oo, this), ...h(G, this)].find((e) => e.element.tabIndex === 0);
|
|
3220
3219
|
}
|
|
3221
|
-
function
|
|
3222
|
-
for (let t of [...h(
|
|
3220
|
+
function Jo(e) {
|
|
3221
|
+
for (let t of [...h(Oo, this), ...h(G, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3223
3222
|
}
|
|
3224
|
-
e(
|
|
3223
|
+
e(Fo, "observedAttributes", [
|
|
3225
3224
|
g.LANGUAGES,
|
|
3226
3225
|
g.TEXT_TRACKS,
|
|
3227
3226
|
g.LANGUAGE,
|
|
@@ -3229,12 +3228,12 @@ e(Ro, "observedAttributes", [
|
|
|
3229
3228
|
]);
|
|
3230
3229
|
//#endregion
|
|
3231
3230
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3232
|
-
var
|
|
3233
|
-
|
|
3234
|
-
var
|
|
3231
|
+
var Yo, Xo = document.createElement("template");
|
|
3232
|
+
Xo.innerHTML = "\n <style>\n :host {\n display: var(--live-button-display, flex);\n color: var(--vindral-fg-strong, #eee);\n border: 1px solid transparent !important;\n font-size: 12px;\n font-weight: bold;\n cursor: pointer;\n transition: all 0.2s;\n min-width: 50px !important;\n text-align: center;\n align-items: center;\n justify-content: center;\n }\n\n .live-text {\n display: inline-block;\n vertical-align: middle;\n margin-left: 4px;\n }\n\n slot[name=\"icon\"] svg {\n width: 5px;\n height: 5px;\n flex-shrink: 0;\n }\n\n .live-dot {\n fill: var(--vindral-fg-subtle, #b4b4b4);\n transition: fill 0.2s;\n transform-origin: center;\n }\n\n /* Red pulsing dot when live */\n :host(:not([timeshift-position])) .live-dot {\n fill: #ff0000;\n animation: pulse-dot 2s ease-in-out infinite alternate;\n }\n\n @keyframes pulse-dot {\n 0% {\n opacity: 0.8;\n transform: scale(0.9);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n :host([disabled]) {\n cursor: default;\n opacity: 1;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n\n <slot name=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"5\" height=\"5\" viewBox=\"0 0 5 5\" fill=\"currentColor\">\n <circle cx=\"2.5\" cy=\"2.5\" r=\"2.5\" class=\"live-dot\"/>\n </svg>\n</slot>\n <span class=\"live-text\">LIVE</span>\n";
|
|
3233
|
+
var Zo = class extends v {
|
|
3235
3234
|
constructor() {
|
|
3236
3235
|
var e;
|
|
3237
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3236
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Xo.content.cloneNode(!0));
|
|
3238
3237
|
}
|
|
3239
3238
|
connectedCallback() {
|
|
3240
3239
|
super.connectedCallback(), this.updateState();
|
|
@@ -3265,15 +3264,15 @@ var es = class extends v {
|
|
|
3265
3264
|
}));
|
|
3266
3265
|
}
|
|
3267
3266
|
};
|
|
3268
|
-
|
|
3269
|
-
...y(
|
|
3267
|
+
Yo = Zo, e(Zo, "observedAttributes", [
|
|
3268
|
+
...y(Yo, "observedAttributes", Yo),
|
|
3270
3269
|
g.TIMESHIFT_POSITION,
|
|
3271
3270
|
g.DURATION
|
|
3272
3271
|
]);
|
|
3273
3272
|
//#endregion
|
|
3274
3273
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3275
|
-
var
|
|
3276
|
-
|
|
3274
|
+
var Qo, $o = document.createElement("template");
|
|
3275
|
+
$o.innerHTML = `
|
|
3277
3276
|
<style>
|
|
3278
3277
|
:host {
|
|
3279
3278
|
display: var(--mute-button-display);
|
|
@@ -3301,10 +3300,10 @@ ns.innerHTML = `
|
|
|
3301
3300
|
</slot>
|
|
3302
3301
|
</slot>
|
|
3303
3302
|
`;
|
|
3304
|
-
var
|
|
3303
|
+
var es = class extends v {
|
|
3305
3304
|
constructor() {
|
|
3306
3305
|
var e;
|
|
3307
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3306
|
+
super(), (e = this.shadowRoot) == null || e.appendChild($o.content.cloneNode(!0));
|
|
3308
3307
|
}
|
|
3309
3308
|
connectedCallback() {
|
|
3310
3309
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "Unmute" : "Mute");
|
|
@@ -3329,11 +3328,11 @@ var rs = class extends v {
|
|
|
3329
3328
|
}));
|
|
3330
3329
|
}
|
|
3331
3330
|
};
|
|
3332
|
-
|
|
3331
|
+
Qo = es, e(es, "observedAttributes", [...y(Qo, "observedAttributes", Qo), g.MUTED]);
|
|
3333
3332
|
//#endregion
|
|
3334
3333
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3335
|
-
var
|
|
3336
|
-
|
|
3334
|
+
var ts, ns = document.createElement("template");
|
|
3335
|
+
ns.innerHTML = `
|
|
3337
3336
|
<style>
|
|
3338
3337
|
:host {
|
|
3339
3338
|
display: var(--pip-button-display);
|
|
@@ -3347,10 +3346,10 @@ as.innerHTML = `
|
|
|
3347
3346
|
<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>
|
|
3348
3347
|
</slot>
|
|
3349
3348
|
`;
|
|
3350
|
-
var
|
|
3349
|
+
var rs = class extends v {
|
|
3351
3350
|
constructor() {
|
|
3352
3351
|
var e;
|
|
3353
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3352
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(ns.content.cloneNode(!0));
|
|
3354
3353
|
}
|
|
3355
3354
|
connectedCallback() {
|
|
3356
3355
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture-in-picture" : "Picture-in-picture");
|
|
@@ -3375,15 +3374,15 @@ var os = class extends v {
|
|
|
3375
3374
|
}));
|
|
3376
3375
|
}
|
|
3377
3376
|
};
|
|
3378
|
-
|
|
3379
|
-
...y(
|
|
3377
|
+
ts = rs, e(rs, "observedAttributes", [
|
|
3378
|
+
...y(ts, "observedAttributes", ts),
|
|
3380
3379
|
g.IS_PIP,
|
|
3381
3380
|
g.PIP_AVAILABLE
|
|
3382
3381
|
]);
|
|
3383
3382
|
//#endregion
|
|
3384
3383
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3385
|
-
var
|
|
3386
|
-
|
|
3384
|
+
var is, as = document.createElement("template");
|
|
3385
|
+
as.innerHTML = `
|
|
3387
3386
|
<style>
|
|
3388
3387
|
:host {
|
|
3389
3388
|
display: var(--play-button-display);
|
|
@@ -3407,10 +3406,10 @@ cs.innerHTML = `
|
|
|
3407
3406
|
</slot>
|
|
3408
3407
|
</slot>
|
|
3409
3408
|
`;
|
|
3410
|
-
var
|
|
3409
|
+
var os = class extends v {
|
|
3411
3410
|
constructor() {
|
|
3412
3411
|
var e;
|
|
3413
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3412
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(as.content.cloneNode(!0));
|
|
3414
3413
|
}
|
|
3415
3414
|
connectedCallback() {
|
|
3416
3415
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3435,7 +3434,7 @@ var ls = class extends v {
|
|
|
3435
3434
|
}));
|
|
3436
3435
|
}
|
|
3437
3436
|
};
|
|
3438
|
-
|
|
3437
|
+
is = os, e(os, "observedAttributes", [...y(is, "observedAttributes", is), g.PAUSED]);
|
|
3439
3438
|
//#endregion
|
|
3440
3439
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3441
3440
|
var q = {
|
|
@@ -3444,55 +3443,55 @@ var q = {
|
|
|
3444
3443
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3445
3444
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3446
3445
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3447
|
-
},
|
|
3446
|
+
}, ss = Object.values(q), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakMap(), fs = /* @__PURE__ */ new WeakMap(), ps = /* @__PURE__ */ new WeakMap(), ms = /* @__PURE__ */ new WeakMap(), hs = /* @__PURE__ */ new WeakSet(), gs = class extends pe {
|
|
3448
3447
|
constructor(e) {
|
|
3449
|
-
super(), S(this,
|
|
3448
|
+
super(), S(this, hs), f(this, cs, void 0), f(this, ls, void 0), f(this, us, !1), f(this, ds, !1), f(this, fs, !0), f(this, ps, null), f(this, ms, null), p(ls, this, e), p(cs, this, new de({
|
|
3450
3449
|
publicEndpoint: e.url,
|
|
3451
3450
|
tokenFactory: () => e.authenticationToken
|
|
3452
3451
|
}));
|
|
3453
3452
|
}
|
|
3454
3453
|
start(e = 5e3) {
|
|
3455
|
-
h(
|
|
3456
|
-
!h(
|
|
3454
|
+
h(ms, this) && clearInterval(h(ms, this)), p(us, this, !1), p(ds, this, !1), m(hs, this, bs).call(this), m(hs, this, _s).call(this), p(ms, this, window.setInterval(() => {
|
|
3455
|
+
!h(ds, this) && !h(ls, this).infiniteReconnect && !h(ps, this) && h(fs, this) && p(ps, this, window.setTimeout(() => m(hs, this, vs).call(this), 300 * 1e3)), !h(ds, this) && h(fs, this) && m(hs, this, _s).call(this);
|
|
3457
3456
|
}, e));
|
|
3458
3457
|
}
|
|
3459
3458
|
stop() {
|
|
3460
|
-
m(
|
|
3459
|
+
m(hs, this, ys).call(this), h(ms, this) && (window.clearInterval(h(ms, this)), p(ms, this, null));
|
|
3461
3460
|
}
|
|
3462
3461
|
};
|
|
3463
|
-
function
|
|
3462
|
+
function _s() {
|
|
3464
3463
|
var e = this;
|
|
3465
3464
|
return t(function* () {
|
|
3466
|
-
if (h(
|
|
3467
|
-
p(
|
|
3465
|
+
if (h(us, e)) return;
|
|
3466
|
+
p(us, e, !0);
|
|
3468
3467
|
let t = "Stream is offline", n = "Please stand by";
|
|
3469
3468
|
try {
|
|
3470
|
-
let t = yield h(
|
|
3469
|
+
let t = yield h(cs, e).getChannel(h(ls, e).channelId);
|
|
3471
3470
|
if (t.isLive) {
|
|
3472
|
-
p(
|
|
3471
|
+
p(ds, e, !0), m(hs, e, bs).call(e), e.emit("live", t), p(us, e, !1);
|
|
3473
3472
|
return;
|
|
3474
3473
|
}
|
|
3475
3474
|
} catch (e) {
|
|
3476
3475
|
ue(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3477
3476
|
}
|
|
3478
|
-
h(
|
|
3477
|
+
h(fs, e) && e.emit("error", {
|
|
3479
3478
|
title: t,
|
|
3480
3479
|
message: n
|
|
3481
|
-
}), p(
|
|
3480
|
+
}), p(us, e, !1);
|
|
3482
3481
|
})();
|
|
3483
3482
|
}
|
|
3484
|
-
function
|
|
3485
|
-
this.stop(), p(
|
|
3483
|
+
function vs() {
|
|
3484
|
+
this.stop(), p(fs, this, !1), this.emit("timeout");
|
|
3486
3485
|
}
|
|
3487
|
-
function
|
|
3488
|
-
h(
|
|
3486
|
+
function ys() {
|
|
3487
|
+
h(ps, this) && (window.clearTimeout(h(ps, this)), p(ps, this, null));
|
|
3489
3488
|
}
|
|
3490
|
-
function
|
|
3491
|
-
m(
|
|
3489
|
+
function bs() {
|
|
3490
|
+
m(hs, this, ys).call(this), p(fs, this, !0);
|
|
3492
3491
|
}
|
|
3493
3492
|
//#endregion
|
|
3494
3493
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3495
|
-
var
|
|
3494
|
+
var xs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, Ss = navigator.userAgent.toLowerCase(), Cs = xs.test(Ss), ws = (e) => Ta.observedAttributes.includes(e), Ts = `
|
|
3496
3495
|
<style>
|
|
3497
3496
|
:host {
|
|
3498
3497
|
container-type: inline-size;
|
|
@@ -3502,7 +3501,7 @@ var ws = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3502
3501
|
display: flex;
|
|
3503
3502
|
justify-content: center;
|
|
3504
3503
|
|
|
3505
|
-
--vindral-volume-range-display: ${
|
|
3504
|
+
--vindral-volume-range-display: ${Cs ? "none" : "flex"};
|
|
3506
3505
|
--vindral-airplay-button-display: none;
|
|
3507
3506
|
--vindral-play-overlay-display: none;
|
|
3508
3507
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3583,10 +3582,10 @@ var ws = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3583
3582
|
--vindral-subtitle-offset: -48px;
|
|
3584
3583
|
}
|
|
3585
3584
|
</style>
|
|
3586
|
-
`,
|
|
3585
|
+
`, Es = (e) => {
|
|
3587
3586
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3588
3587
|
return `
|
|
3589
|
-
${
|
|
3588
|
+
${Ts}
|
|
3590
3589
|
|
|
3591
3590
|
<vindral-controller>
|
|
3592
3591
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3624,8 +3623,8 @@ var ws = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3624
3623
|
</vindral-center-overlay>
|
|
3625
3624
|
</vindral-controller>
|
|
3626
3625
|
`;
|
|
3627
|
-
},
|
|
3628
|
-
${
|
|
3626
|
+
}, Ds = `
|
|
3627
|
+
${Ts}
|
|
3629
3628
|
|
|
3630
3629
|
<style>
|
|
3631
3630
|
#control-bar {
|
|
@@ -3649,52 +3648,52 @@ var ws = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3649
3648
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3650
3649
|
</vindral-center-overlay>
|
|
3651
3650
|
</vindral-controller>
|
|
3652
|
-
`,
|
|
3651
|
+
`, Os = document.createElement("template"), ks = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), Fs = /* @__PURE__ */ new WeakMap(), Is = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), Ls = /* @__PURE__ */ new WeakMap(), Rs = /* @__PURE__ */ new WeakMap(), zs = /* @__PURE__ */ new WeakMap(), Bs = class extends HTMLElement {
|
|
3653
3652
|
constructor() {
|
|
3654
|
-
super(), S(this, Y), f(this,
|
|
3653
|
+
super(), S(this, Y), f(this, ks, void 0), f(this, J, void 0), f(this, As, void 0), f(this, js, void 0), f(this, Ms, void 0), f(this, Ns, void 0), f(this, Ps, /* @__PURE__ */ new Set()), f(this, Fs, () => {
|
|
3655
3654
|
Array.from(this.attributes).forEach((e) => {
|
|
3656
|
-
h(
|
|
3655
|
+
h(Is, this).call(this, e.name, e.value);
|
|
3657
3656
|
});
|
|
3658
|
-
}), f(this,
|
|
3659
|
-
|
|
3660
|
-
}), f(this,
|
|
3657
|
+
}), f(this, Is, (e, t) => {
|
|
3658
|
+
ws(e) && (_(t) ? h(J, this).setAttribute(e, t) : h(J, this).removeAttribute(e));
|
|
3659
|
+
}), f(this, Ls, () => {
|
|
3661
3660
|
Array.from(this.children).forEach((e) => {
|
|
3662
|
-
h(
|
|
3661
|
+
h(Ps, this).add(e);
|
|
3663
3662
|
});
|
|
3664
|
-
}), f(this,
|
|
3663
|
+
}), f(this, Rs, () => {
|
|
3665
3664
|
let e = h(J, this).instance;
|
|
3666
3665
|
e && (e.on("is live", (e) => {
|
|
3667
|
-
e ? (this.removeAttribute(q.OFFLINE), m(Y, this,
|
|
3666
|
+
e ? (this.removeAttribute(q.OFFLINE), m(Y, this, qs).call(this)) : (this.setAttribute(q.OFFLINE, ""), m(Y, this, Ks).call(this, "Stream is offline", "Please stand by"));
|
|
3668
3667
|
}), e.on("channels", (e) => {
|
|
3669
3668
|
let t = h(J, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3670
|
-
n && m(Y, this,
|
|
3669
|
+
n && m(Y, this, Ws).call(this, n);
|
|
3671
3670
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3672
3671
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3673
|
-
n && m(Y, this,
|
|
3672
|
+
n && m(Y, this, Ws).call(this, n);
|
|
3674
3673
|
}), e.on("error", (e) => {
|
|
3675
3674
|
if (e.code() === "connection_failed") {
|
|
3676
|
-
m(Y, this,
|
|
3675
|
+
m(Y, this, Ks).call(this, "Stream is offline", "Please stand by");
|
|
3677
3676
|
return;
|
|
3678
3677
|
}
|
|
3679
|
-
e.isFatal() && (e.code() === "access_forbidden" ? m(Y, this,
|
|
3678
|
+
e.isFatal() && (e.code() === "access_forbidden" ? m(Y, this, Ks).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? m(Y, this, Ks).call(this, "Stream is offline", "Please stand by") : m(Y, this, Ks).call(this, "An error occurred", e.message), h(js, this).removeAttribute("hidden"), this.setAttribute(q.OFFLINE, ""), h(J, this).dispatchEvent(new CustomEvent(x.EXIT_FULLSCREEN)), h(J, this).dispatchEvent(new CustomEvent(x.EXIT_PIP)));
|
|
3680
3679
|
}));
|
|
3681
|
-
}), f(this,
|
|
3682
|
-
h(J, this).connect(), h(
|
|
3683
|
-
}), p(
|
|
3680
|
+
}), f(this, zs, () => {
|
|
3681
|
+
h(J, this).connect(), h(js, this).setAttribute("hidden", ""), m(Y, this, qs).call(this), h(J, this).focus();
|
|
3682
|
+
}), p(ks, this, this.attachShadow({ mode: "open" })), m(Y, this, Hs).call(this), p(J, this, h(ks, this).querySelector("vindral-controller")), p(As, this, h(ks, this).querySelector("#vindral-message")), p(js, this, h(ks, this).querySelector("#play-overlay")), p(Ms, this, h(ks, this).querySelector("#center-overlay"));
|
|
3684
3683
|
}
|
|
3685
3684
|
connectedCallback() {
|
|
3686
|
-
this.setAttribute(q.OFFLINE, ""), h(J, this).addEventListener("vindral-instance-ready", h(
|
|
3685
|
+
this.setAttribute(q.OFFLINE, ""), h(J, this).addEventListener("vindral-instance-ready", h(Rs, this)), m(Y, this, Us).call(this);
|
|
3687
3686
|
}
|
|
3688
3687
|
disconnectedCallback() {
|
|
3689
3688
|
var e;
|
|
3690
|
-
h(J, this).removeEventListener("vindral-instance-ready", h(
|
|
3689
|
+
h(J, this).removeEventListener("vindral-instance-ready", h(Rs, this)), h(js, this).removeEventListener("click", h(zs, this)), (e = h(Ns, this)) == null || e.stop();
|
|
3691
3690
|
}
|
|
3692
3691
|
attributeChangedCallback(e, t, n) {
|
|
3693
|
-
if (t !== n) if (e === g.MEDIA || e === q.ADVANCED_RENDITION_MENU_ENABLED) m(Y, this,
|
|
3692
|
+
if (t !== n) if (e === g.MEDIA || e === q.ADVANCED_RENDITION_MENU_ENABLED) m(Y, this, Hs).call(this);
|
|
3694
3693
|
else if (e === q.REFRESH_POSTER_ENABLED) {
|
|
3695
|
-
let e = h(
|
|
3694
|
+
let e = h(ks, this).querySelector("vindral-poster-overlay");
|
|
3696
3695
|
e && (e.disabled = b(this.getAttribute(q.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3697
|
-
} else h(
|
|
3696
|
+
} else h(Is, this).call(this, e, n);
|
|
3698
3697
|
}
|
|
3699
3698
|
get instance() {
|
|
3700
3699
|
return h(J, this).instance;
|
|
@@ -3709,64 +3708,64 @@ var ws = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3709
3708
|
h(J, this).timelineMarkers = e;
|
|
3710
3709
|
}
|
|
3711
3710
|
};
|
|
3712
|
-
function
|
|
3711
|
+
function Vs() {
|
|
3713
3712
|
let e = xe(this.getAttribute(g.MEDIA)), t = b(this.getAttribute(q.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3714
|
-
return e === "audio" ?
|
|
3713
|
+
return e === "audio" ? Ds : Es(t);
|
|
3715
3714
|
}
|
|
3716
|
-
function
|
|
3717
|
-
let e = h(
|
|
3718
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", h(
|
|
3719
|
-
let r =
|
|
3720
|
-
p(J, this, r.querySelector("vindral-controller")), p(
|
|
3715
|
+
function Hs() {
|
|
3716
|
+
let e = h(ks, this).hasChildNodes(), t = e ? h(J, this) : void 0, n = e ? h(js, this) : void 0;
|
|
3717
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", h(Rs, this)), this.isConnected && n && h(Ns, this) && n.removeEventListener("click", h(zs, this)), Os.innerHTML = m(Y, this, Vs).call(this);
|
|
3718
|
+
let r = Os.content.cloneNode(!0);
|
|
3719
|
+
p(J, this, r.querySelector("vindral-controller")), p(As, this, r.querySelector("#vindral-message")), p(js, this, r.querySelector("#play-overlay")), p(Ms, this, r.querySelector("#center-overlay")), h(Ls, this).call(this), h(Ps, this).forEach((e) => {
|
|
3721
3720
|
h(J, this).appendChild(e);
|
|
3722
|
-
}), h(
|
|
3721
|
+
}), h(Fs, this).call(this), h(ks, this).innerHTML = "", h(ks, this).appendChild(r), this.isConnected && (h(J, this).addEventListener("vindral-instance-ready", h(Rs, this)), h(Ns, this) && h(js, this).addEventListener("click", h(zs, this)));
|
|
3723
3722
|
}
|
|
3724
|
-
function
|
|
3723
|
+
function Us() {
|
|
3725
3724
|
var e;
|
|
3726
3725
|
if (b(this.getAttribute(q.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3727
3726
|
let t = this.getAttribute("url") || "https://lb.cdn.vindral.com", n = this.getAttribute("channel-id"), r = (e = this.getAttribute("authentication-token")) == null ? void 0 : e, i = this.hasAttribute("infinite-reconnect");
|
|
3728
3727
|
if (!n) {
|
|
3729
|
-
this.setAttribute(q.OFFLINE, ""), m(Y, this,
|
|
3728
|
+
this.setAttribute(q.OFFLINE, ""), m(Y, this, Ks).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3730
3729
|
return;
|
|
3731
3730
|
}
|
|
3732
|
-
p(
|
|
3731
|
+
p(Ns, this, new gs({
|
|
3733
3732
|
url: t,
|
|
3734
3733
|
channelId: n,
|
|
3735
3734
|
authenticationToken: r,
|
|
3736
3735
|
infiniteReconnect: i
|
|
3737
|
-
})), h(
|
|
3738
|
-
h(J, this).connect(), this.removeAttribute("offline"), m(Y, this,
|
|
3739
|
-
}), h(
|
|
3740
|
-
m(Y, this,
|
|
3741
|
-
}), h(
|
|
3742
|
-
this.setAttribute(q.OFFLINE, ""), m(Y, this,
|
|
3743
|
-
}), h(
|
|
3744
|
-
}
|
|
3745
|
-
function
|
|
3736
|
+
})), h(Ns, this).on("live", (e) => {
|
|
3737
|
+
h(J, this).connect(), this.removeAttribute("offline"), m(Y, this, qs).call(this), m(Y, this, Ws).call(this, e);
|
|
3738
|
+
}), h(Ns, this).on("timeout", () => {
|
|
3739
|
+
m(Y, this, qs).call(this), h(js, this).removeAttribute("hidden");
|
|
3740
|
+
}), h(Ns, this).on("error", (e) => {
|
|
3741
|
+
this.setAttribute(q.OFFLINE, ""), m(Y, this, Ks).call(this, e.title, e.message);
|
|
3742
|
+
}), h(js, this).addEventListener("click", h(zs, this)), this.hasAttribute("paused") && h(Ns, this).start();
|
|
3743
|
+
}
|
|
3744
|
+
function Ws(e) {
|
|
3746
3745
|
var t, n, r;
|
|
3747
3746
|
let i = ve(this.getAttribute("title"), !1);
|
|
3748
3747
|
i && Me({
|
|
3749
3748
|
title: typeof i == "string" ? i : e.name,
|
|
3750
|
-
poster: (t = (n = m(Y, this,
|
|
3749
|
+
poster: (t = (n = m(Y, this, Gs).call(this)) == null ? (r = this.instance) == null ? void 0 : r.getThumbnailUrl() : n) == null ? e.thumbnailUrls[0] : t
|
|
3751
3750
|
});
|
|
3752
3751
|
}
|
|
3753
|
-
function
|
|
3752
|
+
function Gs() {
|
|
3754
3753
|
let e = ve(this.getAttribute("poster"));
|
|
3755
3754
|
return _(e) ? e : void 0;
|
|
3756
3755
|
}
|
|
3757
|
-
function
|
|
3758
|
-
h(
|
|
3759
|
-
let n = m(Y, this,
|
|
3760
|
-
n ? h(
|
|
3756
|
+
function Ks(e, t) {
|
|
3757
|
+
h(As, this).setAttribute("title", e), h(As, this).setAttribute("description", t), h(As, this).removeAttribute("hidden");
|
|
3758
|
+
let n = m(Y, this, Gs).call(this);
|
|
3759
|
+
n ? h(Ms, this).setAttribute("poster", n) : h(Ms, this).removeAttribute("poster"), h(Ms, this).setAttribute("backdrop", "");
|
|
3761
3760
|
}
|
|
3762
|
-
function
|
|
3763
|
-
h(
|
|
3761
|
+
function qs() {
|
|
3762
|
+
h(As, this).setAttribute("hidden", ""), h(Ms, this).removeAttribute("backdrop");
|
|
3764
3763
|
}
|
|
3765
|
-
e(
|
|
3764
|
+
e(Bs, "observedAttributes", [...Ta.observedAttributes, ...ss]);
|
|
3766
3765
|
//#endregion
|
|
3767
3766
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3768
|
-
var
|
|
3769
|
-
|
|
3767
|
+
var Js = document.createElement("template");
|
|
3768
|
+
Js.innerHTML = `
|
|
3770
3769
|
<style>
|
|
3771
3770
|
:host {
|
|
3772
3771
|
display: var(--poster-overlay-display);
|
|
@@ -3801,26 +3800,26 @@ Zs.innerHTML = `
|
|
|
3801
3800
|
}
|
|
3802
3801
|
</style>
|
|
3803
3802
|
`;
|
|
3804
|
-
var
|
|
3803
|
+
var Ys = 6e3, Xs = /* @__PURE__ */ new WeakMap(), Zs = /* @__PURE__ */ new WeakMap(), Qs = /* @__PURE__ */ new WeakMap(), $s = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakSet(), tc = /* @__PURE__ */ new WeakMap(), nc = class extends HTMLElement {
|
|
3805
3804
|
constructor() {
|
|
3806
|
-
super(), S(this,
|
|
3807
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? m(
|
|
3808
|
-
}), f(this,
|
|
3805
|
+
super(), S(this, ec), f(this, Xs, null), f(this, Zs, null), f(this, Qs, null), f(this, $s, () => {
|
|
3806
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? m(ec, this, rc).call(this) : m(ec, this, ic).call(this);
|
|
3807
|
+
}), f(this, tc, (e) => {
|
|
3809
3808
|
e.forEach((e) => {
|
|
3810
3809
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3811
3810
|
});
|
|
3812
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3811
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Js.content.cloneNode(!0));
|
|
3813
3812
|
}
|
|
3814
3813
|
connectedCallback() {
|
|
3815
3814
|
var e;
|
|
3816
|
-
p(
|
|
3815
|
+
p(Xs, this, this.closest("vindral-controller")), (e = h(Xs, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", h($s, this)), p(Qs, this, new IntersectionObserver(h(tc, this))), h(Qs, this).observe(this);
|
|
3817
3816
|
}
|
|
3818
3817
|
disconnectedCallback() {
|
|
3819
3818
|
var e, t;
|
|
3820
|
-
(e = h(
|
|
3819
|
+
(e = h(Xs, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", h($s, this)), (t = h(Qs, this)) == null || t.disconnect(), p(Qs, this, null), m(ec, this, ic).call(this);
|
|
3821
3820
|
}
|
|
3822
3821
|
attributeChangedCallback(e, t, n) {
|
|
3823
|
-
t !== n && (e === g.POSTER_SRC && this.paused && !this.disabled && m(
|
|
3822
|
+
t !== n && (e === g.POSTER_SRC && this.paused && !this.disabled && m(ec, this, ac).call(this), (e === g.PAUSED || e === "disabled" || e === "intersecting") && h($s, this).call(this));
|
|
3824
3823
|
}
|
|
3825
3824
|
get disabled() {
|
|
3826
3825
|
return this.hasAttribute("disabled");
|
|
@@ -3835,18 +3834,18 @@ var Qs = 6e3, $s = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakM
|
|
|
3835
3834
|
return this.hasAttribute(g.PAUSED);
|
|
3836
3835
|
}
|
|
3837
3836
|
};
|
|
3838
|
-
function
|
|
3839
|
-
h(
|
|
3837
|
+
function rc() {
|
|
3838
|
+
h(Zs, this) === null && (m(ec, this, ic).call(this), p(Zs, this, window.setInterval(() => m(ec, this, ac).call(this), Ys)));
|
|
3840
3839
|
}
|
|
3841
|
-
function
|
|
3842
|
-
h(
|
|
3840
|
+
function ic() {
|
|
3841
|
+
h(Zs, this) !== null && (clearInterval(h(Zs, this)), p(Zs, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3843
3842
|
}
|
|
3844
|
-
function
|
|
3843
|
+
function ac() {
|
|
3845
3844
|
if (!this.posterSrc) return;
|
|
3846
3845
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3847
3846
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3848
3847
|
}
|
|
3849
|
-
e(
|
|
3848
|
+
e(nc, "observedAttributes", [
|
|
3850
3849
|
g.POSTER_SRC,
|
|
3851
3850
|
g.PAUSED,
|
|
3852
3851
|
"disabled",
|
|
@@ -3854,70 +3853,70 @@ e(ac, "observedAttributes", [
|
|
|
3854
3853
|
]);
|
|
3855
3854
|
//#endregion
|
|
3856
3855
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3857
|
-
var
|
|
3858
|
-
|
|
3856
|
+
var oc, sc = "\n<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\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <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\" />\n</svg>\n", cc = document.createElement("template");
|
|
3857
|
+
cc.innerHTML = `
|
|
3859
3858
|
<style>
|
|
3860
3859
|
:host {
|
|
3861
3860
|
display: var(--rendition-menu-display);
|
|
3862
3861
|
}
|
|
3863
3862
|
</style>
|
|
3864
3863
|
|
|
3865
|
-
<slot name="button">${
|
|
3864
|
+
<slot name="button">${sc}</slot>
|
|
3866
3865
|
<slot name="listbox" hidden>
|
|
3867
3866
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3868
3867
|
</slot>
|
|
3869
3868
|
`;
|
|
3870
|
-
var
|
|
3869
|
+
var lc = /* @__PURE__ */ new WeakSet(), uc = class extends He {
|
|
3871
3870
|
constructor() {
|
|
3872
3871
|
var e, t, n;
|
|
3873
|
-
super(), S(this,
|
|
3872
|
+
super(), S(this, lc), (e = this.shadowRoot) == null || e.appendChild(cc.content.cloneNode(!0)), this.listbox = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[part=listbox]"), this.listboxSlot = (n = this.shadowRoot) == null ? void 0 : n.querySelector("slot[name=listbox]");
|
|
3874
3873
|
}
|
|
3875
3874
|
connectedCallback() {
|
|
3876
|
-
super.connectedCallback(), m(
|
|
3875
|
+
super.connectedCallback(), m(lc, this, dc).call(this), this.setAttribute("aria-label", "Quality");
|
|
3877
3876
|
}
|
|
3878
3877
|
attributeChangedCallback(e, t, n) {
|
|
3879
|
-
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && m(
|
|
3878
|
+
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && m(lc, this, dc).call(this);
|
|
3880
3879
|
}
|
|
3881
3880
|
};
|
|
3882
|
-
|
|
3883
|
-
function
|
|
3881
|
+
oc = uc;
|
|
3882
|
+
function dc() {
|
|
3884
3883
|
let e = this.getAttribute(g.RENDITION_LEVELS);
|
|
3885
3884
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3886
3885
|
}
|
|
3887
|
-
e(
|
|
3886
|
+
e(uc, "observedAttributes", [...y(oc, "observedAttributes", oc), g.RENDITION_LEVELS]);
|
|
3888
3887
|
//#endregion
|
|
3889
3888
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3890
|
-
var
|
|
3891
|
-
|
|
3892
|
-
var
|
|
3889
|
+
var fc = document.createElement("template");
|
|
3890
|
+
fc.innerHTML = "\n <style>\n :host {\n font: inherit;\n cursor: default;\n padding: var(--padding-2) !important;\n padding-top: var(--padding-3) !important;\n border-radius: 0.25em;\n position: absolute;\n min-width: 140px !important;\n background: var(--bg-subtle);\n z-index: 1;\n overflow: auto;\n }\n\n :host([list-position=\"top\"]) {\n bottom: calc(100% + 0.5em);\n transform: translate(-50%);\n }\n\n :host([list-position=\"bottom\"]) {\n top: calc(100% + 0.5em);\n }\n\n :host::-webkit-scrollbar {\n width: 5px;\n padding-right: 5px;\n }\n\n :host::-webkit-scrollbar-thumb {\n background-color: var(--fg-extra-subtle);\n border-radius: 10px;\n border: 0;\n }\n\n :host::-webkit-scrollbar-track {\n border-radius: 10px;\n background-color: transparent;\n }\n\n .menu {\n display: grid;\n gap: var(--padding-1);\n }\n\n [role=\"menuitem\"] {\n flex: 1;\n position: relative;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 44px;\n padding: 0 var(--padding-5);\n border-radius: 4px;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n white-space: nowrap;\n text-align: left;\n }\n\n [role=\"menuitem\"]:hover {\n background: var(--bg-component-hover);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"] {\n background: var(--bg-component-active);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"]::before {\n content: url(\"data:image/svg+xml,%0A%20%20%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2078.369%2078.369%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20d%3D%22M78.049%2019.015%2029.458%2067.606a1.094%201.094%200%200%201-1.548%200L.32%2040.015a1.094%201.094%200%200%201%200-1.547l6.704-6.704a1.095%201.095%200%200%201%201.548%200l20.113%2020.112%2041.113-41.113a1.095%201.095%200%200%201%201.548%200l6.703%206.704a1.094%201.094%200%200%201%200%201.548z%22%2F%3E%3C%2Fsvg%3E%0A\");\n position: absolute;\n left: calc(var(--padding-3) - var(--padding-1));\n top: calc(50% - 8px);\n }\n\n [role=\"menuitem\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n outline: 0;\n }\n\n .menu-item-subtitle {\n font-size: 11px;\n opacity: 0.6;\n }\n\n .heading {\n text-transform: uppercase;\n margin-bottom: var(--padding-2);\n padding: 0 var(--padding-3);\n font-size: 11px;\n font-weight: bold;\n }\n </style>\n\n <slot>\n <div class=\"heading\">Max quality</div>\n <div class=\"menu\"></div>\n </slot>\n";
|
|
3891
|
+
var pc = /* @__PURE__ */ new WeakMap(), mc = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), _c = /* @__PURE__ */ new WeakMap(), vc = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), yc = class extends HTMLElement {
|
|
3893
3892
|
constructor() {
|
|
3894
|
-
super(), S(this, X), f(this,
|
|
3893
|
+
super(), S(this, X), f(this, pc, []), f(this, mc, 2 ** 53 - 1), f(this, hc, null), f(this, gc, []), f(this, _c, null), f(this, vc, null), e(this, "handleEvent", (e) => {
|
|
3895
3894
|
switch (e.type) {
|
|
3896
3895
|
case "keydown":
|
|
3897
|
-
m(X, this,
|
|
3896
|
+
m(X, this, Tc).call(this, e);
|
|
3898
3897
|
break;
|
|
3899
3898
|
}
|
|
3900
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3899
|
+
}), this.attachShadow({ mode: "open" }).appendChild(fc.content.cloneNode(!0));
|
|
3901
3900
|
}
|
|
3902
3901
|
connectedCallback() {
|
|
3903
3902
|
let e = this.getRootNode();
|
|
3904
3903
|
if (e instanceof ShadowRoot) {
|
|
3905
3904
|
var t;
|
|
3906
|
-
p(
|
|
3905
|
+
p(_c, this, e.host.closest("vindral-controller")), (t = h(_c, this)) == null || t.connectListener(this), m(X, this, bc).call(this), m(X, this, xc).call(this), p(vc, this, e.host), this.addEventListener("keydown", this);
|
|
3907
3906
|
}
|
|
3908
3907
|
}
|
|
3909
3908
|
disconnectedCallback() {
|
|
3910
3909
|
var e;
|
|
3911
|
-
(e = h(
|
|
3910
|
+
(e = h(_c, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3912
3911
|
}
|
|
3913
3912
|
attributeChangedCallback(e, t, n) {
|
|
3914
3913
|
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3915
3914
|
}
|
|
3916
3915
|
set list(e) {
|
|
3917
|
-
p(
|
|
3916
|
+
p(pc, this, e), m(X, this, xc).call(this);
|
|
3918
3917
|
}
|
|
3919
3918
|
set maxVideoBitrate(e) {
|
|
3920
|
-
p(
|
|
3919
|
+
p(mc, this, e), m(X, this, Cc).call(this);
|
|
3921
3920
|
}
|
|
3922
3921
|
get keysUsed() {
|
|
3923
3922
|
return [
|
|
@@ -3933,10 +3932,10 @@ var gc = /* @__PURE__ */ new WeakMap(), _c = /* @__PURE__ */ new WeakMap(), vc =
|
|
|
3933
3932
|
}
|
|
3934
3933
|
focus() {
|
|
3935
3934
|
var e;
|
|
3936
|
-
(e = h(
|
|
3935
|
+
(e = h(hc, this)) == null || e.focus();
|
|
3937
3936
|
}
|
|
3938
3937
|
};
|
|
3939
|
-
function
|
|
3938
|
+
function bc() {
|
|
3940
3939
|
new IntersectionObserver((e) => {
|
|
3941
3940
|
e.forEach((e) => {
|
|
3942
3941
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3945,50 +3944,50 @@ function Cc() {
|
|
|
3945
3944
|
} else this.style.height = "auto";
|
|
3946
3945
|
});
|
|
3947
3946
|
}, {
|
|
3948
|
-
root: h(
|
|
3947
|
+
root: h(_c, this),
|
|
3949
3948
|
threshold: 0
|
|
3950
3949
|
}).observe(this);
|
|
3951
3950
|
}
|
|
3952
|
-
function
|
|
3951
|
+
function xc() {
|
|
3953
3952
|
var e;
|
|
3954
3953
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
3955
|
-
t && (p(
|
|
3954
|
+
t && (p(gc, this, []), t.innerHTML = "", h(pc, this).sort((e, t) => {
|
|
3956
3955
|
var n, r;
|
|
3957
3956
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3958
3957
|
}).forEach((e) => {
|
|
3959
3958
|
var n, r, i, a, o, s, c, l;
|
|
3960
3959
|
let u = document.createElement("div");
|
|
3961
3960
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
3962
|
-
let ee = m(X, this,
|
|
3961
|
+
let ee = m(X, this, Sc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3963
3962
|
u.textContent = e.video ? me(e.video) : "";
|
|
3964
3963
|
let d = document.createElement("span");
|
|
3965
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${he(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => m(X, this,
|
|
3964
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${he(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => m(X, this, wc).call(this, e)), h(gc, this).push({
|
|
3966
3965
|
el: u,
|
|
3967
3966
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3968
3967
|
}), t.appendChild(u);
|
|
3969
|
-
}), m(X, this,
|
|
3968
|
+
}), m(X, this, Cc).call(this));
|
|
3970
3969
|
}
|
|
3971
|
-
function
|
|
3970
|
+
function Sc(e) {
|
|
3972
3971
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
3973
3972
|
}
|
|
3974
|
-
function
|
|
3975
|
-
h(
|
|
3976
|
-
let e = h(
|
|
3973
|
+
function Cc() {
|
|
3974
|
+
h(hc, this) && (h(hc, this).removeAttribute("aria-selected"), h(hc, this).tabIndex = -1);
|
|
3975
|
+
let e = h(pc, this).sort((e, t) => {
|
|
3977
3976
|
var n, r;
|
|
3978
3977
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3979
|
-
}), t = h(
|
|
3978
|
+
}), t = h(pc, this).filter((e) => {
|
|
3980
3979
|
var t;
|
|
3981
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= h(
|
|
3980
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= h(mc, this);
|
|
3982
3981
|
})[0] || e[e.length - 1];
|
|
3983
3982
|
if (t) {
|
|
3984
|
-
let e = h(
|
|
3983
|
+
let e = h(gc, this).find((e) => {
|
|
3985
3984
|
var n;
|
|
3986
3985
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
3987
3986
|
});
|
|
3988
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), p(
|
|
3987
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), p(hc, this, e.el));
|
|
3989
3988
|
}
|
|
3990
3989
|
}
|
|
3991
|
-
function
|
|
3990
|
+
function wc(e) {
|
|
3992
3991
|
this.dispatchEvent(new Event("change", {
|
|
3993
3992
|
bubbles: !0,
|
|
3994
3993
|
composed: !0
|
|
@@ -3998,36 +3997,36 @@ function Dc(e) {
|
|
|
3998
3997
|
detail: e
|
|
3999
3998
|
}));
|
|
4000
3999
|
}
|
|
4001
|
-
function
|
|
4000
|
+
function Tc(e) {
|
|
4002
4001
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
4003
4002
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
4004
4003
|
var a;
|
|
4005
|
-
(a = h(
|
|
4004
|
+
(a = h(vc, this)) == null || a.hide();
|
|
4006
4005
|
} else if (t === "Enter" || t === " ") {
|
|
4007
4006
|
var o;
|
|
4008
|
-
(o = m(X, this,
|
|
4009
|
-
} else m(X, this,
|
|
4007
|
+
(o = m(X, this, Dc).call(this)) == null || (o = o.el) == null || o.click();
|
|
4008
|
+
} else m(X, this, Ec).call(this, e);
|
|
4010
4009
|
}
|
|
4011
|
-
function
|
|
4010
|
+
function Ec(e) {
|
|
4012
4011
|
var t;
|
|
4013
|
-
let { key: n } = e, r = h(
|
|
4012
|
+
let { key: n } = e, r = h(gc, this), i = (t = m(X, this, Dc).call(this)) == null ? r[0] : t;
|
|
4014
4013
|
if (!i) return;
|
|
4015
4014
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
4016
4015
|
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : e.key === "Home" ? o = 0 : e.key === "End" && (o = r.length - 1), o < 0 && (o = r.length - 1), o > r.length - 1 && (o = 0);
|
|
4017
4016
|
let s = r[o];
|
|
4018
|
-
s && (m(X, this,
|
|
4017
|
+
s && (m(X, this, Oc).call(this, s.id), s.el.focus());
|
|
4019
4018
|
}
|
|
4020
|
-
function
|
|
4021
|
-
return h(
|
|
4019
|
+
function Dc() {
|
|
4020
|
+
return h(gc, this).find((e) => e.el.tabIndex === 0);
|
|
4022
4021
|
}
|
|
4023
|
-
function
|
|
4024
|
-
for (let t of h(
|
|
4022
|
+
function Oc(e) {
|
|
4023
|
+
for (let t of h(gc, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
4025
4024
|
}
|
|
4026
|
-
e(
|
|
4025
|
+
e(yc, "observedAttributes", [g.RENDITION_LEVELS, g.MAX_VIDEO_BITRATE]);
|
|
4027
4026
|
//#endregion
|
|
4028
4027
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
4029
|
-
var
|
|
4030
|
-
|
|
4028
|
+
var kc = document.createElement("template");
|
|
4029
|
+
kc.innerHTML = `
|
|
4031
4030
|
<style>
|
|
4032
4031
|
:host {
|
|
4033
4032
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -4095,71 +4094,71 @@ Mc.innerHTML = `
|
|
|
4095
4094
|
<div id="scroll-area"></div>
|
|
4096
4095
|
<slot id="content"></slot>
|
|
4097
4096
|
`;
|
|
4098
|
-
var
|
|
4097
|
+
var Ac = /* @__PURE__ */ new WeakMap(), jc = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), Nc = /* @__PURE__ */ new WeakMap(), Pc = /* @__PURE__ */ new WeakMap(), Fc = /* @__PURE__ */ new WeakMap(), Ic = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakSet(), Lc = /* @__PURE__ */ new WeakMap(), Rc = class extends HTMLElement {
|
|
4099
4098
|
constructor() {
|
|
4100
|
-
super(), S(this, Z), f(this,
|
|
4099
|
+
super(), S(this, Z), f(this, Ac, null), f(this, jc, null), f(this, Mc, !1), f(this, Nc, !1), f(this, Pc, !1), f(this, Fc, () => {
|
|
4101
4100
|
this.open && (this.open = !1);
|
|
4102
|
-
}), f(this,
|
|
4101
|
+
}), f(this, Ic, null), e(this, "handleEvent", (e) => {
|
|
4103
4102
|
switch (e.type) {
|
|
4104
4103
|
case "touchstart":
|
|
4105
|
-
m(Z, this,
|
|
4104
|
+
m(Z, this, Bc).call(this, e);
|
|
4106
4105
|
break;
|
|
4107
4106
|
case "touchmove":
|
|
4108
|
-
m(Z, this,
|
|
4107
|
+
m(Z, this, Vc).call(this, e);
|
|
4109
4108
|
break;
|
|
4110
4109
|
case "touchend":
|
|
4111
|
-
m(Z, this,
|
|
4110
|
+
m(Z, this, Hc).call(this, e);
|
|
4112
4111
|
break;
|
|
4113
4112
|
}
|
|
4114
|
-
}), f(this,
|
|
4115
|
-
let e = h(
|
|
4113
|
+
}), f(this, Lc, () => {
|
|
4114
|
+
let e = h(Pc, this);
|
|
4116
4115
|
if (this.scrollTop === 0) {
|
|
4117
|
-
m(Z, this,
|
|
4116
|
+
m(Z, this, Xc).call(this, e);
|
|
4118
4117
|
return;
|
|
4119
4118
|
}
|
|
4120
|
-
if (!e && !m(Z, this,
|
|
4121
|
-
m(Z, this,
|
|
4119
|
+
if (!e && !m(Z, this, Uc).call(this)) {
|
|
4120
|
+
m(Z, this, Jc).call(this), m(Z, this, Xc).call(this);
|
|
4122
4121
|
return;
|
|
4123
4122
|
}
|
|
4124
|
-
!this.visible && this.scrollTop > 0 && !h(
|
|
4125
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4123
|
+
!this.visible && this.scrollTop > 0 && !h(Mc, this) ? m(Z, this, Zc).call(this) : !h(Mc, this) && m(Z, this, Gc).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4124
|
+
}), this.attachShadow({ mode: "open" }).appendChild(kc.content.cloneNode(!0));
|
|
4126
4125
|
}
|
|
4127
4126
|
connectedCallback() {
|
|
4128
4127
|
let e = this.getRootNode();
|
|
4129
4128
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4130
4129
|
var t, n, r;
|
|
4131
|
-
p(
|
|
4130
|
+
p(Ac, this, e.querySelector("vindral-controller")), (t = h(Ac, this)) == null || t.connectListener(this), p(jc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = h(jc, this)) == null || r.addEventListener("click", h(Fc, this));
|
|
4132
4131
|
let s = this.hasAttribute("touch-enabled");
|
|
4133
|
-
if (p(
|
|
4132
|
+
if (p(Pc, this, d() && s), !h(Pc, this)) this.setAttribute("snap", "");
|
|
4134
4133
|
else {
|
|
4135
4134
|
var i, a, o;
|
|
4136
|
-
(i = h(
|
|
4135
|
+
(i = h(Ac, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = h(Ac, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = h(Ac, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
4137
4136
|
}
|
|
4138
|
-
this.addEventListener("scroll", h(
|
|
4137
|
+
this.addEventListener("scroll", h(Lc, this));
|
|
4139
4138
|
}
|
|
4140
4139
|
}
|
|
4141
4140
|
disconnectedCallback() {
|
|
4142
4141
|
var e, t, n, r, i;
|
|
4143
|
-
(e = h(
|
|
4142
|
+
(e = h(jc, this)) == null || e.removeEventListener("click", h(Fc, this)), this.removeEventListener("scroll", h(Lc, this)), (t = h(Ac, this)) == null || t.removeEventListener("touchstart", this), (n = h(Ac, this)) == null || n.removeEventListener("touchmove", this), (r = h(Ac, this)) == null || r.removeEventListener("touchend", this), (i = h(Ac, this)) == null || i.disconnectListener(this);
|
|
4144
4143
|
}
|
|
4145
4144
|
attributeChangedCallback(e, t, n) {
|
|
4146
|
-
if (t !== n && (e === g.USER_INTERACTING && n === null && m(Z, this,
|
|
4145
|
+
if (t !== n && (e === g.USER_INTERACTING && n === null && m(Z, this, Wc).call(this) && setTimeout(() => {
|
|
4147
4146
|
this.open = !1;
|
|
4148
4147
|
}, 300), e === "open")) if (n !== null) {
|
|
4149
4148
|
var r;
|
|
4150
|
-
p(
|
|
4151
|
-
top: (r = h(
|
|
4149
|
+
p(Mc, this, !1), this.scrollTop > 0 && m(Z, this, Zc).call(this), this.scrollTo({
|
|
4150
|
+
top: (r = h(jc, this)) == null ? void 0 : r.clientHeight,
|
|
4152
4151
|
behavior: "smooth"
|
|
4153
4152
|
});
|
|
4154
|
-
} else m(Z, this,
|
|
4153
|
+
} else m(Z, this, Yc).call(this);
|
|
4155
4154
|
}
|
|
4156
4155
|
set open(e) {
|
|
4157
4156
|
if (e) {
|
|
4158
4157
|
this.setAttribute("open", "");
|
|
4159
4158
|
return;
|
|
4160
4159
|
}
|
|
4161
|
-
let t = this.hasAttribute("open"), n = this.visible || m(Z, this,
|
|
4162
|
-
t ? this.removeAttribute("open") : n ? m(Z, this,
|
|
4160
|
+
let t = this.hasAttribute("open"), n = this.visible || m(Z, this, Wc).call(this);
|
|
4161
|
+
t ? this.removeAttribute("open") : n ? m(Z, this, Yc).call(this) : (p(Mc, this, !1), this.removeAttribute("snap-touch"));
|
|
4163
4162
|
}
|
|
4164
4163
|
get open() {
|
|
4165
4164
|
return this.hasAttribute("open");
|
|
@@ -4171,78 +4170,78 @@ var Nc = /* @__PURE__ */ new WeakMap(), Pc = /* @__PURE__ */ new WeakMap(), Fc =
|
|
|
4171
4170
|
return this.hasAttribute("visible");
|
|
4172
4171
|
}
|
|
4173
4172
|
};
|
|
4174
|
-
function
|
|
4175
|
-
return m(Z, this,
|
|
4173
|
+
function zc() {
|
|
4174
|
+
return m(Z, this, Uc).call(this) || m(Z, this, qc).call(this) || m(Z, this, Wc).call(this);
|
|
4176
4175
|
}
|
|
4177
|
-
function
|
|
4176
|
+
function Bc(e) {
|
|
4178
4177
|
let t = e.touches[0];
|
|
4179
|
-
t && (p(
|
|
4178
|
+
t && (p(Nc, this, m(Z, this, zc).call(this)), h(Nc, this) && (p(Mc, this, !1), p(Ic, this, t.clientY)));
|
|
4180
4179
|
}
|
|
4181
|
-
function
|
|
4182
|
-
if (!(!h(
|
|
4183
|
-
let t = e.touches[0].clientY, n = h(
|
|
4180
|
+
function Vc(e) {
|
|
4181
|
+
if (!(!h(Nc, this) || h(Ic, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4182
|
+
let t = e.touches[0].clientY, n = h(Ic, this) - t;
|
|
4184
4183
|
this.scrollTop = Math.max(0, n);
|
|
4185
4184
|
}
|
|
4186
4185
|
}
|
|
4187
|
-
function
|
|
4188
|
-
h(
|
|
4186
|
+
function Hc(e) {
|
|
4187
|
+
h(Nc, this) && !h(Mc, this) && m(Z, this, Wc).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), p(Ic, this, null), p(Nc, this, !1);
|
|
4189
4188
|
}
|
|
4190
|
-
function
|
|
4189
|
+
function Uc() {
|
|
4191
4190
|
return this.hasAttribute(g.USER_INTERACTING);
|
|
4192
4191
|
}
|
|
4193
|
-
function
|
|
4192
|
+
function Wc() {
|
|
4194
4193
|
return this.scrollTop > 0;
|
|
4195
4194
|
}
|
|
4196
|
-
function
|
|
4195
|
+
function Gc() {
|
|
4197
4196
|
var e;
|
|
4198
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = h(
|
|
4197
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = h(jc, this)) == null ? void 0 : e.clientHeight);
|
|
4199
4198
|
}
|
|
4200
|
-
function
|
|
4199
|
+
function Kc() {
|
|
4201
4200
|
var e;
|
|
4202
|
-
let t = (e = h(
|
|
4201
|
+
let t = (e = h(jc, this)) == null ? void 0 : e.clientHeight;
|
|
4203
4202
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4204
4203
|
}
|
|
4205
|
-
function
|
|
4204
|
+
function qc() {
|
|
4206
4205
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4207
|
-
return Number.isNaN(t) ? m(Z, this,
|
|
4206
|
+
return Number.isNaN(t) ? m(Z, this, Kc).call(this) > 0 : t > 0;
|
|
4208
4207
|
}
|
|
4209
|
-
function
|
|
4208
|
+
function Jc() {
|
|
4210
4209
|
let e = this.style.scrollBehavior;
|
|
4211
4210
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4212
4211
|
top: 0,
|
|
4213
4212
|
behavior: "auto"
|
|
4214
4213
|
}), this.style.scrollBehavior = e;
|
|
4215
4214
|
}
|
|
4216
|
-
function
|
|
4217
|
-
p(
|
|
4215
|
+
function Yc() {
|
|
4216
|
+
p(Mc, this, !0), this.removeAttribute("snap-touch"), m(Z, this, Qc).call(this), this.scrollTo({
|
|
4218
4217
|
top: 0,
|
|
4219
4218
|
behavior: "smooth"
|
|
4220
4219
|
});
|
|
4221
4220
|
}
|
|
4222
|
-
function
|
|
4223
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), p(
|
|
4221
|
+
function Xc(e = !1) {
|
|
4222
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), p(Mc, this, !1), m(Z, this, Qc).call(this);
|
|
4224
4223
|
}
|
|
4225
|
-
function
|
|
4224
|
+
function Zc() {
|
|
4226
4225
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(x.LOCK_UI, {
|
|
4227
4226
|
bubbles: !0,
|
|
4228
4227
|
composed: !0
|
|
4229
4228
|
})));
|
|
4230
4229
|
}
|
|
4231
|
-
function
|
|
4230
|
+
function Qc() {
|
|
4232
4231
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(x.UNLOCK_UI, {
|
|
4233
4232
|
bubbles: !0,
|
|
4234
4233
|
composed: !0
|
|
4235
4234
|
})));
|
|
4236
4235
|
}
|
|
4237
|
-
e(
|
|
4236
|
+
e(Rc, "observedAttributes", [
|
|
4238
4237
|
g.USER_INTERACTING,
|
|
4239
4238
|
"open",
|
|
4240
4239
|
"touch-enabled"
|
|
4241
4240
|
]);
|
|
4242
4241
|
//#endregion
|
|
4243
4242
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4244
|
-
var
|
|
4245
|
-
|
|
4243
|
+
var $c = 1e3, el = 8, tl = document.createElement("template");
|
|
4244
|
+
tl.innerHTML = `
|
|
4246
4245
|
<style>
|
|
4247
4246
|
:host {
|
|
4248
4247
|
--buffered: 0;
|
|
@@ -4317,53 +4316,53 @@ il.innerHTML = `
|
|
|
4317
4316
|
<div id="markers"></div>
|
|
4318
4317
|
<div id="time-tooltip"></div>
|
|
4319
4318
|
`;
|
|
4320
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4319
|
+
var Q = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new WeakMap(), rl = /* @__PURE__ */ new WeakMap(), il = /* @__PURE__ */ new WeakMap(), al = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new WeakMap(), cl = /* @__PURE__ */ new WeakMap(), ll = /* @__PURE__ */ new WeakMap(), ul = /* @__PURE__ */ new WeakMap(), dl = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), fl = /* @__PURE__ */ new WeakMap(), pl = /* @__PURE__ */ new WeakMap(), ml = /* @__PURE__ */ new WeakMap(), hl = /* @__PURE__ */ new WeakMap(), gl = /* @__PURE__ */ new WeakMap(), _l = /* @__PURE__ */ new WeakMap(), vl = class extends bi {
|
|
4321
4320
|
constructor() {
|
|
4322
4321
|
var e, t, n, r;
|
|
4323
|
-
super(), S(this, $), f(this, Q, void 0), f(this,
|
|
4324
|
-
if (!m($, this,
|
|
4322
|
+
super(), S(this, $), f(this, Q, void 0), f(this, nl, void 0), f(this, rl, void 0), f(this, il, void 0), f(this, al, []), f(this, ol, null), f(this, sl, !1), f(this, cl, null), f(this, ll, null), f(this, ul, !1), f(this, dl, !1), f(this, fl, (e) => {
|
|
4323
|
+
if (!m($, this, xl).call(this) || m($, this, Sl).call(this)) {
|
|
4325
4324
|
e.preventDefault();
|
|
4326
4325
|
return;
|
|
4327
4326
|
}
|
|
4328
|
-
p(
|
|
4327
|
+
p(sl, this, !0), p(ll, this, e.pointerId);
|
|
4329
4328
|
try {
|
|
4330
4329
|
this.setPointerCapture(e.pointerId);
|
|
4331
4330
|
} catch (e) {}
|
|
4332
|
-
m($, this,
|
|
4333
|
-
}), f(this,
|
|
4334
|
-
if (!(!m($, this,
|
|
4335
|
-
if (h(
|
|
4336
|
-
e.preventDefault(), m($, this,
|
|
4331
|
+
m($, this, Al).call(this, e);
|
|
4332
|
+
}), f(this, pl, (e) => {
|
|
4333
|
+
if (!(!m($, this, xl).call(this) || m($, this, Sl).call(this))) {
|
|
4334
|
+
if (h(cl, this) && (cancelAnimationFrame(h(cl, this)), p(cl, this, null)), h(sl, this) && e.pointerId === h(ll, this)) {
|
|
4335
|
+
e.preventDefault(), m($, this, Al).call(this, e);
|
|
4337
4336
|
return;
|
|
4338
4337
|
}
|
|
4339
|
-
p(
|
|
4338
|
+
p(cl, this, requestAnimationFrame(() => {
|
|
4340
4339
|
var t;
|
|
4341
|
-
if (e.pointerType !== "mouse" || h(
|
|
4342
|
-
h(
|
|
4340
|
+
if (e.pointerType !== "mouse" || h(sl, this) || !this.duration) {
|
|
4341
|
+
h(rl, this).style.opacity = "0", p(cl, this, null);
|
|
4343
4342
|
return;
|
|
4344
4343
|
}
|
|
4345
|
-
let n = m($, this,
|
|
4346
|
-
if (m($, this,
|
|
4344
|
+
let n = m($, this, kl).call(this, e.clientX), r = m($, this, Dl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4345
|
+
if (m($, this, Ml).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4347
4346
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4348
|
-
h(
|
|
4349
|
-
} else h(
|
|
4350
|
-
p(
|
|
4347
|
+
h(rl, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, h(rl, this).style.opacity = "1";
|
|
4348
|
+
} else h(rl, this).style.opacity = "0";
|
|
4349
|
+
p(cl, this, null);
|
|
4351
4350
|
}));
|
|
4352
4351
|
}
|
|
4353
|
-
}), f(this,
|
|
4354
|
-
if (e.pointerId === h(
|
|
4352
|
+
}), f(this, ml, (e) => {
|
|
4353
|
+
if (e.pointerId === h(ll, this)) {
|
|
4355
4354
|
try {
|
|
4356
4355
|
this.releasePointerCapture(e.pointerId);
|
|
4357
4356
|
} catch (e) {}
|
|
4358
|
-
p(
|
|
4357
|
+
p(sl, this, !1), p(ll, this, null), e.pointerType !== "mouse" && (h(nl, this).style.opacity = "0"), h(dl, this) && m($, this, Fl).call(this) && (p(ul, this, !1), p(dl, this, !1));
|
|
4359
4358
|
}
|
|
4360
|
-
}), f(this,
|
|
4361
|
-
this.duration && !m($, this,
|
|
4362
|
-
}), f(this,
|
|
4363
|
-
h(
|
|
4364
|
-
}), f(this,
|
|
4365
|
-
if (m($, this,
|
|
4366
|
-
let t = m($, this,
|
|
4359
|
+
}), f(this, hl, () => {
|
|
4360
|
+
this.duration && !m($, this, Sl).call(this) && (h(nl, this).style.opacity = "1");
|
|
4361
|
+
}), f(this, gl, () => {
|
|
4362
|
+
h(nl, this).style.opacity = "0", h(rl, this).style.opacity = "0";
|
|
4363
|
+
}), f(this, _l, (e) => {
|
|
4364
|
+
if (m($, this, Sl).call(this) || !h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this))) return;
|
|
4365
|
+
let t = m($, this, yl).call(this);
|
|
4367
4366
|
if (t <= 0) return;
|
|
4368
4367
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4369
4368
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4371,46 +4370,46 @@ var Q = /* @__PURE__ */ new WeakMap(), al = /* @__PURE__ */ new WeakMap(), ol =
|
|
|
4371
4370
|
r = Math.max(0, n - 5);
|
|
4372
4371
|
break;
|
|
4373
4372
|
case "ArrowRight":
|
|
4374
|
-
if (m($, this,
|
|
4373
|
+
if (m($, this, Fl).call(this)) return;
|
|
4375
4374
|
r = Math.min(t, n + 5);
|
|
4376
4375
|
break;
|
|
4377
4376
|
case "Home":
|
|
4378
4377
|
r = 0;
|
|
4379
4378
|
break;
|
|
4380
4379
|
case "End":
|
|
4381
|
-
if (m($, this,
|
|
4380
|
+
if (m($, this, Fl).call(this)) return;
|
|
4382
4381
|
r = t;
|
|
4383
4382
|
break;
|
|
4384
4383
|
default: return;
|
|
4385
4384
|
}
|
|
4386
4385
|
let i = Math.min(r / t, 1);
|
|
4387
|
-
m($, this,
|
|
4388
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4386
|
+
m($, this, jl).call(this, i);
|
|
4387
|
+
}), (e = this.shadowRoot) == null || e.appendChild(tl.content.cloneNode(!0)), p(nl, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), p(rl, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), p(il, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), this.addEventListener("pointerdown", h(fl, this)), this.addEventListener("pointermove", h(pl, this)), this.addEventListener("pointerup", h(ml, this)), this.addEventListener("pointercancel", h(ml, this)), this.addEventListener("mouseenter", h(hl, this)), this.addEventListener("mouseleave", h(gl, this));
|
|
4389
4388
|
}
|
|
4390
4389
|
connectedCallback() {
|
|
4391
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), m($, this,
|
|
4390
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), m($, this, Ol).call(this), this.addEventListener("keydown", h(_l, this)), m($, this, Fl).call(this) && (this.range.value = "1", m($, this, Ol).call(this)), m($, this, Cl).call(this), m($, this, Tl).call(this);
|
|
4392
4391
|
}
|
|
4393
4392
|
disconnectedCallback() {
|
|
4394
|
-
super.disconnectedCallback(), m($, this,
|
|
4393
|
+
super.disconnectedCallback(), m($, this, El).call(this), this.removeEventListener("pointerdown", h(fl, this)), this.removeEventListener("pointermove", h(pl, this)), this.removeEventListener("pointerup", h(ml, this)), this.removeEventListener("pointercancel", h(ml, this)), this.removeEventListener("mouseenter", h(hl, this)), this.removeEventListener("mouseleave", h(gl, this)), this.removeEventListener("keydown", h(_l, this)), p(ll, this, null);
|
|
4395
4394
|
}
|
|
4396
4395
|
attributeChangedCallback(e, t, n) {
|
|
4397
4396
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4398
4397
|
case g.TIMESHIFT_POSITION:
|
|
4399
|
-
if (m($, this,
|
|
4400
|
-
h(
|
|
4398
|
+
if (m($, this, Fl).call(this)) {
|
|
4399
|
+
h(sl, this) ? p(dl, this, !0) : (p(ul, this, !1), p(dl, this, !1)), this.range.value = "1", m($, this, Ol).call(this);
|
|
4401
4400
|
return;
|
|
4402
4401
|
}
|
|
4403
4402
|
if (h(Q, this)) {
|
|
4404
|
-
p(
|
|
4403
|
+
p(dl, this, !1);
|
|
4405
4404
|
let e = Math.max(parseFloat(n) / h(Q, this), 0);
|
|
4406
|
-
this.range.value = e.toString(), m($, this,
|
|
4405
|
+
this.range.value = e.toString(), m($, this, Ol).call(this);
|
|
4407
4406
|
}
|
|
4408
4407
|
break;
|
|
4409
4408
|
case g.DURATION:
|
|
4410
|
-
p(Q, this, parseFloat(n) || 0), m($, this,
|
|
4409
|
+
p(Q, this, parseFloat(n) || 0), m($, this, Ol).call(this), m($, this, Cl).call(this), m($, this, Tl).call(this);
|
|
4411
4410
|
break;
|
|
4412
4411
|
case g.TIMELINE_MARKERS:
|
|
4413
|
-
p(
|
|
4412
|
+
p(al, this, Lr(n)), m($, this, Cl).call(this), m($, this, Tl).call(this);
|
|
4414
4413
|
break;
|
|
4415
4414
|
}
|
|
4416
4415
|
}
|
|
@@ -4428,54 +4427,54 @@ var Q = /* @__PURE__ */ new WeakMap(), al = /* @__PURE__ */ new WeakMap(), ol =
|
|
|
4428
4427
|
this.setAttribute(g.DURATION, e.toString());
|
|
4429
4428
|
}
|
|
4430
4429
|
};
|
|
4431
|
-
function
|
|
4430
|
+
function yl() {
|
|
4432
4431
|
return h(Q, this) ? h(Q, this) : 1;
|
|
4433
4432
|
}
|
|
4434
|
-
function
|
|
4433
|
+
function bl() {
|
|
4435
4434
|
let e = h(Q, this);
|
|
4436
4435
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4437
4436
|
}
|
|
4438
|
-
function
|
|
4439
|
-
return m($, this,
|
|
4437
|
+
function xl() {
|
|
4438
|
+
return m($, this, bl).call(this) !== void 0;
|
|
4440
4439
|
}
|
|
4441
|
-
function
|
|
4442
|
-
return h(
|
|
4440
|
+
function Sl() {
|
|
4441
|
+
return h(ul, this);
|
|
4443
4442
|
}
|
|
4444
|
-
function
|
|
4443
|
+
function Cl() {
|
|
4445
4444
|
var e;
|
|
4446
|
-
let t = Date.now(), n = (e = h(Q, this)) == null ? 0 : e, r = h(
|
|
4447
|
-
for (let e of h(
|
|
4448
|
-
let a =
|
|
4445
|
+
let t = Date.now(), n = (e = h(Q, this)) == null ? 0 : e, r = h(il, this).children, i = 0;
|
|
4446
|
+
for (let e of h(al, this)) {
|
|
4447
|
+
let a = Rr(e.time, t, n);
|
|
4449
4448
|
if (a === null) continue;
|
|
4450
4449
|
let o = r[i];
|
|
4451
|
-
o || (o = document.createElement("div"), o.className = "marker", h(
|
|
4450
|
+
o || (o = document.createElement("div"), o.className = "marker", h(il, this).appendChild(o)), o.style.left = `${a * 100}%`, o.dataset.label = e.label, e.type ? o.dataset.type = e.type : delete o.dataset.type, i++;
|
|
4452
4451
|
}
|
|
4453
|
-
for (; h(
|
|
4452
|
+
for (; h(il, this).children.length > i;) {
|
|
4454
4453
|
var a;
|
|
4455
|
-
(a = h(
|
|
4454
|
+
(a = h(il, this).lastElementChild) == null || a.remove();
|
|
4456
4455
|
}
|
|
4457
4456
|
}
|
|
4458
|
-
function
|
|
4459
|
-
let e = m($, this,
|
|
4457
|
+
function wl() {
|
|
4458
|
+
let e = m($, this, bl).call(this);
|
|
4460
4459
|
if (e === void 0) return !1;
|
|
4461
4460
|
let t = Date.now() - e * 1e3;
|
|
4462
|
-
return h(
|
|
4461
|
+
return h(al, this).some((e) => e.time >= t);
|
|
4463
4462
|
}
|
|
4464
|
-
function
|
|
4465
|
-
this.isConnected && m($, this,
|
|
4466
|
-
m($, this,
|
|
4467
|
-
},
|
|
4463
|
+
function Tl() {
|
|
4464
|
+
this.isConnected && m($, this, wl).call(this) ? h(ol, this) === null && p(ol, this, window.setInterval(() => {
|
|
4465
|
+
m($, this, Cl).call(this), m($, this, Tl).call(this);
|
|
4466
|
+
}, $c)) : m($, this, El).call(this);
|
|
4468
4467
|
}
|
|
4469
|
-
function
|
|
4470
|
-
h(
|
|
4468
|
+
function El() {
|
|
4469
|
+
h(ol, this) !== null && (window.clearInterval(h(ol, this)), p(ol, this, null));
|
|
4471
4470
|
}
|
|
4472
|
-
function
|
|
4473
|
-
if (h(
|
|
4471
|
+
function Dl(e) {
|
|
4472
|
+
if (h(al, this).length === 0 || !h(Q, this)) return null;
|
|
4474
4473
|
let t = this.getBoundingClientRect().width;
|
|
4475
4474
|
if (!t) return null;
|
|
4476
|
-
let n =
|
|
4477
|
-
for (let t of h(
|
|
4478
|
-
let a =
|
|
4475
|
+
let n = el / t, r = Date.now(), i = null;
|
|
4476
|
+
for (let t of h(al, this)) {
|
|
4477
|
+
let a = Rr(t.time, r, h(Q, this));
|
|
4479
4478
|
if (a === null) continue;
|
|
4480
4479
|
let o = Math.abs(a - e);
|
|
4481
4480
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4485,59 +4484,59 @@ function Al(e) {
|
|
|
4485
4484
|
}
|
|
4486
4485
|
return i;
|
|
4487
4486
|
}
|
|
4488
|
-
function
|
|
4489
|
-
let e = m($, this,
|
|
4490
|
-
!h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), h(
|
|
4487
|
+
function Ol() {
|
|
4488
|
+
let e = m($, this, yl).call(this);
|
|
4489
|
+
!h(Q, this) || h(Q, this) <= 0 || !Number.isFinite(h(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), h(sl, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${m($, this, Il).call(this, this.range.valueAsNumber * e)} of ${m($, this, Il).call(this, e)}`), !h(sl, this) && !m($, this, Sl).call(this) && m($, this, Pl).call(this, this.range.valueAsNumber));
|
|
4491
4490
|
}
|
|
4492
|
-
function
|
|
4491
|
+
function kl(e) {
|
|
4493
4492
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4494
4493
|
return Math.max(0, Math.min(1, n));
|
|
4495
4494
|
}
|
|
4496
|
-
function
|
|
4495
|
+
function Al(e) {
|
|
4497
4496
|
var t;
|
|
4498
|
-
let n = m($, this,
|
|
4499
|
-
m($, this,
|
|
4497
|
+
let n = m($, this, kl).call(this, e.clientX), r = m($, this, Dl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4498
|
+
m($, this, Ml).call(this, i, r), h(sl, this) || (h(nl, this).style.opacity = "1"), m($, this, jl).call(this, i);
|
|
4500
4499
|
}
|
|
4501
|
-
function
|
|
4502
|
-
if (m($, this,
|
|
4503
|
-
let t = e * m($, this,
|
|
4504
|
-
this.range.value = e.toString(), this.updateBar(), m($, this,
|
|
4500
|
+
function jl(e) {
|
|
4501
|
+
if (m($, this, Sl).call(this) || m($, this, Pl).call(this, e)) return;
|
|
4502
|
+
let t = e * m($, this, yl).call(this);
|
|
4503
|
+
this.range.value = e.toString(), this.updateBar(), m($, this, Nl).call(this, t);
|
|
4505
4504
|
}
|
|
4506
|
-
function
|
|
4505
|
+
function Ml(e, t) {
|
|
4507
4506
|
if (!h(Q, this) || !Number.isFinite(h(Q, this))) return;
|
|
4508
|
-
let n = e * h(Q, this), r = h(Q, this) - n, i = `-${m($, this,
|
|
4509
|
-
h(
|
|
4507
|
+
let n = e * h(Q, this), r = h(Q, this) - n, i = `-${m($, this, Il).call(this, r)}`;
|
|
4508
|
+
h(nl, this).textContent = t ? `${t.marker.label}: ${i}` : i, h(nl, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4510
4509
|
}
|
|
4511
|
-
function
|
|
4510
|
+
function Nl(e) {
|
|
4512
4511
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4513
4512
|
bubbles: !0,
|
|
4514
4513
|
composed: !0,
|
|
4515
4514
|
detail: e
|
|
4516
4515
|
}));
|
|
4517
4516
|
}
|
|
4518
|
-
function
|
|
4519
|
-
return h(
|
|
4517
|
+
function Pl(e) {
|
|
4518
|
+
return h(ul, this) || m($, this, Fl).call(this) || e < .999 ? !1 : (p(ul, this, !0), p(dl, this, !1), this.dispatchEvent(new CustomEvent(x.GO_LIVE, {
|
|
4520
4519
|
bubbles: !0,
|
|
4521
4520
|
composed: !0
|
|
4522
4521
|
})), !0);
|
|
4523
4522
|
}
|
|
4524
|
-
function
|
|
4523
|
+
function Fl() {
|
|
4525
4524
|
return !this.hasAttribute(g.TIMESHIFT_POSITION);
|
|
4526
4525
|
}
|
|
4527
|
-
function
|
|
4526
|
+
function Il(e) {
|
|
4528
4527
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4529
4528
|
return h(Q, this) && h(Q, this) >= 3600 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
4530
4529
|
}
|
|
4531
|
-
e(
|
|
4532
|
-
...
|
|
4530
|
+
e(vl, "observedAttributes", [
|
|
4531
|
+
...bi.observedAttributes,
|
|
4533
4532
|
g.TIMESHIFT_POSITION,
|
|
4534
4533
|
g.DURATION,
|
|
4535
4534
|
g.TIMELINE_MARKERS
|
|
4536
4535
|
]);
|
|
4537
4536
|
//#endregion
|
|
4538
4537
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4539
|
-
var
|
|
4540
|
-
|
|
4538
|
+
var Ll = document.createElement("template");
|
|
4539
|
+
Ll.innerHTML = `
|
|
4541
4540
|
<style>
|
|
4542
4541
|
:host {
|
|
4543
4542
|
display: var(--play-overlay-display);
|
|
@@ -4597,51 +4596,51 @@ Bl.innerHTML = `
|
|
|
4597
4596
|
</slot>
|
|
4598
4597
|
</slot>
|
|
4599
4598
|
`;
|
|
4600
|
-
var
|
|
4599
|
+
var Rl = /* @__PURE__ */ new WeakMap(), zl = /* @__PURE__ */ new WeakMap(), Bl = /* @__PURE__ */ new WeakMap(), Vl = /* @__PURE__ */ new WeakMap(), Hl = class extends HTMLElement {
|
|
4601
4600
|
constructor() {
|
|
4602
|
-
super(), f(this,
|
|
4601
|
+
super(), f(this, Rl, null), f(this, zl, () => {
|
|
4603
4602
|
this.dispatchEvent(new CustomEvent(x.REQUEST_USER_INPUT, {
|
|
4604
4603
|
bubbles: !0,
|
|
4605
4604
|
composed: !0
|
|
4606
4605
|
}));
|
|
4607
|
-
}), f(this,
|
|
4606
|
+
}), f(this, Bl, (e) => {
|
|
4608
4607
|
let { key: t } = e;
|
|
4609
4608
|
if (!this.keysUsed.includes(t)) {
|
|
4610
|
-
this.removeEventListener("keyup", h(
|
|
4609
|
+
this.removeEventListener("keyup", h(Bl, this));
|
|
4611
4610
|
return;
|
|
4612
4611
|
}
|
|
4613
4612
|
this.dispatchEvent(new CustomEvent(x.REQUEST_USER_INPUT, {
|
|
4614
4613
|
bubbles: !0,
|
|
4615
4614
|
composed: !0
|
|
4616
4615
|
}));
|
|
4617
|
-
}), f(this,
|
|
4616
|
+
}), f(this, Vl, (e) => {
|
|
4618
4617
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4619
4618
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4620
|
-
this.removeEventListener("keyup", h(
|
|
4619
|
+
this.removeEventListener("keyup", h(Bl, this));
|
|
4621
4620
|
return;
|
|
4622
4621
|
}
|
|
4623
|
-
this.addEventListener("keyup", h(
|
|
4624
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4622
|
+
this.addEventListener("keyup", h(Bl, this), { once: !0 });
|
|
4623
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Ll.content.cloneNode(!0));
|
|
4625
4624
|
}
|
|
4626
4625
|
get keysUsed() {
|
|
4627
4626
|
return ["Enter", " "];
|
|
4628
4627
|
}
|
|
4629
4628
|
connectedCallback() {
|
|
4630
4629
|
var e;
|
|
4631
|
-
p(
|
|
4630
|
+
p(Rl, this, this.closest("vindral-controller")), (e = h(Rl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4632
4631
|
}
|
|
4633
4632
|
enable() {
|
|
4634
|
-
this.addEventListener("click", h(
|
|
4633
|
+
this.addEventListener("click", h(zl, this)), this.addEventListener("keydown", h(Vl, this)), this.tabIndex = 0;
|
|
4635
4634
|
}
|
|
4636
4635
|
disable() {
|
|
4637
|
-
this.removeEventListener("click", h(
|
|
4636
|
+
this.removeEventListener("click", h(zl, this)), this.removeEventListener("keydown", h(Vl, this)), this.removeEventListener("keyup", h(Bl, this)), this.tabIndex = -1;
|
|
4638
4637
|
}
|
|
4639
4638
|
disconnectedCallback() {
|
|
4640
4639
|
var e;
|
|
4641
|
-
(e = h(
|
|
4640
|
+
(e = h(Rl, this)) == null || e.disconnectListener(this), this.disable();
|
|
4642
4641
|
}
|
|
4643
4642
|
};
|
|
4644
|
-
e(
|
|
4643
|
+
e(Hl, "observedAttributes", [
|
|
4645
4644
|
"hidden",
|
|
4646
4645
|
g.NEEDS_USER_INPUT_VIDEO,
|
|
4647
4646
|
g.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4649,68 +4648,68 @@ e(Gl, "observedAttributes", [
|
|
|
4649
4648
|
]);
|
|
4650
4649
|
//#endregion
|
|
4651
4650
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4652
|
-
var
|
|
4653
|
-
|
|
4654
|
-
var
|
|
4651
|
+
var Ul = document.createElement("template");
|
|
4652
|
+
Ul.innerHTML = "\n <style>\n :host {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n pointer-events: none;\n z-index: 1;\n }\n\n :host::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: -1;\n background-color: rgba(0, 0, 0, 0.3);\n background-image: var(--_backdrop-image, none);\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: contain;\n pointer-events: none;\n opacity: 0;\n transition: opacity 100ms;\n }\n\n :host([backdrop]:not([disable-backdrop]))::before {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host::before {\n transition: none;\n }\n }\n </style>\n\n <slot></slot>\n";
|
|
4653
|
+
var Wl = class extends HTMLElement {
|
|
4655
4654
|
constructor() {
|
|
4656
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4655
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Ul.content.cloneNode(!0));
|
|
4657
4656
|
}
|
|
4658
4657
|
attributeChangedCallback(e, t, n) {
|
|
4659
4658
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4660
4659
|
}
|
|
4661
4660
|
};
|
|
4662
|
-
e(
|
|
4661
|
+
e(Wl, "observedAttributes", [
|
|
4663
4662
|
"backdrop",
|
|
4664
4663
|
"poster",
|
|
4665
4664
|
"disable-backdrop"
|
|
4666
4665
|
]);
|
|
4667
4666
|
//#endregion
|
|
4668
4667
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4669
|
-
var
|
|
4670
|
-
|
|
4671
|
-
var
|
|
4668
|
+
var Gl = document.createElement("template");
|
|
4669
|
+
Gl.innerHTML = "\n <style>\n :host {\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 90%;\n color: var(--fg-strong);\n font-size: 20px;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n #title,\n #description {\n text-align: center;\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);\n margin: 0;\n }\n\n #title {\n margin-bottom: var(--padding-2);\n }\n\n @container (max-width: 600px) {\n :host {\n font-size: 15px;\n }\n }\n\n @container (max-width: 400px) {\n :host {\n font-size: 12px;\n }\n #title {\n margin-bottom: 0;\n }\n }\n\n @container (max-width: 150px) {\n :host {\n font-size: 10px;\n }\n #title,\n #description {\n font-size: 1.2em;\n margin: 0;\n }\n }\n </style>\n\n <h1 id=\"title\"></h1>\n <p id=\"description\"></p>\n";
|
|
4670
|
+
var Kl = /* @__PURE__ */ new WeakMap(), ql = /* @__PURE__ */ new WeakMap(), Jl = class extends HTMLElement {
|
|
4672
4671
|
constructor() {
|
|
4673
|
-
super(), f(this,
|
|
4672
|
+
super(), f(this, Kl, void 0), f(this, ql, void 0);
|
|
4674
4673
|
let e = this.attachShadow({ mode: "open" });
|
|
4675
|
-
e.appendChild(
|
|
4674
|
+
e.appendChild(Gl.content.cloneNode(!0)), p(Kl, this, e.querySelector("#title")), p(ql, this, e.querySelector("#description"));
|
|
4676
4675
|
}
|
|
4677
4676
|
connectedCallback() {
|
|
4678
4677
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4679
4678
|
}
|
|
4680
4679
|
attributeChangedCallback(e, t, n) {
|
|
4681
|
-
t !== n && (e === "title" ? h(
|
|
4680
|
+
t !== n && (e === "title" ? h(Kl, this).textContent = n : e === "description" && (h(ql, this).textContent = n));
|
|
4682
4681
|
}
|
|
4683
4682
|
};
|
|
4684
|
-
e(
|
|
4683
|
+
e(Jl, "observedAttributes", [
|
|
4685
4684
|
"title",
|
|
4686
4685
|
"description",
|
|
4687
4686
|
"hidden"
|
|
4688
4687
|
]);
|
|
4689
4688
|
//#endregion
|
|
4690
4689
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4691
|
-
var
|
|
4692
|
-
|
|
4693
|
-
var
|
|
4690
|
+
var Yl = document.createElement("template");
|
|
4691
|
+
Yl.innerHTML = "\n <style>\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n :host(:focus-visible) {\n outline: none;\n outline: 0;\n }\n\n :host(:focus-visible) svg {\n outline: 0;\n }\n\n :host(:where(:focus)) svg {\n box-shadow: none;\n outline: 0;\n }\n\n :host(:active) svg {\n scale: 0.9;\n }\n\n slot#play {\n color: var(--fg-strong);\n pointer-events: auto;\n cursor: pointer;\n }\n\n slot#play > svg {\n width: var(--play-overlay-icon-size);\n height: var(--play-overlay-icon-size);\n }\n </style>\n\n <slot id=\"play\" name=\"icon\">\n <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>\n</slot>\n";
|
|
4692
|
+
var Xl = /* @__PURE__ */ new WeakMap(), Zl = class extends HTMLElement {
|
|
4694
4693
|
constructor() {
|
|
4695
|
-
super(), f(this,
|
|
4694
|
+
super(), f(this, Xl, null), this.attachShadow({ mode: "open" }).appendChild(Yl.content.cloneNode(!0));
|
|
4696
4695
|
}
|
|
4697
4696
|
connectedCallback() {
|
|
4698
4697
|
var e;
|
|
4699
|
-
p(
|
|
4698
|
+
p(Xl, this, this.closest("vindral-controller")), (e = h(Xl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4700
4699
|
}
|
|
4701
4700
|
disconnectedCallback() {
|
|
4702
4701
|
var e;
|
|
4703
|
-
(e = h(
|
|
4702
|
+
(e = h(Xl, this)) == null || e.disconnectListener(this);
|
|
4704
4703
|
}
|
|
4705
4704
|
attributeChangedCallback(e, t, n) {
|
|
4706
4705
|
t !== n && e === "hidden" && !_(n) && this.focus();
|
|
4707
4706
|
}
|
|
4708
4707
|
};
|
|
4709
|
-
e(
|
|
4708
|
+
e(Zl, "observedAttributes", ["hidden"]);
|
|
4710
4709
|
//#endregion
|
|
4711
4710
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4712
|
-
var
|
|
4713
|
-
|
|
4711
|
+
var Ql, $l = "Volume", eu = document.createElement("template");
|
|
4712
|
+
eu.innerHTML = `
|
|
4714
4713
|
<style>
|
|
4715
4714
|
:host {
|
|
4716
4715
|
display: var(--volume-range-display);
|
|
@@ -4735,29 +4734,29 @@ ru.innerHTML = `
|
|
|
4735
4734
|
transition-delay: 0s;
|
|
4736
4735
|
}
|
|
4737
4736
|
</style>
|
|
4738
|
-
<span class="tooltip" aria-hidden="true">${
|
|
4737
|
+
<span class="tooltip" aria-hidden="true">${$l}</span>
|
|
4739
4738
|
`;
|
|
4740
|
-
var
|
|
4739
|
+
var tu = (e) => `${Math.round(e * 100)}%`, nu = /* @__PURE__ */ new WeakMap(), ru = /* @__PURE__ */ new WeakMap(), iu = /* @__PURE__ */ new WeakMap(), au = class extends bi {
|
|
4741
4740
|
constructor() {
|
|
4742
4741
|
var e, t;
|
|
4743
|
-
super(), f(this,
|
|
4742
|
+
super(), f(this, nu, void 0), f(this, ru, void 0), f(this, iu, () => {
|
|
4744
4743
|
let e = this.range.valueAsNumber;
|
|
4745
4744
|
this.dispatchEvent(new CustomEvent(x.SET_VOLUME, {
|
|
4746
4745
|
bubbles: !0,
|
|
4747
4746
|
composed: !0,
|
|
4748
4747
|
detail: e
|
|
4749
4748
|
}));
|
|
4750
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4749
|
+
}), (e = this.shadowRoot) == null || e.appendChild(eu.content.cloneNode(!0)), p(nu, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector(".tooltip"));
|
|
4751
4750
|
}
|
|
4752
4751
|
connectedCallback() {
|
|
4753
|
-
super.connectedCallback(), this.range.addEventListener("input", h(
|
|
4752
|
+
super.connectedCallback(), this.range.addEventListener("input", h(iu, this)), this.range.setAttribute("aria-label", $l), p(ru, this, De(this, h(nu, this)));
|
|
4754
4753
|
}
|
|
4755
4754
|
disconnectedCallback() {
|
|
4756
4755
|
var e;
|
|
4757
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", h(
|
|
4756
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", h(iu, this)), (e = h(ru, this)) == null || e.call(this);
|
|
4758
4757
|
}
|
|
4759
4758
|
attributeChangedCallback(e, t, n) {
|
|
4760
|
-
super.attributeChangedCallback(e, t, n), (e === g.MUTED || e === g.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4759
|
+
super.attributeChangedCallback(e, t, n), (e === g.MUTED || e === g.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", tu(this.range.valueAsNumber)), this.updateBar());
|
|
4761
4760
|
}
|
|
4762
4761
|
get volume() {
|
|
4763
4762
|
var e;
|
|
@@ -4767,15 +4766,15 @@ var iu = (e) => `${Math.round(e * 100)}%`, au = /* @__PURE__ */ new WeakMap(), o
|
|
|
4767
4766
|
return this.hasAttribute(g.MUTED);
|
|
4768
4767
|
}
|
|
4769
4768
|
};
|
|
4770
|
-
|
|
4771
|
-
...y(
|
|
4769
|
+
Ql = au, e(au, "observedAttributes", [
|
|
4770
|
+
...y(Ql, "observedAttributes", Ql),
|
|
4772
4771
|
g.MUTED,
|
|
4773
4772
|
g.VOLUME
|
|
4774
4773
|
]);
|
|
4775
4774
|
//#endregion
|
|
4776
4775
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4777
|
-
function
|
|
4778
|
-
customElements.define("vindral-controller",
|
|
4776
|
+
function ou() {
|
|
4777
|
+
customElements.define("vindral-controller", Ta), customElements.define("vindral-control-bar", Vn), customElements.define("vindral-advanced-rendition-menu", Ye), customElements.define("vindral-advanced-rendition-menu-list", ct), customElements.define("vindral-play-button", os), customElements.define("vindral-mute-button", es), customElements.define("vindral-buffering-overlay", Ft), customElements.define("vindral-scroll-overlay", Rc), customElements.define("vindral-play-overlay", Zl), customElements.define("vindral-user-input-play-overlay", Hl), customElements.define("vindral-fullscreen-button", go), customElements.define("vindral-rendition-levels-menu", uc), customElements.define("vindral-rendition-levels-menu-list", yc), customElements.define("vindral-channel-grid-button", Pn), customElements.define("vindral-channel-grid", on), customElements.define("vindral-channel-grid-item", Yt), customElements.define("vindral-pip-button", rs), customElements.define("vindral-airplay-button", Ot), customElements.define("vindral-cast-button", zt), customElements.define("vindral-cast-overlay", Gt), customElements.define("vindral-buffering-icon", Mt), customElements.define("vindral-language-menu", xo), customElements.define("vindral-language-menu-list", Fo), customElements.define("vindral-center-overlay", Wl), customElements.define("vindral-message", Jl), customElements.define("vindral-volume-range", au), customElements.define("vindral-poster-overlay", nc), customElements.define("vindral-player", Bs), customElements.define("vindral-seek-bar", vl), customElements.define("vindral-live-button", Zo);
|
|
4779
4778
|
}
|
|
4780
4779
|
//#endregion
|
|
4781
|
-
export {
|
|
4780
|
+
export { ou as t };
|