@vindral/web-sdk 4.5.1-6-g47571100 → 4.5.1-8-g4635d6fd8
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/{hrmB1QcM.js → BIydOAFq.js} +773 -763
- package/{BsJtUY1Z.js → COQrk5dZ.js} +1 -1
- package/{C01DcfYu.js → CQo-WbvS.js} +41 -36
- package/{DvjDOQ6E.js → DNren1CH.js} +2806 -2808
- package/core.d.ts +3 -1
- package/core.js +3 -3
- package/legacy.d.ts +3 -1
- package/legacy.es.js +2269 -2266
- package/legacy.umd.js +16 -16
- package/package.json +1 -1
- package/player.d.ts +2 -1
- package/player.js +2 -2
- package/react.d.ts +2 -1
- package/vindral-player-component.js +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as e, t } from "./BsfwXDui.js";
|
|
2
|
-
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se, y as ce } from "./
|
|
3
|
-
import {
|
|
2
|
+
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as ee, n as d, o as te, p as ne, r as re, s as ie, t as ae, u as oe, v as se, y as ce } from "./DNren1CH.js";
|
|
3
|
+
import { P as le } from "./CQo-WbvS.js";
|
|
4
4
|
import { a as f, i as p, n as m, r as h, t as g } from "./B7hT-BKr.js";
|
|
5
5
|
import { c as ue, n as de, t as fe } from "./DeYmk5AL.js";
|
|
6
6
|
import { t as pe } from "./FYiEDBC4.js";
|
|
@@ -1073,25 +1073,33 @@ function Hn(e) {
|
|
|
1073
1073
|
return [];
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
var Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = class {
|
|
1076
|
+
var Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = class {
|
|
1077
1077
|
constructor(t) {
|
|
1078
|
-
f(this, Un, void 0), f(this, Wn, null), f(this, Gn, null), e(this, "observe", (e) => {
|
|
1079
|
-
|
|
1078
|
+
f(this, Un, void 0), f(this, Wn, null), f(this, Gn, null), f(this, Kn, null), f(this, qn, !0), e(this, "observe", (e) => {
|
|
1079
|
+
m(Kn, this) || (h(Kn, this, e), window.ResizeObserver && (h(Wn, this, new ResizeObserver(() => m(Jn, this).call(this))), m(Wn, this).observe(e)));
|
|
1080
|
+
}), e(this, "setEnabled", (e) => {
|
|
1081
|
+
if (m(qn, this) !== e) {
|
|
1082
|
+
if (h(qn, this, e), h(Gn, this, null), e) {
|
|
1083
|
+
m(Jn, this).call(this);
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
for (let e of m(Un, this)) e.style.removeProperty("font-size");
|
|
1087
|
+
}
|
|
1080
1088
|
}), e(this, "unload", () => {
|
|
1081
1089
|
var e;
|
|
1082
|
-
(e = m(Wn, this)) == null || e.disconnect(), h(Wn, this, null);
|
|
1083
|
-
}), f(this,
|
|
1084
|
-
if (m(Un, this).length === 0) return;
|
|
1085
|
-
let { clientWidth:
|
|
1086
|
-
if (
|
|
1087
|
-
let
|
|
1088
|
-
if (
|
|
1089
|
-
h(Gn, this,
|
|
1090
|
-
for (let e of m(Un, this)) e.style.fontSize =
|
|
1090
|
+
(e = m(Wn, this)) == null || e.disconnect(), h(Wn, this, null), h(Kn, this, null), h(qn, this, !0);
|
|
1091
|
+
}), f(this, Jn, () => {
|
|
1092
|
+
if (!m(qn, this) || m(Un, this).length === 0 || !m(Kn, this)) return;
|
|
1093
|
+
let { clientWidth: e, clientHeight: t } = m(Kn, this);
|
|
1094
|
+
if (e <= 0 || t <= 0) return;
|
|
1095
|
+
let n = d(e, t, { max: Bn });
|
|
1096
|
+
if (n !== m(Gn, this)) {
|
|
1097
|
+
h(Gn, this, n);
|
|
1098
|
+
for (let e of m(Un, this)) e.style.fontSize = n;
|
|
1091
1099
|
}
|
|
1092
1100
|
}), h(Un, this, Hn(t));
|
|
1093
1101
|
}
|
|
1094
|
-
},
|
|
1102
|
+
}, Xn = class n extends pe {
|
|
1095
1103
|
constructor(r) {
|
|
1096
1104
|
var i;
|
|
1097
1105
|
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1122,35 +1130,35 @@ var Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn =
|
|
|
1122
1130
|
return () => Promise.resolve();
|
|
1123
1131
|
}
|
|
1124
1132
|
};
|
|
1125
|
-
e(
|
|
1133
|
+
e(Xn, "isFullscreenApiSupported", (e) => oe(e));
|
|
1126
1134
|
//#endregion
|
|
1127
1135
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1128
|
-
var
|
|
1136
|
+
var Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), nr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ir = /* @__PURE__ */ new WeakMap(), ar = class extends pe {
|
|
1129
1137
|
constructor(n) {
|
|
1130
1138
|
var o;
|
|
1131
1139
|
super(), o = this, e(this, "unload", () => {
|
|
1132
|
-
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), ne(this.element, !1);
|
|
1140
|
+
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), this.element.removeEventListener("webkitpresentationmodechanged", this.onChange), ne(this.element, !1);
|
|
1133
1141
|
}), e(this, "request", t(function* () {
|
|
1134
1142
|
try {
|
|
1135
|
-
return yield m(
|
|
1143
|
+
return yield m(Zn, o).call(o);
|
|
1136
1144
|
} catch (e) {
|
|
1137
1145
|
throw o.onChange(), e;
|
|
1138
1146
|
}
|
|
1139
1147
|
})), e(this, "exit", t(function* () {
|
|
1140
1148
|
try {
|
|
1141
|
-
return yield m(
|
|
1149
|
+
return yield m(Qn, o).call(o);
|
|
1142
1150
|
} catch (e) {
|
|
1143
1151
|
throw o.onChange(), e;
|
|
1144
1152
|
}
|
|
1145
1153
|
})), e(this, "onChange", () => {
|
|
1146
1154
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1147
|
-
}), e(this, "isPictureInPictureActive", () =>
|
|
1155
|
+
}), e(this, "isPictureInPictureActive", () => this.isWebkitPresentationModeActive() || m(nr, this).call(this)), e(this, "isSupported", () => m(ir, this).call(this) || m(tr, this).call(this)), f(this, Zn, () => m(tr, this).call(this) ? m($n, this).call(this) : m(ir, this).call(this) ? m(rr, this).call(this, "picture-in-picture") : Promise.resolve()), f(this, Qn, () => this.isPictureInPictureActive() ? m(tr, this).call(this) ? m(er, this).call(this) : m(ir, this).call(this) ? m(rr, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), f(this, $n, t(function* () {
|
|
1148
1156
|
let e = ie(o.element);
|
|
1149
1157
|
e && (yield e());
|
|
1150
|
-
})), f(this,
|
|
1158
|
+
})), f(this, er, t(function* () {
|
|
1151
1159
|
let e = r();
|
|
1152
1160
|
e && (yield e());
|
|
1153
|
-
})), f(this,
|
|
1161
|
+
})), f(this, tr, () => c(this.element)), f(this, nr, () => a()), e(this, "isWebkitPresentationModeActive", () => i(this.element) === "picture-in-picture"), f(this, rr, (e) => (s(this.element) && ee(this.element, e), Promise.resolve())), f(this, ir, () => s(this.element)), this.element = n, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), this.element.addEventListener("webkitpresentationmodechanged", this.onChange), ne(this.element, !0);
|
|
1154
1162
|
}
|
|
1155
1163
|
get videoElement() {
|
|
1156
1164
|
return this.element;
|
|
@@ -1158,7 +1166,7 @@ var Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn =
|
|
|
1158
1166
|
};
|
|
1159
1167
|
//#endregion
|
|
1160
1168
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1161
|
-
function
|
|
1169
|
+
function or(e, t) {
|
|
1162
1170
|
let n = e.split("\n").map((e) => e.trim());
|
|
1163
1171
|
for (let e = 0; e < n.length; e++) {
|
|
1164
1172
|
var r;
|
|
@@ -1170,7 +1178,7 @@ function ar(e, t) {
|
|
|
1170
1178
|
}
|
|
1171
1179
|
//#endregion
|
|
1172
1180
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1173
|
-
function
|
|
1181
|
+
function sr(e) {
|
|
1174
1182
|
let t = 0;
|
|
1175
1183
|
for (let n of e.split("\n")) {
|
|
1176
1184
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1180,90 +1188,90 @@ function or(e) {
|
|
|
1180
1188
|
}
|
|
1181
1189
|
//#endregion
|
|
1182
1190
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1183
|
-
var
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1191
|
+
var cr = 5e3;
|
|
1192
|
+
function lr(e, t) {
|
|
1193
|
+
return ur.apply(this, arguments);
|
|
1186
1194
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1189
|
-
let { signal: r, timeoutMs: i =
|
|
1195
|
+
function ur() {
|
|
1196
|
+
return ur = t(function* (e, t, n = {}) {
|
|
1197
|
+
let { signal: r, timeoutMs: i = cr } = n, a = new AbortController(), o = () => a.abort();
|
|
1190
1198
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1191
1199
|
let s = setTimeout(o, i);
|
|
1192
1200
|
try {
|
|
1193
1201
|
let n = yield fetch(e, { signal: a.signal });
|
|
1194
1202
|
if (!n.ok) return;
|
|
1195
|
-
let r =
|
|
1203
|
+
let r = or(yield n.text(), e);
|
|
1196
1204
|
if (!r) return;
|
|
1197
1205
|
let i = new URL(r);
|
|
1198
1206
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1199
1207
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1200
|
-
return o.ok ?
|
|
1208
|
+
return o.ok ? sr(yield o.text()) : void 0;
|
|
1201
1209
|
} catch (e) {
|
|
1202
1210
|
return;
|
|
1203
1211
|
} finally {
|
|
1204
1212
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1205
1213
|
}
|
|
1206
|
-
}),
|
|
1214
|
+
}), ur.apply(this, arguments);
|
|
1207
1215
|
}
|
|
1208
1216
|
//#endregion
|
|
1209
1217
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1210
|
-
var
|
|
1211
|
-
constructor({ onChange: e, probe: t =
|
|
1212
|
-
g(this, A), f(this,
|
|
1218
|
+
var dr = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), 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(), A = /* @__PURE__ */ new WeakSet(), xr = class {
|
|
1219
|
+
constructor({ onChange: e, probe: t = lr, now: n = () => performance.now() }) {
|
|
1220
|
+
g(this, A), f(this, dr, void 0), f(this, fr, void 0), f(this, pr, void 0), f(this, mr, void 0), f(this, hr, !0), f(this, gr, !1), f(this, _r, 0), f(this, vr, 0), f(this, yr, 0), f(this, br, null), h(dr, this, e), h(fr, this, t), h(pr, this, n);
|
|
1213
1221
|
}
|
|
1214
1222
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1215
|
-
if (p(A, this,
|
|
1216
|
-
m(
|
|
1223
|
+
if (p(A, this, Sr).call(this), !(n > 0)) {
|
|
1224
|
+
m(dr, this).call(this, n);
|
|
1217
1225
|
return;
|
|
1218
1226
|
}
|
|
1219
1227
|
let r = new AbortController();
|
|
1220
|
-
h(
|
|
1228
|
+
h(mr, this, r);
|
|
1221
1229
|
let { signal: i } = r;
|
|
1222
|
-
m(
|
|
1230
|
+
m(fr, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1223
1231
|
if (!i.aborted) {
|
|
1224
1232
|
if (e === void 0) {
|
|
1225
|
-
m(
|
|
1233
|
+
m(dr, this).call(this, n);
|
|
1226
1234
|
return;
|
|
1227
1235
|
}
|
|
1228
|
-
h(
|
|
1236
|
+
h(vr, this, n), h(_r, this, Math.min(Math.max(e, 0), n)), h(yr, this, m(pr, this).call(this)), h(gr, this, !0), p(A, this, Cr).call(this), m(hr, this) && p(A, this, wr).call(this);
|
|
1229
1237
|
}
|
|
1230
1238
|
});
|
|
1231
1239
|
}
|
|
1232
1240
|
setLive(e) {
|
|
1233
|
-
h(
|
|
1241
|
+
h(hr, this, e), !(!m(mr, this) || e) && (p(A, this, Tr).call(this), p(A, this, Cr).call(this));
|
|
1234
1242
|
}
|
|
1235
1243
|
applyLoadedDuration(e) {
|
|
1236
|
-
p(A, this,
|
|
1244
|
+
p(A, this, Sr).call(this), m(dr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1237
1245
|
}
|
|
1238
1246
|
stop() {
|
|
1239
|
-
p(A, this,
|
|
1247
|
+
p(A, this, Sr).call(this);
|
|
1240
1248
|
}
|
|
1241
1249
|
};
|
|
1242
|
-
function xr() {
|
|
1243
|
-
var e;
|
|
1244
|
-
(e = m(pr, this)) == null || e.abort(), h(pr, this, void 0), p(A, this, wr).call(this), h(hr, this, !1);
|
|
1245
|
-
}
|
|
1246
1250
|
function Sr() {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
m(ur, this).call(this, t), t >= m(_r, this) && p(A, this, wr).call(this);
|
|
1251
|
+
var e;
|
|
1252
|
+
(e = m(mr, this)) == null || e.abort(), h(mr, this, void 0), p(A, this, Tr).call(this), h(gr, this, !1);
|
|
1250
1253
|
}
|
|
1251
1254
|
function Cr() {
|
|
1252
|
-
|
|
1255
|
+
if (!m(gr, this)) return;
|
|
1256
|
+
let e = m(_r, this) + Math.max(0, (m(pr, this).call(this) - m(yr, this)) / 1e3), t = Math.min(m(vr, this), e);
|
|
1257
|
+
m(dr, this).call(this, t), t >= m(vr, this) && p(A, this, Tr).call(this);
|
|
1253
1258
|
}
|
|
1254
1259
|
function wr() {
|
|
1255
|
-
m(
|
|
1260
|
+
m(br, this) === null && h(br, this, window.setInterval(() => p(A, this, Cr).call(this), 1e3));
|
|
1261
|
+
}
|
|
1262
|
+
function Tr() {
|
|
1263
|
+
m(br, this) !== null && (clearInterval(m(br, this)), h(br, this, null));
|
|
1256
1264
|
}
|
|
1257
1265
|
//#endregion
|
|
1258
1266
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1259
|
-
var
|
|
1267
|
+
var Er = (e) => {
|
|
1260
1268
|
var t;
|
|
1261
1269
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1262
1270
|
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) => Ee.includes(e)) : [];
|
|
1263
1271
|
};
|
|
1264
1272
|
//#endregion
|
|
1265
1273
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1266
|
-
function
|
|
1274
|
+
function Dr(e) {
|
|
1267
1275
|
if (typeof e != "string") return NaN;
|
|
1268
1276
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1269
1277
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1279,37 +1287,37 @@ function Er(e) {
|
|
|
1279
1287
|
}
|
|
1280
1288
|
//#endregion
|
|
1281
1289
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1284
|
-
},
|
|
1290
|
+
var Or = re.get().createContext("TimelineMarkers"), kr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Ar = (e) => {
|
|
1291
|
+
Or.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.`);
|
|
1292
|
+
}, jr = (e) => {
|
|
1285
1293
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1286
1294
|
if (typeof e == "string") {
|
|
1287
1295
|
let t = Date.parse(e);
|
|
1288
|
-
return Number.isNaN(t) ? null : (
|
|
1296
|
+
return Number.isNaN(t) ? null : (kr.test(e) && Ar(e), t);
|
|
1289
1297
|
}
|
|
1290
1298
|
if (e instanceof Date) {
|
|
1291
1299
|
let t = e.getTime();
|
|
1292
1300
|
return Number.isNaN(t) ? null : t;
|
|
1293
1301
|
}
|
|
1294
1302
|
return null;
|
|
1295
|
-
},
|
|
1303
|
+
}, Mr = (e) => {
|
|
1296
1304
|
if (typeof e != "object" || !e) return null;
|
|
1297
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1305
|
+
let { time: t, label: n, type: r } = e, i = jr(t);
|
|
1298
1306
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1299
1307
|
let a = {
|
|
1300
1308
|
time: i,
|
|
1301
1309
|
label: n
|
|
1302
1310
|
};
|
|
1303
1311
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1304
|
-
},
|
|
1312
|
+
}, Nr = (e) => {
|
|
1305
1313
|
if (!Array.isArray(e)) return [];
|
|
1306
|
-
let t = e.map(
|
|
1307
|
-
return n > 0 &&
|
|
1308
|
-
},
|
|
1314
|
+
let t = e.map(Mr).filter((e) => e !== null), n = e.length - t.length;
|
|
1315
|
+
return n > 0 && Or.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;
|
|
1316
|
+
}, Pr = (e) => e ? Nr(ue(e)) : [], Fr = (e, t, n) => {
|
|
1309
1317
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1310
1318
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1311
1319
|
return r < 0 || r > 1 ? null : r;
|
|
1312
|
-
},
|
|
1320
|
+
}, Ir = class extends pe {
|
|
1313
1321
|
constructor(t) {
|
|
1314
1322
|
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", () => {
|
|
1315
1323
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1361,18 +1369,18 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1361
1369
|
get isMediaElementSource() {
|
|
1362
1370
|
return this.source instanceof HTMLMediaElement;
|
|
1363
1371
|
}
|
|
1364
|
-
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(),
|
|
1372
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), zr = /* @__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(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Yr = /* @__PURE__ */ new WeakMap(), Xr = class {
|
|
1365
1373
|
constructor(t, n) {
|
|
1366
|
-
g(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this,
|
|
1367
|
-
m(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(j, this).paused && p(F, this,
|
|
1368
|
-
}), f(this,
|
|
1369
|
-
m(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(F, this,
|
|
1370
|
-
}), h(M, this, t), h(
|
|
1374
|
+
g(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this, Lr, void 0), f(this, Rr, void 0), e(this, "userPaused", !0), f(this, zr, void 0), f(this, Br, void 0), f(this, Vr, !1), f(this, Hr, !1), f(this, Ur, null), f(this, Wr, 0), f(this, Gr, !1), f(this, P, re.get().createContext("HlsPlayer")), f(this, Kr, () => p(F, this, li).call(this, !0)), f(this, qr, () => p(F, this, li).call(this, !1)), f(this, Jr, () => {
|
|
1375
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(j, this).paused && p(F, this, li).call(this, !1);
|
|
1376
|
+
}), f(this, Yr, () => {
|
|
1377
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(F, this, li).call(this, !1);
|
|
1378
|
+
}), h(M, this, t), h(Br, this, n == null ? void 0 : n.maxVideoBitRate), m(M, this).style.position = "absolute", m(M, this).style.top = "0", m(M, this).style.left = "0", m(M, this).style.width = "100%", m(M, this).style.height = "100%", m(M, this).style.opacity = "0", m(M, this).style.pointerEvents = "none", m(M, this).style.transition = "opacity 0.12s linear";
|
|
1371
1379
|
let r = document.createElement("video");
|
|
1372
|
-
h(j, this, r), t.appendChild(m(j, this)), m(j, this).style.width = "100%", m(j, this).style.height = "100%", m(j, this).setAttribute("playsinline", ""), m(j, this).setAttribute("webkit-playsinline", ""), m(j, this).setAttribute("preload", "metadata"), p(F, this,
|
|
1380
|
+
h(j, this, r), t.appendChild(m(j, this)), m(j, this).style.width = "100%", m(j, this).style.height = "100%", m(j, this).setAttribute("playsinline", ""), m(j, this).setAttribute("webkit-playsinline", ""), m(j, this).setAttribute("preload", "metadata"), p(F, this, si).call(this), h(Gr, this, m(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);
|
|
1373
1381
|
}
|
|
1374
1382
|
hide() {
|
|
1375
|
-
h(
|
|
1383
|
+
h(Vr, this, !0), h(Hr, this, !1), m(M, this).classList.remove("active"), m(M, this).style.opacity = "0", m(M, this).style.pointerEvents = "none", h(Ur, this, null);
|
|
1376
1384
|
}
|
|
1377
1385
|
play() {
|
|
1378
1386
|
var e = this;
|
|
@@ -1388,17 +1396,17 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1388
1396
|
var n = this;
|
|
1389
1397
|
return t(function* () {
|
|
1390
1398
|
if (m(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1391
|
-
h(
|
|
1399
|
+
h(Ur, n, null);
|
|
1392
1400
|
return;
|
|
1393
1401
|
}
|
|
1394
|
-
if (h(
|
|
1395
|
-
else return p(F, n,
|
|
1402
|
+
if (h(Ur, n, e.time > .1 ? e.time : null), n.isActive() && m(N, n)) p(F, n, ti).call(n, e.time);
|
|
1403
|
+
else return p(F, n, ni).call(n, e);
|
|
1396
1404
|
})();
|
|
1397
1405
|
}
|
|
1398
1406
|
shouldIgnoreTimeupdate() {
|
|
1399
|
-
if (m(
|
|
1407
|
+
if (m(Ur, this) == null) return !1;
|
|
1400
1408
|
let e = m(j, this).currentTime;
|
|
1401
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (h(
|
|
1409
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (h(Ur, this, null), !1);
|
|
1402
1410
|
}
|
|
1403
1411
|
isPipSupported() {
|
|
1404
1412
|
return "pictureInPictureEnabled" in document && !m(j, this).disablePictureInPicture;
|
|
@@ -1413,7 +1421,7 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1413
1421
|
return m(M, this).style.opacity === "1" || m(M, this).classList.contains("active");
|
|
1414
1422
|
}
|
|
1415
1423
|
cleanup() {
|
|
1416
|
-
p(F, this,
|
|
1424
|
+
p(F, this, ci).call(this), p(F, this, ei).call(this), m(zr, this) && (cancelAnimationFrame(m(zr, this)), h(zr, this, void 0)), h(Ur, this, null), m(j, this).remove();
|
|
1417
1425
|
}
|
|
1418
1426
|
addEventListener(e, t) {
|
|
1419
1427
|
m(j, this).addEventListener(e, t);
|
|
@@ -1425,7 +1433,7 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1425
1433
|
return m(j, this).dispatchEvent(e);
|
|
1426
1434
|
}
|
|
1427
1435
|
setTimeshiftUrl(e) {
|
|
1428
|
-
m(
|
|
1436
|
+
m(Rr, this) !== e && (m(P, this).debug("HLSPlayer Setting timeshift URL to", e), h(Rr, this, e));
|
|
1429
1437
|
}
|
|
1430
1438
|
get videoElement() {
|
|
1431
1439
|
return m(j, this);
|
|
@@ -1443,10 +1451,10 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1443
1451
|
return m(j, this).volume;
|
|
1444
1452
|
}
|
|
1445
1453
|
set muted(e) {
|
|
1446
|
-
h(
|
|
1454
|
+
h(Gr, this, e), m(j, this).muted = e;
|
|
1447
1455
|
}
|
|
1448
1456
|
get muted() {
|
|
1449
|
-
return m(
|
|
1457
|
+
return m(Gr, this);
|
|
1450
1458
|
}
|
|
1451
1459
|
set currentTime(e) {
|
|
1452
1460
|
m(j, this).currentTime = e;
|
|
@@ -1461,17 +1469,17 @@ var Dr = re.get().createContext("TimelineMarkers"), Or = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1461
1469
|
return m(j, this).duration;
|
|
1462
1470
|
}
|
|
1463
1471
|
get maxVideoBitRate() {
|
|
1464
|
-
return m(
|
|
1472
|
+
return m(Br, this);
|
|
1465
1473
|
}
|
|
1466
1474
|
set maxVideoBitRate(e) {
|
|
1467
|
-
h(
|
|
1475
|
+
h(Br, this, e), e !== void 0 && m(N, this) && p(F, this, Qr).call(this, e);
|
|
1468
1476
|
}
|
|
1469
1477
|
};
|
|
1470
|
-
function
|
|
1478
|
+
function Zr() {
|
|
1471
1479
|
var e = this;
|
|
1472
1480
|
return t(function* () {
|
|
1473
1481
|
let { default: t } = yield import("./Ddby8xU_.js");
|
|
1474
|
-
if (h(
|
|
1482
|
+
if (h(Lr, e, t), !t.isSupported()) {
|
|
1475
1483
|
m(P, e).warn("HLS not supported");
|
|
1476
1484
|
return;
|
|
1477
1485
|
}
|
|
@@ -1495,17 +1503,17 @@ function Xr() {
|
|
|
1495
1503
|
testBandwidth: !1,
|
|
1496
1504
|
debug: !1
|
|
1497
1505
|
})), m(N, e).attachMedia(m(j, e)), m(N, e).on(t.Events.MEDIA_ATTACHED, () => m(P, e).debug("[HLS] media attached")), m(N, e).on(t.Events.MANIFEST_PARSED, () => m(P, e).debug("[HLS] manifest parsed")), m(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1498
|
-
m(P, e).error("[HLS] error:", n), n.fatal && p(F, e,
|
|
1506
|
+
m(P, e).error("[HLS] error:", n), n.fatal && p(F, e, $r).call(e, n);
|
|
1499
1507
|
}), m(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1500
1508
|
var t;
|
|
1501
|
-
!m(
|
|
1509
|
+
!m(Br, e) || ((t = m(N, e)) == null ? void 0 : t.levels.length) === 0 || p(F, e, Qr).call(e, m(Br, e));
|
|
1502
1510
|
}), m(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1503
1511
|
var t, n;
|
|
1504
1512
|
m(P, e).debug("Level switched:", (t = m(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = m(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1505
1513
|
});
|
|
1506
1514
|
})();
|
|
1507
1515
|
}
|
|
1508
|
-
function
|
|
1516
|
+
function Qr(e) {
|
|
1509
1517
|
if (!m(N, this)) {
|
|
1510
1518
|
m(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1511
1519
|
return;
|
|
@@ -1521,12 +1529,12 @@ function Zr(e) {
|
|
|
1521
1529
|
let r = m(N, this).currentLevel;
|
|
1522
1530
|
m(N, this).autoLevelCapping = t, r !== t && (m(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), m(N, this).currentLevel = t);
|
|
1523
1531
|
}
|
|
1524
|
-
function
|
|
1525
|
-
if (!m(
|
|
1532
|
+
function $r(e) {
|
|
1533
|
+
if (!m(Lr, this)) {
|
|
1526
1534
|
m(P, this).error("Hls class not available for error handling");
|
|
1527
1535
|
return;
|
|
1528
1536
|
}
|
|
1529
|
-
let t = m(
|
|
1537
|
+
let t = m(Lr, this);
|
|
1530
1538
|
switch (e.type) {
|
|
1531
1539
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1532
1540
|
var n;
|
|
@@ -1537,39 +1545,39 @@ function Qr(e) {
|
|
|
1537
1545
|
m(P, this).warn("[HLS] media error -> recoverMediaError"), (r = m(N, this)) == null || r.recoverMediaError();
|
|
1538
1546
|
break;
|
|
1539
1547
|
default:
|
|
1540
|
-
m(P, this).error("[HLS] fatal -> destroy"), p(F, this,
|
|
1548
|
+
m(P, this).error("[HLS] fatal -> destroy"), p(F, this, ei).call(this);
|
|
1541
1549
|
break;
|
|
1542
1550
|
}
|
|
1543
1551
|
}
|
|
1544
|
-
function
|
|
1552
|
+
function ei() {
|
|
1545
1553
|
m(N, this) && (m(N, this).destroy(), h(N, this, void 0));
|
|
1546
1554
|
}
|
|
1547
|
-
function
|
|
1555
|
+
function ti(e) {
|
|
1548
1556
|
if (!Number.isFinite(e)) {
|
|
1549
|
-
h(
|
|
1557
|
+
h(Ur, this, null);
|
|
1550
1558
|
return;
|
|
1551
1559
|
}
|
|
1552
|
-
let t = p(F, this,
|
|
1553
|
-
h(
|
|
1560
|
+
let t = p(F, this, oi).call(this, m(j, this), e);
|
|
1561
|
+
h(Ur, this, t > .1 ? t : null), m(zr, this) && cancelAnimationFrame(m(zr, this)), h(zr, this, requestAnimationFrame(() => {
|
|
1554
1562
|
m(j, this).currentTime = t;
|
|
1555
1563
|
}));
|
|
1556
1564
|
}
|
|
1557
|
-
function
|
|
1565
|
+
function ni(e) {
|
|
1558
1566
|
var n = this;
|
|
1559
1567
|
return t(function* () {
|
|
1560
1568
|
var t;
|
|
1561
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(
|
|
1562
|
-
if (!m(
|
|
1569
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(Wr, n, (t = m(Wr, n), ++t));
|
|
1570
|
+
if (!m(Rr, n)) {
|
|
1563
1571
|
m(P, n).warn("No timeshift URL");
|
|
1564
1572
|
return;
|
|
1565
1573
|
}
|
|
1566
|
-
if (!m(N, n) && (yield p(F, n,
|
|
1567
|
-
h(
|
|
1574
|
+
if (!m(N, n) && (yield p(F, n, Zr).call(n), !p(F, n, ui).call(n, a))) return;
|
|
1575
|
+
h(Vr, n, !1), h(Hr, n, !1), m(N, n) && (!m(N, n).url || m(N, n).url !== m(Rr, n)) && (m(P, n).debug("Loading timeshift URL", m(Rr, n)), m(N, n).loadSource(m(Rr, n)));
|
|
1568
1576
|
let o = n.muted;
|
|
1569
|
-
m(j, n).muted = !0, yield p(F, n,
|
|
1577
|
+
m(j, n).muted = !0, yield p(F, n, ri).call(n), p(F, n, ui).call(n, a) && (p(F, n, ti).call(n, r), !(i && (yield n.play(), !p(F, n, ui).call(n, a))) && p(F, n, ii).call(n, o, a));
|
|
1570
1578
|
})();
|
|
1571
1579
|
}
|
|
1572
|
-
function
|
|
1580
|
+
function ri() {
|
|
1573
1581
|
return m(j, this).duration && !Number.isNaN(m(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1574
1582
|
m(P, this).debug("Waiting for duration...");
|
|
1575
1583
|
let t = () => {
|
|
@@ -1580,11 +1588,11 @@ function ni() {
|
|
|
1580
1588
|
m(j, this).addEventListener("loadedmetadata", t);
|
|
1581
1589
|
});
|
|
1582
1590
|
}
|
|
1583
|
-
function
|
|
1591
|
+
function ii(e, t) {
|
|
1584
1592
|
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(j, this).readyState >= n && m(j, this).videoWidth > 0 && m(j, this).videoHeight > 0, i = () => {
|
|
1585
|
-
m(
|
|
1593
|
+
m(Vr, this) || m(Hr, this) || !p(F, this, ui).call(this, t) || (h(Hr, this, !0), m(P, this).debug("Revealing timeshift video"), m(M, this).classList.add("active"), m(M, this).style.opacity = "1", m(M, this).style.pointerEvents = "auto", m(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || p(F, this, ai).call(this, t));
|
|
1586
1594
|
}, a = () => {
|
|
1587
|
-
m(
|
|
1595
|
+
m(Vr, this) || m(Hr, this) || !p(F, this, ui).call(this, t) || r() && (s(), i());
|
|
1588
1596
|
}, o = !1, s = () => {
|
|
1589
1597
|
o || (o = !0, m(j, this).removeEventListener("canplay", a), m(j, this).removeEventListener("canplaythrough", a), m(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1590
1598
|
};
|
|
@@ -1597,9 +1605,9 @@ function ri(e, t) {
|
|
|
1597
1605
|
m(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1598
1606
|
}, 2e3);
|
|
1599
1607
|
}
|
|
1600
|
-
function
|
|
1608
|
+
function ai(e) {
|
|
1601
1609
|
let t = () => {
|
|
1602
|
-
p(F, this,
|
|
1610
|
+
p(F, this, ui).call(this, e) && (m(j, this).muted = !1);
|
|
1603
1611
|
};
|
|
1604
1612
|
"requestVideoFrameCallback" in m(j, this) ? m(j, this).requestVideoFrameCallback(() => {
|
|
1605
1613
|
setTimeout(() => {
|
|
@@ -1609,43 +1617,43 @@ function ii(e) {
|
|
|
1609
1617
|
t();
|
|
1610
1618
|
}, 120);
|
|
1611
1619
|
}
|
|
1612
|
-
function
|
|
1620
|
+
function oi(e, t) {
|
|
1613
1621
|
let n = e.seekable;
|
|
1614
1622
|
if (!n || n.length === 0) return t;
|
|
1615
1623
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1616
1624
|
return m(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1617
1625
|
}
|
|
1618
|
-
function
|
|
1619
|
-
for (let e of ui._) m(j, this).addEventListener(e, m(Gr, this));
|
|
1626
|
+
function si() {
|
|
1620
1627
|
for (let e of di._) m(j, this).addEventListener(e, m(Kr, this));
|
|
1621
|
-
|
|
1628
|
+
for (let e of fi._) m(j, this).addEventListener(e, m(qr, this));
|
|
1629
|
+
m(j, this).addEventListener("timeupdate", m(Jr, this)), m(j, this).addEventListener("progress", m(Yr, this));
|
|
1622
1630
|
}
|
|
1623
|
-
function
|
|
1624
|
-
for (let e of ui._) m(j, this).removeEventListener(e, m(Gr, this));
|
|
1631
|
+
function ci() {
|
|
1625
1632
|
for (let e of di._) m(j, this).removeEventListener(e, m(Kr, this));
|
|
1626
|
-
|
|
1633
|
+
for (let e of fi._) m(j, this).removeEventListener(e, m(qr, this));
|
|
1634
|
+
m(j, this).removeEventListener("timeupdate", m(Jr, this)), m(j, this).removeEventListener("progress", m(Yr, this));
|
|
1627
1635
|
}
|
|
1628
|
-
function
|
|
1636
|
+
function li(e) {
|
|
1629
1637
|
let t = e && (m(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || m(j, this).seeking || m(j, this).paused && !this.userPaused);
|
|
1630
1638
|
m(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1631
1639
|
bubbles: !0,
|
|
1632
1640
|
composed: !0
|
|
1633
1641
|
}));
|
|
1634
1642
|
}
|
|
1635
|
-
function
|
|
1636
|
-
return m(
|
|
1643
|
+
function ui(e) {
|
|
1644
|
+
return m(Wr, this) === e;
|
|
1637
1645
|
}
|
|
1638
|
-
var
|
|
1646
|
+
var di = { _: [
|
|
1639
1647
|
"waiting",
|
|
1640
1648
|
"seeking",
|
|
1641
1649
|
"stalled",
|
|
1642
1650
|
"loadstart"
|
|
1643
|
-
] },
|
|
1651
|
+
] }, fi = { _: [
|
|
1644
1652
|
"canplay",
|
|
1645
1653
|
"canplaythrough",
|
|
1646
1654
|
"seeked",
|
|
1647
1655
|
"loadeddata"
|
|
1648
|
-
] },
|
|
1656
|
+
] }, pi = class {
|
|
1649
1657
|
constructor(e) {
|
|
1650
1658
|
this.vindral = e;
|
|
1651
1659
|
}
|
|
@@ -1665,19 +1673,19 @@ var ui = { _: [
|
|
|
1665
1673
|
pause() {
|
|
1666
1674
|
this.vindral.pause();
|
|
1667
1675
|
}
|
|
1668
|
-
},
|
|
1669
|
-
|
|
1670
|
-
var
|
|
1676
|
+
}, mi = document.createElement("template");
|
|
1677
|
+
mi.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";
|
|
1678
|
+
var hi = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), _i = class extends HTMLElement {
|
|
1671
1679
|
constructor() {
|
|
1672
|
-
super(), f(this,
|
|
1680
|
+
super(), f(this, hi, null), f(this, gi, void 0), e(this, "range", void 0), h(gi, this, this.attachShadow({ mode: "open" })), m(gi, this).appendChild(mi.content.cloneNode(!0)), this.range = m(gi, this).getElementById("range");
|
|
1673
1681
|
}
|
|
1674
1682
|
connectedCallback() {
|
|
1675
1683
|
var e;
|
|
1676
|
-
h(
|
|
1684
|
+
h(hi, this, this.closest("vindral-controller")), (e = m(hi, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1677
1685
|
}
|
|
1678
1686
|
disconnectedCallback() {
|
|
1679
1687
|
var e;
|
|
1680
|
-
(e = m(
|
|
1688
|
+
(e = m(hi, this)) == null || e.disconnectListener(this);
|
|
1681
1689
|
}
|
|
1682
1690
|
attributeChangedCallback(e, t, n) {
|
|
1683
1691
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1703,11 +1711,11 @@ var mi = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap(), gi =
|
|
|
1703
1711
|
];
|
|
1704
1712
|
}
|
|
1705
1713
|
};
|
|
1706
|
-
e(
|
|
1714
|
+
e(_i, "observedAttributes", ["disabled"]);
|
|
1707
1715
|
//#endregion
|
|
1708
1716
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1709
|
-
var
|
|
1710
|
-
|
|
1717
|
+
var vi = document.createElement("template");
|
|
1718
|
+
vi.innerHTML = `
|
|
1711
1719
|
<style>
|
|
1712
1720
|
:host {
|
|
1713
1721
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1919,7 +1927,7 @@ _i.innerHTML = `
|
|
|
1919
1927
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1920
1928
|
</div>
|
|
1921
1929
|
`;
|
|
1922
|
-
var
|
|
1930
|
+
var yi = [
|
|
1923
1931
|
"ArrowDown",
|
|
1924
1932
|
"ArrowLeft",
|
|
1925
1933
|
"ArrowRight",
|
|
@@ -1928,18 +1936,18 @@ var vi = [
|
|
|
1928
1936
|
" ",
|
|
1929
1937
|
"f",
|
|
1930
1938
|
"m"
|
|
1931
|
-
],
|
|
1939
|
+
], bi = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Hi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), 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 = class extends HTMLElement {
|
|
1932
1940
|
constructor() {
|
|
1933
1941
|
var t;
|
|
1934
|
-
super(), g(this, H), f(this,
|
|
1942
|
+
super(), g(this, H), f(this, bi, /* @__PURE__ */ new Map()), f(this, xi, 2e3), f(this, Si, null), f(this, Ci, new xr({ onChange: (e) => p(H, this, U).call(this, _.DURATION, e.toString()) })), f(this, wi, null), f(this, Ti, void 0), f(this, I, void 0), f(this, L, void 0), f(this, Ei, void 0), f(this, R, void 0), f(this, Di, xe), f(this, Oi, void 0), f(this, ki, void 0), f(this, Ai, void 0), f(this, ji, void 0), f(this, z, void 0), f(this, Mi, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, B, void 0), f(this, Fi, void 0), f(this, Ii, void 0), f(this, Li, void 0), f(this, V, void 0), f(this, Ri, null), f(this, zi, !1), f(this, Bi, null), f(this, Vi, void 0), f(this, Hi, (e) => {
|
|
1935
1943
|
let t = e.filter((e) => {
|
|
1936
1944
|
var t;
|
|
1937
1945
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1938
1946
|
});
|
|
1939
1947
|
p(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1940
|
-
}), f(this, Hi, (e) => {
|
|
1941
|
-
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1942
1948
|
}), f(this, Ui, (e) => {
|
|
1949
|
+
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1950
|
+
}), f(this, Wi, (e) => {
|
|
1943
1951
|
switch (e) {
|
|
1944
1952
|
case "playing":
|
|
1945
1953
|
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
@@ -1952,38 +1960,38 @@ var vi = [
|
|
|
1952
1960
|
break;
|
|
1953
1961
|
default: break;
|
|
1954
1962
|
}
|
|
1955
|
-
}), f(this,
|
|
1963
|
+
}), f(this, Gi, (e) => {
|
|
1956
1964
|
p(H, this, U).call(this, _.VOLUME, e.volume.toString()), e.isMuted ? p(H, this, U).call(this, _.MUTED, "") : p(H, this, W).call(this, _.MUTED);
|
|
1957
|
-
}), f(this,
|
|
1965
|
+
}), f(this, Ki, ({ channelId: e }) => {
|
|
1958
1966
|
var t;
|
|
1959
1967
|
this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1960
|
-
}), f(this,
|
|
1968
|
+
}), f(this, qi, ({ channelId: e }) => {
|
|
1961
1969
|
var t;
|
|
1962
|
-
m(
|
|
1963
|
-
}), f(this, qi, (e) => {
|
|
1964
|
-
h(ha, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1970
|
+
m(Oi, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1965
1971
|
}), f(this, Ji, (e) => {
|
|
1972
|
+
h(ga, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1973
|
+
}), f(this, Yi, (e) => {
|
|
1966
1974
|
var t;
|
|
1967
1975
|
p(H, this, U).call(this, _.LANGUAGES, JSON.stringify(e)), (t = m(I, this)) != null && t.language && p(H, this, U).call(this, _.LANGUAGE, m(I, this).language);
|
|
1968
|
-
}), f(this,
|
|
1976
|
+
}), f(this, Xi, (e) => {
|
|
1969
1977
|
var t;
|
|
1970
1978
|
if (p(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = m(I, this)) != null && t.textTrack) {
|
|
1971
1979
|
var n, r;
|
|
1972
1980
|
p(H, this, U).call(this, _.TEXT_TRACK, (n = (r = m(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1973
1981
|
}
|
|
1974
|
-
}), f(this, Xi, (e) => {
|
|
1975
|
-
e != null && e.forVideo ? (p(H, this, U).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (p(H, this, U).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
1976
1982
|
}), f(this, Zi, (e) => {
|
|
1977
|
-
e
|
|
1983
|
+
e != null && e.forVideo ? (p(H, this, U).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (p(H, this, U).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
1978
1984
|
}), f(this, Qi, (e) => {
|
|
1985
|
+
e || p(H, this, W).call(this, _.BUFFERING), m(Ci, this).setLive(e);
|
|
1986
|
+
}), f(this, $i, (e) => {
|
|
1979
1987
|
var t, n;
|
|
1980
1988
|
let { urls: r, duration: i } = e;
|
|
1981
1989
|
if (!r[0] || !m(R, this)) return;
|
|
1982
1990
|
let a = new URL(r[0]);
|
|
1983
|
-
a.searchParams.set("channelId", (t = m(
|
|
1991
|
+
a.searchParams.set("channelId", (t = m(Oi, this)) == null ? "" : t);
|
|
1984
1992
|
let o = this.getAttribute("authentication-token");
|
|
1985
1993
|
o && a.searchParams.set("authToken", o);
|
|
1986
|
-
let s =
|
|
1994
|
+
let s = Dr(i);
|
|
1987
1995
|
if (Number.isNaN(s)) {
|
|
1988
1996
|
m(V, this).error(`Invalid duration format: ${i}`);
|
|
1989
1997
|
return;
|
|
@@ -1991,70 +1999,70 @@ var vi = [
|
|
|
1991
1999
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
1992
2000
|
a.searchParams.set("from", l);
|
|
1993
2001
|
let u = a.toString();
|
|
1994
|
-
m(R, this).setTimeshiftUrl(u), m(
|
|
2002
|
+
m(R, this).setTimeshiftUrl(u), m(Ci, this).start({
|
|
1995
2003
|
multivariantUrl: u,
|
|
1996
2004
|
params: {
|
|
1997
|
-
channelId: (n = m(
|
|
2005
|
+
channelId: (n = m(Oi, this)) == null ? "" : n,
|
|
1998
2006
|
authToken: o == null ? void 0 : o,
|
|
1999
2007
|
from: l
|
|
2000
2008
|
},
|
|
2001
2009
|
windowCapSeconds: s
|
|
2002
2010
|
});
|
|
2003
|
-
}), f(this, $i, () => {
|
|
2004
|
-
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
2005
2011
|
}), f(this, ea, () => {
|
|
2006
|
-
p(H, this,
|
|
2012
|
+
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
2007
2013
|
}), f(this, ta, () => {
|
|
2008
|
-
|
|
2014
|
+
p(H, this, U).call(this, _.PAUSED, ""), p(H, this, W).call(this, _.BUFFERING);
|
|
2009
2015
|
}), f(this, na, () => {
|
|
2010
|
-
m(
|
|
2016
|
+
m(pa, this).call(this), p(H, this, W).call(this, _.BUFFERING);
|
|
2011
2017
|
}), f(this, ra, () => {
|
|
2018
|
+
m(R, this) && m(Ci, this).applyLoadedDuration(m(R, this).duration);
|
|
2019
|
+
}), f(this, ia, () => {
|
|
2012
2020
|
var e, t;
|
|
2013
2021
|
if (!m(R, this) || m(R, this).seeking || (e = (t = m(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2014
2022
|
let n = m(R, this).currentTime;
|
|
2015
2023
|
n !== void 0 && p(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2016
|
-
}), f(this, ia, () => {
|
|
2017
|
-
m(R, this) && (p(H, this, U).call(this, _.VOLUME, m(R, this).volume.toString()), m(R, this).muted ? p(H, this, U).call(this, _.MUTED, "") : p(H, this, W).call(this, _.MUTED));
|
|
2018
2024
|
}), f(this, aa, () => {
|
|
2019
|
-
p(H, this, U).call(this, _.
|
|
2025
|
+
m(R, this) && (p(H, this, U).call(this, _.VOLUME, m(R, this).volume.toString()), m(R, this).muted ? p(H, this, U).call(this, _.MUTED, "") : p(H, this, W).call(this, _.MUTED));
|
|
2020
2026
|
}), f(this, oa, () => {
|
|
2021
|
-
p(H, this,
|
|
2027
|
+
p(H, this, U).call(this, _.BUFFERING, "");
|
|
2022
2028
|
}), f(this, sa, () => {
|
|
2023
|
-
|
|
2029
|
+
p(H, this, W).call(this, _.BUFFERING);
|
|
2030
|
+
}), f(this, ca, () => {
|
|
2031
|
+
if (m(zi, this)) {
|
|
2024
2032
|
if (m(L, this) !== m(R, this)) {
|
|
2025
|
-
h(
|
|
2033
|
+
h(zi, this, !1);
|
|
2026
2034
|
return;
|
|
2027
2035
|
}
|
|
2028
|
-
h(
|
|
2036
|
+
h(zi, this, !1), p(H, this, Za).call(this);
|
|
2029
2037
|
}
|
|
2030
|
-
}), f(this,
|
|
2038
|
+
}), f(this, la, 0), e(this, "handleEvent", (e) => {
|
|
2031
2039
|
switch (e.type) {
|
|
2032
2040
|
case "pointerdown":
|
|
2033
|
-
h(
|
|
2041
|
+
h(la, this, e.timeStamp);
|
|
2034
2042
|
break;
|
|
2035
2043
|
case "pointermove":
|
|
2036
|
-
p(H, this,
|
|
2044
|
+
p(H, this, Ba).call(this, e);
|
|
2037
2045
|
break;
|
|
2038
2046
|
case "pointerup":
|
|
2039
|
-
p(H, this,
|
|
2047
|
+
p(H, this, Va).call(this, e);
|
|
2040
2048
|
break;
|
|
2041
2049
|
case "mouseleave":
|
|
2042
|
-
p(H, this,
|
|
2050
|
+
p(H, this, Ya).call(this);
|
|
2043
2051
|
break;
|
|
2044
2052
|
case "dblclick":
|
|
2045
|
-
p(H, this,
|
|
2053
|
+
p(H, this, Ua).call(this, e);
|
|
2046
2054
|
break;
|
|
2047
2055
|
case "mousemove":
|
|
2048
|
-
p(H, this,
|
|
2056
|
+
p(H, this, Wa).call(this, e);
|
|
2049
2057
|
break;
|
|
2050
2058
|
case "keydown":
|
|
2051
|
-
m(
|
|
2059
|
+
m(fa, this).call(this, e);
|
|
2052
2060
|
break;
|
|
2053
2061
|
case "keyup":
|
|
2054
|
-
p(H, this,
|
|
2062
|
+
p(H, this, Ya).call(this), m(da, this).call(this, e);
|
|
2055
2063
|
break;
|
|
2056
2064
|
}
|
|
2057
|
-
}), f(this,
|
|
2065
|
+
}), f(this, ua, (e) => {
|
|
2058
2066
|
if (m(I, this) && (m(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2059
2067
|
case y.PLAY:
|
|
2060
2068
|
this.removeAttribute(_.PAUSED);
|
|
@@ -2099,10 +2107,10 @@ var vi = [
|
|
|
2099
2107
|
}
|
|
2100
2108
|
break;
|
|
2101
2109
|
case y.CHANNEL_GRID_OPENED:
|
|
2102
|
-
m(
|
|
2110
|
+
m(Ri, this) === null && p(H, this, Ka).call(this);
|
|
2103
2111
|
break;
|
|
2104
2112
|
case y.CHANNEL_GRID_CLOSED:
|
|
2105
|
-
m(
|
|
2113
|
+
m(Ri, this) !== null && (clearTimeout(m(Ri, this)), h(Ri, this, null));
|
|
2106
2114
|
break;
|
|
2107
2115
|
case y.ENTER_PIP:
|
|
2108
2116
|
this.setAttribute(_.IS_PIP, "");
|
|
@@ -2112,7 +2120,7 @@ var vi = [
|
|
|
2112
2120
|
break;
|
|
2113
2121
|
case y.REQUEST_AIRPLAY:
|
|
2114
2122
|
var t;
|
|
2115
|
-
(t = m(
|
|
2123
|
+
(t = m(Pi, this)) == null || t.showPlaybackTargetPicker();
|
|
2116
2124
|
break;
|
|
2117
2125
|
case y.SET_LANGUAGE:
|
|
2118
2126
|
v(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
@@ -2133,7 +2141,7 @@ var vi = [
|
|
|
2133
2141
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2134
2142
|
break;
|
|
2135
2143
|
case y.GO_LIVE:
|
|
2136
|
-
m(
|
|
2144
|
+
m(pa, this).call(this);
|
|
2137
2145
|
break;
|
|
2138
2146
|
case y.TOGGLE_DEBUG_PANEL:
|
|
2139
2147
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2145,64 +2153,64 @@ var vi = [
|
|
|
2145
2153
|
}
|
|
2146
2154
|
break;
|
|
2147
2155
|
}
|
|
2148
|
-
}), f(this,
|
|
2156
|
+
}), f(this, da, (e) => {
|
|
2149
2157
|
let { key: t } = e;
|
|
2150
|
-
if (!
|
|
2158
|
+
if (!yi.includes(t)) {
|
|
2151
2159
|
this.removeEventListener("keyup", this);
|
|
2152
2160
|
return;
|
|
2153
2161
|
}
|
|
2154
|
-
p(H, this,
|
|
2155
|
-
}), f(this,
|
|
2162
|
+
p(H, this, Ga).call(this, e);
|
|
2163
|
+
}), f(this, fa, (e) => {
|
|
2156
2164
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2157
|
-
t || n || !
|
|
2158
|
-
}), f(this,
|
|
2165
|
+
t || n || !yi.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2166
|
+
}), f(this, pa, () => {
|
|
2159
2167
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2160
|
-
}), f(this, pa, (e) => {
|
|
2161
|
-
var t;
|
|
2162
|
-
m(R, this) || p(H, this, wa).call(this), m(L, this) !== m(R, this) && (e && p(H, this, Za).call(this), h(L, this, m(R, this)), p(H, this, Sa).call(this), p(H, this, Ca).call(this), p(H, this, Oa).call(this), (t = m(I, this)) == null || t.pause(), h(Ri, this, e));
|
|
2163
2168
|
}), f(this, ma, (e) => {
|
|
2169
|
+
var t;
|
|
2170
|
+
m(R, this) || p(H, this, Ta).call(this), m(L, this) !== m(R, this) && (e && p(H, this, Qa).call(this), h(L, this, m(R, this)), p(H, this, Ca).call(this), p(H, this, wa).call(this), p(H, this, ka).call(this), (t = m(I, this)) == null || t.pause(), h(zi, this, e));
|
|
2171
|
+
}), f(this, ha, (e) => {
|
|
2164
2172
|
var t, n, r, i;
|
|
2165
|
-
e && p(H, this,
|
|
2166
|
-
p(H, this,
|
|
2173
|
+
e && p(H, this, Qa).call(this), (t = m(R, this)) == null || t.hide(), h(L, this, m(Ei, this)), p(H, this, ka).call(this), this.hasAttribute(_.PAUSED) ? (n = m(L, this)) == null || n.pause() : (r = m(L, this)) == null || r.play(), p(H, this, Da).call(this), p(H, this, Sa).call(this), (i = m(R, this)) == null || i.pause(), e && (h(zi, this, !1), setTimeout(() => {
|
|
2174
|
+
p(H, this, Za).call(this);
|
|
2167
2175
|
}, 100));
|
|
2168
2176
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2169
2177
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2170
2178
|
if (e !== !1) {
|
|
2171
2179
|
var n;
|
|
2172
|
-
m(
|
|
2180
|
+
m(ma, this).call(this, t), (n = m(R, this)) == null || n.seek({
|
|
2173
2181
|
time: parseFloat(e),
|
|
2174
2182
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2175
2183
|
});
|
|
2176
2184
|
return;
|
|
2177
2185
|
}
|
|
2178
|
-
m(L, this) !== m(
|
|
2179
|
-
}), f(this,
|
|
2186
|
+
m(L, this) !== m(Ei, this) && m(ha, this).call(this, t);
|
|
2187
|
+
}), f(this, ga, null), f(this, _a, () => {
|
|
2180
2188
|
var e;
|
|
2181
2189
|
let t = (e = m(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2182
2190
|
if (!(t != null && t.video)) return;
|
|
2183
2191
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2184
2192
|
n && n.catch(() => {});
|
|
2185
|
-
}), f(this,
|
|
2193
|
+
}), f(this, va, () => {
|
|
2186
2194
|
n();
|
|
2187
|
-
}), f(this,
|
|
2195
|
+
}), f(this, ya, null);
|
|
2188
2196
|
let r = this.attachShadow({ mode: "open" });
|
|
2189
|
-
r.appendChild(
|
|
2197
|
+
r.appendChild(vi.content.cloneNode(!0));
|
|
2190
2198
|
let i = ye(this.getAttribute("log-level"));
|
|
2191
|
-
h(V, this, re.get().createContext("VindralController")), m(V, this).setLevel(i), h(
|
|
2199
|
+
h(V, this, re.get().createContext("VindralController")), m(V, this).setLevel(i), h(Ti, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), h(Vi, this, new Yn(r));
|
|
2192
2200
|
}
|
|
2193
2201
|
connectedCallback() {
|
|
2194
2202
|
var e = this;
|
|
2195
2203
|
return t(function* () {
|
|
2196
|
-
S(e.getAttribute("auto-instance-enabled"), !0) && (yield p(H, e,
|
|
2197
|
-
for (let t of Object.values(y)) e.addEventListener(t, m(
|
|
2198
|
-
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), e.connectListener(e), p(H, e,
|
|
2204
|
+
S(e.getAttribute("auto-instance-enabled"), !0) && (yield p(H, e, xa).call(e));
|
|
2205
|
+
for (let t of Object.values(y)) e.addEventListener(t, m(ua, e));
|
|
2206
|
+
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), e.connectListener(e), p(H, e, Ra).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2199
2207
|
})();
|
|
2200
2208
|
}
|
|
2201
2209
|
disconnectedCallback() {
|
|
2202
2210
|
var e, t, n, r, i;
|
|
2203
|
-
p(H, this,
|
|
2204
|
-
for (let e of Object.values(y)) this.removeEventListener(e, m(
|
|
2205
|
-
p(H, this,
|
|
2211
|
+
p(H, this, za).call(this), p(H, this, ao).call(this), m(Vi, this).unload(), (e = m(I, this)) == null || e.unload(), (t = m(z, this)) == null || t.unload(), (n = m(Mi, this)) == null || n.unload(), (r = m(Ni, this)) == null || r.unload(), (i = m(B, this)) == null || i.unload(), p(H, this, Ea).call(this);
|
|
2212
|
+
for (let e of Object.values(y)) this.removeEventListener(e, m(ua, this));
|
|
2213
|
+
p(H, this, Ca).call(this), m(Si, this) && (clearTimeout(m(Si, this)), h(Si, this, null)), m(Ci, this).stop(), this.disconnectListener(this);
|
|
2206
2214
|
}
|
|
2207
2215
|
attributeChangedCallback(e, t, n) {
|
|
2208
2216
|
if (t !== n) {
|
|
@@ -2212,13 +2220,13 @@ var vi = [
|
|
|
2212
2220
|
newValue: n
|
|
2213
2221
|
}), e) {
|
|
2214
2222
|
case "channel-id":
|
|
2215
|
-
h(
|
|
2223
|
+
h(Oi, this, n), m(I, this) && n && (m(I, this).channelId = n, m(I, this).play(), p(H, this, U).call(this, _.BUFFERING, ""), p(H, this, U).call(this, _.CHANNEL_ID, n), p(H, this, U).call(this, _.POSTER_SRC, m(I, this).getThumbnailUrl()));
|
|
2216
2224
|
break;
|
|
2217
2225
|
case "channel-group-id":
|
|
2218
|
-
h(
|
|
2226
|
+
h(ki, this, n);
|
|
2219
2227
|
break;
|
|
2220
2228
|
case "url":
|
|
2221
|
-
n && h(
|
|
2229
|
+
n && h(Di, this, n);
|
|
2222
2230
|
break;
|
|
2223
2231
|
case "paused":
|
|
2224
2232
|
if (v(n)) {
|
|
@@ -2248,7 +2256,7 @@ var vi = [
|
|
|
2248
2256
|
}
|
|
2249
2257
|
break;
|
|
2250
2258
|
case _.DEBUG_PANEL_OPEN:
|
|
2251
|
-
v(n) ? p(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : p(H, this, W).call(this, _.DEBUG_PANEL_OPEN), p(H, this,
|
|
2259
|
+
v(n) ? p(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : p(H, this, W).call(this, _.DEBUG_PANEL_OPEN), p(H, this, ro).call(this);
|
|
2252
2260
|
break;
|
|
2253
2261
|
case "user-interacting":
|
|
2254
2262
|
v(n) ? p(H, this, U).call(this, _.USER_INTERACTING, "") : p(H, this, W).call(this, _.USER_INTERACTING);
|
|
@@ -2269,10 +2277,10 @@ var vi = [
|
|
|
2269
2277
|
}
|
|
2270
2278
|
break;
|
|
2271
2279
|
case "ui-locked":
|
|
2272
|
-
v(n) ? p(H, this,
|
|
2280
|
+
v(n) ? p(H, this, Ja).call(this) : p(H, this, Ya).call(this);
|
|
2273
2281
|
break;
|
|
2274
2282
|
case "is-fullscreen":
|
|
2275
|
-
v(n) ? p(H, this,
|
|
2283
|
+
v(n) ? p(H, this, $a).call(this) : p(H, this, eo).call(this);
|
|
2276
2284
|
break;
|
|
2277
2285
|
case "abr-enabled":
|
|
2278
2286
|
{
|
|
@@ -2287,13 +2295,13 @@ var vi = [
|
|
|
2287
2295
|
}
|
|
2288
2296
|
break;
|
|
2289
2297
|
case "max-video-bit-rate":
|
|
2290
|
-
h(
|
|
2298
|
+
h(Ai, this, n), v(n) ? p(H, this, U).call(this, _.MAX_VIDEO_BITRATE, n) : p(H, this, W).call(this, _.MAX_VIDEO_BITRATE), m(R, this) && (m(R, this).maxVideoBitRate = n ? Ce(n) : void 0);
|
|
2291
2299
|
break;
|
|
2292
2300
|
case "max-initial-bit-rate":
|
|
2293
|
-
h(
|
|
2301
|
+
h(ji, this, n), v(n) ? p(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : p(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2294
2302
|
break;
|
|
2295
2303
|
case "is-pip":
|
|
2296
|
-
v(n) ? p(H, this,
|
|
2304
|
+
v(n) ? p(H, this, Za).call(this) : p(H, this, Qa).call(this);
|
|
2297
2305
|
break;
|
|
2298
2306
|
case "is-airplaying":
|
|
2299
2307
|
if (v(n)) {
|
|
@@ -2307,17 +2315,17 @@ var vi = [
|
|
|
2307
2315
|
case "is-casting":
|
|
2308
2316
|
if (v(n)) {
|
|
2309
2317
|
var ee, d;
|
|
2310
|
-
(ee = m(
|
|
2318
|
+
(ee = m(Mi, this)) != null && ee.isFullscreen() && p(H, this, eo).call(this), (d = m(I, this)) == null || d.pause();
|
|
2311
2319
|
} else if (!document.hidden) {
|
|
2312
2320
|
var te;
|
|
2313
2321
|
(te = m(I, this)) == null || te.play();
|
|
2314
2322
|
}
|
|
2315
2323
|
break;
|
|
2316
2324
|
case "cast-receiver-id":
|
|
2317
|
-
h(
|
|
2325
|
+
h(Ii, this, n);
|
|
2318
2326
|
break;
|
|
2319
2327
|
case "cast-background":
|
|
2320
|
-
h(
|
|
2328
|
+
h(Li, this, n);
|
|
2321
2329
|
break;
|
|
2322
2330
|
case "language":
|
|
2323
2331
|
m(I, this) && (m(I, this).language = n, v(n) ? p(H, this, U).call(this, _.LANGUAGE, n) : p(H, this, W).call(this, _.LANGUAGE));
|
|
@@ -2331,7 +2339,7 @@ var vi = [
|
|
|
2331
2339
|
case "authentication-token":
|
|
2332
2340
|
if (v(n)) {
|
|
2333
2341
|
var ne, re;
|
|
2334
|
-
(ne = m(I, this)) == null || ne.updateAuthenticationToken(n), (re = m(
|
|
2342
|
+
(ne = m(I, this)) == null || ne.updateAuthenticationToken(n), (re = m(Pi, this)) == null || re.updateAuthenticationToken(n), p(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2335
2343
|
} else p(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2336
2344
|
break;
|
|
2337
2345
|
case "volume":
|
|
@@ -2369,13 +2377,13 @@ var vi = [
|
|
|
2369
2377
|
_.USER_INTERACTING,
|
|
2370
2378
|
_.PAUSED,
|
|
2371
2379
|
_.HIDE_UI_ON_PAUSE
|
|
2372
|
-
].includes(e) && p(H, this,
|
|
2380
|
+
].includes(e) && p(H, this, Xa).call(this);
|
|
2373
2381
|
}
|
|
2374
2382
|
}
|
|
2375
2383
|
connectListener(e) {
|
|
2376
|
-
|
|
2377
|
-
let n = m(
|
|
2378
|
-
switch (n ? n.push(e) : m(
|
|
2384
|
+
Er(e).forEach((t) => {
|
|
2385
|
+
let n = m(bi, this).get(t);
|
|
2386
|
+
switch (n ? n.push(e) : m(bi, this).set(t, [e]), t) {
|
|
2379
2387
|
case _.PAUSED:
|
|
2380
2388
|
var r;
|
|
2381
2389
|
(((r = m(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
@@ -2385,7 +2393,7 @@ var vi = [
|
|
|
2385
2393
|
((i = m(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2386
2394
|
break;
|
|
2387
2395
|
case _.MAX_VIDEO_BITRATE:
|
|
2388
|
-
m(
|
|
2396
|
+
m(Ai, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, m(Ai, this));
|
|
2389
2397
|
break;
|
|
2390
2398
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2391
2399
|
{
|
|
@@ -2395,10 +2403,10 @@ var vi = [
|
|
|
2395
2403
|
}
|
|
2396
2404
|
break;
|
|
2397
2405
|
case _.CHANNEL_ID:
|
|
2398
|
-
m(
|
|
2406
|
+
m(Oi, this) && e.setAttribute(_.CHANNEL_ID, m(Oi, this));
|
|
2399
2407
|
break;
|
|
2400
2408
|
case _.CHANNEL_GROUP_ID:
|
|
2401
|
-
m(
|
|
2409
|
+
m(ki, this) && e.setAttribute(_.CHANNEL_GROUP_ID, m(ki, this));
|
|
2402
2410
|
break;
|
|
2403
2411
|
case _.AUTHENTICATION_TOKEN: {
|
|
2404
2412
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2434,38 +2442,38 @@ var vi = [
|
|
|
2434
2442
|
});
|
|
2435
2443
|
}
|
|
2436
2444
|
disconnectListener(e) {
|
|
2437
|
-
|
|
2438
|
-
let n = m(
|
|
2439
|
-
n && m(
|
|
2445
|
+
Er(e).forEach((t) => {
|
|
2446
|
+
let n = m(bi, this).get(t);
|
|
2447
|
+
n && m(bi, this).set(t, n.filter((t) => t !== e));
|
|
2440
2448
|
});
|
|
2441
2449
|
}
|
|
2442
2450
|
get instance() {
|
|
2443
2451
|
return m(I, this);
|
|
2444
2452
|
}
|
|
2445
2453
|
get fullscreen() {
|
|
2446
|
-
return p(H, this,
|
|
2454
|
+
return p(H, this, Ma).call(this);
|
|
2447
2455
|
}
|
|
2448
2456
|
get airPlay() {
|
|
2449
|
-
return m(
|
|
2457
|
+
return m(Pi, this);
|
|
2450
2458
|
}
|
|
2451
2459
|
get timelineMarkers() {
|
|
2452
|
-
return
|
|
2460
|
+
return Pr(this.getAttribute(_.TIMELINE_MARKERS));
|
|
2453
2461
|
}
|
|
2454
2462
|
set timelineMarkers(e) {
|
|
2455
|
-
let t =
|
|
2463
|
+
let t = Nr(e);
|
|
2456
2464
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2457
2465
|
}
|
|
2458
2466
|
connect() {
|
|
2459
|
-
p(H, this,
|
|
2467
|
+
p(H, this, xa).call(this);
|
|
2460
2468
|
}
|
|
2461
2469
|
};
|
|
2462
|
-
function
|
|
2470
|
+
function xa() {
|
|
2463
2471
|
var e = this;
|
|
2464
2472
|
return t(function* () {
|
|
2465
2473
|
var t, n;
|
|
2466
|
-
if (!m(
|
|
2467
|
-
let r = m(L, e) === m(
|
|
2468
|
-
m(
|
|
2474
|
+
if (!m(Oi, e)) return;
|
|
2475
|
+
let r = m(L, e) === m(Ei, e);
|
|
2476
|
+
m(Ci, e).stop(), yield (t = m(I, e)) == null ? void 0 : t.unload(), r && h(L, e, void 0);
|
|
2469
2477
|
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = Ce(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = _e(e.getAttribute(_.MEDIA)), l = e.getAttribute(_.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = Ce(e.getAttribute("max-video-bit-rate")), te = Ce(e.getAttribute("max-initial-bit-rate")), ne = ge(e.getAttribute("max-size")), re = Ce(e.getAttribute("min-buffer-time")), ie = Ce(e.getAttribute("max-buffer-time")), oe = S(e.getAttribute("burst-enabled")), se = S(e.getAttribute("mse-enabled")), ce = S(e.getAttribute("mse-opus-enabled")), le = S(e.getAttribute("background-play-enabled")), f = S(e.getAttribute("ios-background-play-enabled")), g = S(e.getAttribute("ios-wake-lock-enabled")), ue = S(e.getAttribute("stream-to-media-element-enabled")), de = S(e.getAttribute("ios-media-element-enabled")), fe = S(e.getAttribute("abr-enabled"), !0), pe = S(e.getAttribute("size-based-resolution-cap-enabled")), me = S(e.getAttribute("telemetry-enabled")), y = ve(e.getAttribute("video-codecs")), b = he(e.getAttribute("poster")), xe = Se(e.getAttribute("advanced")), x = ye(e.getAttribute("log-level")), we = {
|
|
2470
2478
|
headers: Te(e.getAttribute("drm-headers")),
|
|
2471
2479
|
queryParams: Te(e.getAttribute("drm-queryparams")),
|
|
@@ -2479,9 +2487,9 @@ function ba() {
|
|
|
2479
2487
|
}
|
|
2480
2488
|
}, Ee = Me(e.getAttribute("webcodecs-hardware-acceleration")), De = je(e.getAttribute("decoders")), Oe = S(e.getAttribute("offscreen-canvas-enabled")), ke = S(e.getAttribute("webtransport-enabled")), Ae = Ce(e.getAttribute("reconnect-retries")), Ne = Ae === void 0 ? void 0 : (e) => e.reconnectRetries < Ae, Pe = e.getAttribute("language") || void 0;
|
|
2481
2489
|
h(I, e, new ae({
|
|
2482
|
-
url: m(
|
|
2483
|
-
channelId: m(
|
|
2484
|
-
channelGroupId: m(
|
|
2490
|
+
url: m(Di, e),
|
|
2491
|
+
channelId: m(Oi, e),
|
|
2492
|
+
channelGroupId: m(ki, e),
|
|
2485
2493
|
edgeUrl: u,
|
|
2486
2494
|
authenticationToken: ee,
|
|
2487
2495
|
muted: a,
|
|
@@ -2515,110 +2523,112 @@ function ba() {
|
|
|
2515
2523
|
decoders: De,
|
|
2516
2524
|
offscreenCanvasEnabled: Oe,
|
|
2517
2525
|
reconnectHandler: Ne
|
|
2518
|
-
})), h(
|
|
2526
|
+
})), h(Ei, e, new pi(m(I, e))), m(L, e) || h(L, e, m(Ei, e)), p(H, e, Sa).call(e), h(wi, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), m(wi, e) && (m(I, e).attach(m(wi, e)), m(Vi, e).observe(m(wi, e))), e.setAttribute(_.MEDIA, m(I, e).media), m(I, e).muted && p(H, e, U).call(e, _.MUTED, ""), m(I, e).abrEnabled ? p(H, e, U).call(e, _.ABR_ENABLED, "") : p(H, e, W).call(e, _.ABR_ENABLED), p(H, e, U).call(e, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, m(I, e).sizeBasedResolutionCapEnabled ? "true" : "false"), p(H, e, U).call(e, _.VOLUME, m(I, e).volume.toString()), v(b) || p(H, e, U).call(e, _.POSTER_SRC, m(I, e).getThumbnailUrl());
|
|
2519
2527
|
let Fe = S(e.getAttribute(_.AIRPLAY_ENABLED), !1), C = S(e.getAttribute(_.CAST_ENABLED), !0), Ie = S(e.getAttribute(_.FULLSCREEN_ENABLED), !0), Le = S(e.getAttribute(_.PIP_ENABLED), !0), Re = S(e.getAttribute(_.VU_METER_ENABLED), !1), ze = S(e.getAttribute(_.TIMESHIFT_ENABLED), !1);
|
|
2520
|
-
Fe && p(H, e,
|
|
2528
|
+
Fe && p(H, e, Ia).call(e, m(I, e)), C && p(H, e, Na).call(e, m(I, e)), Ie && p(H, e, Aa).call(e, m(I, e)), Le && p(H, e, Oa).call(e, m(I, e)), i || m(I, e).play(), Re && p(H, e, La).call(e, m(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2521
2529
|
bubbles: !0,
|
|
2522
2530
|
composed: !0,
|
|
2523
2531
|
detail: m(I, e)
|
|
2524
|
-
})), ze && (p(H, e,
|
|
2532
|
+
})), ze && (p(H, e, Ta).call(e), Ie && p(H, e, ja).call(e));
|
|
2525
2533
|
})();
|
|
2526
2534
|
}
|
|
2527
|
-
function xa() {
|
|
2528
|
-
m(I, this) && (m(I, this).on("rendition levels", m(Vi, this)), m(I, this).on("rendition level", m(Hi, this)), m(I, this).on("playback state", m(Ui, this)), m(I, this).on("volume state", m(Wi, this)), m(I, this).on("channel switch failed", m(Gi, this)), m(I, this).on("channel switch", m(Ki, this)), m(I, this).on("channels", m(qi, this)), m(I, this).on("languages", m(Ji, this)), m(I, this).on("text tracks", m(Yi, this)), m(I, this).on("needs user input", m(Xi, this)), m(I, this).on("is live", m(Zi, this)), m(I, this).on("timeshift info", m(Qi, this)));
|
|
2529
|
-
}
|
|
2530
2535
|
function Sa() {
|
|
2531
|
-
m(I, this) && (m(I, this).
|
|
2536
|
+
m(I, this) && (m(I, this).on("rendition levels", m(Hi, this)), m(I, this).on("rendition level", m(Ui, this)), m(I, this).on("playback state", m(Wi, this)), m(I, this).on("volume state", m(Gi, this)), m(I, this).on("channel switch failed", m(Ki, this)), m(I, this).on("channel switch", m(qi, this)), m(I, this).on("channels", m(Ji, this)), m(I, this).on("languages", m(Yi, this)), m(I, this).on("text tracks", m(Xi, this)), m(I, this).on("needs user input", m(Zi, this)), m(I, this).on("is live", m(Qi, this)), m(I, this).on("timeshift info", m($i, this)));
|
|
2532
2537
|
}
|
|
2533
2538
|
function Ca() {
|
|
2534
|
-
m(
|
|
2539
|
+
m(I, this) && (m(I, this).off("playback state", m(Wi, this)), m(I, this).off("volume state", m(Gi, this)), m(I, this).off("channel switch failed", m(Ki, this)), m(I, this).off("channel switch", m(qi, this)), m(I, this).off("channels", m(Ji, this)), m(I, this).off("languages", m(Yi, this)), m(I, this).off("text tracks", m(Xi, this)), m(I, this).off("needs user input", m(Zi, this)), m(I, this).off("is live", m(Qi, this)), m(I, this).off("timeshift info", m($i, this)));
|
|
2535
2540
|
}
|
|
2536
2541
|
function wa() {
|
|
2542
|
+
m(R, this) && (m(R, this).addEventListener("playing", m(ea, this)), m(R, this).addEventListener("pause", m(ta, this)), m(R, this).addEventListener("ended", m(na, this)), m(R, this).addEventListener("timeupdate", m(ia, this)), m(R, this).addEventListener("volumechange", m(aa, this)), m(R, this).addEventListener("hlsbuffering", m(oa, this)), m(R, this).addEventListener("hlsnotbuffering", m(sa, this)), m(R, this).addEventListener("timeshiftready", m(ca, this)));
|
|
2543
|
+
}
|
|
2544
|
+
function Ta() {
|
|
2537
2545
|
var e, t, n, r;
|
|
2538
2546
|
let i = Ce(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = m(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = S(this.getAttribute(_.MUTED), (n = (r = m(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2539
|
-
p(H, this,
|
|
2547
|
+
p(H, this, Ea).call(this), h(R, this, new Xr(m(Ti, this), {
|
|
2540
2548
|
volume: a,
|
|
2541
2549
|
muted: o,
|
|
2542
|
-
maxVideoBitRate: m(
|
|
2543
|
-
})), m(R, this).addEventListener("durationchange", m(
|
|
2544
|
-
}
|
|
2545
|
-
function Ta() {
|
|
2546
|
-
m(R, this) && (p(H, this, Ea).call(this), m(R, this).removeEventListener("durationchange", m(na, this)), m(R, this).cleanup(), m(L, this) === m(R, this) && h(L, this, void 0), h(R, this, void 0));
|
|
2550
|
+
maxVideoBitRate: m(Ai, this) ? parseInt(m(Ai, this), 10) : void 0
|
|
2551
|
+
})), m(R, this).addEventListener("durationchange", m(ra, this));
|
|
2547
2552
|
}
|
|
2548
2553
|
function Ea() {
|
|
2549
|
-
m(R, this) && (
|
|
2554
|
+
m(R, this) && (p(H, this, Da).call(this), m(R, this).removeEventListener("durationchange", m(ra, this)), m(R, this).cleanup(), m(L, this) === m(R, this) && h(L, this, void 0), h(R, this, void 0));
|
|
2550
2555
|
}
|
|
2551
|
-
function Da(
|
|
2552
|
-
|
|
2553
|
-
|
|
2556
|
+
function Da() {
|
|
2557
|
+
m(R, this) && (m(R, this).removeEventListener("playing", m(ea, this)), m(R, this).removeEventListener("pause", m(ta, this)), m(R, this).removeEventListener("ended", m(na, this)), m(R, this).removeEventListener("timeupdate", m(ia, this)), m(R, this).removeEventListener("volumechange", m(aa, this)), m(R, this).removeEventListener("hlsbuffering", m(oa, this)), m(R, this).removeEventListener("hlsnotbuffering", m(sa, this)), m(R, this).removeEventListener("timeshiftready", m(ca, this)));
|
|
2558
|
+
}
|
|
2559
|
+
function Oa(e) {
|
|
2560
|
+
e.mediaElement instanceof HTMLVideoElement && (h(z, this, new ar(e.mediaElement)), m(z, this).isSupported() && (m(V, this).debug("PIP is supported"), p(H, this, U).call(this, _.PIP_AVAILABLE, "")), m(z, this).on("on picture in picture change", (e) => {
|
|
2561
|
+
var t;
|
|
2562
|
+
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP), m(Vi, this).setEnabled(!((t = m(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2554
2563
|
}));
|
|
2555
2564
|
}
|
|
2556
|
-
function
|
|
2565
|
+
function ka() {
|
|
2557
2566
|
var e;
|
|
2558
2567
|
if (!m(z, this)) return;
|
|
2559
2568
|
let t = null;
|
|
2560
|
-
m(L, this) === m(R, this) && m(R, this) ? t = m(R, this).videoElement : ((e = m(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = m(I, this).mediaElement), t && t !== m(z, this).videoElement && (m(V, this).debug("Updating PIP target to", m(L, this) === m(R, this) ? "HLS" : "Vindral"), m(z, this).unload(), h(z, this, new
|
|
2561
|
-
|
|
2569
|
+
m(L, this) === m(R, this) && m(R, this) ? t = m(R, this).videoElement : ((e = m(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = m(I, this).mediaElement), t && t !== m(z, this).videoElement && (m(V, this).debug("Updating PIP target to", m(L, this) === m(R, this) ? "HLS" : "Vindral"), m(z, this).unload(), h(z, this, new ar(t)), m(z, this).on("on picture in picture change", (e) => {
|
|
2570
|
+
var t;
|
|
2571
|
+
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP), m(Vi, this).setEnabled(!((t = m(z, this)) != null && t.isWebkitPresentationModeActive()));
|
|
2562
2572
|
}));
|
|
2563
2573
|
}
|
|
2564
|
-
function
|
|
2565
|
-
let t = !
|
|
2566
|
-
h(
|
|
2574
|
+
function Aa(e) {
|
|
2575
|
+
let t = !Xn.isFullscreenApiSupported(this) && Xn.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2576
|
+
h(Mi, this, new Xn(t)), m(Mi, this).on("on fullscreen change", (e) => {
|
|
2567
2577
|
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2568
2578
|
});
|
|
2569
2579
|
}
|
|
2570
|
-
function
|
|
2580
|
+
function ja() {
|
|
2571
2581
|
var e;
|
|
2572
|
-
m(R, this) && (h(
|
|
2582
|
+
m(R, this) && (h(Ni, this, !Xn.isFullscreenApiSupported(this) && Xn.isFullscreenApiSupported((e = m(R, this)) == null ? void 0 : e.videoElement) ? new Xn(m(R, this).videoElement) : new Xn(this)), m(Ni, this).on("on fullscreen change", (e) => {
|
|
2573
2583
|
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2574
2584
|
}));
|
|
2575
2585
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return this.hasAttribute(_.TIMESHIFT_POSITION) ? m(
|
|
2586
|
+
function Ma() {
|
|
2587
|
+
return this.hasAttribute(_.TIMESHIFT_POSITION) ? m(Ni, this) : m(Mi, this);
|
|
2578
2588
|
}
|
|
2579
|
-
function
|
|
2580
|
-
h(
|
|
2581
|
-
background: m(
|
|
2582
|
-
receiverApplicationId: m(
|
|
2589
|
+
function Na(e) {
|
|
2590
|
+
h(Fi, this, new Oe({
|
|
2591
|
+
background: m(Li, this),
|
|
2592
|
+
receiverApplicationId: m(Ii, this),
|
|
2583
2593
|
options: e.getCastOptions()
|
|
2584
|
-
})), m(
|
|
2594
|
+
})), m(Fi, this).init().then(() => {
|
|
2585
2595
|
var e, t, n;
|
|
2586
|
-
p(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = m(
|
|
2596
|
+
p(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = m(Fi, this)) == null || e.on("connected", p(H, this, Pa).bind(this)), (t = m(Fi, this)) == null || t.on("resumed", p(H, this, Pa).bind(this)), (n = m(Fi, this)) == null || n.on("disconnected", p(H, this, Fa).bind(this));
|
|
2587
2597
|
}).catch((e) => {
|
|
2588
2598
|
m(V, this).warn("Failed to initialize CastSender", e);
|
|
2589
2599
|
});
|
|
2590
2600
|
}
|
|
2591
|
-
function
|
|
2601
|
+
function Pa() {
|
|
2592
2602
|
var e, t;
|
|
2593
2603
|
p(H, this, U).call(this, _.IS_CASTING, "");
|
|
2594
|
-
let n = (e = (t = m(
|
|
2604
|
+
let n = (e = (t = m(Fi, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2595
2605
|
p(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2596
2606
|
}
|
|
2597
|
-
function
|
|
2607
|
+
function Fa() {
|
|
2598
2608
|
p(H, this, W).call(this, _.IS_CASTING), p(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2599
2609
|
}
|
|
2600
|
-
function
|
|
2610
|
+
function Ia(e) {
|
|
2601
2611
|
var t;
|
|
2602
|
-
(t = m(
|
|
2612
|
+
(t = m(Pi, this)) == null || t.unload();
|
|
2603
2613
|
let n = e.getCastOptions();
|
|
2604
|
-
h(
|
|
2614
|
+
h(Pi, this, new zn({
|
|
2605
2615
|
url: n.url,
|
|
2606
2616
|
channelId: n.channelId,
|
|
2607
2617
|
authenticationToken: n.authenticationToken,
|
|
2608
2618
|
container: this
|
|
2609
|
-
})), m(
|
|
2619
|
+
})), m(Pi, this).once("available", () => {
|
|
2610
2620
|
p(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2611
|
-
}), m(
|
|
2621
|
+
}), m(Pi, this).on("connected", () => {
|
|
2612
2622
|
p(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2613
|
-
}), m(
|
|
2623
|
+
}), m(Pi, this).on("disconnected", () => {
|
|
2614
2624
|
p(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2615
2625
|
});
|
|
2616
2626
|
}
|
|
2617
|
-
function
|
|
2627
|
+
function La(e) {
|
|
2618
2628
|
var t;
|
|
2619
2629
|
if ((t = m(B, this)) == null || t.unload(), !se()) {
|
|
2620
|
-
if (e.audioNode) h(B, this, new
|
|
2621
|
-
else if (e.mediaElement instanceof HTMLMediaElement) h(B, this, new
|
|
2630
|
+
if (e.audioNode) h(B, this, new Ir(e.audioNode));
|
|
2631
|
+
else if (e.mediaElement instanceof HTMLMediaElement) h(B, this, new Ir(e.mediaElement));
|
|
2622
2632
|
else return;
|
|
2623
2633
|
m(B, this).on("on decibel change", (e) => {
|
|
2624
2634
|
p(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
@@ -2628,37 +2638,37 @@ function Ia(e) {
|
|
|
2628
2638
|
})), (!m(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && m(B, this).start();
|
|
2629
2639
|
}
|
|
2630
2640
|
}
|
|
2631
|
-
function
|
|
2641
|
+
function Ra() {
|
|
2632
2642
|
let e = () => (customElements.get("vindral-debug-panel") || import("./rVXtcXLn.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), m(I, this));
|
|
2633
|
-
window._vindralDebug = e, h(
|
|
2643
|
+
window._vindralDebug = e, h(Bi, this, e);
|
|
2634
2644
|
}
|
|
2635
|
-
function
|
|
2645
|
+
function za() {
|
|
2636
2646
|
let e = window;
|
|
2637
|
-
m(
|
|
2638
|
-
}
|
|
2639
|
-
function za(e) {
|
|
2640
|
-
e.pointerType !== "mouse" && e.timeStamp - m(ca, this) < 250 || (p(H, this, qa).call(this), m(xi, this) && clearTimeout(m(xi, this)), e.target instanceof HTMLElement && ([this, m(Ci, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && p(H, this, Ja).call(this));
|
|
2647
|
+
m(Bi, this) && e._vindralDebug === m(Bi, this) && delete e._vindralDebug, h(Bi, this, null);
|
|
2641
2648
|
}
|
|
2642
2649
|
function Ba(e) {
|
|
2643
|
-
|
|
2644
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(Ci, this)].includes(e.target) && t ? p(H, this, Ka).call(this) : p(H, this, Ja).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(H, this, Ja).call(this);
|
|
2650
|
+
e.pointerType !== "mouse" && e.timeStamp - m(la, this) < 250 || (p(H, this, Ja).call(this), m(Si, this) && clearTimeout(m(Si, this)), e.target instanceof HTMLElement && ([this, m(wi, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && p(H, this, Ya).call(this));
|
|
2645
2651
|
}
|
|
2646
2652
|
function Va(e) {
|
|
2653
|
+
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2654
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(wi, this)].includes(e.target) && t ? p(H, this, qa).call(this) : p(H, this, Ya).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(H, this, Ya).call(this);
|
|
2655
|
+
}
|
|
2656
|
+
function Ha(e) {
|
|
2647
2657
|
switch (e) {
|
|
2648
2658
|
case "dblclick-fullscreen": return S(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2649
2659
|
default: return !0;
|
|
2650
2660
|
}
|
|
2651
2661
|
}
|
|
2652
|
-
function Ha(e) {
|
|
2653
|
-
p(H, this, Va).call(this, "dblclick-fullscreen") && (!m(ji, this) || e.target instanceof b || e.target instanceof Be || e.target instanceof gi || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2654
|
-
}
|
|
2655
2662
|
function Ua(e) {
|
|
2656
|
-
this.
|
|
2663
|
+
p(H, this, Ha).call(this, "dblclick-fullscreen") && (!m(Mi, this) || e.target instanceof b || e.target instanceof Be || e.target instanceof _i || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2657
2664
|
}
|
|
2658
2665
|
function Wa(e) {
|
|
2666
|
+
this.hasAttribute(_.USER_INTERACTING) || p(H, this, Ya).call(this);
|
|
2667
|
+
}
|
|
2668
|
+
function Ga(e) {
|
|
2659
2669
|
var t;
|
|
2660
2670
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2661
|
-
if (n || r || !
|
|
2671
|
+
if (n || r || !yi.includes(i)) return;
|
|
2662
2672
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2663
2673
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2664
2674
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2676,28 +2686,28 @@ function Wa(e) {
|
|
|
2676
2686
|
break;
|
|
2677
2687
|
}
|
|
2678
2688
|
}
|
|
2679
|
-
function
|
|
2689
|
+
function Ka() {
|
|
2680
2690
|
var e = this;
|
|
2681
2691
|
return t(function* () {
|
|
2682
|
-
if (!m(I, e) || !m(
|
|
2692
|
+
if (!m(I, e) || !m(ki, e)) return;
|
|
2683
2693
|
let t = Date.now();
|
|
2684
|
-
if (m(
|
|
2694
|
+
if (m(ga, e) && t - m(ga, e) < 1e4) m(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2685
2695
|
else {
|
|
2686
|
-
h(
|
|
2687
|
-
let n = yield m(I, e).getApiClient().getChannels(m(
|
|
2696
|
+
h(ga, e, t);
|
|
2697
|
+
let n = yield m(I, e).getApiClient().getChannels(m(ki, e));
|
|
2688
2698
|
p(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2689
2699
|
}
|
|
2690
|
-
h(
|
|
2700
|
+
h(Ri, e, window.setTimeout(() => void p(H, e, Ka).call(e), 1e4));
|
|
2691
2701
|
})();
|
|
2692
2702
|
}
|
|
2693
|
-
function
|
|
2703
|
+
function qa() {
|
|
2694
2704
|
!this.hasAttribute(_.USER_INTERACTING) || this.hasAttribute(_.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2695
2705
|
bubbles: !0,
|
|
2696
2706
|
composed: !0,
|
|
2697
2707
|
detail: { active: !1 }
|
|
2698
2708
|
})), this.removeAttribute(_.USER_INTERACTING));
|
|
2699
2709
|
}
|
|
2700
|
-
function
|
|
2710
|
+
function Ja() {
|
|
2701
2711
|
this.hasAttribute(_.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2702
2712
|
this.setAttribute(_.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2703
2713
|
bubbles: !0,
|
|
@@ -2706,64 +2716,64 @@ function qa() {
|
|
|
2706
2716
|
}));
|
|
2707
2717
|
});
|
|
2708
2718
|
}
|
|
2709
|
-
function Ja() {
|
|
2710
|
-
p(H, this, qa).call(this), m(xi, this) && clearTimeout(m(xi, this)), m(bi, this) && h(xi, this, self.setTimeout(() => {
|
|
2711
|
-
p(H, this, Ka).call(this);
|
|
2712
|
-
}, m(bi, this)));
|
|
2713
|
-
}
|
|
2714
2719
|
function Ya() {
|
|
2720
|
+
p(H, this, Ja).call(this), m(Si, this) && clearTimeout(m(Si, this)), m(xi, this) && h(Si, this, self.setTimeout(() => {
|
|
2721
|
+
p(H, this, qa).call(this);
|
|
2722
|
+
}, m(xi, this)));
|
|
2723
|
+
}
|
|
2724
|
+
function Xa() {
|
|
2715
2725
|
var e;
|
|
2716
2726
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2717
2727
|
(e = m(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2718
2728
|
}
|
|
2719
|
-
function
|
|
2729
|
+
function Za() {
|
|
2720
2730
|
var e;
|
|
2721
|
-
p(H, this,
|
|
2731
|
+
p(H, this, ka).call(this), p(H, this, to).call(this), (e = m(z, this)) == null || e.request().catch((e) => {
|
|
2722
2732
|
m(V, this).warn("Failed to enter picture in picture:", e);
|
|
2723
2733
|
});
|
|
2724
2734
|
}
|
|
2725
|
-
function
|
|
2735
|
+
function Qa() {
|
|
2726
2736
|
var e;
|
|
2727
2737
|
(e = m(z, this)) == null || e.exit().catch((e) => {
|
|
2728
2738
|
m(V, this).warn("Failed to exit picture in picture:", e);
|
|
2729
2739
|
});
|
|
2730
2740
|
}
|
|
2731
|
-
function
|
|
2732
|
-
let e = p(H, this,
|
|
2741
|
+
function $a() {
|
|
2742
|
+
let e = p(H, this, Ma).call(this);
|
|
2733
2743
|
if (!e) {
|
|
2734
2744
|
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2735
2745
|
return;
|
|
2736
2746
|
}
|
|
2737
|
-
e != null && e.isFullscreenApiSupported() ? (p(H, this,
|
|
2738
|
-
m(
|
|
2747
|
+
e != null && e.isFullscreenApiSupported() ? (p(H, this, to).call(this), e == null || e.request().then(() => {
|
|
2748
|
+
m(_a, this).call(this);
|
|
2739
2749
|
}).catch((e) => {
|
|
2740
2750
|
m(V, this).warn("Failed to enter fullscreen:", e);
|
|
2741
2751
|
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2742
2752
|
}
|
|
2743
|
-
function
|
|
2744
|
-
let e = p(H, this,
|
|
2753
|
+
function eo() {
|
|
2754
|
+
let e = p(H, this, Ma).call(this);
|
|
2745
2755
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2746
|
-
m(
|
|
2756
|
+
m(va, this).call(this);
|
|
2747
2757
|
}).catch((e) => {
|
|
2748
2758
|
m(V, this).warn("Failed to exit fullscreen:", e);
|
|
2749
2759
|
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), p(H, this, W).call(this, _.FULLSCREEN));
|
|
2750
2760
|
}
|
|
2751
|
-
function eo() {
|
|
2752
|
-
m(I, this) && m(I, this).emitter.emit("ios-hack: reset size");
|
|
2753
|
-
}
|
|
2754
2761
|
function to() {
|
|
2755
|
-
|
|
2762
|
+
m(I, this) && m(I, this).emitter.emit("ios-hack: reset size");
|
|
2756
2763
|
}
|
|
2757
2764
|
function no() {
|
|
2758
|
-
|
|
2765
|
+
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2759
2766
|
}
|
|
2760
2767
|
function ro() {
|
|
2761
|
-
|
|
2768
|
+
p(H, this, no).call(this) ? p(H, this, io).call(this) : p(H, this, ao).call(this);
|
|
2762
2769
|
}
|
|
2763
2770
|
function io() {
|
|
2764
|
-
m(
|
|
2771
|
+
m(ya, this) === null && (p(H, this, oo).call(this), h(ya, this, window.setInterval(() => p(H, this, oo).call(this), 1e3)));
|
|
2765
2772
|
}
|
|
2766
2773
|
function ao() {
|
|
2774
|
+
m(ya, this) && (clearInterval(m(ya, this)), h(ya, this, null)), this.removeAttribute(_.DRIFT), p(H, this, W).call(this, _.DRIFT), p(H, this, W).call(this, _.PLAYBACK_LATENCY), p(H, this, W).call(this, _.CONNECTION_STATE);
|
|
2775
|
+
}
|
|
2776
|
+
function oo() {
|
|
2767
2777
|
if (!m(I, this)) return;
|
|
2768
2778
|
try {
|
|
2769
2779
|
let e = m(I, this).getStatistics().drift;
|
|
@@ -2779,13 +2789,13 @@ function ao() {
|
|
|
2779
2789
|
}
|
|
2780
2790
|
function U(e, t) {
|
|
2781
2791
|
var n;
|
|
2782
|
-
(n = m(
|
|
2792
|
+
(n = m(bi, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2783
2793
|
}
|
|
2784
2794
|
function W(e) {
|
|
2785
2795
|
var t;
|
|
2786
|
-
(t = m(
|
|
2796
|
+
(t = m(bi, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2787
2797
|
}
|
|
2788
|
-
e(
|
|
2798
|
+
e(ba, "observedAttributes", [
|
|
2789
2799
|
...Ee,
|
|
2790
2800
|
"url",
|
|
2791
2801
|
"edge-url",
|
|
@@ -2828,8 +2838,8 @@ e(ya, "observedAttributes", [
|
|
|
2828
2838
|
]);
|
|
2829
2839
|
//#endregion
|
|
2830
2840
|
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2831
|
-
var
|
|
2832
|
-
|
|
2841
|
+
var so, co = document.createElement("template");
|
|
2842
|
+
co.innerHTML = `
|
|
2833
2843
|
<style>
|
|
2834
2844
|
:host {
|
|
2835
2845
|
display: var(--fullscreen-button-display);
|
|
@@ -2853,10 +2863,10 @@ so.innerHTML = `
|
|
|
2853
2863
|
</slot>
|
|
2854
2864
|
</slot>
|
|
2855
2865
|
`;
|
|
2856
|
-
var
|
|
2866
|
+
var lo = class extends b {
|
|
2857
2867
|
constructor() {
|
|
2858
2868
|
var e;
|
|
2859
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2869
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(co.content.cloneNode(!0));
|
|
2860
2870
|
}
|
|
2861
2871
|
connectedCallback() {
|
|
2862
2872
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2881,48 +2891,48 @@ var co = class extends b {
|
|
|
2881
2891
|
}));
|
|
2882
2892
|
}
|
|
2883
2893
|
};
|
|
2884
|
-
|
|
2894
|
+
so = lo, e(lo, "observedAttributes", [...x(so, "observedAttributes", so), _.FULLSCREEN]);
|
|
2885
2895
|
//#endregion
|
|
2886
2896
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2887
|
-
var
|
|
2888
|
-
|
|
2897
|
+
var uo, fo = "\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", po = document.createElement("template");
|
|
2898
|
+
po.innerHTML = `
|
|
2889
2899
|
<style>
|
|
2890
2900
|
:host(:not([hidden])) {
|
|
2891
2901
|
display: var(--language-menu-display);
|
|
2892
2902
|
}
|
|
2893
2903
|
</style>
|
|
2894
2904
|
|
|
2895
|
-
<slot name="button">${
|
|
2905
|
+
<slot name="button">${fo}</slot>
|
|
2896
2906
|
<slot name="listbox" hidden>
|
|
2897
2907
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2898
2908
|
</slot>
|
|
2899
2909
|
`;
|
|
2900
|
-
var
|
|
2910
|
+
var mo = /* @__PURE__ */ new WeakSet(), ho = class extends Be {
|
|
2901
2911
|
constructor() {
|
|
2902
2912
|
var e, t, n, r;
|
|
2903
|
-
super(), g(this,
|
|
2913
|
+
super(), g(this, mo), (e = this.shadowRoot) == null || e.appendChild(po.content.cloneNode(!0)), this.button = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"), this.listbox = (n = this.shadowRoot) == null ? void 0 : n.querySelector("[part=listbox]"), this.listboxSlot = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot[name=listbox]");
|
|
2904
2914
|
}
|
|
2905
2915
|
connectedCallback() {
|
|
2906
|
-
super.connectedCallback(), p(
|
|
2916
|
+
super.connectedCallback(), p(mo, this, go).call(this), this.setAttribute("aria-label", "Languages");
|
|
2907
2917
|
}
|
|
2908
2918
|
attributeChangedCallback(e, t, n) {
|
|
2909
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(
|
|
2919
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(mo, this, go).call(this);
|
|
2910
2920
|
}
|
|
2911
2921
|
};
|
|
2912
|
-
|
|
2913
|
-
function
|
|
2922
|
+
uo = ho;
|
|
2923
|
+
function go() {
|
|
2914
2924
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
2915
2925
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2916
2926
|
}
|
|
2917
|
-
e(
|
|
2918
|
-
...x(
|
|
2927
|
+
e(ho, "observedAttributes", [
|
|
2928
|
+
...x(uo, "observedAttributes", uo),
|
|
2919
2929
|
_.LANGUAGES,
|
|
2920
2930
|
_.TEXT_TRACKS
|
|
2921
2931
|
]);
|
|
2922
2932
|
//#endregion
|
|
2923
2933
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2924
|
-
var
|
|
2925
|
-
|
|
2934
|
+
var _o = document.createElement("template");
|
|
2935
|
+
_o.innerHTML = `
|
|
2926
2936
|
<style>
|
|
2927
2937
|
:host {
|
|
2928
2938
|
font: inherit;
|
|
@@ -3036,21 +3046,21 @@ go.innerHTML = `
|
|
|
3036
3046
|
<div class="menu"></div>
|
|
3037
3047
|
</div>
|
|
3038
3048
|
`;
|
|
3039
|
-
var
|
|
3049
|
+
var vo = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), bo = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), To = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), ko = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), Ao = class extends HTMLElement {
|
|
3040
3050
|
constructor() {
|
|
3041
|
-
super(), g(this,
|
|
3051
|
+
super(), g(this, G), f(this, vo, []), f(this, yo, []), f(this, bo, void 0), f(this, xo, void 0), f(this, So, []), f(this, Co, []), f(this, wo, null), f(this, To, null), f(this, Eo, null), f(this, Do, null), f(this, Oo, null), f(this, ko, null), e(this, "handleEvent", (e) => {
|
|
3042
3052
|
switch (e.type) {
|
|
3043
3053
|
case "keydown":
|
|
3044
|
-
p(
|
|
3054
|
+
p(G, this, zo).call(this, e);
|
|
3045
3055
|
break;
|
|
3046
3056
|
}
|
|
3047
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3057
|
+
}), this.attachShadow({ mode: "open" }).appendChild(_o.content.cloneNode(!0));
|
|
3048
3058
|
}
|
|
3049
3059
|
connectedCallback() {
|
|
3050
3060
|
let e = this.getRootNode();
|
|
3051
3061
|
if (e instanceof ShadowRoot) {
|
|
3052
3062
|
var t, n, r;
|
|
3053
|
-
h(
|
|
3063
|
+
h(Eo, this, e.host.closest("vindral-controller")), (t = m(Eo, this)) == null || t.connectListener(this), h(wo, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), h(To, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), p(G, this, jo).call(this), p(G, this, Mo).call(this), h(Do, this, e.host), this.addEventListener("keydown", this);
|
|
3054
3064
|
}
|
|
3055
3065
|
}
|
|
3056
3066
|
disconnectedCallback() {
|
|
@@ -3060,16 +3070,16 @@ var _o = /* @__PURE__ */ new WeakMap(), vo = /* @__PURE__ */ new WeakMap(), yo =
|
|
|
3060
3070
|
t !== n && (e === _.LANGUAGES && n && (this.languages = JSON.parse(n)), e === _.TEXT_TRACKS && n && (this.textTracks = JSON.parse(n)), e === _.LANGUAGE && (this.language = n), e === _.TEXT_TRACK && (this.textTrack = n));
|
|
3061
3071
|
}
|
|
3062
3072
|
set languages(e) {
|
|
3063
|
-
h(
|
|
3073
|
+
h(vo, this, e), p(G, this, Po).call(this), p(G, this, Io).call(this);
|
|
3064
3074
|
}
|
|
3065
3075
|
set textTracks(e) {
|
|
3066
|
-
h(
|
|
3076
|
+
h(yo, this, e), p(G, this, No).call(this), p(G, this, Lo).call(this);
|
|
3067
3077
|
}
|
|
3068
3078
|
set language(e) {
|
|
3069
|
-
h(
|
|
3079
|
+
h(bo, this, e), p(G, this, Io).call(this);
|
|
3070
3080
|
}
|
|
3071
3081
|
set textTrack(e) {
|
|
3072
|
-
h(
|
|
3082
|
+
h(xo, this, e), p(G, this, Lo).call(this);
|
|
3073
3083
|
}
|
|
3074
3084
|
get keysUsed() {
|
|
3075
3085
|
return [
|
|
@@ -3086,10 +3096,10 @@ var _o = /* @__PURE__ */ new WeakMap(), vo = /* @__PURE__ */ new WeakMap(), yo =
|
|
|
3086
3096
|
];
|
|
3087
3097
|
}
|
|
3088
3098
|
focus() {
|
|
3089
|
-
m(
|
|
3099
|
+
m(Oo, this) ? m(Oo, this).focus() : m(ko, this) && m(ko, this).focus();
|
|
3090
3100
|
}
|
|
3091
3101
|
};
|
|
3092
|
-
function
|
|
3102
|
+
function jo() {
|
|
3093
3103
|
new IntersectionObserver((e) => {
|
|
3094
3104
|
e.forEach((e) => {
|
|
3095
3105
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3098,55 +3108,55 @@ function ko() {
|
|
|
3098
3108
|
} else this.style.height = "auto";
|
|
3099
3109
|
});
|
|
3100
3110
|
}, {
|
|
3101
|
-
root: m(
|
|
3111
|
+
root: m(Eo, this),
|
|
3102
3112
|
threshold: 0
|
|
3103
3113
|
}).observe(this);
|
|
3104
3114
|
}
|
|
3105
|
-
function
|
|
3106
|
-
m(
|
|
3115
|
+
function Mo() {
|
|
3116
|
+
m(wo, this) && (p(G, this, Po).call(this), p(G, this, Io).call(this)), m(To, this) && (p(G, this, No).call(this), p(G, this, Lo).call(this));
|
|
3107
3117
|
}
|
|
3108
|
-
function
|
|
3109
|
-
m(
|
|
3110
|
-
let e = p(
|
|
3111
|
-
m(
|
|
3118
|
+
function No() {
|
|
3119
|
+
m(To, this).innerHTML = "", h(Co, this, []);
|
|
3120
|
+
let e = p(G, this, Fo).call(this, "Off", "textTrack", void 0);
|
|
3121
|
+
m(To, this).appendChild(e), m(Co, this).push({
|
|
3112
3122
|
element: e,
|
|
3113
3123
|
value: void 0
|
|
3114
|
-
}), m(
|
|
3115
|
-
let t = p(
|
|
3116
|
-
m(
|
|
3124
|
+
}), m(yo, this).forEach((e) => {
|
|
3125
|
+
let t = p(G, this, Fo).call(this, e, "textTrack", e);
|
|
3126
|
+
m(To, this).appendChild(t), m(Co, this).push({
|
|
3117
3127
|
element: t,
|
|
3118
3128
|
value: e
|
|
3119
3129
|
});
|
|
3120
|
-
}), p(
|
|
3130
|
+
}), p(G, this, Lo).call(this);
|
|
3121
3131
|
}
|
|
3122
|
-
function
|
|
3123
|
-
m(
|
|
3124
|
-
let t = p(
|
|
3125
|
-
m(
|
|
3132
|
+
function Po() {
|
|
3133
|
+
m(wo, this).innerHTML = "", h(So, this, []), m(vo, this).forEach((e) => {
|
|
3134
|
+
let t = p(G, this, Fo).call(this, e, "language", e);
|
|
3135
|
+
m(wo, this).appendChild(t), m(So, this).push({
|
|
3126
3136
|
element: t,
|
|
3127
3137
|
value: e
|
|
3128
3138
|
});
|
|
3129
|
-
}), p(
|
|
3139
|
+
}), p(G, this, Io).call(this);
|
|
3130
3140
|
}
|
|
3131
|
-
function
|
|
3141
|
+
function Fo(e, t, n) {
|
|
3132
3142
|
let r = document.createElement("div");
|
|
3133
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(
|
|
3143
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(G, this, Ro).call(this, n, t)), r;
|
|
3134
3144
|
}
|
|
3135
|
-
function
|
|
3136
|
-
m(
|
|
3137
|
-
let e = m(
|
|
3138
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(
|
|
3139
|
-
}
|
|
3140
|
-
function
|
|
3141
|
-
m(
|
|
3142
|
-
let e = m(
|
|
3143
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(
|
|
3145
|
+
function Io() {
|
|
3146
|
+
m(Oo, this) && (m(Oo, this).removeAttribute("aria-selected"), m(Oo, this).tabIndex = -1);
|
|
3147
|
+
let e = m(So, this).find((e) => e.value === m(bo, this));
|
|
3148
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Oo, this, e.element));
|
|
3149
|
+
}
|
|
3150
|
+
function Lo() {
|
|
3151
|
+
m(ko, this) && (m(ko, this).removeAttribute("aria-selected"), m(ko, this).tabIndex = -1);
|
|
3152
|
+
let e = m(Co, this).find((e) => e.value === m(xo, this));
|
|
3153
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(ko, this, e.element);
|
|
3144
3154
|
else {
|
|
3145
|
-
let e = m(
|
|
3146
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(
|
|
3155
|
+
let e = m(Co, this).find((e) => e.value === void 0);
|
|
3156
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(ko, this, e.element));
|
|
3147
3157
|
}
|
|
3148
3158
|
}
|
|
3149
|
-
function
|
|
3159
|
+
function Ro(e, t) {
|
|
3150
3160
|
this.dispatchEvent(new Event("change", {
|
|
3151
3161
|
bubbles: !0,
|
|
3152
3162
|
composed: !0
|
|
@@ -3158,36 +3168,36 @@ function Io(e, t) {
|
|
|
3158
3168
|
detail: e
|
|
3159
3169
|
}));
|
|
3160
3170
|
}
|
|
3161
|
-
function
|
|
3171
|
+
function zo(e) {
|
|
3162
3172
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3163
3173
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3164
3174
|
var a;
|
|
3165
|
-
(a = m(
|
|
3175
|
+
(a = m(Do, this)) == null || a.hide();
|
|
3166
3176
|
} else if (t === "Enter" || t === " ") {
|
|
3167
3177
|
var o;
|
|
3168
|
-
(o = p(
|
|
3169
|
-
} else p(
|
|
3178
|
+
(o = p(G, this, Ho).call(this)) == null || (o = o.element) == null || o.click();
|
|
3179
|
+
} else p(G, this, Bo).call(this, e);
|
|
3170
3180
|
}
|
|
3171
|
-
function
|
|
3181
|
+
function Bo(e) {
|
|
3172
3182
|
var t;
|
|
3173
|
-
let { key: n } = e, r = [...m(
|
|
3183
|
+
let { key: n } = e, r = [...m(So, this), ...m(Co, this)], i = (t = p(G, this, Ho).call(this)) == null ? r[0] : t;
|
|
3174
3184
|
if (!i) return;
|
|
3175
3185
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3176
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(
|
|
3186
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(G, this, Vo).call(this, a, "left") : n === "ArrowRight" ? o = p(G, this, Vo).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);
|
|
3177
3187
|
let s = r[o];
|
|
3178
|
-
s && (p(
|
|
3188
|
+
s && (p(G, this, Uo).call(this, s.value), s.element.focus());
|
|
3179
3189
|
}
|
|
3180
|
-
function
|
|
3181
|
-
let n = m(
|
|
3190
|
+
function Vo(e, t) {
|
|
3191
|
+
let n = m(So, this).length, r = m(Co, this).length;
|
|
3182
3192
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3183
3193
|
}
|
|
3184
|
-
function
|
|
3185
|
-
return [...m(
|
|
3194
|
+
function Ho() {
|
|
3195
|
+
return [...m(So, this), ...m(Co, this)].find((e) => e.element.tabIndex === 0);
|
|
3186
3196
|
}
|
|
3187
|
-
function
|
|
3188
|
-
for (let t of [...m(
|
|
3197
|
+
function Uo(e) {
|
|
3198
|
+
for (let t of [...m(So, this), ...m(Co, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3189
3199
|
}
|
|
3190
|
-
e(
|
|
3200
|
+
e(Ao, "observedAttributes", [
|
|
3191
3201
|
_.LANGUAGES,
|
|
3192
3202
|
_.TEXT_TRACKS,
|
|
3193
3203
|
_.LANGUAGE,
|
|
@@ -3195,12 +3205,12 @@ e(Oo, "observedAttributes", [
|
|
|
3195
3205
|
]);
|
|
3196
3206
|
//#endregion
|
|
3197
3207
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3198
|
-
var
|
|
3199
|
-
|
|
3200
|
-
var
|
|
3208
|
+
var Wo, Go = document.createElement("template");
|
|
3209
|
+
Go.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";
|
|
3210
|
+
var Ko = class extends b {
|
|
3201
3211
|
constructor() {
|
|
3202
3212
|
var e;
|
|
3203
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3213
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Go.content.cloneNode(!0));
|
|
3204
3214
|
}
|
|
3205
3215
|
connectedCallback() {
|
|
3206
3216
|
super.connectedCallback(), this.updateState();
|
|
@@ -3231,15 +3241,15 @@ var Wo = class extends b {
|
|
|
3231
3241
|
}));
|
|
3232
3242
|
}
|
|
3233
3243
|
};
|
|
3234
|
-
|
|
3235
|
-
...x(
|
|
3244
|
+
Wo = Ko, e(Ko, "observedAttributes", [
|
|
3245
|
+
...x(Wo, "observedAttributes", Wo),
|
|
3236
3246
|
_.TIMESHIFT_POSITION,
|
|
3237
3247
|
_.DURATION
|
|
3238
3248
|
]);
|
|
3239
3249
|
//#endregion
|
|
3240
3250
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3241
|
-
var
|
|
3242
|
-
|
|
3251
|
+
var qo, Jo = document.createElement("template");
|
|
3252
|
+
Jo.innerHTML = `
|
|
3243
3253
|
<style>
|
|
3244
3254
|
:host {
|
|
3245
3255
|
display: var(--mute-button-display);
|
|
@@ -3267,10 +3277,10 @@ Ko.innerHTML = `
|
|
|
3267
3277
|
</slot>
|
|
3268
3278
|
</slot>
|
|
3269
3279
|
`;
|
|
3270
|
-
var
|
|
3280
|
+
var Yo = class extends b {
|
|
3271
3281
|
constructor() {
|
|
3272
3282
|
var e;
|
|
3273
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3283
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Jo.content.cloneNode(!0));
|
|
3274
3284
|
}
|
|
3275
3285
|
connectedCallback() {
|
|
3276
3286
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3295,11 +3305,11 @@ var qo = class extends b {
|
|
|
3295
3305
|
}));
|
|
3296
3306
|
}
|
|
3297
3307
|
};
|
|
3298
|
-
|
|
3308
|
+
qo = Yo, e(Yo, "observedAttributes", [...x(qo, "observedAttributes", qo), _.MUTED]);
|
|
3299
3309
|
//#endregion
|
|
3300
3310
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3301
|
-
var
|
|
3302
|
-
|
|
3311
|
+
var Xo, Zo = document.createElement("template");
|
|
3312
|
+
Zo.innerHTML = `
|
|
3303
3313
|
<style>
|
|
3304
3314
|
:host {
|
|
3305
3315
|
display: var(--pip-button-display);
|
|
@@ -3313,10 +3323,10 @@ Yo.innerHTML = `
|
|
|
3313
3323
|
<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>
|
|
3314
3324
|
</slot>
|
|
3315
3325
|
`;
|
|
3316
|
-
var
|
|
3326
|
+
var Qo = class extends b {
|
|
3317
3327
|
constructor() {
|
|
3318
3328
|
var e;
|
|
3319
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3329
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Zo.content.cloneNode(!0));
|
|
3320
3330
|
}
|
|
3321
3331
|
connectedCallback() {
|
|
3322
3332
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture");
|
|
@@ -3341,15 +3351,15 @@ var Xo = class extends b {
|
|
|
3341
3351
|
}));
|
|
3342
3352
|
}
|
|
3343
3353
|
};
|
|
3344
|
-
|
|
3345
|
-
...x(
|
|
3354
|
+
Xo = Qo, e(Qo, "observedAttributes", [
|
|
3355
|
+
...x(Xo, "observedAttributes", Xo),
|
|
3346
3356
|
_.IS_PIP,
|
|
3347
3357
|
_.PIP_AVAILABLE
|
|
3348
3358
|
]);
|
|
3349
3359
|
//#endregion
|
|
3350
3360
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3351
|
-
var
|
|
3352
|
-
|
|
3361
|
+
var $o, es = document.createElement("template");
|
|
3362
|
+
es.innerHTML = `
|
|
3353
3363
|
<style>
|
|
3354
3364
|
:host {
|
|
3355
3365
|
display: var(--play-button-display);
|
|
@@ -3373,10 +3383,10 @@ Qo.innerHTML = `
|
|
|
3373
3383
|
</slot>
|
|
3374
3384
|
</slot>
|
|
3375
3385
|
`;
|
|
3376
|
-
var
|
|
3386
|
+
var ts = class extends b {
|
|
3377
3387
|
constructor() {
|
|
3378
3388
|
var e;
|
|
3379
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3389
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(es.content.cloneNode(!0));
|
|
3380
3390
|
}
|
|
3381
3391
|
connectedCallback() {
|
|
3382
3392
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3401,64 +3411,64 @@ var $o = class extends b {
|
|
|
3401
3411
|
}));
|
|
3402
3412
|
}
|
|
3403
3413
|
};
|
|
3404
|
-
|
|
3414
|
+
$o = ts, e(ts, "observedAttributes", [...x($o, "observedAttributes", $o), _.PAUSED]);
|
|
3405
3415
|
//#endregion
|
|
3406
3416
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3407
|
-
var
|
|
3417
|
+
var K = {
|
|
3408
3418
|
TITLE: "title",
|
|
3409
3419
|
OFFLINE: "offline",
|
|
3410
3420
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3411
3421
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3412
3422
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3413
|
-
},
|
|
3423
|
+
}, ns = Object.values(K), rs = /* @__PURE__ */ new WeakMap(), is = /* @__PURE__ */ new WeakMap(), as = /* @__PURE__ */ new WeakMap(), os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = /* @__PURE__ */ new WeakSet(), ds = class extends pe {
|
|
3414
3424
|
constructor(e) {
|
|
3415
|
-
super(), g(this,
|
|
3425
|
+
super(), g(this, us), f(this, rs, void 0), f(this, is, void 0), f(this, as, !1), f(this, os, !1), f(this, ss, !0), f(this, cs, null), f(this, ls, null), h(is, this, e), h(rs, this, new fe({
|
|
3416
3426
|
publicEndpoint: e.url,
|
|
3417
3427
|
tokenFactory: () => e.authenticationToken
|
|
3418
3428
|
}));
|
|
3419
3429
|
}
|
|
3420
3430
|
start(e = 5e3) {
|
|
3421
|
-
m(
|
|
3422
|
-
!m(
|
|
3431
|
+
m(ls, this) && clearInterval(m(ls, this)), h(as, this, !1), h(os, this, !1), p(us, this, hs).call(this), p(us, this, fs).call(this), h(ls, this, window.setInterval(() => {
|
|
3432
|
+
!m(os, this) && !m(is, this).infiniteReconnect && !m(cs, this) && m(ss, this) && h(cs, this, window.setTimeout(() => p(us, this, ps).call(this), 300 * 1e3)), !m(os, this) && m(ss, this) && p(us, this, fs).call(this);
|
|
3423
3433
|
}, e));
|
|
3424
3434
|
}
|
|
3425
3435
|
stop() {
|
|
3426
|
-
p(
|
|
3436
|
+
p(us, this, ms).call(this), m(ls, this) && (window.clearInterval(m(ls, this)), h(ls, this, null));
|
|
3427
3437
|
}
|
|
3428
3438
|
};
|
|
3429
|
-
function
|
|
3439
|
+
function fs() {
|
|
3430
3440
|
var e = this;
|
|
3431
3441
|
return t(function* () {
|
|
3432
|
-
if (m(
|
|
3433
|
-
h(
|
|
3442
|
+
if (m(as, e)) return;
|
|
3443
|
+
h(as, e, !0);
|
|
3434
3444
|
let t = "Stream is offline", n = "Please stand by";
|
|
3435
3445
|
try {
|
|
3436
|
-
let t = yield m(
|
|
3446
|
+
let t = yield m(rs, e).getChannel(m(is, e).channelId);
|
|
3437
3447
|
if (t.isLive) {
|
|
3438
|
-
h(
|
|
3448
|
+
h(os, e, !0), p(us, e, hs).call(e), e.emit("live", t), h(as, e, !1);
|
|
3439
3449
|
return;
|
|
3440
3450
|
}
|
|
3441
3451
|
} catch (e) {
|
|
3442
3452
|
de(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3443
3453
|
}
|
|
3444
|
-
m(
|
|
3454
|
+
m(ss, e) && e.emit("error", {
|
|
3445
3455
|
title: t,
|
|
3446
3456
|
message: n
|
|
3447
|
-
}), h(
|
|
3457
|
+
}), h(as, e, !1);
|
|
3448
3458
|
})();
|
|
3449
3459
|
}
|
|
3450
|
-
function
|
|
3451
|
-
this.stop(), h(
|
|
3460
|
+
function ps() {
|
|
3461
|
+
this.stop(), h(ss, this, !1), this.emit("timeout");
|
|
3452
3462
|
}
|
|
3453
|
-
function
|
|
3454
|
-
m(
|
|
3463
|
+
function ms() {
|
|
3464
|
+
m(cs, this) && (window.clearTimeout(m(cs, this)), h(cs, this, null));
|
|
3455
3465
|
}
|
|
3456
|
-
function
|
|
3457
|
-
p(
|
|
3466
|
+
function hs() {
|
|
3467
|
+
p(us, this, ms).call(this), h(ss, this, !0);
|
|
3458
3468
|
}
|
|
3459
3469
|
//#endregion
|
|
3460
3470
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3461
|
-
var
|
|
3471
|
+
var gs = /\/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, _s = navigator.userAgent.toLowerCase(), vs = gs.test(_s), ys = (e) => ba.observedAttributes.includes(e), bs = `
|
|
3462
3472
|
<style>
|
|
3463
3473
|
:host {
|
|
3464
3474
|
container-type: inline-size;
|
|
@@ -3468,7 +3478,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3468
3478
|
display: flex;
|
|
3469
3479
|
justify-content: center;
|
|
3470
3480
|
|
|
3471
|
-
--vindral-volume-range-display: ${
|
|
3481
|
+
--vindral-volume-range-display: ${vs ? "none" : "flex"};
|
|
3472
3482
|
--vindral-airplay-button-display: none;
|
|
3473
3483
|
--vindral-play-overlay-display: none;
|
|
3474
3484
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3504,7 +3514,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3504
3514
|
// needs to be higher than bottom bar/UI
|
|
3505
3515
|
}
|
|
3506
3516
|
|
|
3507
|
-
:host([${
|
|
3517
|
+
:host([${K.OFFLINE}]) {
|
|
3508
3518
|
aspect-ratio: 16 / 9;
|
|
3509
3519
|
vindral-controller {
|
|
3510
3520
|
--vindral-ui-display: none;
|
|
@@ -3549,10 +3559,10 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3549
3559
|
--vindral-subtitle-offset: -48px;
|
|
3550
3560
|
}
|
|
3551
3561
|
</style>
|
|
3552
|
-
`,
|
|
3562
|
+
`, xs = (e) => {
|
|
3553
3563
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3554
3564
|
return `
|
|
3555
|
-
${
|
|
3565
|
+
${bs}
|
|
3556
3566
|
|
|
3557
3567
|
<vindral-controller>
|
|
3558
3568
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3590,8 +3600,8 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3590
3600
|
</vindral-center-overlay>
|
|
3591
3601
|
</vindral-controller>
|
|
3592
3602
|
`;
|
|
3593
|
-
},
|
|
3594
|
-
${
|
|
3603
|
+
}, Ss = `
|
|
3604
|
+
${bs}
|
|
3595
3605
|
|
|
3596
3606
|
<style>
|
|
3597
3607
|
#control-bar {
|
|
@@ -3615,100 +3625,100 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3615
3625
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3616
3626
|
</vindral-center-overlay>
|
|
3617
3627
|
</vindral-controller>
|
|
3618
|
-
`,
|
|
3628
|
+
`, Cs = document.createElement("template"), ws = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakSet(), Ms = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), Fs = class extends HTMLElement {
|
|
3619
3629
|
constructor() {
|
|
3620
|
-
super(), g(this,
|
|
3630
|
+
super(), g(this, J), f(this, ws, void 0), f(this, q, void 0), f(this, Ts, void 0), f(this, Es, void 0), f(this, Ds, void 0), f(this, Os, void 0), f(this, ks, /* @__PURE__ */ new Set()), f(this, As, () => {
|
|
3621
3631
|
Array.from(this.attributes).forEach((e) => {
|
|
3622
|
-
m(
|
|
3632
|
+
m(js, this).call(this, e.name, e.value);
|
|
3623
3633
|
});
|
|
3624
|
-
}), f(this,
|
|
3625
|
-
|
|
3626
|
-
}), f(this,
|
|
3634
|
+
}), f(this, js, (e, t) => {
|
|
3635
|
+
ys(e) && (v(t) ? m(q, this).setAttribute(e, t) : m(q, this).removeAttribute(e));
|
|
3636
|
+
}), f(this, Ms, () => {
|
|
3627
3637
|
Array.from(this.children).forEach((e) => {
|
|
3628
|
-
m(
|
|
3638
|
+
m(ks, this).add(e);
|
|
3629
3639
|
});
|
|
3630
|
-
}), f(this,
|
|
3631
|
-
let e = m(
|
|
3640
|
+
}), f(this, Ns, () => {
|
|
3641
|
+
let e = m(q, this).instance;
|
|
3632
3642
|
e && (e.on("is live", (e) => {
|
|
3633
|
-
e ? (this.removeAttribute(
|
|
3643
|
+
e ? (this.removeAttribute(K.OFFLINE), p(J, this, Vs).call(this)) : (this.setAttribute(K.OFFLINE, ""), p(J, this, Bs).call(this, "Stream is offline", "Please stand by"));
|
|
3634
3644
|
}), e.on("channels", (e) => {
|
|
3635
|
-
let t = m(
|
|
3636
|
-
n && p(
|
|
3645
|
+
let t = m(q, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3646
|
+
n && p(J, this, zs).call(this, n);
|
|
3637
3647
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3638
3648
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3639
|
-
n && p(
|
|
3649
|
+
n && p(J, this, zs).call(this, n);
|
|
3640
3650
|
}), e.on("error", (e) => {
|
|
3641
3651
|
if (e.code() === "connection_failed") {
|
|
3642
|
-
p(
|
|
3652
|
+
p(J, this, Bs).call(this, "Stream is offline", "Please stand by");
|
|
3643
3653
|
return;
|
|
3644
3654
|
}
|
|
3645
|
-
e.isFatal() && (e.code() === "access_forbidden" ? p(
|
|
3655
|
+
e.isFatal() && (e.code() === "access_forbidden" ? p(J, this, Bs).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? p(J, this, Bs).call(this, "Stream is offline", "Please stand by") : p(J, this, Bs).call(this, "An error occurred", e.message), m(Es, this).removeAttribute("hidden"), this.setAttribute(K.OFFLINE, ""), m(q, this).dispatchEvent(new CustomEvent(y.EXIT_FULLSCREEN)), m(q, this).dispatchEvent(new CustomEvent(y.EXIT_PIP)));
|
|
3646
3656
|
}));
|
|
3647
|
-
}), f(this,
|
|
3648
|
-
m(
|
|
3649
|
-
}), h(
|
|
3657
|
+
}), f(this, Ps, () => {
|
|
3658
|
+
m(q, this).connect(), m(Es, this).setAttribute("hidden", ""), p(J, this, Vs).call(this), m(q, this).focus();
|
|
3659
|
+
}), h(ws, this, this.attachShadow({ mode: "open" })), p(J, this, Ls).call(this), h(q, this, m(ws, this).querySelector("vindral-controller")), h(Ts, this, m(ws, this).querySelector("#vindral-message")), h(Es, this, m(ws, this).querySelector("#play-overlay")), h(Ds, this, m(ws, this).querySelector("#center-overlay"));
|
|
3650
3660
|
}
|
|
3651
3661
|
connectedCallback() {
|
|
3652
|
-
this.setAttribute(
|
|
3662
|
+
this.setAttribute(K.OFFLINE, ""), m(q, this).addEventListener("vindral-instance-ready", m(Ns, this)), p(J, this, Rs).call(this);
|
|
3653
3663
|
}
|
|
3654
3664
|
disconnectedCallback() {
|
|
3655
3665
|
var e;
|
|
3656
|
-
m(
|
|
3666
|
+
m(q, this).removeEventListener("vindral-instance-ready", m(Ns, this)), m(Es, this).removeEventListener("click", m(Ps, this)), (e = m(Os, this)) == null || e.stop();
|
|
3657
3667
|
}
|
|
3658
3668
|
attributeChangedCallback(e, t, n) {
|
|
3659
|
-
if (t !== n) if (e === _.MEDIA || e ===
|
|
3660
|
-
else if (e ===
|
|
3661
|
-
let e = m(
|
|
3662
|
-
e && (e.disabled = S(this.getAttribute(
|
|
3663
|
-
} else m(
|
|
3669
|
+
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) p(J, this, Ls).call(this);
|
|
3670
|
+
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3671
|
+
let e = m(ws, this).querySelector("vindral-poster-overlay");
|
|
3672
|
+
e && (e.disabled = S(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3673
|
+
} else m(js, this).call(this, e, n);
|
|
3664
3674
|
}
|
|
3665
3675
|
get instance() {
|
|
3666
|
-
return m(
|
|
3676
|
+
return m(q, this).instance;
|
|
3667
3677
|
}
|
|
3668
3678
|
get airPlay() {
|
|
3669
|
-
return m(
|
|
3679
|
+
return m(q, this).airPlay;
|
|
3670
3680
|
}
|
|
3671
3681
|
get timelineMarkers() {
|
|
3672
|
-
return m(
|
|
3682
|
+
return m(q, this).timelineMarkers;
|
|
3673
3683
|
}
|
|
3674
3684
|
set timelineMarkers(e) {
|
|
3675
|
-
m(
|
|
3685
|
+
m(q, this).timelineMarkers = e;
|
|
3676
3686
|
}
|
|
3677
3687
|
};
|
|
3678
|
-
function Ps() {
|
|
3679
|
-
let e = _e(this.getAttribute(_.MEDIA)), t = S(this.getAttribute(q.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3680
|
-
return e === "audio" ? bs : ys(t);
|
|
3681
|
-
}
|
|
3682
|
-
function Fs() {
|
|
3683
|
-
let e = m(Ss, this).hasChildNodes(), t = e ? m(J, this) : void 0, n = e ? m(ws, this) : void 0;
|
|
3684
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)), xs.innerHTML = p(Y, this, Ps).call(this);
|
|
3685
|
-
let r = xs.content.cloneNode(!0);
|
|
3686
|
-
h(J, this, r.querySelector("vindral-controller")), h(Cs, this, r.querySelector("#vindral-message")), h(ws, this, r.querySelector("#play-overlay")), h(Ts, this, r.querySelector("#center-overlay")), m(As, this).call(this), m(Ds, this).forEach((e) => {
|
|
3687
|
-
m(J, this).appendChild(e);
|
|
3688
|
-
}), m(Os, this).call(this), m(Ss, this).innerHTML = "", m(Ss, this).appendChild(r), this.isConnected && (m(J, this).addEventListener("vindral-instance-ready", m(js, this)), m(Es, this) && m(ws, this).addEventListener("click", m(Ms, this)));
|
|
3689
|
-
}
|
|
3690
3688
|
function Is() {
|
|
3689
|
+
let e = _e(this.getAttribute(_.MEDIA)), t = S(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3690
|
+
return e === "audio" ? Ss : xs(t);
|
|
3691
|
+
}
|
|
3692
|
+
function Ls() {
|
|
3693
|
+
let e = m(ws, this).hasChildNodes(), t = e ? m(q, this) : void 0, n = e ? m(Es, this) : void 0;
|
|
3694
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(Ns, this)), this.isConnected && n && m(Os, this) && n.removeEventListener("click", m(Ps, this)), Cs.innerHTML = p(J, this, Is).call(this);
|
|
3695
|
+
let r = Cs.content.cloneNode(!0);
|
|
3696
|
+
h(q, this, r.querySelector("vindral-controller")), h(Ts, this, r.querySelector("#vindral-message")), h(Es, this, r.querySelector("#play-overlay")), h(Ds, this, r.querySelector("#center-overlay")), m(Ms, this).call(this), m(ks, this).forEach((e) => {
|
|
3697
|
+
m(q, this).appendChild(e);
|
|
3698
|
+
}), m(As, this).call(this), m(ws, this).innerHTML = "", m(ws, this).appendChild(r), this.isConnected && (m(q, this).addEventListener("vindral-instance-ready", m(Ns, this)), m(Os, this) && m(Es, this).addEventListener("click", m(Ps, this)));
|
|
3699
|
+
}
|
|
3700
|
+
function Rs() {
|
|
3691
3701
|
var e;
|
|
3692
|
-
if (S(this.getAttribute(
|
|
3702
|
+
if (S(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3693
3703
|
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");
|
|
3694
3704
|
if (!n) {
|
|
3695
|
-
this.setAttribute(
|
|
3705
|
+
this.setAttribute(K.OFFLINE, ""), p(J, this, Bs).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3696
3706
|
return;
|
|
3697
3707
|
}
|
|
3698
|
-
h(
|
|
3708
|
+
h(Os, this, new ds({
|
|
3699
3709
|
url: t,
|
|
3700
3710
|
channelId: n,
|
|
3701
3711
|
authenticationToken: r,
|
|
3702
3712
|
infiniteReconnect: i
|
|
3703
|
-
})), m(
|
|
3704
|
-
m(
|
|
3705
|
-
}), m(
|
|
3706
|
-
p(
|
|
3707
|
-
}), m(
|
|
3708
|
-
this.setAttribute(
|
|
3709
|
-
}), m(
|
|
3710
|
-
}
|
|
3711
|
-
function
|
|
3713
|
+
})), m(Os, this).on("live", (e) => {
|
|
3714
|
+
m(q, this).connect(), this.removeAttribute("offline"), p(J, this, Vs).call(this), p(J, this, zs).call(this, e);
|
|
3715
|
+
}), m(Os, this).on("timeout", () => {
|
|
3716
|
+
p(J, this, Vs).call(this), m(Es, this).removeAttribute("hidden");
|
|
3717
|
+
}), m(Os, this).on("error", (e) => {
|
|
3718
|
+
this.setAttribute(K.OFFLINE, ""), p(J, this, Bs).call(this, e.title, e.message);
|
|
3719
|
+
}), m(Es, this).addEventListener("click", m(Ps, this)), this.hasAttribute("paused") && m(Os, this).start();
|
|
3720
|
+
}
|
|
3721
|
+
function zs(e) {
|
|
3712
3722
|
let t = he(this.getAttribute("title"), !1);
|
|
3713
3723
|
if (!t) return;
|
|
3714
3724
|
let n = this.getAttribute("poster"), r = typeof t == "string" ? t : e.name, i;
|
|
@@ -3722,19 +3732,19 @@ function Ls(e) {
|
|
|
3722
3732
|
poster: i
|
|
3723
3733
|
});
|
|
3724
3734
|
}
|
|
3725
|
-
function
|
|
3726
|
-
m(
|
|
3735
|
+
function Bs(e, t) {
|
|
3736
|
+
m(Ts, this).setAttribute("title", e), m(Ts, this).setAttribute("description", t), m(Ts, this).removeAttribute("hidden");
|
|
3727
3737
|
let n = this.getAttribute("poster");
|
|
3728
|
-
n ? m(
|
|
3738
|
+
n ? m(Ds, this).setAttribute("poster", n) : m(Ds, this).removeAttribute("poster"), m(Ds, this).setAttribute("backdrop", "");
|
|
3729
3739
|
}
|
|
3730
|
-
function
|
|
3731
|
-
m(
|
|
3740
|
+
function Vs() {
|
|
3741
|
+
m(Ts, this).setAttribute("hidden", ""), m(Ds, this).removeAttribute("backdrop");
|
|
3732
3742
|
}
|
|
3733
|
-
e(
|
|
3743
|
+
e(Fs, "observedAttributes", [...ba.observedAttributes, ...ns]);
|
|
3734
3744
|
//#endregion
|
|
3735
3745
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3736
|
-
var
|
|
3737
|
-
|
|
3746
|
+
var Hs = document.createElement("template");
|
|
3747
|
+
Hs.innerHTML = `
|
|
3738
3748
|
<style>
|
|
3739
3749
|
:host {
|
|
3740
3750
|
display: var(--poster-overlay-display);
|
|
@@ -3769,26 +3779,26 @@ Bs.innerHTML = `
|
|
|
3769
3779
|
}
|
|
3770
3780
|
</style>
|
|
3771
3781
|
`;
|
|
3772
|
-
var
|
|
3782
|
+
var Us = 6e3, Ws = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakMap(), qs = /* @__PURE__ */ new WeakMap(), Js = /* @__PURE__ */ new WeakSet(), Ys = /* @__PURE__ */ new WeakMap(), Xs = class extends HTMLElement {
|
|
3773
3783
|
constructor() {
|
|
3774
|
-
super(), g(this,
|
|
3775
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? p(
|
|
3776
|
-
}), f(this,
|
|
3784
|
+
super(), g(this, Js), f(this, Ws, null), f(this, Gs, null), f(this, Ks, null), f(this, qs, () => {
|
|
3785
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? p(Js, this, Zs).call(this) : p(Js, this, Qs).call(this);
|
|
3786
|
+
}), f(this, Ys, (e) => {
|
|
3777
3787
|
e.forEach((e) => {
|
|
3778
3788
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3779
3789
|
});
|
|
3780
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3790
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Hs.content.cloneNode(!0));
|
|
3781
3791
|
}
|
|
3782
3792
|
connectedCallback() {
|
|
3783
3793
|
var e;
|
|
3784
|
-
h(
|
|
3794
|
+
h(Ws, this, this.closest("vindral-controller")), (e = m(Ws, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", m(qs, this)), h(Ks, this, new IntersectionObserver(m(Ys, this))), m(Ks, this).observe(this);
|
|
3785
3795
|
}
|
|
3786
3796
|
disconnectedCallback() {
|
|
3787
3797
|
var e, t;
|
|
3788
|
-
(e = m(
|
|
3798
|
+
(e = m(Ws, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", m(qs, this)), (t = m(Ks, this)) == null || t.disconnect(), h(Ks, this, null), p(Js, this, Qs).call(this);
|
|
3789
3799
|
}
|
|
3790
3800
|
attributeChangedCallback(e, t, n) {
|
|
3791
|
-
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && p(
|
|
3801
|
+
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && p(Js, this, $s).call(this), (e === _.PAUSED || e === "disabled" || e === "intersecting") && m(qs, this).call(this));
|
|
3792
3802
|
}
|
|
3793
3803
|
get disabled() {
|
|
3794
3804
|
return this.hasAttribute("disabled");
|
|
@@ -3803,18 +3813,18 @@ var Vs = 6e3, Hs = /* @__PURE__ */ new WeakMap(), Us = /* @__PURE__ */ new WeakM
|
|
|
3803
3813
|
return this.hasAttribute(_.PAUSED);
|
|
3804
3814
|
}
|
|
3805
3815
|
};
|
|
3806
|
-
function
|
|
3807
|
-
m(
|
|
3816
|
+
function Zs() {
|
|
3817
|
+
m(Gs, this) === null && (p(Js, this, Qs).call(this), h(Gs, this, window.setInterval(() => p(Js, this, $s).call(this), Us)));
|
|
3808
3818
|
}
|
|
3809
|
-
function
|
|
3810
|
-
m(
|
|
3819
|
+
function Qs() {
|
|
3820
|
+
m(Gs, this) !== null && (clearInterval(m(Gs, this)), h(Gs, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3811
3821
|
}
|
|
3812
|
-
function
|
|
3822
|
+
function $s() {
|
|
3813
3823
|
if (!this.posterSrc) return;
|
|
3814
3824
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3815
3825
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3816
3826
|
}
|
|
3817
|
-
e(
|
|
3827
|
+
e(Xs, "observedAttributes", [
|
|
3818
3828
|
_.POSTER_SRC,
|
|
3819
3829
|
_.PAUSED,
|
|
3820
3830
|
"disabled",
|
|
@@ -3822,70 +3832,70 @@ e(Js, "observedAttributes", [
|
|
|
3822
3832
|
]);
|
|
3823
3833
|
//#endregion
|
|
3824
3834
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3825
|
-
var
|
|
3826
|
-
|
|
3835
|
+
var ec, tc = "\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", nc = document.createElement("template");
|
|
3836
|
+
nc.innerHTML = `
|
|
3827
3837
|
<style>
|
|
3828
3838
|
:host {
|
|
3829
3839
|
display: var(--rendition-menu-display);
|
|
3830
3840
|
}
|
|
3831
3841
|
</style>
|
|
3832
3842
|
|
|
3833
|
-
<slot name="button">${
|
|
3843
|
+
<slot name="button">${tc}</slot>
|
|
3834
3844
|
<slot name="listbox" hidden>
|
|
3835
3845
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3836
3846
|
</slot>
|
|
3837
3847
|
`;
|
|
3838
|
-
var
|
|
3848
|
+
var rc = /* @__PURE__ */ new WeakSet(), ic = class extends Be {
|
|
3839
3849
|
constructor() {
|
|
3840
3850
|
var e, t, n, r;
|
|
3841
|
-
super(), g(this,
|
|
3851
|
+
super(), g(this, rc), (e = this.shadowRoot) == null || e.appendChild(nc.content.cloneNode(!0)), this.button = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"), this.listbox = (n = this.shadowRoot) == null ? void 0 : n.querySelector("[part=listbox]"), this.listboxSlot = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot[name=listbox]");
|
|
3842
3852
|
}
|
|
3843
3853
|
connectedCallback() {
|
|
3844
|
-
super.connectedCallback(), p(
|
|
3854
|
+
super.connectedCallback(), p(rc, this, ac).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3845
3855
|
}
|
|
3846
3856
|
attributeChangedCallback(e, t, n) {
|
|
3847
|
-
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && p(
|
|
3857
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && p(rc, this, ac).call(this);
|
|
3848
3858
|
}
|
|
3849
3859
|
};
|
|
3850
|
-
|
|
3851
|
-
function
|
|
3860
|
+
ec = ic;
|
|
3861
|
+
function ac() {
|
|
3852
3862
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3853
3863
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3854
3864
|
}
|
|
3855
|
-
e(
|
|
3865
|
+
e(ic, "observedAttributes", [...x(ec, "observedAttributes", ec), _.RENDITION_LEVELS]);
|
|
3856
3866
|
//#endregion
|
|
3857
3867
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3858
|
-
var
|
|
3859
|
-
|
|
3860
|
-
var
|
|
3868
|
+
var oc = document.createElement("template");
|
|
3869
|
+
oc.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";
|
|
3870
|
+
var sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(), dc = /* @__PURE__ */ new WeakMap(), fc = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), pc = class extends HTMLElement {
|
|
3861
3871
|
constructor() {
|
|
3862
|
-
super(), g(this,
|
|
3872
|
+
super(), g(this, Y), f(this, sc, []), f(this, cc, 2 ** 53 - 1), f(this, lc, null), f(this, uc, []), f(this, dc, null), f(this, fc, null), e(this, "handleEvent", (e) => {
|
|
3863
3873
|
switch (e.type) {
|
|
3864
3874
|
case "keydown":
|
|
3865
|
-
p(
|
|
3875
|
+
p(Y, this, yc).call(this, e);
|
|
3866
3876
|
break;
|
|
3867
3877
|
}
|
|
3868
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3878
|
+
}), this.attachShadow({ mode: "open" }).appendChild(oc.content.cloneNode(!0));
|
|
3869
3879
|
}
|
|
3870
3880
|
connectedCallback() {
|
|
3871
3881
|
let e = this.getRootNode();
|
|
3872
3882
|
if (e instanceof ShadowRoot) {
|
|
3873
3883
|
var t;
|
|
3874
|
-
h(
|
|
3884
|
+
h(dc, this, e.host.closest("vindral-controller")), (t = m(dc, this)) == null || t.connectListener(this), p(Y, this, mc).call(this), p(Y, this, hc).call(this), h(fc, this, e.host), this.addEventListener("keydown", this);
|
|
3875
3885
|
}
|
|
3876
3886
|
}
|
|
3877
3887
|
disconnectedCallback() {
|
|
3878
3888
|
var e;
|
|
3879
|
-
(e = m(
|
|
3889
|
+
(e = m(dc, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3880
3890
|
}
|
|
3881
3891
|
attributeChangedCallback(e, t, n) {
|
|
3882
3892
|
t !== n && (e === _.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === _.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3883
3893
|
}
|
|
3884
3894
|
set list(e) {
|
|
3885
|
-
h(
|
|
3895
|
+
h(sc, this, e), p(Y, this, hc).call(this);
|
|
3886
3896
|
}
|
|
3887
3897
|
set maxVideoBitrate(e) {
|
|
3888
|
-
h(
|
|
3898
|
+
h(cc, this, e), p(Y, this, _c).call(this);
|
|
3889
3899
|
}
|
|
3890
3900
|
get keysUsed() {
|
|
3891
3901
|
return [
|
|
@@ -3901,10 +3911,10 @@ var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc =
|
|
|
3901
3911
|
}
|
|
3902
3912
|
focus() {
|
|
3903
3913
|
var e;
|
|
3904
|
-
(e = m(
|
|
3914
|
+
(e = m(lc, this)) == null || e.focus();
|
|
3905
3915
|
}
|
|
3906
3916
|
};
|
|
3907
|
-
function
|
|
3917
|
+
function mc() {
|
|
3908
3918
|
new IntersectionObserver((e) => {
|
|
3909
3919
|
e.forEach((e) => {
|
|
3910
3920
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3913,50 +3923,50 @@ function fc() {
|
|
|
3913
3923
|
} else this.style.height = "auto";
|
|
3914
3924
|
});
|
|
3915
3925
|
}, {
|
|
3916
|
-
root: m(
|
|
3926
|
+
root: m(dc, this),
|
|
3917
3927
|
threshold: 0
|
|
3918
3928
|
}).observe(this);
|
|
3919
3929
|
}
|
|
3920
|
-
function
|
|
3930
|
+
function hc() {
|
|
3921
3931
|
var e;
|
|
3922
3932
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
3923
|
-
t && (h(
|
|
3933
|
+
t && (h(uc, this, []), t.innerHTML = "", m(sc, this).sort((e, t) => {
|
|
3924
3934
|
var n, r;
|
|
3925
3935
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3926
3936
|
}).forEach((e) => {
|
|
3927
3937
|
var n, r, i, a, o, s, c, l;
|
|
3928
3938
|
let u = document.createElement("div");
|
|
3929
3939
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
3930
|
-
let ee = p(
|
|
3940
|
+
let ee = p(Y, this, gc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3931
3941
|
u.textContent = e.video ? me(e.video) : "";
|
|
3932
3942
|
let d = document.createElement("span");
|
|
3933
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${De(((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", () => p(
|
|
3943
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${De(((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", () => p(Y, this, vc).call(this, e)), m(uc, this).push({
|
|
3934
3944
|
el: u,
|
|
3935
3945
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3936
3946
|
}), t.appendChild(u);
|
|
3937
|
-
}), p(
|
|
3947
|
+
}), p(Y, this, _c).call(this));
|
|
3938
3948
|
}
|
|
3939
|
-
function
|
|
3949
|
+
function gc(e) {
|
|
3940
3950
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
3941
3951
|
}
|
|
3942
|
-
function
|
|
3943
|
-
m(
|
|
3944
|
-
let e = m(
|
|
3952
|
+
function _c() {
|
|
3953
|
+
m(lc, this) && (m(lc, this).removeAttribute("aria-selected"), m(lc, this).tabIndex = -1);
|
|
3954
|
+
let e = m(sc, this).sort((e, t) => {
|
|
3945
3955
|
var n, r;
|
|
3946
3956
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3947
|
-
}), t = m(
|
|
3957
|
+
}), t = m(sc, this).filter((e) => {
|
|
3948
3958
|
var t;
|
|
3949
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= m(
|
|
3959
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= m(cc, this);
|
|
3950
3960
|
})[0] || e[e.length - 1];
|
|
3951
3961
|
if (t) {
|
|
3952
|
-
let e = m(
|
|
3962
|
+
let e = m(uc, this).find((e) => {
|
|
3953
3963
|
var n;
|
|
3954
3964
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
3955
3965
|
});
|
|
3956
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), h(
|
|
3966
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), h(lc, this, e.el));
|
|
3957
3967
|
}
|
|
3958
3968
|
}
|
|
3959
|
-
function
|
|
3969
|
+
function vc(e) {
|
|
3960
3970
|
this.dispatchEvent(new Event("change", {
|
|
3961
3971
|
bubbles: !0,
|
|
3962
3972
|
composed: !0
|
|
@@ -3966,36 +3976,36 @@ function gc(e) {
|
|
|
3966
3976
|
detail: e
|
|
3967
3977
|
}));
|
|
3968
3978
|
}
|
|
3969
|
-
function
|
|
3979
|
+
function yc(e) {
|
|
3970
3980
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3971
3981
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3972
3982
|
var a;
|
|
3973
|
-
(a = m(
|
|
3983
|
+
(a = m(fc, this)) == null || a.hide();
|
|
3974
3984
|
} else if (t === "Enter" || t === " ") {
|
|
3975
3985
|
var o;
|
|
3976
|
-
(o = p(
|
|
3977
|
-
} else p(
|
|
3986
|
+
(o = p(Y, this, xc).call(this)) == null || (o = o.el) == null || o.click();
|
|
3987
|
+
} else p(Y, this, bc).call(this, e);
|
|
3978
3988
|
}
|
|
3979
|
-
function
|
|
3989
|
+
function bc(e) {
|
|
3980
3990
|
var t;
|
|
3981
|
-
let { key: n } = e, r = m(
|
|
3991
|
+
let { key: n } = e, r = m(uc, this), i = (t = p(Y, this, xc).call(this)) == null ? r[0] : t;
|
|
3982
3992
|
if (!i) return;
|
|
3983
3993
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3984
3994
|
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);
|
|
3985
3995
|
let s = r[o];
|
|
3986
|
-
s && (p(
|
|
3996
|
+
s && (p(Y, this, Sc).call(this, s.id), s.el.focus());
|
|
3987
3997
|
}
|
|
3988
|
-
function
|
|
3989
|
-
return m(
|
|
3998
|
+
function xc() {
|
|
3999
|
+
return m(uc, this).find((e) => e.el.tabIndex === 0);
|
|
3990
4000
|
}
|
|
3991
|
-
function
|
|
3992
|
-
for (let t of m(
|
|
4001
|
+
function Sc(e) {
|
|
4002
|
+
for (let t of m(uc, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
3993
4003
|
}
|
|
3994
|
-
e(
|
|
4004
|
+
e(pc, "observedAttributes", [_.RENDITION_LEVELS, _.MAX_VIDEO_BITRATE]);
|
|
3995
4005
|
//#endregion
|
|
3996
4006
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
3997
|
-
var
|
|
3998
|
-
|
|
4007
|
+
var Cc = document.createElement("template");
|
|
4008
|
+
Cc.innerHTML = `
|
|
3999
4009
|
<style>
|
|
4000
4010
|
:host {
|
|
4001
4011
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -4063,71 +4073,71 @@ xc.innerHTML = `
|
|
|
4063
4073
|
<div id="scroll-area"></div>
|
|
4064
4074
|
<slot id="content"></slot>
|
|
4065
4075
|
`;
|
|
4066
|
-
var
|
|
4076
|
+
var X = /* @__PURE__ */ new WeakMap(), wc = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), Ec = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), Oc = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakSet(), Ac = /* @__PURE__ */ new WeakMap(), jc = class extends HTMLElement {
|
|
4067
4077
|
constructor() {
|
|
4068
|
-
super(), g(this, Z), f(this,
|
|
4078
|
+
super(), g(this, Z), f(this, X, null), f(this, wc, null), f(this, Tc, !1), f(this, Ec, !1), f(this, Dc, !1), f(this, Oc, () => {
|
|
4069
4079
|
this.open && (this.open = !1);
|
|
4070
|
-
}), f(this,
|
|
4080
|
+
}), f(this, kc, null), e(this, "handleEvent", (e) => {
|
|
4071
4081
|
switch (e.type) {
|
|
4072
4082
|
case "touchstart":
|
|
4073
|
-
p(Z, this,
|
|
4083
|
+
p(Z, this, Nc).call(this, e);
|
|
4074
4084
|
break;
|
|
4075
4085
|
case "touchmove":
|
|
4076
|
-
p(Z, this,
|
|
4086
|
+
p(Z, this, Pc).call(this, e);
|
|
4077
4087
|
break;
|
|
4078
4088
|
case "touchend":
|
|
4079
|
-
p(Z, this,
|
|
4089
|
+
p(Z, this, Fc).call(this, e);
|
|
4080
4090
|
break;
|
|
4081
4091
|
}
|
|
4082
|
-
}), f(this,
|
|
4083
|
-
let e = m(
|
|
4092
|
+
}), f(this, Ac, () => {
|
|
4093
|
+
let e = m(Dc, this);
|
|
4084
4094
|
if (this.scrollTop === 0) {
|
|
4085
|
-
p(Z, this,
|
|
4095
|
+
p(Z, this, Uc).call(this, e);
|
|
4086
4096
|
return;
|
|
4087
4097
|
}
|
|
4088
|
-
if (!e && !p(Z, this,
|
|
4089
|
-
p(Z, this,
|
|
4098
|
+
if (!e && !p(Z, this, Ic).call(this)) {
|
|
4099
|
+
p(Z, this, Vc).call(this), p(Z, this, Uc).call(this);
|
|
4090
4100
|
return;
|
|
4091
4101
|
}
|
|
4092
|
-
!this.visible && this.scrollTop > 0 && !m(
|
|
4093
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4102
|
+
!this.visible && this.scrollTop > 0 && !m(Tc, this) ? p(Z, this, Wc).call(this) : !m(Tc, this) && p(Z, this, Rc).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4103
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Cc.content.cloneNode(!0));
|
|
4094
4104
|
}
|
|
4095
4105
|
connectedCallback() {
|
|
4096
4106
|
let e = this.getRootNode();
|
|
4097
4107
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4098
4108
|
var t, n, r;
|
|
4099
|
-
h(
|
|
4109
|
+
h(X, this, e.querySelector("vindral-controller")), (t = m(X, this)) == null || t.connectListener(this), h(wc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = m(wc, this)) == null || r.addEventListener("click", m(Oc, this));
|
|
4100
4110
|
let s = this.hasAttribute("touch-enabled");
|
|
4101
|
-
if (h(
|
|
4111
|
+
if (h(Dc, this, ce() && s), !m(Dc, this)) this.setAttribute("snap", "");
|
|
4102
4112
|
else {
|
|
4103
4113
|
var i, a, o;
|
|
4104
|
-
(i = m(
|
|
4114
|
+
(i = m(X, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = m(X, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = m(X, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
4105
4115
|
}
|
|
4106
|
-
this.addEventListener("scroll", m(
|
|
4116
|
+
this.addEventListener("scroll", m(Ac, this));
|
|
4107
4117
|
}
|
|
4108
4118
|
}
|
|
4109
4119
|
disconnectedCallback() {
|
|
4110
4120
|
var e, t, n, r, i;
|
|
4111
|
-
(e = m(
|
|
4121
|
+
(e = m(wc, this)) == null || e.removeEventListener("click", m(Oc, this)), this.removeEventListener("scroll", m(Ac, this)), (t = m(X, this)) == null || t.removeEventListener("touchstart", this), (n = m(X, this)) == null || n.removeEventListener("touchmove", this), (r = m(X, this)) == null || r.removeEventListener("touchend", this), (i = m(X, this)) == null || i.disconnectListener(this);
|
|
4112
4122
|
}
|
|
4113
4123
|
attributeChangedCallback(e, t, n) {
|
|
4114
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this,
|
|
4124
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this, Lc).call(this) && setTimeout(() => {
|
|
4115
4125
|
this.open = !1;
|
|
4116
4126
|
}, 300), e === "open")) if (n !== null) {
|
|
4117
4127
|
var r;
|
|
4118
|
-
h(
|
|
4119
|
-
top: (r = m(
|
|
4128
|
+
h(Tc, this, !1), this.scrollTop > 0 && p(Z, this, Wc).call(this), this.scrollTo({
|
|
4129
|
+
top: (r = m(wc, this)) == null ? void 0 : r.clientHeight,
|
|
4120
4130
|
behavior: "smooth"
|
|
4121
4131
|
});
|
|
4122
|
-
} else p(Z, this,
|
|
4132
|
+
} else p(Z, this, Hc).call(this);
|
|
4123
4133
|
}
|
|
4124
4134
|
set open(e) {
|
|
4125
4135
|
if (e) {
|
|
4126
4136
|
this.setAttribute("open", "");
|
|
4127
4137
|
return;
|
|
4128
4138
|
}
|
|
4129
|
-
let t = this.hasAttribute("open"), n = this.visible || p(Z, this,
|
|
4130
|
-
t ? this.removeAttribute("open") : n ? p(Z, this,
|
|
4139
|
+
let t = this.hasAttribute("open"), n = this.visible || p(Z, this, Lc).call(this);
|
|
4140
|
+
t ? this.removeAttribute("open") : n ? p(Z, this, Hc).call(this) : (h(Tc, this, !1), this.removeAttribute("snap-touch"));
|
|
4131
4141
|
}
|
|
4132
4142
|
get open() {
|
|
4133
4143
|
return this.hasAttribute("open");
|
|
@@ -4139,125 +4149,125 @@ var Sc = /* @__PURE__ */ new WeakMap(), Cc = /* @__PURE__ */ new WeakMap(), wc =
|
|
|
4139
4149
|
return this.hasAttribute("visible");
|
|
4140
4150
|
}
|
|
4141
4151
|
};
|
|
4142
|
-
function
|
|
4143
|
-
return p(Z, this,
|
|
4152
|
+
function Mc() {
|
|
4153
|
+
return p(Z, this, Ic).call(this) || p(Z, this, Bc).call(this) || p(Z, this, Lc).call(this);
|
|
4144
4154
|
}
|
|
4145
|
-
function
|
|
4155
|
+
function Nc(e) {
|
|
4146
4156
|
let t = e.touches[0];
|
|
4147
|
-
t && (h(
|
|
4157
|
+
t && (h(Ec, this, p(Z, this, Mc).call(this)), m(Ec, this) && (h(Tc, this, !1), h(kc, this, t.clientY)));
|
|
4148
4158
|
}
|
|
4149
|
-
function
|
|
4150
|
-
if (!(!m(
|
|
4151
|
-
let t = e.touches[0].clientY, n = m(
|
|
4159
|
+
function Pc(e) {
|
|
4160
|
+
if (!(!m(Ec, this) || m(kc, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4161
|
+
let t = e.touches[0].clientY, n = m(kc, this) - t;
|
|
4152
4162
|
this.scrollTop = Math.max(0, n);
|
|
4153
4163
|
}
|
|
4154
4164
|
}
|
|
4155
|
-
function
|
|
4156
|
-
m(
|
|
4165
|
+
function Fc(e) {
|
|
4166
|
+
m(Ec, this) && !m(Tc, this) && p(Z, this, Lc).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), h(kc, this, null), h(Ec, this, !1);
|
|
4157
4167
|
}
|
|
4158
|
-
function
|
|
4168
|
+
function Ic() {
|
|
4159
4169
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4160
4170
|
}
|
|
4161
|
-
function
|
|
4171
|
+
function Lc() {
|
|
4162
4172
|
return this.scrollTop > 0;
|
|
4163
4173
|
}
|
|
4164
|
-
function
|
|
4174
|
+
function Rc() {
|
|
4165
4175
|
var e;
|
|
4166
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(
|
|
4176
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(wc, this)) == null ? void 0 : e.clientHeight);
|
|
4167
4177
|
}
|
|
4168
|
-
function
|
|
4178
|
+
function zc() {
|
|
4169
4179
|
var e;
|
|
4170
|
-
let t = (e = m(
|
|
4180
|
+
let t = (e = m(wc, this)) == null ? void 0 : e.clientHeight;
|
|
4171
4181
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4172
4182
|
}
|
|
4173
|
-
function
|
|
4183
|
+
function Bc() {
|
|
4174
4184
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4175
|
-
return Number.isNaN(t) ? p(Z, this,
|
|
4185
|
+
return Number.isNaN(t) ? p(Z, this, zc).call(this) > 0 : t > 0;
|
|
4176
4186
|
}
|
|
4177
|
-
function
|
|
4187
|
+
function Vc() {
|
|
4178
4188
|
let e = this.style.scrollBehavior;
|
|
4179
4189
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4180
4190
|
top: 0,
|
|
4181
4191
|
behavior: "auto"
|
|
4182
4192
|
}), this.style.scrollBehavior = e;
|
|
4183
4193
|
}
|
|
4184
|
-
function
|
|
4185
|
-
h(
|
|
4194
|
+
function Hc() {
|
|
4195
|
+
h(Tc, this, !0), this.removeAttribute("snap-touch"), p(Z, this, Gc).call(this), this.scrollTo({
|
|
4186
4196
|
top: 0,
|
|
4187
4197
|
behavior: "smooth"
|
|
4188
4198
|
});
|
|
4189
4199
|
}
|
|
4190
|
-
function
|
|
4191
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), h(
|
|
4200
|
+
function Uc(e = !1) {
|
|
4201
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), h(Tc, this, !1), p(Z, this, Gc).call(this);
|
|
4192
4202
|
}
|
|
4193
|
-
function
|
|
4203
|
+
function Wc() {
|
|
4194
4204
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(y.LOCK_UI, {
|
|
4195
4205
|
bubbles: !0,
|
|
4196
4206
|
composed: !0
|
|
4197
4207
|
})));
|
|
4198
4208
|
}
|
|
4199
|
-
function
|
|
4209
|
+
function Gc() {
|
|
4200
4210
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(y.UNLOCK_UI, {
|
|
4201
4211
|
bubbles: !0,
|
|
4202
4212
|
composed: !0
|
|
4203
4213
|
})));
|
|
4204
4214
|
}
|
|
4205
|
-
e(
|
|
4215
|
+
e(jc, "observedAttributes", [
|
|
4206
4216
|
_.USER_INTERACTING,
|
|
4207
4217
|
"open",
|
|
4208
4218
|
"touch-enabled"
|
|
4209
4219
|
]);
|
|
4210
4220
|
//#endregion
|
|
4211
4221
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4212
|
-
var
|
|
4213
|
-
|
|
4214
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4222
|
+
var Kc = 1e3, qc = 8, Jc = document.createElement("template");
|
|
4223
|
+
Jc.innerHTML = "\n <style>\n :host {\n --buffered: 0;\n --vindral-range-thickness: 3px;\n --vindral-range-hover-thickness: 5px;\n --vindral-range-thumb-size: 10px;\n --vindral-range-thumb-hover-size: 15px;\n --vindral-range-fill-color: linear-gradient(\n 90deg,\n #03a9f4 0%,\n #03a9f4 calc(100% - min(20%, 150px)),\n #b3e5fc 100%\n );\n --vindral-range-thumb-color: #03a9f4;\n display: var(--seek-bar-display);\n position: relative;\n }\n\n :host([data-no-duration]) {\n display: none;\n }\n\n #hover-preview {\n position: absolute;\n background-color: rgba(255, 255, 255, 0.6);\n opacity: 0;\n pointer-events: none;\n z-index: 1;\n }\n\n #time-tooltip {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%) translateY(-8px);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s;\n z-index: 10;\n }\n\n @media (hover: none) {\n #time-tooltip {\n display: none;\n }\n }\n\n #markers {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 2;\n }\n\n .marker {\n position: absolute;\n top: calc(50% - var(--vindral-seek-bar-marker-size, 6px) / 2);\n width: var(--vindral-seek-bar-marker-size, 6px);\n height: var(--vindral-seek-bar-marker-size, 6px);\n border-radius: 50%;\n transform: translateX(-50%);\n background: var(--vindral-seek-bar-marker-color, #ffffff);\n }\n </style>\n\n <div id=\"buffered-track\"></div>\n <div id=\"hover-preview\"></div>\n <div id=\"markers\"></div>\n <div id=\"time-tooltip\"></div>\n";
|
|
4224
|
+
var Q = /* @__PURE__ */ new WeakMap(), Yc = /* @__PURE__ */ new WeakMap(), Xc = /* @__PURE__ */ new WeakMap(), Zc = /* @__PURE__ */ new WeakMap(), Qc = /* @__PURE__ */ new WeakMap(), $c = /* @__PURE__ */ new WeakMap(), el = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new WeakMap(), rl = /* @__PURE__ */ new WeakMap(), il = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), 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 = class extends _i {
|
|
4215
4225
|
constructor() {
|
|
4216
4226
|
var e, t, n, r;
|
|
4217
|
-
super(), g(this, $), f(this, Q, void 0), f(this,
|
|
4218
|
-
if (!p($, this,
|
|
4227
|
+
super(), g(this, $), f(this, Q, void 0), f(this, Yc, void 0), f(this, Xc, void 0), f(this, Zc, void 0), f(this, Qc, []), f(this, $c, null), f(this, el, !1), f(this, tl, null), f(this, nl, null), f(this, rl, !1), f(this, il, !1), f(this, al, (e) => {
|
|
4228
|
+
if (!p($, this, ml).call(this) || p($, this, hl).call(this)) {
|
|
4219
4229
|
e.preventDefault();
|
|
4220
4230
|
return;
|
|
4221
4231
|
}
|
|
4222
|
-
h(
|
|
4232
|
+
h(el, this, !0), h(nl, this, e.pointerId);
|
|
4223
4233
|
try {
|
|
4224
4234
|
this.setPointerCapture(e.pointerId);
|
|
4225
4235
|
} catch (e) {}
|
|
4226
|
-
p($, this,
|
|
4227
|
-
}), f(this,
|
|
4228
|
-
if (!(!p($, this,
|
|
4229
|
-
if (m(
|
|
4230
|
-
e.preventDefault(), p($, this,
|
|
4236
|
+
p($, this, Cl).call(this, e);
|
|
4237
|
+
}), f(this, ol, (e) => {
|
|
4238
|
+
if (!(!p($, this, ml).call(this) || p($, this, hl).call(this))) {
|
|
4239
|
+
if (m(tl, this) && (cancelAnimationFrame(m(tl, this)), h(tl, this, null)), m(el, this) && e.pointerId === m(nl, this)) {
|
|
4240
|
+
e.preventDefault(), p($, this, Cl).call(this, e);
|
|
4231
4241
|
return;
|
|
4232
4242
|
}
|
|
4233
|
-
h(
|
|
4243
|
+
h(tl, this, requestAnimationFrame(() => {
|
|
4234
4244
|
var t;
|
|
4235
|
-
if (e.pointerType !== "mouse" || m(
|
|
4236
|
-
m(
|
|
4245
|
+
if (e.pointerType !== "mouse" || m(el, this) || !this.duration) {
|
|
4246
|
+
m(Xc, this).style.opacity = "0", h(tl, this, null);
|
|
4237
4247
|
return;
|
|
4238
4248
|
}
|
|
4239
|
-
let n = p($, this,
|
|
4240
|
-
if (p($, this,
|
|
4249
|
+
let n = p($, this, Sl).call(this, e.clientX), r = p($, this, bl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4250
|
+
if (p($, this, Tl).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4241
4251
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4242
|
-
m(
|
|
4243
|
-
} else m(
|
|
4244
|
-
h(
|
|
4252
|
+
m(Xc, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, m(Xc, this).style.opacity = "1";
|
|
4253
|
+
} else m(Xc, this).style.opacity = "0";
|
|
4254
|
+
h(tl, this, null);
|
|
4245
4255
|
}));
|
|
4246
4256
|
}
|
|
4247
|
-
}), f(this,
|
|
4248
|
-
if (e.pointerId === m(
|
|
4257
|
+
}), f(this, sl, (e) => {
|
|
4258
|
+
if (e.pointerId === m(nl, this)) {
|
|
4249
4259
|
try {
|
|
4250
4260
|
this.releasePointerCapture(e.pointerId);
|
|
4251
4261
|
} catch (e) {}
|
|
4252
|
-
h(
|
|
4262
|
+
h(el, this, !1), h(nl, this, null), e.pointerType !== "mouse" && (m(Yc, this).style.opacity = "0"), m(il, this) && p($, this, Ol).call(this) && (h(rl, this, !1), h(il, this, !1));
|
|
4253
4263
|
}
|
|
4254
|
-
}), f(this, sl, () => {
|
|
4255
|
-
this.duration && !p($, this, ml).call(this) && (m(Jc, this).style.opacity = "1");
|
|
4256
4264
|
}), f(this, cl, () => {
|
|
4257
|
-
|
|
4258
|
-
}), f(this, ll, (
|
|
4259
|
-
|
|
4260
|
-
|
|
4265
|
+
this.duration && !p($, this, hl).call(this) && (m(Yc, this).style.opacity = "1");
|
|
4266
|
+
}), f(this, ll, () => {
|
|
4267
|
+
m(Yc, this).style.opacity = "0", m(Xc, this).style.opacity = "0";
|
|
4268
|
+
}), f(this, ul, (e) => {
|
|
4269
|
+
if (p($, this, hl).call(this) || !m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this))) return;
|
|
4270
|
+
let t = p($, this, fl).call(this);
|
|
4261
4271
|
if (t <= 0) return;
|
|
4262
4272
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4263
4273
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4265,46 +4275,46 @@ var Q = /* @__PURE__ */ new WeakMap(), Jc = /* @__PURE__ */ new WeakMap(), Yc =
|
|
|
4265
4275
|
r = Math.max(0, n - 5);
|
|
4266
4276
|
break;
|
|
4267
4277
|
case "ArrowRight":
|
|
4268
|
-
if (p($, this,
|
|
4278
|
+
if (p($, this, Ol).call(this)) return;
|
|
4269
4279
|
r = Math.min(t, n + 5);
|
|
4270
4280
|
break;
|
|
4271
4281
|
case "Home":
|
|
4272
4282
|
r = 0;
|
|
4273
4283
|
break;
|
|
4274
4284
|
case "End":
|
|
4275
|
-
if (p($, this,
|
|
4285
|
+
if (p($, this, Ol).call(this)) return;
|
|
4276
4286
|
r = t;
|
|
4277
4287
|
break;
|
|
4278
4288
|
default: return;
|
|
4279
4289
|
}
|
|
4280
4290
|
let i = Math.min(r / t, 1);
|
|
4281
|
-
p($, this,
|
|
4282
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4291
|
+
p($, this, wl).call(this, i);
|
|
4292
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Jc.content.cloneNode(!0)), h(Yc, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), h(Xc, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), h(Zc, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), this.addEventListener("pointerdown", m(al, this)), this.addEventListener("pointermove", m(ol, this)), this.addEventListener("pointerup", m(sl, this)), this.addEventListener("pointercancel", m(sl, this)), this.addEventListener("mouseenter", m(cl, this)), this.addEventListener("mouseleave", m(ll, this));
|
|
4283
4293
|
}
|
|
4284
4294
|
connectedCallback() {
|
|
4285
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), p($, this,
|
|
4295
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), p($, this, xl).call(this), this.addEventListener("keydown", m(ul, this)), p($, this, Ol).call(this) && (this.range.value = "1", p($, this, xl).call(this)), p($, this, gl).call(this), p($, this, vl).call(this);
|
|
4286
4296
|
}
|
|
4287
4297
|
disconnectedCallback() {
|
|
4288
|
-
super.disconnectedCallback(), p($, this,
|
|
4298
|
+
super.disconnectedCallback(), p($, this, yl).call(this), this.removeEventListener("pointerdown", m(al, this)), this.removeEventListener("pointermove", m(ol, this)), this.removeEventListener("pointerup", m(sl, this)), this.removeEventListener("pointercancel", m(sl, this)), this.removeEventListener("mouseenter", m(cl, this)), this.removeEventListener("mouseleave", m(ll, this)), this.removeEventListener("keydown", m(ul, this)), h(nl, this, null);
|
|
4289
4299
|
}
|
|
4290
4300
|
attributeChangedCallback(e, t, n) {
|
|
4291
4301
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4292
4302
|
case _.TIMESHIFT_POSITION:
|
|
4293
|
-
if (p($, this,
|
|
4294
|
-
m(
|
|
4303
|
+
if (p($, this, Ol).call(this)) {
|
|
4304
|
+
m(el, this) ? h(il, this, !0) : (h(rl, this, !1), h(il, this, !1)), this.range.value = "1", p($, this, xl).call(this);
|
|
4295
4305
|
return;
|
|
4296
4306
|
}
|
|
4297
4307
|
if (m(Q, this)) {
|
|
4298
|
-
h(
|
|
4308
|
+
h(il, this, !1);
|
|
4299
4309
|
let e = Math.max(parseFloat(n) / m(Q, this), 0);
|
|
4300
|
-
this.range.value = e.toString(), p($, this,
|
|
4310
|
+
this.range.value = e.toString(), p($, this, xl).call(this);
|
|
4301
4311
|
}
|
|
4302
4312
|
break;
|
|
4303
4313
|
case _.DURATION:
|
|
4304
|
-
h(Q, this, parseFloat(n) || 0), p($, this,
|
|
4314
|
+
h(Q, this, parseFloat(n) || 0), p($, this, xl).call(this), p($, this, gl).call(this), p($, this, vl).call(this);
|
|
4305
4315
|
break;
|
|
4306
4316
|
case _.TIMELINE_MARKERS:
|
|
4307
|
-
h(
|
|
4317
|
+
h(Qc, this, Pr(n)), p($, this, gl).call(this), p($, this, vl).call(this);
|
|
4308
4318
|
break;
|
|
4309
4319
|
}
|
|
4310
4320
|
}
|
|
@@ -4322,54 +4332,54 @@ var Q = /* @__PURE__ */ new WeakMap(), Jc = /* @__PURE__ */ new WeakMap(), Yc =
|
|
|
4322
4332
|
this.setAttribute(_.DURATION, e.toString());
|
|
4323
4333
|
}
|
|
4324
4334
|
};
|
|
4325
|
-
function
|
|
4335
|
+
function fl() {
|
|
4326
4336
|
return m(Q, this) ? m(Q, this) : 1;
|
|
4327
4337
|
}
|
|
4328
|
-
function
|
|
4338
|
+
function pl() {
|
|
4329
4339
|
let e = m(Q, this);
|
|
4330
4340
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4331
4341
|
}
|
|
4332
|
-
function pl() {
|
|
4333
|
-
return p($, this, fl).call(this) !== void 0;
|
|
4334
|
-
}
|
|
4335
4342
|
function ml() {
|
|
4336
|
-
return
|
|
4343
|
+
return p($, this, pl).call(this) !== void 0;
|
|
4337
4344
|
}
|
|
4338
4345
|
function hl() {
|
|
4346
|
+
return m(rl, this);
|
|
4347
|
+
}
|
|
4348
|
+
function gl() {
|
|
4339
4349
|
var e;
|
|
4340
|
-
let t = Date.now(), n = (e = m(Q, this)) == null ? 0 : e, r = m(
|
|
4341
|
-
for (let e of m(
|
|
4342
|
-
let a =
|
|
4350
|
+
let t = Date.now(), n = (e = m(Q, this)) == null ? 0 : e, r = m(Zc, this).children, i = 0;
|
|
4351
|
+
for (let e of m(Qc, this)) {
|
|
4352
|
+
let a = Fr(e.time, t, n);
|
|
4343
4353
|
if (a === null) continue;
|
|
4344
4354
|
let o = r[i];
|
|
4345
|
-
o || (o = document.createElement("div"), o.className = "marker", m(
|
|
4355
|
+
o || (o = document.createElement("div"), o.className = "marker", m(Zc, 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++;
|
|
4346
4356
|
}
|
|
4347
|
-
for (; m(
|
|
4357
|
+
for (; m(Zc, this).children.length > i;) {
|
|
4348
4358
|
var a;
|
|
4349
|
-
(a = m(
|
|
4359
|
+
(a = m(Zc, this).lastElementChild) == null || a.remove();
|
|
4350
4360
|
}
|
|
4351
4361
|
}
|
|
4352
|
-
function
|
|
4353
|
-
let e = p($, this,
|
|
4362
|
+
function _l() {
|
|
4363
|
+
let e = p($, this, pl).call(this);
|
|
4354
4364
|
if (e === void 0) return !1;
|
|
4355
4365
|
let t = Date.now() - e * 1e3;
|
|
4356
|
-
return m(
|
|
4357
|
-
}
|
|
4358
|
-
function _l() {
|
|
4359
|
-
this.isConnected && p($, this, gl).call(this) ? m(Qc, this) === null && h(Qc, this, window.setInterval(() => {
|
|
4360
|
-
p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4361
|
-
}, Gc)) : p($, this, vl).call(this);
|
|
4366
|
+
return m(Qc, this).some((e) => e.time >= t);
|
|
4362
4367
|
}
|
|
4363
4368
|
function vl() {
|
|
4364
|
-
|
|
4369
|
+
this.isConnected && p($, this, _l).call(this) ? m($c, this) === null && h($c, this, window.setInterval(() => {
|
|
4370
|
+
p($, this, gl).call(this), p($, this, vl).call(this);
|
|
4371
|
+
}, Kc)) : p($, this, yl).call(this);
|
|
4372
|
+
}
|
|
4373
|
+
function yl() {
|
|
4374
|
+
m($c, this) !== null && (window.clearInterval(m($c, this)), h($c, this, null));
|
|
4365
4375
|
}
|
|
4366
|
-
function
|
|
4367
|
-
if (m(
|
|
4376
|
+
function bl(e) {
|
|
4377
|
+
if (m(Qc, this).length === 0 || !m(Q, this)) return null;
|
|
4368
4378
|
let t = this.getBoundingClientRect().width;
|
|
4369
4379
|
if (!t) return null;
|
|
4370
|
-
let n =
|
|
4371
|
-
for (let t of m(
|
|
4372
|
-
let a =
|
|
4380
|
+
let n = qc / t, r = Date.now(), i = null;
|
|
4381
|
+
for (let t of m(Qc, this)) {
|
|
4382
|
+
let a = Fr(t.time, r, m(Q, this));
|
|
4373
4383
|
if (a === null) continue;
|
|
4374
4384
|
let o = Math.abs(a - e);
|
|
4375
4385
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4379,59 +4389,59 @@ function yl(e) {
|
|
|
4379
4389
|
}
|
|
4380
4390
|
return i;
|
|
4381
4391
|
}
|
|
4382
|
-
function
|
|
4383
|
-
let e = p($, this,
|
|
4384
|
-
!m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), m(
|
|
4392
|
+
function xl() {
|
|
4393
|
+
let e = p($, this, fl).call(this);
|
|
4394
|
+
!m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), m(el, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${p($, this, kl).call(this, this.range.valueAsNumber * e)} of ${p($, this, kl).call(this, e)}`), !m(el, this) && !p($, this, hl).call(this) && p($, this, Dl).call(this, this.range.valueAsNumber));
|
|
4385
4395
|
}
|
|
4386
|
-
function
|
|
4396
|
+
function Sl(e) {
|
|
4387
4397
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4388
4398
|
return Math.max(0, Math.min(1, n));
|
|
4389
4399
|
}
|
|
4390
|
-
function
|
|
4400
|
+
function Cl(e) {
|
|
4391
4401
|
var t;
|
|
4392
|
-
let n = p($, this,
|
|
4393
|
-
p($, this,
|
|
4402
|
+
let n = p($, this, Sl).call(this, e.clientX), r = p($, this, bl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4403
|
+
p($, this, Tl).call(this, i, r), m(el, this) || (m(Yc, this).style.opacity = "1"), p($, this, wl).call(this, i);
|
|
4394
4404
|
}
|
|
4395
|
-
function
|
|
4396
|
-
if (p($, this,
|
|
4397
|
-
let t = e * p($, this,
|
|
4398
|
-
this.range.value = e.toString(), this.updateBar(), p($, this,
|
|
4405
|
+
function wl(e) {
|
|
4406
|
+
if (p($, this, hl).call(this) || p($, this, Dl).call(this, e)) return;
|
|
4407
|
+
let t = e * p($, this, fl).call(this);
|
|
4408
|
+
this.range.value = e.toString(), this.updateBar(), p($, this, El).call(this, t);
|
|
4399
4409
|
}
|
|
4400
|
-
function
|
|
4410
|
+
function Tl(e, t) {
|
|
4401
4411
|
if (!m(Q, this) || !Number.isFinite(m(Q, this))) return;
|
|
4402
|
-
let n = e * m(Q, this), r = m(Q, this) - n, i = `-${p($, this,
|
|
4403
|
-
m(
|
|
4412
|
+
let n = e * m(Q, this), r = m(Q, this) - n, i = `-${p($, this, kl).call(this, r)}`;
|
|
4413
|
+
m(Yc, this).textContent = t ? `${t.marker.label}: ${i}` : i, m(Yc, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4404
4414
|
}
|
|
4405
|
-
function
|
|
4415
|
+
function El(e) {
|
|
4406
4416
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4407
4417
|
bubbles: !0,
|
|
4408
4418
|
composed: !0,
|
|
4409
4419
|
detail: e
|
|
4410
4420
|
}));
|
|
4411
4421
|
}
|
|
4412
|
-
function
|
|
4413
|
-
return m(
|
|
4422
|
+
function Dl(e) {
|
|
4423
|
+
return m(rl, this) || p($, this, Ol).call(this) || e < .999 ? !1 : (h(rl, this, !0), h(il, this, !1), this.dispatchEvent(new CustomEvent(y.GO_LIVE, {
|
|
4414
4424
|
bubbles: !0,
|
|
4415
4425
|
composed: !0
|
|
4416
4426
|
})), !0);
|
|
4417
4427
|
}
|
|
4418
|
-
function
|
|
4428
|
+
function Ol() {
|
|
4419
4429
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4420
4430
|
}
|
|
4421
|
-
function
|
|
4431
|
+
function kl(e) {
|
|
4422
4432
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4423
4433
|
return m(Q, this) && m(Q, this) >= 3600 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
4424
4434
|
}
|
|
4425
|
-
e(
|
|
4426
|
-
...
|
|
4435
|
+
e(dl, "observedAttributes", [
|
|
4436
|
+
..._i.observedAttributes,
|
|
4427
4437
|
_.TIMESHIFT_POSITION,
|
|
4428
4438
|
_.DURATION,
|
|
4429
4439
|
_.TIMELINE_MARKERS
|
|
4430
4440
|
]);
|
|
4431
4441
|
//#endregion
|
|
4432
4442
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4433
|
-
var
|
|
4434
|
-
|
|
4443
|
+
var Al = document.createElement("template");
|
|
4444
|
+
Al.innerHTML = `
|
|
4435
4445
|
<style>
|
|
4436
4446
|
:host {
|
|
4437
4447
|
display: var(--play-overlay-display);
|
|
@@ -4491,51 +4501,51 @@ kl.innerHTML = `
|
|
|
4491
4501
|
</slot>
|
|
4492
4502
|
</slot>
|
|
4493
4503
|
`;
|
|
4494
|
-
var
|
|
4504
|
+
var jl = /* @__PURE__ */ new WeakMap(), Ml = /* @__PURE__ */ new WeakMap(), Nl = /* @__PURE__ */ new WeakMap(), Pl = /* @__PURE__ */ new WeakMap(), Fl = class extends HTMLElement {
|
|
4495
4505
|
constructor() {
|
|
4496
|
-
super(), f(this,
|
|
4506
|
+
super(), f(this, jl, null), f(this, Ml, () => {
|
|
4497
4507
|
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, {
|
|
4498
4508
|
bubbles: !0,
|
|
4499
4509
|
composed: !0
|
|
4500
4510
|
}));
|
|
4501
|
-
}), f(this,
|
|
4511
|
+
}), f(this, Nl, (e) => {
|
|
4502
4512
|
let { key: t } = e;
|
|
4503
4513
|
if (!this.keysUsed.includes(t)) {
|
|
4504
|
-
this.removeEventListener("keyup", m(
|
|
4514
|
+
this.removeEventListener("keyup", m(Nl, this));
|
|
4505
4515
|
return;
|
|
4506
4516
|
}
|
|
4507
4517
|
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, {
|
|
4508
4518
|
bubbles: !0,
|
|
4509
4519
|
composed: !0
|
|
4510
4520
|
}));
|
|
4511
|
-
}), f(this,
|
|
4521
|
+
}), f(this, Pl, (e) => {
|
|
4512
4522
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4513
4523
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4514
|
-
this.removeEventListener("keyup", m(
|
|
4524
|
+
this.removeEventListener("keyup", m(Nl, this));
|
|
4515
4525
|
return;
|
|
4516
4526
|
}
|
|
4517
|
-
this.addEventListener("keyup", m(
|
|
4518
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4527
|
+
this.addEventListener("keyup", m(Nl, this), { once: !0 });
|
|
4528
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Al.content.cloneNode(!0));
|
|
4519
4529
|
}
|
|
4520
4530
|
get keysUsed() {
|
|
4521
4531
|
return ["Enter", " "];
|
|
4522
4532
|
}
|
|
4523
4533
|
connectedCallback() {
|
|
4524
4534
|
var e;
|
|
4525
|
-
h(
|
|
4535
|
+
h(jl, this, this.closest("vindral-controller")), (e = m(jl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4526
4536
|
}
|
|
4527
4537
|
enable() {
|
|
4528
|
-
this.addEventListener("click", m(
|
|
4538
|
+
this.addEventListener("click", m(Ml, this)), this.addEventListener("keydown", m(Pl, this)), this.tabIndex = 0;
|
|
4529
4539
|
}
|
|
4530
4540
|
disable() {
|
|
4531
|
-
this.removeEventListener("click", m(
|
|
4541
|
+
this.removeEventListener("click", m(Ml, this)), this.removeEventListener("keydown", m(Pl, this)), this.removeEventListener("keyup", m(Nl, this)), this.tabIndex = -1;
|
|
4532
4542
|
}
|
|
4533
4543
|
disconnectedCallback() {
|
|
4534
4544
|
var e;
|
|
4535
|
-
(e = m(
|
|
4545
|
+
(e = m(jl, this)) == null || e.disconnectListener(this), this.disable();
|
|
4536
4546
|
}
|
|
4537
4547
|
};
|
|
4538
|
-
e(
|
|
4548
|
+
e(Fl, "observedAttributes", [
|
|
4539
4549
|
"hidden",
|
|
4540
4550
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4541
4551
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4543,88 +4553,88 @@ e(Pl, "observedAttributes", [
|
|
|
4543
4553
|
]);
|
|
4544
4554
|
//#endregion
|
|
4545
4555
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4546
|
-
var
|
|
4547
|
-
|
|
4548
|
-
var
|
|
4556
|
+
var Il = document.createElement("template");
|
|
4557
|
+
Il.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";
|
|
4558
|
+
var Ll = class extends HTMLElement {
|
|
4549
4559
|
constructor() {
|
|
4550
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4560
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Il.content.cloneNode(!0));
|
|
4551
4561
|
}
|
|
4552
4562
|
attributeChangedCallback(e, t, n) {
|
|
4553
4563
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4554
4564
|
}
|
|
4555
4565
|
};
|
|
4556
|
-
e(
|
|
4566
|
+
e(Ll, "observedAttributes", [
|
|
4557
4567
|
"backdrop",
|
|
4558
4568
|
"poster",
|
|
4559
4569
|
"disable-backdrop"
|
|
4560
4570
|
]);
|
|
4561
4571
|
//#endregion
|
|
4562
4572
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4563
|
-
var
|
|
4564
|
-
|
|
4565
|
-
var
|
|
4573
|
+
var Rl = document.createElement("template");
|
|
4574
|
+
Rl.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";
|
|
4575
|
+
var zl = /* @__PURE__ */ new WeakMap(), Bl = /* @__PURE__ */ new WeakMap(), Vl = class extends HTMLElement {
|
|
4566
4576
|
constructor() {
|
|
4567
|
-
super(), f(this,
|
|
4577
|
+
super(), f(this, zl, void 0), f(this, Bl, void 0);
|
|
4568
4578
|
let e = this.attachShadow({ mode: "open" });
|
|
4569
|
-
e.appendChild(
|
|
4579
|
+
e.appendChild(Rl.content.cloneNode(!0)), h(zl, this, e.querySelector("#title")), h(Bl, this, e.querySelector("#description"));
|
|
4570
4580
|
}
|
|
4571
4581
|
connectedCallback() {
|
|
4572
4582
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4573
4583
|
}
|
|
4574
4584
|
attributeChangedCallback(e, t, n) {
|
|
4575
|
-
t !== n && (e === "title" ? m(
|
|
4585
|
+
t !== n && (e === "title" ? m(zl, this).textContent = n : e === "description" && (m(Bl, this).textContent = n));
|
|
4576
4586
|
}
|
|
4577
4587
|
};
|
|
4578
|
-
e(
|
|
4588
|
+
e(Vl, "observedAttributes", [
|
|
4579
4589
|
"title",
|
|
4580
4590
|
"description",
|
|
4581
4591
|
"hidden"
|
|
4582
4592
|
]);
|
|
4583
4593
|
//#endregion
|
|
4584
4594
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4585
|
-
var
|
|
4586
|
-
|
|
4587
|
-
var
|
|
4595
|
+
var Hl = document.createElement("template");
|
|
4596
|
+
Hl.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";
|
|
4597
|
+
var Ul = /* @__PURE__ */ new WeakMap(), Wl = class extends HTMLElement {
|
|
4588
4598
|
constructor() {
|
|
4589
|
-
super(), f(this,
|
|
4599
|
+
super(), f(this, Ul, null), this.attachShadow({ mode: "open" }).appendChild(Hl.content.cloneNode(!0));
|
|
4590
4600
|
}
|
|
4591
4601
|
connectedCallback() {
|
|
4592
4602
|
var e;
|
|
4593
|
-
h(
|
|
4603
|
+
h(Ul, this, this.closest("vindral-controller")), (e = m(Ul, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4594
4604
|
}
|
|
4595
4605
|
disconnectedCallback() {
|
|
4596
4606
|
var e;
|
|
4597
|
-
(e = m(
|
|
4607
|
+
(e = m(Ul, this)) == null || e.disconnectListener(this);
|
|
4598
4608
|
}
|
|
4599
4609
|
attributeChangedCallback(e, t, n) {
|
|
4600
4610
|
t !== n && e === "hidden" && !v(n) && this.focus();
|
|
4601
4611
|
}
|
|
4602
4612
|
};
|
|
4603
|
-
e(
|
|
4613
|
+
e(Wl, "observedAttributes", ["hidden"]);
|
|
4604
4614
|
//#endregion
|
|
4605
4615
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4606
|
-
var
|
|
4607
|
-
|
|
4608
|
-
var
|
|
4616
|
+
var Gl, Kl = document.createElement("template");
|
|
4617
|
+
Kl.innerHTML = "\n <style>\n :host {\n display: var(--volume-range-display);\n width: 80px;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) {\n background: rgba(255, 255, 255, 0.15);\n }\n }\n\n :host(:active) {\n background: rgba(255, 255, 255, 0.25);\n }\n </style>\n";
|
|
4618
|
+
var ql = (e) => `${Math.round(e * 100)}%`, Jl = /* @__PURE__ */ new WeakMap(), Yl = class extends _i {
|
|
4609
4619
|
constructor() {
|
|
4610
4620
|
var e;
|
|
4611
|
-
super(), f(this,
|
|
4621
|
+
super(), f(this, Jl, () => {
|
|
4612
4622
|
let e = this.range.valueAsNumber;
|
|
4613
4623
|
this.dispatchEvent(new CustomEvent(y.SET_VOLUME, {
|
|
4614
4624
|
bubbles: !0,
|
|
4615
4625
|
composed: !0,
|
|
4616
4626
|
detail: e
|
|
4617
4627
|
}));
|
|
4618
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4628
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Kl.content.cloneNode(!0));
|
|
4619
4629
|
}
|
|
4620
4630
|
connectedCallback() {
|
|
4621
|
-
super.connectedCallback(), this.range.addEventListener("input", m(
|
|
4631
|
+
super.connectedCallback(), this.range.addEventListener("input", m(Jl, this)), this.range.setAttribute("aria-label", "volume");
|
|
4622
4632
|
}
|
|
4623
4633
|
disconnectedCallback() {
|
|
4624
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", m(
|
|
4634
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", m(Jl, this));
|
|
4625
4635
|
}
|
|
4626
4636
|
attributeChangedCallback(e, t, n) {
|
|
4627
|
-
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4637
|
+
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", ql(this.range.valueAsNumber)), this.updateBar());
|
|
4628
4638
|
}
|
|
4629
4639
|
get volume() {
|
|
4630
4640
|
var e;
|
|
@@ -4634,15 +4644,15 @@ var Kl = (e) => `${Math.round(e * 100)}%`, ql = /* @__PURE__ */ new WeakMap(), J
|
|
|
4634
4644
|
return this.hasAttribute(_.MUTED);
|
|
4635
4645
|
}
|
|
4636
4646
|
};
|
|
4637
|
-
|
|
4638
|
-
...x(
|
|
4647
|
+
Gl = Yl, e(Yl, "observedAttributes", [
|
|
4648
|
+
...x(Gl, "observedAttributes", Gl),
|
|
4639
4649
|
_.MUTED,
|
|
4640
4650
|
_.VOLUME
|
|
4641
4651
|
]);
|
|
4642
4652
|
//#endregion
|
|
4643
4653
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4644
|
-
function
|
|
4645
|
-
customElements.define("vindral-controller",
|
|
4654
|
+
function Xl() {
|
|
4655
|
+
customElements.define("vindral-controller", ba), customElements.define("vindral-control-bar", Rn), customElements.define("vindral-advanced-rendition-menu", qe), customElements.define("vindral-advanced-rendition-menu-list", ot), customElements.define("vindral-play-button", ts), customElements.define("vindral-mute-button", Yo), customElements.define("vindral-buffering-overlay", Nt), customElements.define("vindral-scroll-overlay", jc), customElements.define("vindral-play-overlay", Wl), customElements.define("vindral-user-input-play-overlay", Fl), customElements.define("vindral-fullscreen-button", lo), customElements.define("vindral-rendition-levels-menu", ic), customElements.define("vindral-rendition-levels-menu-list", pc), customElements.define("vindral-channel-grid-button", jn), customElements.define("vindral-channel-grid", rn), customElements.define("vindral-channel-grid-item", qt), customElements.define("vindral-pip-button", Qo), customElements.define("vindral-airplay-button", Et), customElements.define("vindral-cast-button", Lt), customElements.define("vindral-cast-overlay", Ut), customElements.define("vindral-buffering-icon", At), customElements.define("vindral-language-menu", ho), customElements.define("vindral-language-menu-list", Ao), customElements.define("vindral-center-overlay", Ll), customElements.define("vindral-message", Vl), customElements.define("vindral-volume-range", Yl), customElements.define("vindral-poster-overlay", Xs), customElements.define("vindral-player", Fs), customElements.define("vindral-seek-bar", dl), customElements.define("vindral-live-button", Ko);
|
|
4646
4656
|
}
|
|
4647
4657
|
//#endregion
|
|
4648
|
-
export {
|
|
4658
|
+
export { Xl as t };
|