@vindral/web-sdk 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{C5AsBfiL.js → BRKrFfT9.js} +1 -1
- package/{zRKuZnIT.js → C3YYzwmQ.js} +758 -712
- package/{C02TEUyE.js → ci2nH0xq.js} +693 -680
- package/core.js +1 -1
- package/legacy.es.js +78 -32
- package/legacy.umd.js +12 -11
- package/package.json +1 -1
- package/player.js +2 -2
- package/vindral-player-component.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
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 "./
|
|
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 "./C3YYzwmQ.js";
|
|
3
3
|
import { M as le } from "./C01DcfYu.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";
|
|
@@ -1063,32 +1063,35 @@ var Rn = class extends pe {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
})();
|
|
1065
1065
|
}
|
|
1066
|
-
}, zn = 28;
|
|
1067
|
-
function
|
|
1066
|
+
}, zn = 28, Bn = ["::cue", "::-webkit-media-text-track-display"];
|
|
1067
|
+
function Vn(e) {
|
|
1068
1068
|
let t = e.styleSheets[0];
|
|
1069
|
-
if (!t) return
|
|
1069
|
+
if (!t) return [];
|
|
1070
1070
|
try {
|
|
1071
|
-
|
|
1072
|
-
} catch (e) {
|
|
1073
|
-
|
|
1071
|
+
return Array.from(t.cssRules).filter((e) => e instanceof CSSStyleRule && Bn.some((t) => e.selectorText.endsWith(t)));
|
|
1072
|
+
} catch (e) {
|
|
1073
|
+
return [];
|
|
1074
|
+
}
|
|
1074
1075
|
}
|
|
1075
|
-
var
|
|
1076
|
+
var Hn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Kn = class {
|
|
1076
1077
|
constructor(t) {
|
|
1077
|
-
f(this,
|
|
1078
|
-
!window.ResizeObserver || m(
|
|
1078
|
+
f(this, Hn, void 0), f(this, Un, null), f(this, Wn, null), e(this, "observe", (e) => {
|
|
1079
|
+
!window.ResizeObserver || m(Un, this) || (h(Un, this, new ResizeObserver(() => m(Gn, this).call(this, e))), m(Un, this).observe(e));
|
|
1079
1080
|
}), e(this, "unload", () => {
|
|
1080
1081
|
var e;
|
|
1081
|
-
(e = m(
|
|
1082
|
-
}), f(this,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
},
|
|
1082
|
+
(e = m(Un, this)) == null || e.disconnect(), h(Un, this, null);
|
|
1083
|
+
}), f(this, Gn, (e) => {
|
|
1084
|
+
if (m(Hn, this).length === 0) return;
|
|
1085
|
+
let { clientWidth: t, clientHeight: n } = e;
|
|
1086
|
+
if (t <= 0 || n <= 0) return;
|
|
1087
|
+
let r = d(t, n, { max: zn });
|
|
1088
|
+
if (r !== m(Wn, this)) {
|
|
1089
|
+
h(Wn, this, r);
|
|
1090
|
+
for (let e of m(Hn, this)) e.style.fontSize = r;
|
|
1091
|
+
}
|
|
1092
|
+
}), h(Hn, this, Vn(t));
|
|
1093
|
+
}
|
|
1094
|
+
}, qn = class n extends pe {
|
|
1092
1095
|
constructor(r) {
|
|
1093
1096
|
var i;
|
|
1094
1097
|
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
@@ -1119,35 +1122,35 @@ var Vn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Un =
|
|
|
1119
1122
|
return () => Promise.resolve();
|
|
1120
1123
|
}
|
|
1121
1124
|
};
|
|
1122
|
-
e(
|
|
1125
|
+
e(qn, "isFullscreenApiSupported", (e) => oe(e));
|
|
1123
1126
|
//#endregion
|
|
1124
1127
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1125
|
-
var
|
|
1128
|
+
var Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), 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 = class extends pe {
|
|
1126
1129
|
constructor(n) {
|
|
1127
1130
|
var o;
|
|
1128
1131
|
super(), o = this, e(this, "unload", () => {
|
|
1129
1132
|
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), ne(this.element, !1);
|
|
1130
1133
|
}), e(this, "request", t(function* () {
|
|
1131
1134
|
try {
|
|
1132
|
-
return yield m(
|
|
1135
|
+
return yield m(Jn, o).call(o);
|
|
1133
1136
|
} catch (e) {
|
|
1134
1137
|
throw o.onChange(), e;
|
|
1135
1138
|
}
|
|
1136
1139
|
})), e(this, "exit", t(function* () {
|
|
1137
1140
|
try {
|
|
1138
|
-
return yield m(
|
|
1141
|
+
return yield m(Yn, o).call(o);
|
|
1139
1142
|
} catch (e) {
|
|
1140
1143
|
throw o.onChange(), e;
|
|
1141
1144
|
}
|
|
1142
1145
|
})), e(this, "onChange", () => {
|
|
1143
1146
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1144
|
-
}), e(this, "isPictureInPictureActive", () => m(
|
|
1147
|
+
}), e(this, "isPictureInPictureActive", () => m(er, this).call(this) || m($n, this).call(this)), e(this, "isSupported", () => m(nr, this).call(this) || m(Qn, this).call(this)), f(this, Jn, () => m(Qn, this).call(this) ? m(Xn, this).call(this) : m(nr, this).call(this) ? m(tr, this).call(this, "picture-in-picture") : Promise.resolve()), f(this, Yn, () => this.isPictureInPictureActive() ? m(Qn, this).call(this) ? m(Zn, this).call(this) : m(nr, this).call(this) ? m(tr, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), f(this, Xn, t(function* () {
|
|
1145
1148
|
let e = ie(o.element);
|
|
1146
1149
|
e && (yield e());
|
|
1147
|
-
})), f(this,
|
|
1150
|
+
})), f(this, Zn, t(function* () {
|
|
1148
1151
|
let e = r();
|
|
1149
1152
|
e && (yield e());
|
|
1150
|
-
})), f(this,
|
|
1153
|
+
})), f(this, Qn, () => c(this.element)), f(this, $n, () => a()), f(this, er, () => i(this.element) === "picture-in-picture"), f(this, tr, (e) => (s(this.element) && ee(this.element, e), Promise.resolve())), f(this, nr, () => s(this.element)), this.element = n, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), ne(this.element, !0);
|
|
1151
1154
|
}
|
|
1152
1155
|
get videoElement() {
|
|
1153
1156
|
return this.element;
|
|
@@ -1155,7 +1158,7 @@ var qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn =
|
|
|
1155
1158
|
};
|
|
1156
1159
|
//#endregion
|
|
1157
1160
|
//#region ../../libs/player-next/src/timeshift/firstMediaPlaylistUrl.ts
|
|
1158
|
-
function
|
|
1161
|
+
function ir(e, t) {
|
|
1159
1162
|
let n = e.split("\n").map((e) => e.trim());
|
|
1160
1163
|
for (let e = 0; e < n.length; e++) {
|
|
1161
1164
|
var r;
|
|
@@ -1167,7 +1170,7 @@ function rr(e, t) {
|
|
|
1167
1170
|
}
|
|
1168
1171
|
//#endregion
|
|
1169
1172
|
//#region ../../libs/player-next/src/timeshift/parseMediaPlaylistDuration.ts
|
|
1170
|
-
function
|
|
1173
|
+
function ar(e) {
|
|
1171
1174
|
let t = 0;
|
|
1172
1175
|
for (let n of e.split("\n")) {
|
|
1173
1176
|
let e = n.trim().match(/^#EXTINF:([\d.]+)/), r = e != null && e[1] ? Number.parseFloat(e[1]) : NaN;
|
|
@@ -1177,90 +1180,90 @@ function ir(e) {
|
|
|
1177
1180
|
}
|
|
1178
1181
|
//#endregion
|
|
1179
1182
|
//#region ../../libs/player-next/src/timeshift/probeTimeshiftDuration.ts
|
|
1180
|
-
var
|
|
1181
|
-
function
|
|
1182
|
-
return
|
|
1183
|
+
var or = 5e3;
|
|
1184
|
+
function sr(e, t) {
|
|
1185
|
+
return cr.apply(this, arguments);
|
|
1183
1186
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1186
|
-
let { signal: r, timeoutMs: i =
|
|
1187
|
+
function cr() {
|
|
1188
|
+
return cr = t(function* (e, t, n = {}) {
|
|
1189
|
+
let { signal: r, timeoutMs: i = or } = n, a = new AbortController(), o = () => a.abort();
|
|
1187
1190
|
r && (r.aborted ? a.abort() : r.addEventListener("abort", o, { once: !0 }));
|
|
1188
1191
|
let s = setTimeout(o, i);
|
|
1189
1192
|
try {
|
|
1190
1193
|
let n = yield fetch(e, { signal: a.signal });
|
|
1191
1194
|
if (!n.ok) return;
|
|
1192
|
-
let r =
|
|
1195
|
+
let r = ir(yield n.text(), e);
|
|
1193
1196
|
if (!r) return;
|
|
1194
1197
|
let i = new URL(r);
|
|
1195
1198
|
i.searchParams.set("channelId", t.channelId), i.searchParams.set("from", t.from), t.authToken && i.searchParams.set("authToken", t.authToken);
|
|
1196
1199
|
let o = yield fetch(i.toString(), { signal: a.signal });
|
|
1197
|
-
return o.ok ?
|
|
1200
|
+
return o.ok ? ar(yield o.text()) : void 0;
|
|
1198
1201
|
} catch (e) {
|
|
1199
1202
|
return;
|
|
1200
1203
|
} finally {
|
|
1201
1204
|
clearTimeout(s), r == null || r.removeEventListener("abort", o);
|
|
1202
1205
|
}
|
|
1203
|
-
}),
|
|
1206
|
+
}), cr.apply(this, arguments);
|
|
1204
1207
|
}
|
|
1205
1208
|
//#endregion
|
|
1206
1209
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
1207
|
-
var
|
|
1208
|
-
constructor({ onChange: e, probe: t =
|
|
1209
|
-
g(this, A), f(this,
|
|
1210
|
+
var lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), 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(), A = /* @__PURE__ */ new WeakSet(), yr = class {
|
|
1211
|
+
constructor({ onChange: e, probe: t = sr, now: n = () => performance.now() }) {
|
|
1212
|
+
g(this, A), f(this, lr, void 0), f(this, ur, void 0), f(this, dr, void 0), f(this, fr, void 0), f(this, pr, !0), f(this, mr, !1), f(this, hr, 0), f(this, gr, 0), f(this, _r, 0), f(this, vr, null), h(lr, this, e), h(ur, this, t), h(dr, this, n);
|
|
1210
1213
|
}
|
|
1211
1214
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1212
|
-
if (p(A, this,
|
|
1213
|
-
m(
|
|
1215
|
+
if (p(A, this, br).call(this), !(n > 0)) {
|
|
1216
|
+
m(lr, this).call(this, n);
|
|
1214
1217
|
return;
|
|
1215
1218
|
}
|
|
1216
1219
|
let r = new AbortController();
|
|
1217
|
-
h(
|
|
1220
|
+
h(fr, this, r);
|
|
1218
1221
|
let { signal: i } = r;
|
|
1219
|
-
m(
|
|
1222
|
+
m(ur, this).call(this, e, t, { signal: i }).then((e) => {
|
|
1220
1223
|
if (!i.aborted) {
|
|
1221
1224
|
if (e === void 0) {
|
|
1222
|
-
m(
|
|
1225
|
+
m(lr, this).call(this, n);
|
|
1223
1226
|
return;
|
|
1224
1227
|
}
|
|
1225
|
-
h(
|
|
1228
|
+
h(gr, this, n), h(hr, this, Math.min(Math.max(e, 0), n)), h(_r, this, m(dr, this).call(this)), h(mr, this, !0), p(A, this, xr).call(this), m(pr, this) && p(A, this, Sr).call(this);
|
|
1226
1229
|
}
|
|
1227
1230
|
});
|
|
1228
1231
|
}
|
|
1229
1232
|
setLive(e) {
|
|
1230
|
-
h(
|
|
1233
|
+
h(pr, this, e), !(!m(fr, this) || e) && (p(A, this, Cr).call(this), p(A, this, xr).call(this));
|
|
1231
1234
|
}
|
|
1232
1235
|
applyLoadedDuration(e) {
|
|
1233
|
-
p(A, this,
|
|
1236
|
+
p(A, this, br).call(this), m(lr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1234
1237
|
}
|
|
1235
1238
|
stop() {
|
|
1236
|
-
p(A, this,
|
|
1239
|
+
p(A, this, br).call(this);
|
|
1237
1240
|
}
|
|
1238
1241
|
};
|
|
1239
|
-
function yr() {
|
|
1240
|
-
var e;
|
|
1241
|
-
(e = m(dr, this)) == null || e.abort(), h(dr, this, void 0), p(A, this, Sr).call(this), h(pr, this, !1);
|
|
1242
|
-
}
|
|
1243
1242
|
function br() {
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
m(cr, this).call(this, t), t >= m(hr, this) && p(A, this, Sr).call(this);
|
|
1243
|
+
var e;
|
|
1244
|
+
(e = m(fr, this)) == null || e.abort(), h(fr, this, void 0), p(A, this, Cr).call(this), h(mr, this, !1);
|
|
1247
1245
|
}
|
|
1248
1246
|
function xr() {
|
|
1249
|
-
|
|
1247
|
+
if (!m(mr, this)) return;
|
|
1248
|
+
let e = m(hr, this) + Math.max(0, (m(dr, this).call(this) - m(_r, this)) / 1e3), t = Math.min(m(gr, this), e);
|
|
1249
|
+
m(lr, this).call(this, t), t >= m(gr, this) && p(A, this, Cr).call(this);
|
|
1250
1250
|
}
|
|
1251
1251
|
function Sr() {
|
|
1252
|
-
m(
|
|
1252
|
+
m(vr, this) === null && h(vr, this, window.setInterval(() => p(A, this, xr).call(this), 1e3));
|
|
1253
|
+
}
|
|
1254
|
+
function Cr() {
|
|
1255
|
+
m(vr, this) !== null && (clearInterval(m(vr, this)), h(vr, this, null));
|
|
1253
1256
|
}
|
|
1254
1257
|
//#endregion
|
|
1255
1258
|
//#region ../../libs/player-next/src/utils/getVindralAttributes.ts
|
|
1256
|
-
var
|
|
1259
|
+
var wr = (e) => {
|
|
1257
1260
|
var t;
|
|
1258
1261
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1259
1262
|
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) => me.includes(e)) : [];
|
|
1260
1263
|
};
|
|
1261
1264
|
//#endregion
|
|
1262
1265
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1263
|
-
function
|
|
1266
|
+
function Tr(e) {
|
|
1264
1267
|
if (typeof e != "string") return NaN;
|
|
1265
1268
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1266
1269
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1276,37 +1279,37 @@ function wr(e) {
|
|
|
1276
1279
|
}
|
|
1277
1280
|
//#endregion
|
|
1278
1281
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1279
|
-
var
|
|
1280
|
-
|
|
1281
|
-
},
|
|
1282
|
+
var Er = re.get().createContext("TimelineMarkers"), Dr = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, Or = (e) => {
|
|
1283
|
+
Er.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.`);
|
|
1284
|
+
}, kr = (e) => {
|
|
1282
1285
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1283
1286
|
if (typeof e == "string") {
|
|
1284
1287
|
let t = Date.parse(e);
|
|
1285
|
-
return Number.isNaN(t) ? null : (
|
|
1288
|
+
return Number.isNaN(t) ? null : (Dr.test(e) && Or(e), t);
|
|
1286
1289
|
}
|
|
1287
1290
|
if (e instanceof Date) {
|
|
1288
1291
|
let t = e.getTime();
|
|
1289
1292
|
return Number.isNaN(t) ? null : t;
|
|
1290
1293
|
}
|
|
1291
1294
|
return null;
|
|
1292
|
-
},
|
|
1295
|
+
}, Ar = (e) => {
|
|
1293
1296
|
if (typeof e != "object" || !e) return null;
|
|
1294
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1297
|
+
let { time: t, label: n, type: r } = e, i = kr(t);
|
|
1295
1298
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1296
1299
|
let a = {
|
|
1297
1300
|
time: i,
|
|
1298
1301
|
label: n
|
|
1299
1302
|
};
|
|
1300
1303
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1301
|
-
},
|
|
1304
|
+
}, jr = (e) => {
|
|
1302
1305
|
if (!Array.isArray(e)) return [];
|
|
1303
|
-
let t = e.map(
|
|
1304
|
-
return n > 0 &&
|
|
1305
|
-
},
|
|
1306
|
+
let t = e.map(Ar).filter((e) => e !== null), n = e.length - t.length;
|
|
1307
|
+
return n > 0 && Er.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;
|
|
1308
|
+
}, Mr = (e) => e ? jr(ue(e)) : [], Nr = (e, t, n) => {
|
|
1306
1309
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1307
1310
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1308
1311
|
return r < 0 || r > 1 ? null : r;
|
|
1309
|
-
},
|
|
1312
|
+
}, Pr = class extends pe {
|
|
1310
1313
|
constructor(t) {
|
|
1311
1314
|
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", () => {
|
|
1312
1315
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1358,18 +1361,18 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1358
1361
|
get isMediaElementSource() {
|
|
1359
1362
|
return this.source instanceof HTMLMediaElement;
|
|
1360
1363
|
}
|
|
1361
|
-
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(),
|
|
1364
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Fr = /* @__PURE__ */ new WeakMap(), Ir = /* @__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(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = class {
|
|
1362
1365
|
constructor(t, n) {
|
|
1363
|
-
g(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this,
|
|
1364
|
-
m(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(j, this).paused && p(F, this,
|
|
1365
|
-
}), f(this,
|
|
1366
|
-
m(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(F, this,
|
|
1367
|
-
}), h(M, this, t), h(
|
|
1366
|
+
g(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this, Fr, void 0), f(this, Ir, void 0), e(this, "userPaused", !0), f(this, Lr, void 0), f(this, Rr, void 0), f(this, zr, !1), f(this, Br, !1), f(this, Vr, null), f(this, Hr, 0), f(this, Ur, !1), f(this, P, re.get().createContext("HlsPlayer")), f(this, Wr, () => p(F, this, si).call(this, !0)), f(this, Gr, () => p(F, this, si).call(this, !1)), f(this, Kr, () => {
|
|
1367
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(j, this).paused && p(F, this, si).call(this, !1);
|
|
1368
|
+
}), f(this, qr, () => {
|
|
1369
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(F, this, si).call(this, !1);
|
|
1370
|
+
}), h(M, this, t), h(Rr, 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";
|
|
1368
1371
|
let r = document.createElement("video");
|
|
1369
|
-
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,
|
|
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, ai).call(this), h(Ur, 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);
|
|
1370
1373
|
}
|
|
1371
1374
|
hide() {
|
|
1372
|
-
h(
|
|
1375
|
+
h(zr, this, !0), h(Br, this, !1), m(M, this).classList.remove("active"), m(M, this).style.opacity = "0", m(M, this).style.pointerEvents = "none", h(Vr, this, null);
|
|
1373
1376
|
}
|
|
1374
1377
|
play() {
|
|
1375
1378
|
var e = this;
|
|
@@ -1385,17 +1388,17 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1385
1388
|
var n = this;
|
|
1386
1389
|
return t(function* () {
|
|
1387
1390
|
if (m(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1388
|
-
h(
|
|
1391
|
+
h(Vr, n, null);
|
|
1389
1392
|
return;
|
|
1390
1393
|
}
|
|
1391
|
-
if (h(
|
|
1392
|
-
else return p(F, n,
|
|
1394
|
+
if (h(Vr, n, e.time > .1 ? e.time : null), n.isActive() && m(N, n)) p(F, n, $r).call(n, e.time);
|
|
1395
|
+
else return p(F, n, ei).call(n, e);
|
|
1393
1396
|
})();
|
|
1394
1397
|
}
|
|
1395
1398
|
shouldIgnoreTimeupdate() {
|
|
1396
|
-
if (m(
|
|
1399
|
+
if (m(Vr, this) == null) return !1;
|
|
1397
1400
|
let e = m(j, this).currentTime;
|
|
1398
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (h(
|
|
1401
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (h(Vr, this, null), !1);
|
|
1399
1402
|
}
|
|
1400
1403
|
isPipSupported() {
|
|
1401
1404
|
return "pictureInPictureEnabled" in document && !m(j, this).disablePictureInPicture;
|
|
@@ -1410,7 +1413,7 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1410
1413
|
return m(M, this).style.opacity === "1" || m(M, this).classList.contains("active");
|
|
1411
1414
|
}
|
|
1412
1415
|
cleanup() {
|
|
1413
|
-
p(F, this,
|
|
1416
|
+
p(F, this, oi).call(this), p(F, this, Qr).call(this), m(Lr, this) && (cancelAnimationFrame(m(Lr, this)), h(Lr, this, void 0)), h(Vr, this, null), m(j, this).remove();
|
|
1414
1417
|
}
|
|
1415
1418
|
addEventListener(e, t) {
|
|
1416
1419
|
m(j, this).addEventListener(e, t);
|
|
@@ -1422,7 +1425,7 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1422
1425
|
return m(j, this).dispatchEvent(e);
|
|
1423
1426
|
}
|
|
1424
1427
|
setTimeshiftUrl(e) {
|
|
1425
|
-
m(
|
|
1428
|
+
m(Ir, this) !== e && (m(P, this).debug("HLSPlayer Setting timeshift URL to", e), h(Ir, this, e));
|
|
1426
1429
|
}
|
|
1427
1430
|
get videoElement() {
|
|
1428
1431
|
return m(j, this);
|
|
@@ -1440,10 +1443,10 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1440
1443
|
return m(j, this).volume;
|
|
1441
1444
|
}
|
|
1442
1445
|
set muted(e) {
|
|
1443
|
-
h(
|
|
1446
|
+
h(Ur, this, e), m(j, this).muted = e;
|
|
1444
1447
|
}
|
|
1445
1448
|
get muted() {
|
|
1446
|
-
return m(
|
|
1449
|
+
return m(Ur, this);
|
|
1447
1450
|
}
|
|
1448
1451
|
set currentTime(e) {
|
|
1449
1452
|
m(j, this).currentTime = e;
|
|
@@ -1458,17 +1461,17 @@ var Tr = re.get().createContext("TimelineMarkers"), Er = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1458
1461
|
return m(j, this).duration;
|
|
1459
1462
|
}
|
|
1460
1463
|
get maxVideoBitRate() {
|
|
1461
|
-
return m(
|
|
1464
|
+
return m(Rr, this);
|
|
1462
1465
|
}
|
|
1463
1466
|
set maxVideoBitRate(e) {
|
|
1464
|
-
h(
|
|
1467
|
+
h(Rr, this, e), e !== void 0 && m(N, this) && p(F, this, Xr).call(this, e);
|
|
1465
1468
|
}
|
|
1466
1469
|
};
|
|
1467
|
-
function
|
|
1470
|
+
function Yr() {
|
|
1468
1471
|
var e = this;
|
|
1469
1472
|
return t(function* () {
|
|
1470
1473
|
let { default: t } = yield import("./Ddby8xU_.js");
|
|
1471
|
-
if (h(
|
|
1474
|
+
if (h(Fr, e, t), !t.isSupported()) {
|
|
1472
1475
|
m(P, e).warn("HLS not supported");
|
|
1473
1476
|
return;
|
|
1474
1477
|
}
|
|
@@ -1492,17 +1495,17 @@ function Jr() {
|
|
|
1492
1495
|
testBandwidth: !1,
|
|
1493
1496
|
debug: !1
|
|
1494
1497
|
})), 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) => {
|
|
1495
|
-
m(P, e).error("[HLS] error:", n), n.fatal && p(F, e,
|
|
1498
|
+
m(P, e).error("[HLS] error:", n), n.fatal && p(F, e, Zr).call(e, n);
|
|
1496
1499
|
}), m(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1497
1500
|
var t;
|
|
1498
|
-
!m(
|
|
1501
|
+
!m(Rr, e) || ((t = m(N, e)) == null ? void 0 : t.levels.length) === 0 || p(F, e, Xr).call(e, m(Rr, e));
|
|
1499
1502
|
}), m(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1500
1503
|
var t, n;
|
|
1501
1504
|
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);
|
|
1502
1505
|
});
|
|
1503
1506
|
})();
|
|
1504
1507
|
}
|
|
1505
|
-
function
|
|
1508
|
+
function Xr(e) {
|
|
1506
1509
|
if (!m(N, this)) {
|
|
1507
1510
|
m(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1508
1511
|
return;
|
|
@@ -1518,12 +1521,12 @@ function Yr(e) {
|
|
|
1518
1521
|
let r = m(N, this).currentLevel;
|
|
1519
1522
|
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);
|
|
1520
1523
|
}
|
|
1521
|
-
function
|
|
1522
|
-
if (!m(
|
|
1524
|
+
function Zr(e) {
|
|
1525
|
+
if (!m(Fr, this)) {
|
|
1523
1526
|
m(P, this).error("Hls class not available for error handling");
|
|
1524
1527
|
return;
|
|
1525
1528
|
}
|
|
1526
|
-
let t = m(
|
|
1529
|
+
let t = m(Fr, this);
|
|
1527
1530
|
switch (e.type) {
|
|
1528
1531
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1529
1532
|
var n;
|
|
@@ -1534,39 +1537,39 @@ function Xr(e) {
|
|
|
1534
1537
|
m(P, this).warn("[HLS] media error -> recoverMediaError"), (r = m(N, this)) == null || r.recoverMediaError();
|
|
1535
1538
|
break;
|
|
1536
1539
|
default:
|
|
1537
|
-
m(P, this).error("[HLS] fatal -> destroy"), p(F, this,
|
|
1540
|
+
m(P, this).error("[HLS] fatal -> destroy"), p(F, this, Qr).call(this);
|
|
1538
1541
|
break;
|
|
1539
1542
|
}
|
|
1540
1543
|
}
|
|
1541
|
-
function
|
|
1544
|
+
function Qr() {
|
|
1542
1545
|
m(N, this) && (m(N, this).destroy(), h(N, this, void 0));
|
|
1543
1546
|
}
|
|
1544
|
-
function
|
|
1547
|
+
function $r(e) {
|
|
1545
1548
|
if (!Number.isFinite(e)) {
|
|
1546
|
-
h(
|
|
1549
|
+
h(Vr, this, null);
|
|
1547
1550
|
return;
|
|
1548
1551
|
}
|
|
1549
|
-
let t = p(F, this,
|
|
1550
|
-
h(
|
|
1552
|
+
let t = p(F, this, ii).call(this, m(j, this), e);
|
|
1553
|
+
h(Vr, this, t > .1 ? t : null), m(Lr, this) && cancelAnimationFrame(m(Lr, this)), h(Lr, this, requestAnimationFrame(() => {
|
|
1551
1554
|
m(j, this).currentTime = t;
|
|
1552
1555
|
}));
|
|
1553
1556
|
}
|
|
1554
|
-
function
|
|
1557
|
+
function ei(e) {
|
|
1555
1558
|
var n = this;
|
|
1556
1559
|
return t(function* () {
|
|
1557
1560
|
var t;
|
|
1558
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(
|
|
1559
|
-
if (!m(
|
|
1561
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(Hr, n, (t = m(Hr, n), ++t));
|
|
1562
|
+
if (!m(Ir, n)) {
|
|
1560
1563
|
m(P, n).warn("No timeshift URL");
|
|
1561
1564
|
return;
|
|
1562
1565
|
}
|
|
1563
|
-
if (!m(N, n) && (yield p(F, n,
|
|
1564
|
-
h(
|
|
1566
|
+
if (!m(N, n) && (yield p(F, n, Yr).call(n), !p(F, n, ci).call(n, a))) return;
|
|
1567
|
+
h(zr, n, !1), h(Br, n, !1), m(N, n) && (!m(N, n).url || m(N, n).url !== m(Ir, n)) && (m(P, n).debug("Loading timeshift URL", m(Ir, n)), m(N, n).loadSource(m(Ir, n)));
|
|
1565
1568
|
let o = n.muted;
|
|
1566
|
-
m(j, n).muted = !0, yield p(F, n,
|
|
1569
|
+
m(j, n).muted = !0, yield p(F, n, ti).call(n), p(F, n, ci).call(n, a) && (p(F, n, $r).call(n, r), !(i && (yield n.play(), !p(F, n, ci).call(n, a))) && p(F, n, ni).call(n, o, a));
|
|
1567
1570
|
})();
|
|
1568
1571
|
}
|
|
1569
|
-
function
|
|
1572
|
+
function ti() {
|
|
1570
1573
|
return m(j, this).duration && !Number.isNaN(m(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1571
1574
|
m(P, this).debug("Waiting for duration...");
|
|
1572
1575
|
let t = () => {
|
|
@@ -1577,11 +1580,11 @@ function ei() {
|
|
|
1577
1580
|
m(j, this).addEventListener("loadedmetadata", t);
|
|
1578
1581
|
});
|
|
1579
1582
|
}
|
|
1580
|
-
function
|
|
1583
|
+
function ni(e, t) {
|
|
1581
1584
|
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(j, this).readyState >= n && m(j, this).videoWidth > 0 && m(j, this).videoHeight > 0, i = () => {
|
|
1582
|
-
m(
|
|
1585
|
+
m(zr, this) || m(Br, this) || !p(F, this, ci).call(this, t) || (h(Br, 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, ri).call(this, t));
|
|
1583
1586
|
}, a = () => {
|
|
1584
|
-
m(
|
|
1587
|
+
m(zr, this) || m(Br, this) || !p(F, this, ci).call(this, t) || r() && (s(), i());
|
|
1585
1588
|
}, o = !1, s = () => {
|
|
1586
1589
|
o || (o = !0, m(j, this).removeEventListener("canplay", a), m(j, this).removeEventListener("canplaythrough", a), m(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1587
1590
|
};
|
|
@@ -1594,9 +1597,9 @@ function ti(e, t) {
|
|
|
1594
1597
|
m(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1595
1598
|
}, 2e3);
|
|
1596
1599
|
}
|
|
1597
|
-
function
|
|
1600
|
+
function ri(e) {
|
|
1598
1601
|
let t = () => {
|
|
1599
|
-
p(F, this,
|
|
1602
|
+
p(F, this, ci).call(this, e) && (m(j, this).muted = !1);
|
|
1600
1603
|
};
|
|
1601
1604
|
"requestVideoFrameCallback" in m(j, this) ? m(j, this).requestVideoFrameCallback(() => {
|
|
1602
1605
|
setTimeout(() => {
|
|
@@ -1606,43 +1609,43 @@ function ni(e) {
|
|
|
1606
1609
|
t();
|
|
1607
1610
|
}, 120);
|
|
1608
1611
|
}
|
|
1609
|
-
function
|
|
1612
|
+
function ii(e, t) {
|
|
1610
1613
|
let n = e.seekable;
|
|
1611
1614
|
if (!n || n.length === 0) return t;
|
|
1612
1615
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1613
1616
|
return m(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1614
1617
|
}
|
|
1615
|
-
function
|
|
1616
|
-
for (let e of ci._) m(j, this).addEventListener(e, m(Ur, this));
|
|
1618
|
+
function ai() {
|
|
1617
1619
|
for (let e of li._) m(j, this).addEventListener(e, m(Wr, this));
|
|
1618
|
-
|
|
1620
|
+
for (let e of ui._) m(j, this).addEventListener(e, m(Gr, this));
|
|
1621
|
+
m(j, this).addEventListener("timeupdate", m(Kr, this)), m(j, this).addEventListener("progress", m(qr, this));
|
|
1619
1622
|
}
|
|
1620
|
-
function
|
|
1621
|
-
for (let e of ci._) m(j, this).removeEventListener(e, m(Ur, this));
|
|
1623
|
+
function oi() {
|
|
1622
1624
|
for (let e of li._) m(j, this).removeEventListener(e, m(Wr, this));
|
|
1623
|
-
|
|
1625
|
+
for (let e of ui._) m(j, this).removeEventListener(e, m(Gr, this));
|
|
1626
|
+
m(j, this).removeEventListener("timeupdate", m(Kr, this)), m(j, this).removeEventListener("progress", m(qr, this));
|
|
1624
1627
|
}
|
|
1625
|
-
function
|
|
1628
|
+
function si(e) {
|
|
1626
1629
|
let t = e && (m(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || m(j, this).seeking || m(j, this).paused && !this.userPaused);
|
|
1627
1630
|
m(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1628
1631
|
bubbles: !0,
|
|
1629
1632
|
composed: !0
|
|
1630
1633
|
}));
|
|
1631
1634
|
}
|
|
1632
|
-
function
|
|
1633
|
-
return m(
|
|
1635
|
+
function ci(e) {
|
|
1636
|
+
return m(Hr, this) === e;
|
|
1634
1637
|
}
|
|
1635
|
-
var
|
|
1638
|
+
var li = { _: [
|
|
1636
1639
|
"waiting",
|
|
1637
1640
|
"seeking",
|
|
1638
1641
|
"stalled",
|
|
1639
1642
|
"loadstart"
|
|
1640
|
-
] },
|
|
1643
|
+
] }, ui = { _: [
|
|
1641
1644
|
"canplay",
|
|
1642
1645
|
"canplaythrough",
|
|
1643
1646
|
"seeked",
|
|
1644
1647
|
"loadeddata"
|
|
1645
|
-
] },
|
|
1648
|
+
] }, di = class {
|
|
1646
1649
|
constructor(e) {
|
|
1647
1650
|
this.vindral = e;
|
|
1648
1651
|
}
|
|
@@ -1662,19 +1665,19 @@ var ci = { _: [
|
|
|
1662
1665
|
pause() {
|
|
1663
1666
|
this.vindral.pause();
|
|
1664
1667
|
}
|
|
1665
|
-
},
|
|
1666
|
-
|
|
1667
|
-
var
|
|
1668
|
+
}, fi = document.createElement("template");
|
|
1669
|
+
fi.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";
|
|
1670
|
+
var pi = /* @__PURE__ */ new WeakMap(), mi = /* @__PURE__ */ new WeakMap(), hi = class extends HTMLElement {
|
|
1668
1671
|
constructor() {
|
|
1669
|
-
super(), f(this,
|
|
1672
|
+
super(), f(this, pi, null), f(this, mi, void 0), e(this, "range", void 0), h(mi, this, this.attachShadow({ mode: "open" })), m(mi, this).appendChild(fi.content.cloneNode(!0)), this.range = m(mi, this).getElementById("range");
|
|
1670
1673
|
}
|
|
1671
1674
|
connectedCallback() {
|
|
1672
1675
|
var e;
|
|
1673
|
-
h(
|
|
1676
|
+
h(pi, this, this.closest("vindral-controller")), (e = m(pi, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1674
1677
|
}
|
|
1675
1678
|
disconnectedCallback() {
|
|
1676
1679
|
var e;
|
|
1677
|
-
(e = m(
|
|
1680
|
+
(e = m(pi, this)) == null || e.disconnectListener(this);
|
|
1678
1681
|
}
|
|
1679
1682
|
attributeChangedCallback(e, t, n) {
|
|
1680
1683
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1700,11 +1703,11 @@ var fi = /* @__PURE__ */ new WeakMap(), pi = /* @__PURE__ */ new WeakMap(), mi =
|
|
|
1700
1703
|
];
|
|
1701
1704
|
}
|
|
1702
1705
|
};
|
|
1703
|
-
e(
|
|
1706
|
+
e(hi, "observedAttributes", ["disabled"]);
|
|
1704
1707
|
//#endregion
|
|
1705
1708
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1706
|
-
var
|
|
1707
|
-
|
|
1709
|
+
var gi = document.createElement("template");
|
|
1710
|
+
gi.innerHTML = `
|
|
1708
1711
|
<style>
|
|
1709
1712
|
:host {
|
|
1710
1713
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1804,13 +1807,23 @@ hi.innerHTML = `
|
|
|
1804
1807
|
z-index: 0;
|
|
1805
1808
|
}
|
|
1806
1809
|
|
|
1810
|
+
/* Chrome sizes this box from the video height, which pads multi-line cues. Must match
|
|
1811
|
+
::cue (CaptionFontScaler updates both); the em lift replaces the inset that sizing gave us. */
|
|
1807
1812
|
#video video::-webkit-media-text-track-display {
|
|
1808
|
-
|
|
1813
|
+
font-size: 28px;
|
|
1814
|
+
transform: translateY(calc(var(--vindral-subtitle-offset, 0px) - 0.5em)) !important;
|
|
1809
1815
|
}
|
|
1810
1816
|
|
|
1817
|
+
/* Chrome does not wrap cue text on its own, so a long line overflows and gets clipped. */
|
|
1811
1818
|
#video video::cue {
|
|
1812
1819
|
font-size: 28px;
|
|
1813
1820
|
background-color: rgba(0, 0, 0, 0.6);
|
|
1821
|
+
white-space: pre-wrap;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/* iOS Safari also paints the system caption window behind the cue; ::cue is the only background we want. */
|
|
1825
|
+
#video video::-webkit-media-text-track-display-backdrop {
|
|
1826
|
+
background-color: transparent;
|
|
1814
1827
|
}
|
|
1815
1828
|
|
|
1816
1829
|
:host([user-interacting]) #video {
|
|
@@ -1906,7 +1919,7 @@ hi.innerHTML = `
|
|
|
1906
1919
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1907
1920
|
</div>
|
|
1908
1921
|
`;
|
|
1909
|
-
var
|
|
1922
|
+
var _i = [
|
|
1910
1923
|
"ArrowDown",
|
|
1911
1924
|
"ArrowLeft",
|
|
1912
1925
|
"ArrowRight",
|
|
@@ -1915,18 +1928,18 @@ var gi = [
|
|
|
1915
1928
|
" ",
|
|
1916
1929
|
"f",
|
|
1917
1930
|
"m"
|
|
1918
|
-
],
|
|
1931
|
+
], vi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Bi = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), 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 = class extends HTMLElement {
|
|
1919
1932
|
constructor() {
|
|
1920
1933
|
var t;
|
|
1921
|
-
super(), g(this, H), f(this,
|
|
1934
|
+
super(), g(this, H), f(this, vi, /* @__PURE__ */ new Map()), f(this, yi, 2e3), f(this, bi, null), f(this, xi, new yr({ onChange: (e) => p(H, this, U).call(this, _.DURATION, e.toString()) })), f(this, Si, null), f(this, Ci, void 0), f(this, I, void 0), f(this, L, void 0), f(this, wi, void 0), f(this, R, void 0), f(this, Ti, ao._), f(this, Ei, void 0), f(this, Di, void 0), f(this, Oi, void 0), f(this, ki, void 0), f(this, z, void 0), f(this, Ai, void 0), f(this, ji, void 0), f(this, Mi, void 0), f(this, B, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, Fi, void 0), f(this, V, void 0), f(this, Ii, null), f(this, Li, !1), f(this, Ri, null), f(this, zi, void 0), f(this, Bi, (e) => {
|
|
1922
1935
|
let t = e.filter((e) => {
|
|
1923
1936
|
var t;
|
|
1924
1937
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1925
1938
|
});
|
|
1926
1939
|
p(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1927
|
-
}), f(this, Bi, (e) => {
|
|
1928
|
-
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1929
1940
|
}), f(this, Vi, (e) => {
|
|
1941
|
+
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1942
|
+
}), f(this, Hi, (e) => {
|
|
1930
1943
|
switch (e) {
|
|
1931
1944
|
case "playing":
|
|
1932
1945
|
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
@@ -1939,38 +1952,38 @@ var gi = [
|
|
|
1939
1952
|
break;
|
|
1940
1953
|
default: break;
|
|
1941
1954
|
}
|
|
1942
|
-
}), f(this,
|
|
1955
|
+
}), f(this, Ui, (e) => {
|
|
1943
1956
|
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);
|
|
1944
|
-
}), f(this,
|
|
1957
|
+
}), f(this, Wi, ({ channelId: e }) => {
|
|
1945
1958
|
var t;
|
|
1946
1959
|
this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1947
|
-
}), f(this,
|
|
1960
|
+
}), f(this, Gi, ({ channelId: e }) => {
|
|
1948
1961
|
var t;
|
|
1949
|
-
m(
|
|
1950
|
-
}), f(this, Gi, (e) => {
|
|
1951
|
-
h(pa, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1962
|
+
m(Ei, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1952
1963
|
}), f(this, Ki, (e) => {
|
|
1964
|
+
h(ma, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1965
|
+
}), f(this, qi, (e) => {
|
|
1953
1966
|
var t;
|
|
1954
1967
|
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);
|
|
1955
|
-
}), f(this,
|
|
1968
|
+
}), f(this, Ji, (e) => {
|
|
1956
1969
|
var t;
|
|
1957
1970
|
if (p(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = m(I, this)) != null && t.textTrack) {
|
|
1958
1971
|
var n, r;
|
|
1959
1972
|
p(H, this, U).call(this, _.TEXT_TRACK, (n = (r = m(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1960
1973
|
}
|
|
1961
|
-
}), f(this, Ji, (e) => {
|
|
1962
|
-
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));
|
|
1963
1974
|
}), f(this, Yi, (e) => {
|
|
1964
|
-
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));
|
|
1965
1976
|
}), f(this, Xi, (e) => {
|
|
1977
|
+
e || p(H, this, W).call(this, _.BUFFERING), m(xi, this).setLive(e);
|
|
1978
|
+
}), f(this, Zi, (e) => {
|
|
1966
1979
|
var t, n;
|
|
1967
1980
|
let { urls: r, duration: i } = e;
|
|
1968
1981
|
if (!r[0] || !m(R, this)) return;
|
|
1969
1982
|
let a = new URL(r[0]);
|
|
1970
|
-
a.searchParams.set("channelId", (t = m(
|
|
1983
|
+
a.searchParams.set("channelId", (t = m(Ei, this)) == null ? "" : t);
|
|
1971
1984
|
let o = this.getAttribute("authentication-token");
|
|
1972
1985
|
o && a.searchParams.set("authToken", o);
|
|
1973
|
-
let s =
|
|
1986
|
+
let s = Tr(i);
|
|
1974
1987
|
if (Number.isNaN(s)) {
|
|
1975
1988
|
m(V, this).error(`Invalid duration format: ${i}`);
|
|
1976
1989
|
return;
|
|
@@ -1978,70 +1991,70 @@ var gi = [
|
|
|
1978
1991
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
1979
1992
|
a.searchParams.set("from", l);
|
|
1980
1993
|
let u = a.toString();
|
|
1981
|
-
m(R, this).setTimeshiftUrl(u), m(
|
|
1994
|
+
m(R, this).setTimeshiftUrl(u), m(xi, this).start({
|
|
1982
1995
|
multivariantUrl: u,
|
|
1983
1996
|
params: {
|
|
1984
|
-
channelId: (n = m(
|
|
1997
|
+
channelId: (n = m(Ei, this)) == null ? "" : n,
|
|
1985
1998
|
authToken: o == null ? void 0 : o,
|
|
1986
1999
|
from: l
|
|
1987
2000
|
},
|
|
1988
2001
|
windowCapSeconds: s
|
|
1989
2002
|
});
|
|
1990
|
-
}), f(this, Zi, () => {
|
|
1991
|
-
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
1992
2003
|
}), f(this, Qi, () => {
|
|
1993
|
-
p(H, this,
|
|
2004
|
+
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
1994
2005
|
}), f(this, $i, () => {
|
|
1995
|
-
|
|
2006
|
+
p(H, this, U).call(this, _.PAUSED, ""), p(H, this, W).call(this, _.BUFFERING);
|
|
1996
2007
|
}), f(this, ea, () => {
|
|
1997
|
-
m(
|
|
2008
|
+
m(da, this).call(this), p(H, this, W).call(this, _.BUFFERING);
|
|
1998
2009
|
}), f(this, ta, () => {
|
|
2010
|
+
m(R, this) && m(xi, this).applyLoadedDuration(m(R, this).duration);
|
|
2011
|
+
}), f(this, na, () => {
|
|
1999
2012
|
var e, t;
|
|
2000
2013
|
if (!m(R, this) || m(R, this).seeking || (e = (t = m(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2001
2014
|
let n = m(R, this).currentTime;
|
|
2002
2015
|
n !== void 0 && p(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2003
|
-
}), f(this, na, () => {
|
|
2004
|
-
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));
|
|
2005
2016
|
}), f(this, ra, () => {
|
|
2006
|
-
p(H, this, U).call(this, _.
|
|
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));
|
|
2007
2018
|
}), f(this, ia, () => {
|
|
2008
|
-
p(H, this,
|
|
2019
|
+
p(H, this, U).call(this, _.BUFFERING, "");
|
|
2009
2020
|
}), f(this, aa, () => {
|
|
2010
|
-
|
|
2021
|
+
p(H, this, W).call(this, _.BUFFERING);
|
|
2022
|
+
}), f(this, oa, () => {
|
|
2023
|
+
if (m(Li, this)) {
|
|
2011
2024
|
if (m(L, this) !== m(R, this)) {
|
|
2012
|
-
h(
|
|
2025
|
+
h(Li, this, !1);
|
|
2013
2026
|
return;
|
|
2014
2027
|
}
|
|
2015
|
-
h(
|
|
2028
|
+
h(Li, this, !1), p(H, this, Ya).call(this);
|
|
2016
2029
|
}
|
|
2017
|
-
}), f(this,
|
|
2030
|
+
}), f(this, sa, 0), e(this, "handleEvent", (e) => {
|
|
2018
2031
|
switch (e.type) {
|
|
2019
2032
|
case "pointerdown":
|
|
2020
|
-
h(
|
|
2033
|
+
h(sa, this, e.timeStamp);
|
|
2021
2034
|
break;
|
|
2022
2035
|
case "pointermove":
|
|
2023
|
-
p(H, this,
|
|
2036
|
+
p(H, this, Ra).call(this, e);
|
|
2024
2037
|
break;
|
|
2025
2038
|
case "pointerup":
|
|
2026
|
-
p(H, this,
|
|
2039
|
+
p(H, this, za).call(this, e);
|
|
2027
2040
|
break;
|
|
2028
2041
|
case "mouseleave":
|
|
2029
|
-
p(H, this,
|
|
2042
|
+
p(H, this, qa).call(this);
|
|
2030
2043
|
break;
|
|
2031
2044
|
case "dblclick":
|
|
2032
|
-
p(H, this,
|
|
2045
|
+
p(H, this, Va).call(this, e);
|
|
2033
2046
|
break;
|
|
2034
2047
|
case "mousemove":
|
|
2035
|
-
p(H, this,
|
|
2048
|
+
p(H, this, Ha).call(this, e);
|
|
2036
2049
|
break;
|
|
2037
2050
|
case "keydown":
|
|
2038
|
-
m(
|
|
2051
|
+
m(ua, this).call(this, e);
|
|
2039
2052
|
break;
|
|
2040
2053
|
case "keyup":
|
|
2041
|
-
p(H, this,
|
|
2054
|
+
p(H, this, qa).call(this), m(la, this).call(this, e);
|
|
2042
2055
|
break;
|
|
2043
2056
|
}
|
|
2044
|
-
}), f(this,
|
|
2057
|
+
}), f(this, ca, (e) => {
|
|
2045
2058
|
if (m(I, this) && (m(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2046
2059
|
case v.PLAY:
|
|
2047
2060
|
this.removeAttribute(_.PAUSED);
|
|
@@ -2086,10 +2099,10 @@ var gi = [
|
|
|
2086
2099
|
}
|
|
2087
2100
|
break;
|
|
2088
2101
|
case v.CHANNEL_GRID_OPENED:
|
|
2089
|
-
m(
|
|
2102
|
+
m(Ii, this) === null && p(H, this, Wa).call(this);
|
|
2090
2103
|
break;
|
|
2091
2104
|
case v.CHANNEL_GRID_CLOSED:
|
|
2092
|
-
m(
|
|
2105
|
+
m(Ii, this) !== null && (clearTimeout(m(Ii, this)), h(Ii, this, null));
|
|
2093
2106
|
break;
|
|
2094
2107
|
case v.ENTER_PIP:
|
|
2095
2108
|
this.setAttribute(_.IS_PIP, "");
|
|
@@ -2099,7 +2112,7 @@ var gi = [
|
|
|
2099
2112
|
break;
|
|
2100
2113
|
case v.REQUEST_AIRPLAY:
|
|
2101
2114
|
var t;
|
|
2102
|
-
(t = m(
|
|
2115
|
+
(t = m(Mi, this)) == null || t.showPlaybackTargetPicker();
|
|
2103
2116
|
break;
|
|
2104
2117
|
case v.SET_LANGUAGE:
|
|
2105
2118
|
y(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
@@ -2120,7 +2133,7 @@ var gi = [
|
|
|
2120
2133
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2121
2134
|
break;
|
|
2122
2135
|
case v.GO_LIVE:
|
|
2123
|
-
m(
|
|
2136
|
+
m(da, this).call(this);
|
|
2124
2137
|
break;
|
|
2125
2138
|
case v.TOGGLE_DEBUG_PANEL:
|
|
2126
2139
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
@@ -2132,64 +2145,64 @@ var gi = [
|
|
|
2132
2145
|
}
|
|
2133
2146
|
break;
|
|
2134
2147
|
}
|
|
2135
|
-
}), f(this,
|
|
2148
|
+
}), f(this, la, (e) => {
|
|
2136
2149
|
let { key: t } = e;
|
|
2137
|
-
if (!
|
|
2150
|
+
if (!_i.includes(t)) {
|
|
2138
2151
|
this.removeEventListener("keyup", this);
|
|
2139
2152
|
return;
|
|
2140
2153
|
}
|
|
2141
|
-
p(H, this,
|
|
2142
|
-
}), f(this,
|
|
2154
|
+
p(H, this, Ua).call(this, e);
|
|
2155
|
+
}), f(this, ua, (e) => {
|
|
2143
2156
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2144
|
-
t || n || !
|
|
2145
|
-
}), f(this,
|
|
2157
|
+
t || n || !_i.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2158
|
+
}), f(this, da, () => {
|
|
2146
2159
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2147
|
-
}), f(this, da, (e) => {
|
|
2148
|
-
var t;
|
|
2149
|
-
m(R, this) || p(H, this, Sa).call(this), m(L, this) !== m(R, this) && (e && p(H, this, Ya).call(this), h(L, this, m(R, this)), p(H, this, ba).call(this), p(H, this, xa).call(this), p(H, this, Ea).call(this), (t = m(I, this)) == null || t.pause(), h(Ii, this, e));
|
|
2150
2160
|
}), f(this, fa, (e) => {
|
|
2161
|
+
var t;
|
|
2162
|
+
m(R, this) || p(H, this, Ca).call(this), m(L, this) !== m(R, this) && (e && p(H, this, Xa).call(this), h(L, this, m(R, this)), p(H, this, xa).call(this), p(H, this, Sa).call(this), p(H, this, Da).call(this), (t = m(I, this)) == null || t.pause(), h(Li, this, e));
|
|
2163
|
+
}), f(this, pa, (e) => {
|
|
2151
2164
|
var t, n, r, i;
|
|
2152
|
-
e && p(H, this,
|
|
2153
|
-
p(H, this,
|
|
2165
|
+
e && p(H, this, Xa).call(this), (t = m(R, this)) == null || t.hide(), h(L, this, m(wi, this)), p(H, this, Da).call(this), this.hasAttribute(_.PAUSED) ? (n = m(L, this)) == null || n.pause() : (r = m(L, this)) == null || r.play(), p(H, this, Ta).call(this), p(H, this, ba).call(this), (i = m(R, this)) == null || i.pause(), e && (h(Li, this, !1), setTimeout(() => {
|
|
2166
|
+
p(H, this, Ya).call(this);
|
|
2154
2167
|
}, 100));
|
|
2155
2168
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2156
2169
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2157
2170
|
if (e !== !1) {
|
|
2158
2171
|
var n;
|
|
2159
|
-
m(
|
|
2172
|
+
m(fa, this).call(this, t), (n = m(R, this)) == null || n.seek({
|
|
2160
2173
|
time: parseFloat(e),
|
|
2161
2174
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2162
2175
|
});
|
|
2163
2176
|
return;
|
|
2164
2177
|
}
|
|
2165
|
-
m(L, this) !== m(
|
|
2166
|
-
}), f(this,
|
|
2178
|
+
m(L, this) !== m(wi, this) && m(pa, this).call(this, t);
|
|
2179
|
+
}), f(this, ma, null), f(this, ha, () => {
|
|
2167
2180
|
var e;
|
|
2168
2181
|
let t = (e = m(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2169
2182
|
if (!(t != null && t.video)) return;
|
|
2170
2183
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2171
2184
|
n && n.catch(() => {});
|
|
2172
|
-
}), f(this,
|
|
2185
|
+
}), f(this, ga, () => {
|
|
2173
2186
|
n();
|
|
2174
|
-
}), f(this,
|
|
2187
|
+
}), f(this, _a, null);
|
|
2175
2188
|
let r = this.attachShadow({ mode: "open" });
|
|
2176
|
-
r.appendChild(
|
|
2189
|
+
r.appendChild(gi.content.cloneNode(!0));
|
|
2177
2190
|
let i = ge(this.getAttribute("log-level"));
|
|
2178
|
-
h(V, this, re.get().createContext("VindralController")), m(V, this).setLevel(i), h(
|
|
2191
|
+
h(V, this, re.get().createContext("VindralController")), m(V, this).setLevel(i), h(Ci, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), h(zi, this, new Kn(r));
|
|
2179
2192
|
}
|
|
2180
2193
|
connectedCallback() {
|
|
2181
2194
|
var e = this;
|
|
2182
2195
|
return t(function* () {
|
|
2183
|
-
x(e.getAttribute("auto-instance-enabled"), !0) && (yield p(H, e,
|
|
2184
|
-
for (let t of Object.values(v)) e.addEventListener(t, m(
|
|
2185
|
-
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,
|
|
2196
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield p(H, e, ya).call(e));
|
|
2197
|
+
for (let t of Object.values(v)) e.addEventListener(t, m(ca, e));
|
|
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, Ia).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2186
2199
|
})();
|
|
2187
2200
|
}
|
|
2188
2201
|
disconnectedCallback() {
|
|
2189
2202
|
var e, t, n, r, i;
|
|
2190
|
-
p(H, this,
|
|
2191
|
-
for (let e of Object.values(v)) this.removeEventListener(e, m(
|
|
2192
|
-
p(H, this,
|
|
2203
|
+
p(H, this, La).call(this), p(H, this, ro).call(this), m(zi, this).unload(), (e = m(I, this)) == null || e.unload(), (t = m(z, this)) == null || t.unload(), (n = m(Ai, this)) == null || n.unload(), (r = m(ji, this)) == null || r.unload(), (i = m(B, this)) == null || i.unload(), p(H, this, wa).call(this);
|
|
2204
|
+
for (let e of Object.values(v)) this.removeEventListener(e, m(ca, this));
|
|
2205
|
+
p(H, this, xa).call(this), m(bi, this) && (clearTimeout(m(bi, this)), h(bi, this, null)), m(xi, this).stop(), this.disconnectListener(this);
|
|
2193
2206
|
}
|
|
2194
2207
|
attributeChangedCallback(e, t, n) {
|
|
2195
2208
|
if (t !== n) {
|
|
@@ -2199,13 +2212,13 @@ var gi = [
|
|
|
2199
2212
|
newValue: n
|
|
2200
2213
|
}), e) {
|
|
2201
2214
|
case "channel-id":
|
|
2202
|
-
h(
|
|
2215
|
+
h(Ei, 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()));
|
|
2203
2216
|
break;
|
|
2204
2217
|
case "channel-group-id":
|
|
2205
|
-
h(
|
|
2218
|
+
h(Di, this, n);
|
|
2206
2219
|
break;
|
|
2207
2220
|
case "url":
|
|
2208
|
-
n && h(
|
|
2221
|
+
n && h(Ti, this, n);
|
|
2209
2222
|
break;
|
|
2210
2223
|
case "paused":
|
|
2211
2224
|
if (y(n)) {
|
|
@@ -2235,7 +2248,7 @@ var gi = [
|
|
|
2235
2248
|
}
|
|
2236
2249
|
break;
|
|
2237
2250
|
case _.DEBUG_PANEL_OPEN:
|
|
2238
|
-
y(n) ? p(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : p(H, this, W).call(this, _.DEBUG_PANEL_OPEN), p(H, this,
|
|
2251
|
+
y(n) ? p(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : p(H, this, W).call(this, _.DEBUG_PANEL_OPEN), p(H, this, to).call(this);
|
|
2239
2252
|
break;
|
|
2240
2253
|
case "user-interacting":
|
|
2241
2254
|
y(n) ? p(H, this, U).call(this, _.USER_INTERACTING, "") : p(H, this, W).call(this, _.USER_INTERACTING);
|
|
@@ -2256,10 +2269,10 @@ var gi = [
|
|
|
2256
2269
|
}
|
|
2257
2270
|
break;
|
|
2258
2271
|
case "ui-locked":
|
|
2259
|
-
y(n) ? p(H, this,
|
|
2272
|
+
y(n) ? p(H, this, Ka).call(this) : p(H, this, qa).call(this);
|
|
2260
2273
|
break;
|
|
2261
2274
|
case "is-fullscreen":
|
|
2262
|
-
y(n) ? p(H, this,
|
|
2275
|
+
y(n) ? p(H, this, Za).call(this) : p(H, this, Qa).call(this);
|
|
2263
2276
|
break;
|
|
2264
2277
|
case "abr-enabled":
|
|
2265
2278
|
{
|
|
@@ -2274,13 +2287,13 @@ var gi = [
|
|
|
2274
2287
|
}
|
|
2275
2288
|
break;
|
|
2276
2289
|
case "max-video-bit-rate":
|
|
2277
|
-
h(
|
|
2290
|
+
h(Oi, this, n), y(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 ? ve(n) : void 0);
|
|
2278
2291
|
break;
|
|
2279
2292
|
case "max-initial-bit-rate":
|
|
2280
|
-
h(
|
|
2293
|
+
h(ki, this, n), y(n) ? p(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : p(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2281
2294
|
break;
|
|
2282
2295
|
case "is-pip":
|
|
2283
|
-
y(n) ? p(H, this,
|
|
2296
|
+
y(n) ? p(H, this, Ya).call(this) : p(H, this, Xa).call(this);
|
|
2284
2297
|
break;
|
|
2285
2298
|
case "is-airplaying":
|
|
2286
2299
|
if (y(n)) {
|
|
@@ -2294,17 +2307,17 @@ var gi = [
|
|
|
2294
2307
|
case "is-casting":
|
|
2295
2308
|
if (y(n)) {
|
|
2296
2309
|
var ee, d;
|
|
2297
|
-
(ee = m(
|
|
2310
|
+
(ee = m(Ai, this)) != null && ee.isFullscreen() && p(H, this, Qa).call(this), (d = m(I, this)) == null || d.pause();
|
|
2298
2311
|
} else if (!document.hidden) {
|
|
2299
2312
|
var te;
|
|
2300
2313
|
(te = m(I, this)) == null || te.play();
|
|
2301
2314
|
}
|
|
2302
2315
|
break;
|
|
2303
2316
|
case "cast-receiver-id":
|
|
2304
|
-
h(
|
|
2317
|
+
h(Pi, this, n);
|
|
2305
2318
|
break;
|
|
2306
2319
|
case "cast-background":
|
|
2307
|
-
h(
|
|
2320
|
+
h(Fi, this, n);
|
|
2308
2321
|
break;
|
|
2309
2322
|
case "language":
|
|
2310
2323
|
m(I, this) && (m(I, this).language = n, y(n) ? p(H, this, U).call(this, _.LANGUAGE, n) : p(H, this, W).call(this, _.LANGUAGE));
|
|
@@ -2318,7 +2331,7 @@ var gi = [
|
|
|
2318
2331
|
case "authentication-token":
|
|
2319
2332
|
if (y(n)) {
|
|
2320
2333
|
var ne, re;
|
|
2321
|
-
(ne = m(I, this)) == null || ne.updateAuthenticationToken(n), (re = m(
|
|
2334
|
+
(ne = m(I, this)) == null || ne.updateAuthenticationToken(n), (re = m(Mi, this)) == null || re.updateAuthenticationToken(n), p(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2322
2335
|
} else p(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2323
2336
|
break;
|
|
2324
2337
|
case "volume":
|
|
@@ -2356,13 +2369,13 @@ var gi = [
|
|
|
2356
2369
|
_.USER_INTERACTING,
|
|
2357
2370
|
_.PAUSED,
|
|
2358
2371
|
_.HIDE_UI_ON_PAUSE
|
|
2359
|
-
].includes(e) && p(H, this,
|
|
2372
|
+
].includes(e) && p(H, this, Ja).call(this);
|
|
2360
2373
|
}
|
|
2361
2374
|
}
|
|
2362
2375
|
connectListener(e) {
|
|
2363
|
-
|
|
2364
|
-
let n = m(
|
|
2365
|
-
switch (n ? n.push(e) : m(
|
|
2376
|
+
wr(e).forEach((t) => {
|
|
2377
|
+
let n = m(vi, this).get(t);
|
|
2378
|
+
switch (n ? n.push(e) : m(vi, this).set(t, [e]), t) {
|
|
2366
2379
|
case _.PAUSED:
|
|
2367
2380
|
var r;
|
|
2368
2381
|
(((r = m(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
@@ -2372,7 +2385,7 @@ var gi = [
|
|
|
2372
2385
|
((i = m(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2373
2386
|
break;
|
|
2374
2387
|
case _.MAX_VIDEO_BITRATE:
|
|
2375
|
-
m(
|
|
2388
|
+
m(Oi, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, m(Oi, this));
|
|
2376
2389
|
break;
|
|
2377
2390
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2378
2391
|
{
|
|
@@ -2382,10 +2395,10 @@ var gi = [
|
|
|
2382
2395
|
}
|
|
2383
2396
|
break;
|
|
2384
2397
|
case _.CHANNEL_ID:
|
|
2385
|
-
m(
|
|
2398
|
+
m(Ei, this) && e.setAttribute(_.CHANNEL_ID, m(Ei, this));
|
|
2386
2399
|
break;
|
|
2387
2400
|
case _.CHANNEL_GROUP_ID:
|
|
2388
|
-
m(
|
|
2401
|
+
m(Di, this) && e.setAttribute(_.CHANNEL_GROUP_ID, m(Di, this));
|
|
2389
2402
|
break;
|
|
2390
2403
|
case _.AUTHENTICATION_TOKEN: {
|
|
2391
2404
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2421,38 +2434,38 @@ var gi = [
|
|
|
2421
2434
|
});
|
|
2422
2435
|
}
|
|
2423
2436
|
disconnectListener(e) {
|
|
2424
|
-
|
|
2425
|
-
let n = m(
|
|
2426
|
-
n && m(
|
|
2437
|
+
wr(e).forEach((t) => {
|
|
2438
|
+
let n = m(vi, this).get(t);
|
|
2439
|
+
n && m(vi, this).set(t, n.filter((t) => t !== e));
|
|
2427
2440
|
});
|
|
2428
2441
|
}
|
|
2429
2442
|
get instance() {
|
|
2430
2443
|
return m(I, this);
|
|
2431
2444
|
}
|
|
2432
2445
|
get fullscreen() {
|
|
2433
|
-
return p(H, this,
|
|
2446
|
+
return p(H, this, Aa).call(this);
|
|
2434
2447
|
}
|
|
2435
2448
|
get airPlay() {
|
|
2436
|
-
return m(
|
|
2449
|
+
return m(Mi, this);
|
|
2437
2450
|
}
|
|
2438
2451
|
get timelineMarkers() {
|
|
2439
|
-
return
|
|
2452
|
+
return Mr(this.getAttribute(_.TIMELINE_MARKERS));
|
|
2440
2453
|
}
|
|
2441
2454
|
set timelineMarkers(e) {
|
|
2442
|
-
let t =
|
|
2455
|
+
let t = jr(e);
|
|
2443
2456
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2444
2457
|
}
|
|
2445
2458
|
connect() {
|
|
2446
|
-
p(H, this,
|
|
2459
|
+
p(H, this, ya).call(this);
|
|
2447
2460
|
}
|
|
2448
2461
|
};
|
|
2449
|
-
function
|
|
2462
|
+
function ya() {
|
|
2450
2463
|
var e = this;
|
|
2451
2464
|
return t(function* () {
|
|
2452
2465
|
var t, n;
|
|
2453
|
-
if (!m(
|
|
2454
|
-
let r = m(L, e) === m(
|
|
2455
|
-
m(
|
|
2466
|
+
if (!m(Ei, e)) return;
|
|
2467
|
+
let r = m(L, e) === m(wi, e);
|
|
2468
|
+
m(xi, e).stop(), yield (t = m(I, e)) == null ? void 0 : t.unload(), r && h(L, e, void 0);
|
|
2456
2469
|
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = ve(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 = ve(e.getAttribute("max-video-bit-rate")), te = ve(e.getAttribute("max-initial-bit-rate")), ne = we(e.getAttribute("max-size")), re = ve(e.getAttribute("min-buffer-time")), ie = ve(e.getAttribute("max-buffer-time")), oe = x(e.getAttribute("burst-enabled")), se = x(e.getAttribute("mse-enabled")), ce = x(e.getAttribute("mse-opus-enabled")), le = x(e.getAttribute("ios-background-play-enabled")), f = x(e.getAttribute("ios-wake-lock-enabled")), g = x(e.getAttribute("stream-to-media-element-enabled")), ue = x(e.getAttribute("ios-media-element-enabled")), de = x(e.getAttribute("abr-enabled"), !0), fe = x(e.getAttribute("size-based-resolution-cap-enabled")), pe = x(e.getAttribute("telemetry-enabled")), me = be(e.getAttribute("video-codecs")), v = Se(e.getAttribute("poster")), b = he(e.getAttribute("advanced")), S = ge(e.getAttribute("log-level")), Ce = {
|
|
2457
2470
|
headers: ye(e.getAttribute("drm-headers")),
|
|
2458
2471
|
queryParams: ye(e.getAttribute("drm-queryparams")),
|
|
@@ -2466,9 +2479,9 @@ function va() {
|
|
|
2466
2479
|
}
|
|
2467
2480
|
}, Te = je(e.getAttribute("webcodecs-hardware-acceleration")), Ee = Ae(e.getAttribute("decoders")), De = x(e.getAttribute("offscreen-canvas-enabled")), Oe = x(e.getAttribute("webtransport-enabled")), ke = ve(e.getAttribute("reconnect-retries")), Me = ke === void 0 ? void 0 : (e) => e.reconnectRetries < ke, Ne = e.getAttribute("language") || void 0;
|
|
2468
2481
|
h(I, e, new ae({
|
|
2469
|
-
url: m(
|
|
2470
|
-
channelId: m(
|
|
2471
|
-
channelGroupId: m(
|
|
2482
|
+
url: m(Ti, e),
|
|
2483
|
+
channelId: m(Ei, e),
|
|
2484
|
+
channelGroupId: m(Di, e),
|
|
2472
2485
|
edgeUrl: u,
|
|
2473
2486
|
authenticationToken: ee,
|
|
2474
2487
|
muted: a,
|
|
@@ -2501,110 +2514,110 @@ function va() {
|
|
|
2501
2514
|
decoders: Ee,
|
|
2502
2515
|
offscreenCanvasEnabled: De,
|
|
2503
2516
|
reconnectHandler: Me
|
|
2504
|
-
})), h(
|
|
2517
|
+
})), h(wi, e, new di(m(I, e))), m(L, e) || h(L, e, m(wi, e)), p(H, e, ba).call(e), h(Si, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), m(Si, e) && (m(I, e).attach(m(Si, e)), m(zi, e).observe(m(Si, 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()), y(v) || p(H, e, U).call(e, _.POSTER_SRC, m(I, e).getThumbnailUrl());
|
|
2505
2518
|
let Pe = x(e.getAttribute(_.AIRPLAY_ENABLED), !1), C = x(e.getAttribute(_.CAST_ENABLED), !0), Fe = x(e.getAttribute(_.FULLSCREEN_ENABLED), !0), Ie = x(e.getAttribute(_.PIP_ENABLED), !0), Le = x(e.getAttribute(_.VU_METER_ENABLED), !1), Re = x(e.getAttribute(_.TIMESHIFT_ENABLED), !1);
|
|
2506
|
-
Pe && p(H, e,
|
|
2519
|
+
Pe && p(H, e, Pa).call(e, m(I, e)), C && p(H, e, ja).call(e, m(I, e)), Fe && p(H, e, Oa).call(e, m(I, e)), Ie && p(H, e, Ea).call(e, m(I, e)), i || m(I, e).play(), Le && p(H, e, Fa).call(e, m(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2507
2520
|
bubbles: !0,
|
|
2508
2521
|
composed: !0,
|
|
2509
2522
|
detail: m(I, e)
|
|
2510
|
-
})), Re && (p(H, e,
|
|
2523
|
+
})), Re && (p(H, e, Ca).call(e), Fe && p(H, e, ka).call(e));
|
|
2511
2524
|
})();
|
|
2512
2525
|
}
|
|
2513
|
-
function ya() {
|
|
2514
|
-
m(I, this) && (m(I, this).on("rendition levels", m(zi, this)), m(I, this).on("rendition level", m(Bi, this)), m(I, this).on("playback state", m(Vi, this)), m(I, this).on("volume state", m(Hi, this)), m(I, this).on("channel switch failed", m(Ui, this)), m(I, this).on("channel switch", m(Wi, this)), m(I, this).on("channels", m(Gi, this)), m(I, this).on("languages", m(Ki, this)), m(I, this).on("text tracks", m(qi, this)), m(I, this).on("needs user input", m(Ji, this)), m(I, this).on("is live", m(Yi, this)), m(I, this).on("timeshift info", m(Xi, this)));
|
|
2515
|
-
}
|
|
2516
2526
|
function ba() {
|
|
2517
|
-
m(I, this) && (m(I, this).
|
|
2527
|
+
m(I, this) && (m(I, this).on("rendition levels", m(Bi, this)), m(I, this).on("rendition level", m(Vi, this)), m(I, this).on("playback state", m(Hi, this)), m(I, this).on("volume state", m(Ui, this)), m(I, this).on("channel switch failed", m(Wi, this)), m(I, this).on("channel switch", m(Gi, this)), m(I, this).on("channels", m(Ki, this)), m(I, this).on("languages", m(qi, this)), m(I, this).on("text tracks", m(Ji, this)), m(I, this).on("needs user input", m(Yi, this)), m(I, this).on("is live", m(Xi, this)), m(I, this).on("timeshift info", m(Zi, this)));
|
|
2518
2528
|
}
|
|
2519
2529
|
function xa() {
|
|
2520
|
-
m(
|
|
2530
|
+
m(I, this) && (m(I, this).off("playback state", m(Hi, this)), m(I, this).off("volume state", m(Ui, this)), m(I, this).off("channel switch failed", m(Wi, this)), m(I, this).off("channel switch", m(Gi, this)), m(I, this).off("channels", m(Ki, this)), m(I, this).off("languages", m(qi, this)), m(I, this).off("text tracks", m(Ji, this)), m(I, this).off("needs user input", m(Yi, this)), m(I, this).off("is live", m(Xi, this)), m(I, this).off("timeshift info", m(Zi, this)));
|
|
2521
2531
|
}
|
|
2522
2532
|
function Sa() {
|
|
2533
|
+
m(R, this) && (m(R, this).addEventListener("playing", m(Qi, this)), m(R, this).addEventListener("pause", m($i, this)), m(R, this).addEventListener("ended", m(ea, this)), m(R, this).addEventListener("timeupdate", m(na, this)), m(R, this).addEventListener("volumechange", m(ra, this)), m(R, this).addEventListener("hlsbuffering", m(ia, this)), m(R, this).addEventListener("hlsnotbuffering", m(aa, this)), m(R, this).addEventListener("timeshiftready", m(oa, this)));
|
|
2534
|
+
}
|
|
2535
|
+
function Ca() {
|
|
2523
2536
|
var e, t, n, r;
|
|
2524
2537
|
let i = ve(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 = x(this.getAttribute(_.MUTED), (n = (r = m(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2525
|
-
p(H, this,
|
|
2538
|
+
p(H, this, wa).call(this), h(R, this, new Jr(m(Ci, this), {
|
|
2526
2539
|
volume: a,
|
|
2527
2540
|
muted: o,
|
|
2528
|
-
maxVideoBitRate: m(
|
|
2529
|
-
})), m(R, this).addEventListener("durationchange", m(
|
|
2530
|
-
}
|
|
2531
|
-
function Ca() {
|
|
2532
|
-
m(R, this) && (p(H, this, wa).call(this), m(R, this).removeEventListener("durationchange", m(ea, this)), m(R, this).cleanup(), m(L, this) === m(R, this) && h(L, this, void 0), h(R, this, void 0));
|
|
2541
|
+
maxVideoBitRate: m(Oi, this) ? parseInt(m(Oi, this), 10) : void 0
|
|
2542
|
+
})), m(R, this).addEventListener("durationchange", m(ta, this));
|
|
2533
2543
|
}
|
|
2534
2544
|
function wa() {
|
|
2535
|
-
m(R, this) && (
|
|
2545
|
+
m(R, this) && (p(H, this, Ta).call(this), m(R, this).removeEventListener("durationchange", m(ta, this)), m(R, this).cleanup(), m(L, this) === m(R, this) && h(L, this, void 0), h(R, this, void 0));
|
|
2536
2546
|
}
|
|
2537
|
-
function Ta(
|
|
2538
|
-
|
|
2547
|
+
function Ta() {
|
|
2548
|
+
m(R, this) && (m(R, this).removeEventListener("playing", m(Qi, this)), m(R, this).removeEventListener("pause", m($i, this)), m(R, this).removeEventListener("ended", m(ea, this)), m(R, this).removeEventListener("timeupdate", m(na, this)), m(R, this).removeEventListener("volumechange", m(ra, this)), m(R, this).removeEventListener("hlsbuffering", m(ia, this)), m(R, this).removeEventListener("hlsnotbuffering", m(aa, this)), m(R, this).removeEventListener("timeshiftready", m(oa, this)));
|
|
2549
|
+
}
|
|
2550
|
+
function Ea(e) {
|
|
2551
|
+
e.mediaElement instanceof HTMLVideoElement && (h(z, this, new rr(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) => {
|
|
2539
2552
|
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP);
|
|
2540
2553
|
}));
|
|
2541
2554
|
}
|
|
2542
|
-
function
|
|
2555
|
+
function Da() {
|
|
2543
2556
|
var e;
|
|
2544
2557
|
if (!m(z, this)) return;
|
|
2545
2558
|
let t = null;
|
|
2546
|
-
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
|
|
2559
|
+
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 rr(t)), m(z, this).on("on picture in picture change", (e) => {
|
|
2547
2560
|
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP);
|
|
2548
2561
|
}));
|
|
2549
2562
|
}
|
|
2550
|
-
function
|
|
2551
|
-
let t = !
|
|
2552
|
-
h(
|
|
2563
|
+
function Oa(e) {
|
|
2564
|
+
let t = !qn.isFullscreenApiSupported(this) && qn.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2565
|
+
h(Ai, this, new qn(t)), m(Ai, this).on("on fullscreen change", (e) => {
|
|
2553
2566
|
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2554
2567
|
});
|
|
2555
2568
|
}
|
|
2556
|
-
function
|
|
2569
|
+
function ka() {
|
|
2557
2570
|
var e;
|
|
2558
|
-
m(R, this) && (h(
|
|
2571
|
+
m(R, this) && (h(ji, this, !qn.isFullscreenApiSupported(this) && qn.isFullscreenApiSupported((e = m(R, this)) == null ? void 0 : e.videoElement) ? new qn(m(R, this).videoElement) : new qn(this)), m(ji, this).on("on fullscreen change", (e) => {
|
|
2559
2572
|
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2560
2573
|
}));
|
|
2561
2574
|
}
|
|
2562
|
-
function
|
|
2563
|
-
return this.hasAttribute(_.TIMESHIFT_POSITION) ? m(
|
|
2575
|
+
function Aa() {
|
|
2576
|
+
return this.hasAttribute(_.TIMESHIFT_POSITION) ? m(ji, this) : m(Ai, this);
|
|
2564
2577
|
}
|
|
2565
|
-
function
|
|
2566
|
-
h(
|
|
2567
|
-
background: m(
|
|
2568
|
-
receiverApplicationId: m(
|
|
2578
|
+
function ja(e) {
|
|
2579
|
+
h(Ni, this, new De({
|
|
2580
|
+
background: m(Fi, this),
|
|
2581
|
+
receiverApplicationId: m(Pi, this),
|
|
2569
2582
|
options: e.getCastOptions()
|
|
2570
|
-
})), m(
|
|
2583
|
+
})), m(Ni, this).init().then(() => {
|
|
2571
2584
|
var e, t, n;
|
|
2572
|
-
p(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = m(
|
|
2585
|
+
p(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = m(Ni, this)) == null || e.on("connected", p(H, this, Ma).bind(this)), (t = m(Ni, this)) == null || t.on("resumed", p(H, this, Ma).bind(this)), (n = m(Ni, this)) == null || n.on("disconnected", p(H, this, Na).bind(this));
|
|
2573
2586
|
}).catch((e) => {
|
|
2574
2587
|
m(V, this).warn("Failed to initialize CastSender", e);
|
|
2575
2588
|
});
|
|
2576
2589
|
}
|
|
2577
|
-
function
|
|
2590
|
+
function Ma() {
|
|
2578
2591
|
var e, t;
|
|
2579
2592
|
p(H, this, U).call(this, _.IS_CASTING, "");
|
|
2580
|
-
let n = (e = (t = m(
|
|
2593
|
+
let n = (e = (t = m(Ni, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2581
2594
|
p(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2582
2595
|
}
|
|
2583
|
-
function
|
|
2596
|
+
function Na() {
|
|
2584
2597
|
p(H, this, W).call(this, _.IS_CASTING), p(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2585
2598
|
}
|
|
2586
|
-
function
|
|
2599
|
+
function Pa(e) {
|
|
2587
2600
|
var t;
|
|
2588
|
-
(t = m(
|
|
2601
|
+
(t = m(Mi, this)) == null || t.unload();
|
|
2589
2602
|
let n = e.getCastOptions();
|
|
2590
|
-
h(
|
|
2603
|
+
h(Mi, this, new Rn({
|
|
2591
2604
|
url: n.url,
|
|
2592
2605
|
channelId: n.channelId,
|
|
2593
2606
|
authenticationToken: n.authenticationToken,
|
|
2594
2607
|
container: this
|
|
2595
|
-
})), m(
|
|
2608
|
+
})), m(Mi, this).once("available", () => {
|
|
2596
2609
|
p(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2597
|
-
}), m(
|
|
2610
|
+
}), m(Mi, this).on("connected", () => {
|
|
2598
2611
|
p(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2599
|
-
}), m(
|
|
2612
|
+
}), m(Mi, this).on("disconnected", () => {
|
|
2600
2613
|
p(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2601
2614
|
});
|
|
2602
2615
|
}
|
|
2603
|
-
function
|
|
2616
|
+
function Fa(e) {
|
|
2604
2617
|
var t;
|
|
2605
2618
|
if ((t = m(B, this)) == null || t.unload(), !se()) {
|
|
2606
|
-
if (e.audioNode) h(B, this, new
|
|
2607
|
-
else if (e.mediaElement instanceof HTMLMediaElement) h(B, this, new
|
|
2619
|
+
if (e.audioNode) h(B, this, new Pr(e.audioNode));
|
|
2620
|
+
else if (e.mediaElement instanceof HTMLMediaElement) h(B, this, new Pr(e.mediaElement));
|
|
2608
2621
|
else return;
|
|
2609
2622
|
m(B, this).on("on decibel change", (e) => {
|
|
2610
2623
|
p(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
@@ -2614,37 +2627,37 @@ function Pa(e) {
|
|
|
2614
2627
|
})), (!m(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && m(B, this).start();
|
|
2615
2628
|
}
|
|
2616
2629
|
}
|
|
2617
|
-
function
|
|
2630
|
+
function Ia() {
|
|
2618
2631
|
let e = () => (customElements.get("vindral-debug-panel") || import("./C2-H3s2r.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), m(I, this));
|
|
2619
|
-
window._vindralDebug = e, h(
|
|
2632
|
+
window._vindralDebug = e, h(Ri, this, e);
|
|
2620
2633
|
}
|
|
2621
|
-
function
|
|
2634
|
+
function La() {
|
|
2622
2635
|
let e = window;
|
|
2623
|
-
m(
|
|
2624
|
-
}
|
|
2625
|
-
function La(e) {
|
|
2626
|
-
e.pointerType !== "mouse" && e.timeStamp - m(oa, this) < 250 || (p(H, this, Ga).call(this), m(yi, this) && clearTimeout(m(yi, this)), e.target instanceof HTMLElement && ([this, m(xi, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && p(H, this, Ka).call(this));
|
|
2636
|
+
m(Ri, this) && e._vindralDebug === m(Ri, this) && delete e._vindralDebug, h(Ri, this, null);
|
|
2627
2637
|
}
|
|
2628
2638
|
function Ra(e) {
|
|
2629
|
-
|
|
2630
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(xi, this)].includes(e.target) && t ? p(H, this, Wa).call(this) : p(H, this, Ka).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(H, this, Ka).call(this);
|
|
2639
|
+
e.pointerType !== "mouse" && e.timeStamp - m(sa, this) < 250 || (p(H, this, Ka).call(this), m(bi, this) && clearTimeout(m(bi, this)), e.target instanceof HTMLElement && ([this, m(Si, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && p(H, this, qa).call(this));
|
|
2631
2640
|
}
|
|
2632
2641
|
function za(e) {
|
|
2642
|
+
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2643
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(Si, this)].includes(e.target) && t ? p(H, this, Ga).call(this) : p(H, this, qa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(H, this, qa).call(this);
|
|
2644
|
+
}
|
|
2645
|
+
function Ba(e) {
|
|
2633
2646
|
switch (e) {
|
|
2634
2647
|
case "dblclick-fullscreen": return x(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2635
2648
|
default: return !0;
|
|
2636
2649
|
}
|
|
2637
2650
|
}
|
|
2638
|
-
function Ba(e) {
|
|
2639
|
-
p(H, this, za).call(this, "dblclick-fullscreen") && (!m(ki, this) || e.target instanceof S || e.target instanceof ze || e.target instanceof mi || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2640
|
-
}
|
|
2641
2651
|
function Va(e) {
|
|
2642
|
-
this.
|
|
2652
|
+
p(H, this, Ba).call(this, "dblclick-fullscreen") && (!m(Ai, this) || e.target instanceof S || e.target instanceof ze || e.target instanceof hi || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2643
2653
|
}
|
|
2644
2654
|
function Ha(e) {
|
|
2655
|
+
this.hasAttribute(_.USER_INTERACTING) || p(H, this, qa).call(this);
|
|
2656
|
+
}
|
|
2657
|
+
function Ua(e) {
|
|
2645
2658
|
var t;
|
|
2646
2659
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2647
|
-
if (n || r || !
|
|
2660
|
+
if (n || r || !_i.includes(i)) return;
|
|
2648
2661
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2649
2662
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2650
2663
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2662,28 +2675,28 @@ function Ha(e) {
|
|
|
2662
2675
|
break;
|
|
2663
2676
|
}
|
|
2664
2677
|
}
|
|
2665
|
-
function
|
|
2678
|
+
function Wa() {
|
|
2666
2679
|
var e = this;
|
|
2667
2680
|
return t(function* () {
|
|
2668
|
-
if (!m(I, e) || !m(
|
|
2681
|
+
if (!m(I, e) || !m(Di, e)) return;
|
|
2669
2682
|
let t = Date.now();
|
|
2670
|
-
if (m(
|
|
2683
|
+
if (m(ma, e) && t - m(ma, e) < 1e4) m(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2671
2684
|
else {
|
|
2672
|
-
h(
|
|
2673
|
-
let n = yield m(I, e).getApiClient().getChannels(m(
|
|
2685
|
+
h(ma, e, t);
|
|
2686
|
+
let n = yield m(I, e).getApiClient().getChannels(m(Di, e));
|
|
2674
2687
|
p(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2675
2688
|
}
|
|
2676
|
-
h(
|
|
2689
|
+
h(Ii, e, window.setTimeout(() => void p(H, e, Wa).call(e), 1e4));
|
|
2677
2690
|
})();
|
|
2678
2691
|
}
|
|
2679
|
-
function
|
|
2692
|
+
function Ga() {
|
|
2680
2693
|
!this.hasAttribute(_.USER_INTERACTING) || this.hasAttribute(_.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2681
2694
|
bubbles: !0,
|
|
2682
2695
|
composed: !0,
|
|
2683
2696
|
detail: { active: !1 }
|
|
2684
2697
|
})), this.removeAttribute(_.USER_INTERACTING));
|
|
2685
2698
|
}
|
|
2686
|
-
function
|
|
2699
|
+
function Ka() {
|
|
2687
2700
|
this.hasAttribute(_.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2688
2701
|
this.setAttribute(_.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2689
2702
|
bubbles: !0,
|
|
@@ -2692,64 +2705,64 @@ function Ga() {
|
|
|
2692
2705
|
}));
|
|
2693
2706
|
});
|
|
2694
2707
|
}
|
|
2695
|
-
function Ka() {
|
|
2696
|
-
p(H, this, Ga).call(this), m(yi, this) && clearTimeout(m(yi, this)), m(vi, this) && h(yi, this, self.setTimeout(() => {
|
|
2697
|
-
p(H, this, Wa).call(this);
|
|
2698
|
-
}, m(vi, this)));
|
|
2699
|
-
}
|
|
2700
2708
|
function qa() {
|
|
2709
|
+
p(H, this, Ka).call(this), m(bi, this) && clearTimeout(m(bi, this)), m(yi, this) && h(bi, this, self.setTimeout(() => {
|
|
2710
|
+
p(H, this, Ga).call(this);
|
|
2711
|
+
}, m(yi, this)));
|
|
2712
|
+
}
|
|
2713
|
+
function Ja() {
|
|
2701
2714
|
var e;
|
|
2702
2715
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2703
2716
|
(e = m(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2704
2717
|
}
|
|
2705
|
-
function
|
|
2718
|
+
function Ya() {
|
|
2706
2719
|
var e;
|
|
2707
|
-
p(H, this,
|
|
2720
|
+
p(H, this, Da).call(this), p(H, this, $a).call(this), (e = m(z, this)) == null || e.request().catch((e) => {
|
|
2708
2721
|
m(V, this).warn("Failed to enter picture in picture:", e);
|
|
2709
2722
|
});
|
|
2710
2723
|
}
|
|
2711
|
-
function
|
|
2724
|
+
function Xa() {
|
|
2712
2725
|
var e;
|
|
2713
2726
|
(e = m(z, this)) == null || e.exit().catch((e) => {
|
|
2714
2727
|
m(V, this).warn("Failed to exit picture in picture:", e);
|
|
2715
2728
|
});
|
|
2716
2729
|
}
|
|
2717
|
-
function
|
|
2718
|
-
let e = p(H, this,
|
|
2730
|
+
function Za() {
|
|
2731
|
+
let e = p(H, this, Aa).call(this);
|
|
2719
2732
|
if (!e) {
|
|
2720
2733
|
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2721
2734
|
return;
|
|
2722
2735
|
}
|
|
2723
|
-
e != null && e.isFullscreenApiSupported() ? (p(H, this,
|
|
2724
|
-
m(
|
|
2736
|
+
e != null && e.isFullscreenApiSupported() ? (p(H, this, $a).call(this), e == null || e.request().then(() => {
|
|
2737
|
+
m(ha, this).call(this);
|
|
2725
2738
|
}).catch((e) => {
|
|
2726
2739
|
m(V, this).warn("Failed to enter fullscreen:", e);
|
|
2727
2740
|
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2728
2741
|
}
|
|
2729
|
-
function
|
|
2730
|
-
let e = p(H, this,
|
|
2742
|
+
function Qa() {
|
|
2743
|
+
let e = p(H, this, Aa).call(this);
|
|
2731
2744
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2732
|
-
m(
|
|
2745
|
+
m(ga, this).call(this);
|
|
2733
2746
|
}).catch((e) => {
|
|
2734
2747
|
m(V, this).warn("Failed to exit fullscreen:", e);
|
|
2735
2748
|
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), p(H, this, W).call(this, _.FULLSCREEN));
|
|
2736
2749
|
}
|
|
2737
|
-
function Qa() {
|
|
2738
|
-
m(I, this) && m(I, this).emitter.emit("ios-hack: reset size");
|
|
2739
|
-
}
|
|
2740
2750
|
function $a() {
|
|
2741
|
-
|
|
2751
|
+
m(I, this) && m(I, this).emitter.emit("ios-hack: reset size");
|
|
2742
2752
|
}
|
|
2743
2753
|
function eo() {
|
|
2744
|
-
|
|
2754
|
+
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2745
2755
|
}
|
|
2746
2756
|
function to() {
|
|
2747
|
-
|
|
2757
|
+
p(H, this, eo).call(this) ? p(H, this, no).call(this) : p(H, this, ro).call(this);
|
|
2748
2758
|
}
|
|
2749
2759
|
function no() {
|
|
2750
|
-
m(
|
|
2760
|
+
m(_a, this) === null && (p(H, this, io).call(this), h(_a, this, window.setInterval(() => p(H, this, io).call(this), 1e3)));
|
|
2751
2761
|
}
|
|
2752
2762
|
function ro() {
|
|
2763
|
+
m(_a, this) && (clearInterval(m(_a, this)), h(_a, 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);
|
|
2764
|
+
}
|
|
2765
|
+
function io() {
|
|
2753
2766
|
if (!m(I, this)) return;
|
|
2754
2767
|
try {
|
|
2755
2768
|
let e = m(I, this).getStatistics().drift;
|
|
@@ -2765,13 +2778,13 @@ function ro() {
|
|
|
2765
2778
|
}
|
|
2766
2779
|
function U(e, t) {
|
|
2767
2780
|
var n;
|
|
2768
|
-
(n = m(
|
|
2781
|
+
(n = m(vi, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2769
2782
|
}
|
|
2770
2783
|
function W(e) {
|
|
2771
2784
|
var t;
|
|
2772
|
-
(t = m(
|
|
2785
|
+
(t = m(vi, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2773
2786
|
}
|
|
2774
|
-
e(
|
|
2787
|
+
e(va, "observedAttributes", [
|
|
2775
2788
|
...me,
|
|
2776
2789
|
"url",
|
|
2777
2790
|
"edge-url",
|
|
@@ -2811,8 +2824,8 @@ e(_a, "observedAttributes", [
|
|
|
2811
2824
|
"auto-instance-enabled",
|
|
2812
2825
|
"language"
|
|
2813
2826
|
]);
|
|
2814
|
-
var
|
|
2815
|
-
|
|
2827
|
+
var ao = { _: "https://lb.cdn.vindral.com" }, oo, so = document.createElement("template");
|
|
2828
|
+
so.innerHTML = `
|
|
2816
2829
|
<style>
|
|
2817
2830
|
:host {
|
|
2818
2831
|
display: var(--fullscreen-button-display);
|
|
@@ -2836,10 +2849,10 @@ oo.innerHTML = `
|
|
|
2836
2849
|
</slot>
|
|
2837
2850
|
</slot>
|
|
2838
2851
|
`;
|
|
2839
|
-
var
|
|
2852
|
+
var co = class extends S {
|
|
2840
2853
|
constructor() {
|
|
2841
2854
|
var e;
|
|
2842
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2855
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(so.content.cloneNode(!0));
|
|
2843
2856
|
}
|
|
2844
2857
|
connectedCallback() {
|
|
2845
2858
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2864,48 +2877,48 @@ var so = class extends S {
|
|
|
2864
2877
|
}));
|
|
2865
2878
|
}
|
|
2866
2879
|
};
|
|
2867
|
-
|
|
2880
|
+
oo = co, e(co, "observedAttributes", [...b(oo, "observedAttributes", oo), _.FULLSCREEN]);
|
|
2868
2881
|
//#endregion
|
|
2869
2882
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2870
|
-
var
|
|
2871
|
-
|
|
2883
|
+
var lo, uo = "\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", fo = document.createElement("template");
|
|
2884
|
+
fo.innerHTML = `
|
|
2872
2885
|
<style>
|
|
2873
2886
|
:host(:not([hidden])) {
|
|
2874
2887
|
display: var(--language-menu-display);
|
|
2875
2888
|
}
|
|
2876
2889
|
</style>
|
|
2877
2890
|
|
|
2878
|
-
<slot name="button">${
|
|
2891
|
+
<slot name="button">${uo}</slot>
|
|
2879
2892
|
<slot name="listbox" hidden>
|
|
2880
2893
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2881
2894
|
</slot>
|
|
2882
2895
|
`;
|
|
2883
|
-
var
|
|
2896
|
+
var po = /* @__PURE__ */ new WeakSet(), mo = class extends ze {
|
|
2884
2897
|
constructor() {
|
|
2885
2898
|
var e, t, n, r;
|
|
2886
|
-
super(), g(this,
|
|
2899
|
+
super(), g(this, po), (e = this.shadowRoot) == null || e.appendChild(fo.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]");
|
|
2887
2900
|
}
|
|
2888
2901
|
connectedCallback() {
|
|
2889
|
-
super.connectedCallback(), p(
|
|
2902
|
+
super.connectedCallback(), p(po, this, ho).call(this), this.setAttribute("aria-label", "Languages");
|
|
2890
2903
|
}
|
|
2891
2904
|
attributeChangedCallback(e, t, n) {
|
|
2892
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(
|
|
2905
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(po, this, ho).call(this);
|
|
2893
2906
|
}
|
|
2894
2907
|
};
|
|
2895
|
-
|
|
2896
|
-
function
|
|
2908
|
+
lo = mo;
|
|
2909
|
+
function ho() {
|
|
2897
2910
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
2898
2911
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2899
2912
|
}
|
|
2900
|
-
e(
|
|
2901
|
-
...b(
|
|
2913
|
+
e(mo, "observedAttributes", [
|
|
2914
|
+
...b(lo, "observedAttributes", lo),
|
|
2902
2915
|
_.LANGUAGES,
|
|
2903
2916
|
_.TEXT_TRACKS
|
|
2904
2917
|
]);
|
|
2905
2918
|
//#endregion
|
|
2906
2919
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2907
|
-
var
|
|
2908
|
-
|
|
2920
|
+
var go = document.createElement("template");
|
|
2921
|
+
go.innerHTML = `
|
|
2909
2922
|
<style>
|
|
2910
2923
|
:host {
|
|
2911
2924
|
font: inherit;
|
|
@@ -3019,21 +3032,21 @@ ho.innerHTML = `
|
|
|
3019
3032
|
<div class="menu"></div>
|
|
3020
3033
|
</div>
|
|
3021
3034
|
`;
|
|
3022
|
-
var
|
|
3035
|
+
var _o = /* @__PURE__ */ new WeakMap(), 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(), G = /* @__PURE__ */ new WeakSet(), ko = class extends HTMLElement {
|
|
3023
3036
|
constructor() {
|
|
3024
|
-
super(), g(this, G), f(this,
|
|
3037
|
+
super(), g(this, G), f(this, _o, []), f(this, vo, []), f(this, yo, void 0), f(this, bo, void 0), f(this, xo, []), f(this, So, []), f(this, Co, null), f(this, wo, null), f(this, To, null), f(this, Eo, null), f(this, Do, null), f(this, Oo, null), e(this, "handleEvent", (e) => {
|
|
3025
3038
|
switch (e.type) {
|
|
3026
3039
|
case "keydown":
|
|
3027
|
-
p(G, this,
|
|
3040
|
+
p(G, this, Ro).call(this, e);
|
|
3028
3041
|
break;
|
|
3029
3042
|
}
|
|
3030
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3043
|
+
}), this.attachShadow({ mode: "open" }).appendChild(go.content.cloneNode(!0));
|
|
3031
3044
|
}
|
|
3032
3045
|
connectedCallback() {
|
|
3033
3046
|
let e = this.getRootNode();
|
|
3034
3047
|
if (e instanceof ShadowRoot) {
|
|
3035
3048
|
var t, n, r;
|
|
3036
|
-
h(
|
|
3049
|
+
h(To, this, e.host.closest("vindral-controller")), (t = m(To, this)) == null || t.connectListener(this), h(Co, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), h(wo, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), p(G, this, Ao).call(this), p(G, this, jo).call(this), h(Eo, this, e.host), this.addEventListener("keydown", this);
|
|
3037
3050
|
}
|
|
3038
3051
|
}
|
|
3039
3052
|
disconnectedCallback() {
|
|
@@ -3043,16 +3056,16 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3043
3056
|
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));
|
|
3044
3057
|
}
|
|
3045
3058
|
set languages(e) {
|
|
3046
|
-
h(
|
|
3059
|
+
h(_o, this, e), p(G, this, No).call(this), p(G, this, Fo).call(this);
|
|
3047
3060
|
}
|
|
3048
3061
|
set textTracks(e) {
|
|
3049
|
-
h(
|
|
3062
|
+
h(vo, this, e), p(G, this, Mo).call(this), p(G, this, Io).call(this);
|
|
3050
3063
|
}
|
|
3051
3064
|
set language(e) {
|
|
3052
|
-
h(
|
|
3065
|
+
h(yo, this, e), p(G, this, Fo).call(this);
|
|
3053
3066
|
}
|
|
3054
3067
|
set textTrack(e) {
|
|
3055
|
-
h(
|
|
3068
|
+
h(bo, this, e), p(G, this, Io).call(this);
|
|
3056
3069
|
}
|
|
3057
3070
|
get keysUsed() {
|
|
3058
3071
|
return [
|
|
@@ -3069,10 +3082,10 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3069
3082
|
];
|
|
3070
3083
|
}
|
|
3071
3084
|
focus() {
|
|
3072
|
-
m(
|
|
3085
|
+
m(Do, this) ? m(Do, this).focus() : m(Oo, this) && m(Oo, this).focus();
|
|
3073
3086
|
}
|
|
3074
3087
|
};
|
|
3075
|
-
function
|
|
3088
|
+
function Ao() {
|
|
3076
3089
|
new IntersectionObserver((e) => {
|
|
3077
3090
|
e.forEach((e) => {
|
|
3078
3091
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3081,55 +3094,55 @@ function ko() {
|
|
|
3081
3094
|
} else this.style.height = "auto";
|
|
3082
3095
|
});
|
|
3083
3096
|
}, {
|
|
3084
|
-
root: m(
|
|
3097
|
+
root: m(To, this),
|
|
3085
3098
|
threshold: 0
|
|
3086
3099
|
}).observe(this);
|
|
3087
3100
|
}
|
|
3088
|
-
function Ao() {
|
|
3089
|
-
m(So, this) && (p(G, this, Mo).call(this), p(G, this, Po).call(this)), m(Co, this) && (p(G, this, jo).call(this), p(G, this, Fo).call(this));
|
|
3090
|
-
}
|
|
3091
3101
|
function jo() {
|
|
3092
|
-
m(Co, this).
|
|
3093
|
-
|
|
3094
|
-
|
|
3102
|
+
m(Co, this) && (p(G, this, No).call(this), p(G, this, Fo).call(this)), m(wo, this) && (p(G, this, Mo).call(this), p(G, this, Io).call(this));
|
|
3103
|
+
}
|
|
3104
|
+
function Mo() {
|
|
3105
|
+
m(wo, this).innerHTML = "", h(So, this, []);
|
|
3106
|
+
let e = p(G, this, Po).call(this, "Off", "textTrack", void 0);
|
|
3107
|
+
m(wo, this).appendChild(e), m(So, this).push({
|
|
3095
3108
|
element: e,
|
|
3096
3109
|
value: void 0
|
|
3097
|
-
}), m(
|
|
3098
|
-
let t = p(G, this,
|
|
3099
|
-
m(
|
|
3110
|
+
}), m(vo, this).forEach((e) => {
|
|
3111
|
+
let t = p(G, this, Po).call(this, e, "textTrack", e);
|
|
3112
|
+
m(wo, this).appendChild(t), m(So, this).push({
|
|
3100
3113
|
element: t,
|
|
3101
3114
|
value: e
|
|
3102
3115
|
});
|
|
3103
|
-
}), p(G, this,
|
|
3116
|
+
}), p(G, this, Io).call(this);
|
|
3104
3117
|
}
|
|
3105
|
-
function
|
|
3106
|
-
m(
|
|
3107
|
-
let t = p(G, this,
|
|
3108
|
-
m(
|
|
3118
|
+
function No() {
|
|
3119
|
+
m(Co, this).innerHTML = "", h(xo, this, []), m(_o, this).forEach((e) => {
|
|
3120
|
+
let t = p(G, this, Po).call(this, e, "language", e);
|
|
3121
|
+
m(Co, this).appendChild(t), m(xo, this).push({
|
|
3109
3122
|
element: t,
|
|
3110
3123
|
value: e
|
|
3111
3124
|
});
|
|
3112
|
-
}), p(G, this,
|
|
3125
|
+
}), p(G, this, Fo).call(this);
|
|
3113
3126
|
}
|
|
3114
|
-
function
|
|
3127
|
+
function Po(e, t, n) {
|
|
3115
3128
|
let r = document.createElement("div");
|
|
3116
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(G, this,
|
|
3117
|
-
}
|
|
3118
|
-
function Po() {
|
|
3119
|
-
m(Eo, this) && (m(Eo, this).removeAttribute("aria-selected"), m(Eo, this).tabIndex = -1);
|
|
3120
|
-
let e = m(bo, this).find((e) => e.value === m(vo, this));
|
|
3121
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Eo, this, e.element));
|
|
3129
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(G, this, Lo).call(this, n, t)), r;
|
|
3122
3130
|
}
|
|
3123
3131
|
function Fo() {
|
|
3124
3132
|
m(Do, this) && (m(Do, this).removeAttribute("aria-selected"), m(Do, this).tabIndex = -1);
|
|
3125
3133
|
let e = m(xo, this).find((e) => e.value === m(yo, this));
|
|
3126
|
-
|
|
3134
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Do, this, e.element));
|
|
3135
|
+
}
|
|
3136
|
+
function Io() {
|
|
3137
|
+
m(Oo, this) && (m(Oo, this).removeAttribute("aria-selected"), m(Oo, this).tabIndex = -1);
|
|
3138
|
+
let e = m(So, this).find((e) => e.value === m(bo, this));
|
|
3139
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Oo, this, e.element);
|
|
3127
3140
|
else {
|
|
3128
|
-
let e = m(
|
|
3129
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(
|
|
3141
|
+
let e = m(So, this).find((e) => e.value === void 0);
|
|
3142
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Oo, this, e.element));
|
|
3130
3143
|
}
|
|
3131
3144
|
}
|
|
3132
|
-
function
|
|
3145
|
+
function Lo(e, t) {
|
|
3133
3146
|
this.dispatchEvent(new Event("change", {
|
|
3134
3147
|
bubbles: !0,
|
|
3135
3148
|
composed: !0
|
|
@@ -3141,36 +3154,36 @@ function Io(e, t) {
|
|
|
3141
3154
|
detail: e
|
|
3142
3155
|
}));
|
|
3143
3156
|
}
|
|
3144
|
-
function
|
|
3157
|
+
function Ro(e) {
|
|
3145
3158
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3146
3159
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3147
3160
|
var a;
|
|
3148
|
-
(a = m(
|
|
3161
|
+
(a = m(Eo, this)) == null || a.hide();
|
|
3149
3162
|
} else if (t === "Enter" || t === " ") {
|
|
3150
3163
|
var o;
|
|
3151
|
-
(o = p(G, this,
|
|
3152
|
-
} else p(G, this,
|
|
3164
|
+
(o = p(G, this, Vo).call(this)) == null || (o = o.element) == null || o.click();
|
|
3165
|
+
} else p(G, this, zo).call(this, e);
|
|
3153
3166
|
}
|
|
3154
|
-
function
|
|
3167
|
+
function zo(e) {
|
|
3155
3168
|
var t;
|
|
3156
|
-
let { key: n } = e, r = [...m(
|
|
3169
|
+
let { key: n } = e, r = [...m(xo, this), ...m(So, this)], i = (t = p(G, this, Vo).call(this)) == null ? r[0] : t;
|
|
3157
3170
|
if (!i) return;
|
|
3158
3171
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3159
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(G, this,
|
|
3172
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(G, this, Bo).call(this, a, "left") : n === "ArrowRight" ? o = p(G, this, Bo).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);
|
|
3160
3173
|
let s = r[o];
|
|
3161
|
-
s && (p(G, this,
|
|
3174
|
+
s && (p(G, this, Ho).call(this, s.value), s.element.focus());
|
|
3162
3175
|
}
|
|
3163
|
-
function
|
|
3164
|
-
let n = m(
|
|
3176
|
+
function Bo(e, t) {
|
|
3177
|
+
let n = m(xo, this).length, r = m(So, this).length;
|
|
3165
3178
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3166
3179
|
}
|
|
3167
|
-
function
|
|
3168
|
-
return [...m(
|
|
3180
|
+
function Vo() {
|
|
3181
|
+
return [...m(xo, this), ...m(So, this)].find((e) => e.element.tabIndex === 0);
|
|
3169
3182
|
}
|
|
3170
|
-
function
|
|
3171
|
-
for (let t of [...m(
|
|
3183
|
+
function Ho(e) {
|
|
3184
|
+
for (let t of [...m(xo, this), ...m(So, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3172
3185
|
}
|
|
3173
|
-
e(
|
|
3186
|
+
e(ko, "observedAttributes", [
|
|
3174
3187
|
_.LANGUAGES,
|
|
3175
3188
|
_.TEXT_TRACKS,
|
|
3176
3189
|
_.LANGUAGE,
|
|
@@ -3178,12 +3191,12 @@ e(Oo, "observedAttributes", [
|
|
|
3178
3191
|
]);
|
|
3179
3192
|
//#endregion
|
|
3180
3193
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3181
|
-
var
|
|
3182
|
-
|
|
3183
|
-
var
|
|
3194
|
+
var Uo, Wo = document.createElement("template");
|
|
3195
|
+
Wo.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";
|
|
3196
|
+
var Go = class extends S {
|
|
3184
3197
|
constructor() {
|
|
3185
3198
|
var e;
|
|
3186
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3199
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Wo.content.cloneNode(!0));
|
|
3187
3200
|
}
|
|
3188
3201
|
connectedCallback() {
|
|
3189
3202
|
super.connectedCallback(), this.updateState();
|
|
@@ -3214,15 +3227,15 @@ var Wo = class extends S {
|
|
|
3214
3227
|
}));
|
|
3215
3228
|
}
|
|
3216
3229
|
};
|
|
3217
|
-
|
|
3218
|
-
...b(
|
|
3230
|
+
Uo = Go, e(Go, "observedAttributes", [
|
|
3231
|
+
...b(Uo, "observedAttributes", Uo),
|
|
3219
3232
|
_.TIMESHIFT_POSITION,
|
|
3220
3233
|
_.DURATION
|
|
3221
3234
|
]);
|
|
3222
3235
|
//#endregion
|
|
3223
3236
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3224
|
-
var
|
|
3225
|
-
|
|
3237
|
+
var Ko, qo = document.createElement("template");
|
|
3238
|
+
qo.innerHTML = `
|
|
3226
3239
|
<style>
|
|
3227
3240
|
:host {
|
|
3228
3241
|
display: var(--mute-button-display);
|
|
@@ -3250,10 +3263,10 @@ Ko.innerHTML = `
|
|
|
3250
3263
|
</slot>
|
|
3251
3264
|
</slot>
|
|
3252
3265
|
`;
|
|
3253
|
-
var
|
|
3266
|
+
var Jo = class extends S {
|
|
3254
3267
|
constructor() {
|
|
3255
3268
|
var e;
|
|
3256
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3269
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(qo.content.cloneNode(!0));
|
|
3257
3270
|
}
|
|
3258
3271
|
connectedCallback() {
|
|
3259
3272
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3278,11 +3291,11 @@ var qo = class extends S {
|
|
|
3278
3291
|
}));
|
|
3279
3292
|
}
|
|
3280
3293
|
};
|
|
3281
|
-
|
|
3294
|
+
Ko = Jo, e(Jo, "observedAttributes", [...b(Ko, "observedAttributes", Ko), _.MUTED]);
|
|
3282
3295
|
//#endregion
|
|
3283
3296
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3284
|
-
var
|
|
3285
|
-
|
|
3297
|
+
var Yo, Xo = document.createElement("template");
|
|
3298
|
+
Xo.innerHTML = `
|
|
3286
3299
|
<style>
|
|
3287
3300
|
:host {
|
|
3288
3301
|
display: var(--pip-button-display);
|
|
@@ -3296,10 +3309,10 @@ Yo.innerHTML = `
|
|
|
3296
3309
|
<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>
|
|
3297
3310
|
</slot>
|
|
3298
3311
|
`;
|
|
3299
|
-
var
|
|
3312
|
+
var Zo = class extends S {
|
|
3300
3313
|
constructor() {
|
|
3301
3314
|
var e;
|
|
3302
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3315
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Xo.content.cloneNode(!0));
|
|
3303
3316
|
}
|
|
3304
3317
|
connectedCallback() {
|
|
3305
3318
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture");
|
|
@@ -3324,15 +3337,15 @@ var Xo = class extends S {
|
|
|
3324
3337
|
}));
|
|
3325
3338
|
}
|
|
3326
3339
|
};
|
|
3327
|
-
|
|
3328
|
-
...b(
|
|
3340
|
+
Yo = Zo, e(Zo, "observedAttributes", [
|
|
3341
|
+
...b(Yo, "observedAttributes", Yo),
|
|
3329
3342
|
_.IS_PIP,
|
|
3330
3343
|
_.PIP_AVAILABLE
|
|
3331
3344
|
]);
|
|
3332
3345
|
//#endregion
|
|
3333
3346
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3334
|
-
var
|
|
3335
|
-
|
|
3347
|
+
var Qo, $o = document.createElement("template");
|
|
3348
|
+
$o.innerHTML = `
|
|
3336
3349
|
<style>
|
|
3337
3350
|
:host {
|
|
3338
3351
|
display: var(--play-button-display);
|
|
@@ -3356,10 +3369,10 @@ Qo.innerHTML = `
|
|
|
3356
3369
|
</slot>
|
|
3357
3370
|
</slot>
|
|
3358
3371
|
`;
|
|
3359
|
-
var
|
|
3372
|
+
var es = class extends S {
|
|
3360
3373
|
constructor() {
|
|
3361
3374
|
var e;
|
|
3362
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3375
|
+
super(), (e = this.shadowRoot) == null || e.appendChild($o.content.cloneNode(!0));
|
|
3363
3376
|
}
|
|
3364
3377
|
connectedCallback() {
|
|
3365
3378
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3384,7 +3397,7 @@ var $o = class extends S {
|
|
|
3384
3397
|
}));
|
|
3385
3398
|
}
|
|
3386
3399
|
};
|
|
3387
|
-
|
|
3400
|
+
Qo = es, e(es, "observedAttributes", [...b(Qo, "observedAttributes", Qo), _.PAUSED]);
|
|
3388
3401
|
//#endregion
|
|
3389
3402
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3390
3403
|
var K = {
|
|
@@ -3393,55 +3406,55 @@ var K = {
|
|
|
3393
3406
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3394
3407
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3395
3408
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3396
|
-
},
|
|
3409
|
+
}, ts = Object.values(K), ns = /* @__PURE__ */ new WeakMap(), 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 WeakSet(), us = class extends pe {
|
|
3397
3410
|
constructor(e) {
|
|
3398
|
-
super(), g(this,
|
|
3411
|
+
super(), g(this, ls), f(this, ns, void 0), f(this, rs, void 0), f(this, is, !1), f(this, as, !1), f(this, os, !0), f(this, ss, null), f(this, cs, null), h(rs, this, e), h(ns, this, new fe({
|
|
3399
3412
|
publicEndpoint: e.url,
|
|
3400
3413
|
tokenFactory: () => e.authenticationToken
|
|
3401
3414
|
}));
|
|
3402
3415
|
}
|
|
3403
3416
|
start(e = 5e3) {
|
|
3404
|
-
m(
|
|
3405
|
-
!m(
|
|
3417
|
+
m(cs, this) && clearInterval(m(cs, this)), h(is, this, !1), h(as, this, !1), p(ls, this, ms).call(this), p(ls, this, ds).call(this), h(cs, this, window.setInterval(() => {
|
|
3418
|
+
!m(as, this) && !m(rs, this).infiniteReconnect && !m(ss, this) && m(os, this) && h(ss, this, window.setTimeout(() => p(ls, this, fs).call(this), 300 * 1e3)), !m(as, this) && m(os, this) && p(ls, this, ds).call(this);
|
|
3406
3419
|
}, e));
|
|
3407
3420
|
}
|
|
3408
3421
|
stop() {
|
|
3409
|
-
p(
|
|
3422
|
+
p(ls, this, ps).call(this), m(cs, this) && (window.clearInterval(m(cs, this)), h(cs, this, null));
|
|
3410
3423
|
}
|
|
3411
3424
|
};
|
|
3412
|
-
function
|
|
3425
|
+
function ds() {
|
|
3413
3426
|
var e = this;
|
|
3414
3427
|
return t(function* () {
|
|
3415
|
-
if (m(
|
|
3416
|
-
h(
|
|
3428
|
+
if (m(is, e)) return;
|
|
3429
|
+
h(is, e, !0);
|
|
3417
3430
|
let t = "Stream is offline", n = "Please stand by";
|
|
3418
3431
|
try {
|
|
3419
|
-
let t = yield m(
|
|
3432
|
+
let t = yield m(ns, e).getChannel(m(rs, e).channelId);
|
|
3420
3433
|
if (t.isLive) {
|
|
3421
|
-
h(
|
|
3434
|
+
h(as, e, !0), p(ls, e, ms).call(e), e.emit("live", t), h(is, e, !1);
|
|
3422
3435
|
return;
|
|
3423
3436
|
}
|
|
3424
3437
|
} catch (e) {
|
|
3425
3438
|
de(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3426
3439
|
}
|
|
3427
|
-
m(
|
|
3440
|
+
m(os, e) && e.emit("error", {
|
|
3428
3441
|
title: t,
|
|
3429
3442
|
message: n
|
|
3430
|
-
}), h(
|
|
3443
|
+
}), h(is, e, !1);
|
|
3431
3444
|
})();
|
|
3432
3445
|
}
|
|
3433
|
-
function ds() {
|
|
3434
|
-
this.stop(), h(as, this, !1), this.emit("timeout");
|
|
3435
|
-
}
|
|
3436
3446
|
function fs() {
|
|
3437
|
-
|
|
3447
|
+
this.stop(), h(os, this, !1), this.emit("timeout");
|
|
3438
3448
|
}
|
|
3439
3449
|
function ps() {
|
|
3440
|
-
|
|
3450
|
+
m(ss, this) && (window.clearTimeout(m(ss, this)), h(ss, this, null));
|
|
3451
|
+
}
|
|
3452
|
+
function ms() {
|
|
3453
|
+
p(ls, this, ps).call(this), h(os, this, !0);
|
|
3441
3454
|
}
|
|
3442
3455
|
//#endregion
|
|
3443
3456
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3444
|
-
var
|
|
3457
|
+
var hs = /\/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, gs = navigator.userAgent.toLowerCase(), _s = hs.test(gs), vs = (e) => va.observedAttributes.includes(e), ys = `
|
|
3445
3458
|
<style>
|
|
3446
3459
|
:host {
|
|
3447
3460
|
container-type: inline-size;
|
|
@@ -3451,7 +3464,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3451
3464
|
display: flex;
|
|
3452
3465
|
justify-content: center;
|
|
3453
3466
|
|
|
3454
|
-
--vindral-volume-range-display: ${
|
|
3467
|
+
--vindral-volume-range-display: ${_s ? "none" : "flex"};
|
|
3455
3468
|
--vindral-airplay-button-display: none;
|
|
3456
3469
|
--vindral-play-overlay-display: none;
|
|
3457
3470
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3532,10 +3545,10 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3532
3545
|
--vindral-subtitle-offset: -48px;
|
|
3533
3546
|
}
|
|
3534
3547
|
</style>
|
|
3535
|
-
`,
|
|
3548
|
+
`, bs = (e) => {
|
|
3536
3549
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3537
3550
|
return `
|
|
3538
|
-
${
|
|
3551
|
+
${ys}
|
|
3539
3552
|
|
|
3540
3553
|
<vindral-controller>
|
|
3541
3554
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3573,8 +3586,8 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3573
3586
|
</vindral-center-overlay>
|
|
3574
3587
|
</vindral-controller>
|
|
3575
3588
|
`;
|
|
3576
|
-
},
|
|
3577
|
-
${
|
|
3589
|
+
}, xs = `
|
|
3590
|
+
${ys}
|
|
3578
3591
|
|
|
3579
3592
|
<style>
|
|
3580
3593
|
#control-bar {
|
|
@@ -3598,97 +3611,97 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3598
3611
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3599
3612
|
</vindral-center-overlay>
|
|
3600
3613
|
</vindral-controller>
|
|
3601
|
-
`,
|
|
3614
|
+
`, Ss = document.createElement("template"), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Ns = class extends HTMLElement {
|
|
3602
3615
|
constructor() {
|
|
3603
|
-
super(), g(this,
|
|
3616
|
+
super(), g(this, Y), f(this, q, void 0), f(this, J, void 0), f(this, Cs, void 0), f(this, ws, void 0), f(this, Ts, void 0), f(this, Es, void 0), f(this, Ds, /* @__PURE__ */ new Set()), f(this, Os, () => {
|
|
3604
3617
|
Array.from(this.attributes).forEach((e) => {
|
|
3605
3618
|
m(ks, this).call(this, e.name, e.value);
|
|
3606
3619
|
});
|
|
3607
3620
|
}), f(this, ks, (e, t) => {
|
|
3608
|
-
|
|
3621
|
+
vs(e) && (y(t) ? m(J, this).setAttribute(e, t) : m(J, this).removeAttribute(e));
|
|
3609
3622
|
}), f(this, As, () => {
|
|
3610
3623
|
Array.from(this.children).forEach((e) => {
|
|
3611
3624
|
m(Ds, this).add(e);
|
|
3612
3625
|
});
|
|
3613
3626
|
}), f(this, js, () => {
|
|
3614
|
-
let e = m(
|
|
3627
|
+
let e = m(J, this).instance;
|
|
3615
3628
|
e && (e.on("is live", (e) => {
|
|
3616
|
-
e ? (this.removeAttribute(K.OFFLINE), p(
|
|
3629
|
+
e ? (this.removeAttribute(K.OFFLINE), p(Y, this, zs).call(this)) : (this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, "Stream is offline", "Please stand by"));
|
|
3617
3630
|
}), e.on("channels", (e) => {
|
|
3618
|
-
let t = m(
|
|
3619
|
-
n && p(
|
|
3631
|
+
let t = m(J, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3632
|
+
n && p(Y, this, Ls).call(this, n);
|
|
3620
3633
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3621
3634
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3622
|
-
n && p(
|
|
3635
|
+
n && p(Y, this, Ls).call(this, n);
|
|
3623
3636
|
}), e.on("error", (e) => {
|
|
3624
3637
|
if (e.code() === "connection_failed") {
|
|
3625
|
-
p(
|
|
3638
|
+
p(Y, this, Rs).call(this, "Stream is offline", "Please stand by");
|
|
3626
3639
|
return;
|
|
3627
3640
|
}
|
|
3628
|
-
e.isFatal() && (e.code() === "access_forbidden" ? p(
|
|
3641
|
+
e.isFatal() && (e.code() === "access_forbidden" ? p(Y, this, Rs).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? p(Y, this, Rs).call(this, "Stream is offline", "Please stand by") : p(Y, this, Rs).call(this, "An error occurred", e.message), m(ws, this).removeAttribute("hidden"), this.setAttribute(K.OFFLINE, ""), m(J, this).dispatchEvent(new CustomEvent(v.EXIT_FULLSCREEN)), m(J, this).dispatchEvent(new CustomEvent(v.EXIT_PIP)));
|
|
3629
3642
|
}));
|
|
3630
3643
|
}), f(this, Ms, () => {
|
|
3631
|
-
m(
|
|
3632
|
-
}), h(
|
|
3644
|
+
m(J, this).connect(), m(ws, this).setAttribute("hidden", ""), p(Y, this, zs).call(this), m(J, this).focus();
|
|
3645
|
+
}), h(q, this, this.attachShadow({ mode: "open" })), p(Y, this, Fs).call(this), h(J, this, m(q, this).querySelector("vindral-controller")), h(Cs, this, m(q, this).querySelector("#vindral-message")), h(ws, this, m(q, this).querySelector("#play-overlay")), h(Ts, this, m(q, this).querySelector("#center-overlay"));
|
|
3633
3646
|
}
|
|
3634
3647
|
connectedCallback() {
|
|
3635
|
-
this.setAttribute(K.OFFLINE, ""), m(
|
|
3648
|
+
this.setAttribute(K.OFFLINE, ""), m(J, this).addEventListener("vindral-instance-ready", m(js, this)), p(Y, this, Is).call(this);
|
|
3636
3649
|
}
|
|
3637
3650
|
disconnectedCallback() {
|
|
3638
3651
|
var e;
|
|
3639
|
-
m(
|
|
3652
|
+
m(J, this).removeEventListener("vindral-instance-ready", m(js, this)), m(ws, this).removeEventListener("click", m(Ms, this)), (e = m(Es, this)) == null || e.stop();
|
|
3640
3653
|
}
|
|
3641
3654
|
attributeChangedCallback(e, t, n) {
|
|
3642
|
-
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) p(
|
|
3655
|
+
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) p(Y, this, Fs).call(this);
|
|
3643
3656
|
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3644
|
-
let e = m(
|
|
3657
|
+
let e = m(q, this).querySelector("vindral-poster-overlay");
|
|
3645
3658
|
e && (e.disabled = x(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3646
3659
|
} else m(ks, this).call(this, e, n);
|
|
3647
3660
|
}
|
|
3648
3661
|
get instance() {
|
|
3649
|
-
return m(
|
|
3662
|
+
return m(J, this).instance;
|
|
3650
3663
|
}
|
|
3651
3664
|
get airPlay() {
|
|
3652
|
-
return m(
|
|
3665
|
+
return m(J, this).airPlay;
|
|
3653
3666
|
}
|
|
3654
3667
|
get timelineMarkers() {
|
|
3655
|
-
return m(
|
|
3668
|
+
return m(J, this).timelineMarkers;
|
|
3656
3669
|
}
|
|
3657
3670
|
set timelineMarkers(e) {
|
|
3658
|
-
m(
|
|
3671
|
+
m(J, this).timelineMarkers = e;
|
|
3659
3672
|
}
|
|
3660
3673
|
};
|
|
3661
3674
|
function Ps() {
|
|
3662
3675
|
let e = _e(this.getAttribute(_.MEDIA)), t = x(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3663
|
-
return e === "audio" ?
|
|
3676
|
+
return e === "audio" ? xs : bs(t);
|
|
3664
3677
|
}
|
|
3665
3678
|
function Fs() {
|
|
3666
|
-
let e = m(
|
|
3667
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)),
|
|
3668
|
-
let r =
|
|
3669
|
-
h(
|
|
3670
|
-
m(
|
|
3671
|
-
}), m(Os, this).call(this), m(
|
|
3679
|
+
let e = m(q, this).hasChildNodes(), t = e ? m(J, this) : void 0, n = e ? m(ws, this) : void 0;
|
|
3680
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)), Ss.innerHTML = p(Y, this, Ps).call(this);
|
|
3681
|
+
let r = Ss.content.cloneNode(!0);
|
|
3682
|
+
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) => {
|
|
3683
|
+
m(J, this).appendChild(e);
|
|
3684
|
+
}), m(Os, this).call(this), m(q, this).innerHTML = "", m(q, 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)));
|
|
3672
3685
|
}
|
|
3673
3686
|
function Is() {
|
|
3674
3687
|
var e;
|
|
3675
3688
|
if (x(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3676
3689
|
let t = this.getAttribute("url"), n = this.getAttribute("channel-id"), r = (e = this.getAttribute("authentication-token")) == null ? void 0 : e, i = this.hasAttribute("infinite-reconnect");
|
|
3677
3690
|
if (!t || !n) {
|
|
3678
|
-
this.setAttribute(K.OFFLINE, ""), p(
|
|
3691
|
+
this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3679
3692
|
return;
|
|
3680
3693
|
}
|
|
3681
|
-
h(Es, this, new
|
|
3694
|
+
h(Es, this, new us({
|
|
3682
3695
|
url: t,
|
|
3683
3696
|
channelId: n,
|
|
3684
3697
|
authenticationToken: r,
|
|
3685
3698
|
infiniteReconnect: i
|
|
3686
3699
|
})), m(Es, this).on("live", (e) => {
|
|
3687
|
-
m(
|
|
3700
|
+
m(J, this).connect(), this.removeAttribute("offline"), p(Y, this, zs).call(this), p(Y, this, Ls).call(this, e);
|
|
3688
3701
|
}), m(Es, this).on("timeout", () => {
|
|
3689
|
-
p(
|
|
3702
|
+
p(Y, this, zs).call(this), m(ws, this).removeAttribute("hidden");
|
|
3690
3703
|
}), m(Es, this).on("error", (e) => {
|
|
3691
|
-
this.setAttribute(K.OFFLINE, ""), p(
|
|
3704
|
+
this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, e.title, e.message);
|
|
3692
3705
|
}), m(ws, this).addEventListener("click", m(Ms, this)), this.hasAttribute("paused") && m(Es, this).start();
|
|
3693
3706
|
}
|
|
3694
3707
|
function Ls(e) {
|
|
@@ -3713,7 +3726,7 @@ function Rs(e, t) {
|
|
|
3713
3726
|
function zs() {
|
|
3714
3727
|
m(Cs, this).setAttribute("hidden", ""), m(Ts, this).removeAttribute("backdrop");
|
|
3715
3728
|
}
|
|
3716
|
-
e(Ns, "observedAttributes", [...
|
|
3729
|
+
e(Ns, "observedAttributes", [...va.observedAttributes, ...ts]);
|
|
3717
3730
|
//#endregion
|
|
3718
3731
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3719
3732
|
var Bs = document.createElement("template");
|
|
@@ -3840,12 +3853,12 @@ e(nc, "observedAttributes", [...b(Qs, "observedAttributes", Qs), _.RENDITION_LEV
|
|
|
3840
3853
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3841
3854
|
var ic = document.createElement("template");
|
|
3842
3855
|
ic.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";
|
|
3843
|
-
var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(),
|
|
3856
|
+
var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), dc = class extends HTMLElement {
|
|
3844
3857
|
constructor() {
|
|
3845
|
-
super(), g(this,
|
|
3858
|
+
super(), g(this, X), f(this, ac, []), f(this, oc, 2 ** 53 - 1), f(this, sc, null), f(this, cc, []), f(this, lc, null), f(this, uc, null), e(this, "handleEvent", (e) => {
|
|
3846
3859
|
switch (e.type) {
|
|
3847
3860
|
case "keydown":
|
|
3848
|
-
p(
|
|
3861
|
+
p(X, this, _c).call(this, e);
|
|
3849
3862
|
break;
|
|
3850
3863
|
}
|
|
3851
3864
|
}), this.attachShadow({ mode: "open" }).appendChild(ic.content.cloneNode(!0));
|
|
@@ -3854,7 +3867,7 @@ var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc =
|
|
|
3854
3867
|
let e = this.getRootNode();
|
|
3855
3868
|
if (e instanceof ShadowRoot) {
|
|
3856
3869
|
var t;
|
|
3857
|
-
h(lc, this, e.host.closest("vindral-controller")), (t = m(lc, this)) == null || t.connectListener(this), p(
|
|
3870
|
+
h(lc, this, e.host.closest("vindral-controller")), (t = m(lc, this)) == null || t.connectListener(this), p(X, this, fc).call(this), p(X, this, pc).call(this), h(uc, this, e.host), this.addEventListener("keydown", this);
|
|
3858
3871
|
}
|
|
3859
3872
|
}
|
|
3860
3873
|
disconnectedCallback() {
|
|
@@ -3865,10 +3878,10 @@ var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc =
|
|
|
3865
3878
|
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));
|
|
3866
3879
|
}
|
|
3867
3880
|
set list(e) {
|
|
3868
|
-
h(ac, this, e), p(
|
|
3881
|
+
h(ac, this, e), p(X, this, pc).call(this);
|
|
3869
3882
|
}
|
|
3870
3883
|
set maxVideoBitrate(e) {
|
|
3871
|
-
h(oc, this, e), p(
|
|
3884
|
+
h(oc, this, e), p(X, this, hc).call(this);
|
|
3872
3885
|
}
|
|
3873
3886
|
get keysUsed() {
|
|
3874
3887
|
return [
|
|
@@ -3910,14 +3923,14 @@ function pc() {
|
|
|
3910
3923
|
var n, r, i, a, o, s, c, l;
|
|
3911
3924
|
let u = document.createElement("div");
|
|
3912
3925
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
3913
|
-
let ee = p(
|
|
3926
|
+
let ee = p(X, this, mc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3914
3927
|
u.textContent = e.video ? Ee(e.video) : "";
|
|
3915
3928
|
let d = document.createElement("span");
|
|
3916
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${Te(((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(
|
|
3929
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${Te(((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(X, this, gc).call(this, e)), m(cc, this).push({
|
|
3917
3930
|
el: u,
|
|
3918
3931
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3919
3932
|
}), t.appendChild(u);
|
|
3920
|
-
}), p(
|
|
3933
|
+
}), p(X, this, hc).call(this));
|
|
3921
3934
|
}
|
|
3922
3935
|
function mc(e) {
|
|
3923
3936
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
@@ -3956,17 +3969,17 @@ function _c(e) {
|
|
|
3956
3969
|
(a = m(uc, this)) == null || a.hide();
|
|
3957
3970
|
} else if (t === "Enter" || t === " ") {
|
|
3958
3971
|
var o;
|
|
3959
|
-
(o = p(
|
|
3960
|
-
} else p(
|
|
3972
|
+
(o = p(X, this, yc).call(this)) == null || (o = o.el) == null || o.click();
|
|
3973
|
+
} else p(X, this, vc).call(this, e);
|
|
3961
3974
|
}
|
|
3962
3975
|
function vc(e) {
|
|
3963
3976
|
var t;
|
|
3964
|
-
let { key: n } = e, r = m(cc, this), i = (t = p(
|
|
3977
|
+
let { key: n } = e, r = m(cc, this), i = (t = p(X, this, yc).call(this)) == null ? r[0] : t;
|
|
3965
3978
|
if (!i) return;
|
|
3966
3979
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3967
3980
|
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);
|
|
3968
3981
|
let s = r[o];
|
|
3969
|
-
s && (p(
|
|
3982
|
+
s && (p(X, this, bc).call(this, s.id), s.el.focus());
|
|
3970
3983
|
}
|
|
3971
3984
|
function yc() {
|
|
3972
3985
|
return m(cc, this).find((e) => e.el.tabIndex === 0);
|
|
@@ -4046,71 +4059,71 @@ xc.innerHTML = `
|
|
|
4046
4059
|
<div id="scroll-area"></div>
|
|
4047
4060
|
<slot id="content"></slot>
|
|
4048
4061
|
`;
|
|
4049
|
-
var
|
|
4062
|
+
var Sc = /* @__PURE__ */ new WeakMap(), Cc = /* @__PURE__ */ new WeakMap(), wc = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), Ec = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), Oc = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakSet(), kc = /* @__PURE__ */ new WeakMap(), Ac = class extends HTMLElement {
|
|
4050
4063
|
constructor() {
|
|
4051
|
-
super(), g(this, Z), f(this,
|
|
4064
|
+
super(), g(this, Z), f(this, Sc, null), f(this, Cc, null), f(this, wc, !1), f(this, Tc, !1), f(this, Ec, !1), f(this, Dc, () => {
|
|
4052
4065
|
this.open && (this.open = !1);
|
|
4053
|
-
}), f(this,
|
|
4066
|
+
}), f(this, Oc, null), e(this, "handleEvent", (e) => {
|
|
4054
4067
|
switch (e.type) {
|
|
4055
4068
|
case "touchstart":
|
|
4056
|
-
p(Z, this,
|
|
4069
|
+
p(Z, this, Mc).call(this, e);
|
|
4057
4070
|
break;
|
|
4058
4071
|
case "touchmove":
|
|
4059
|
-
p(Z, this,
|
|
4072
|
+
p(Z, this, Nc).call(this, e);
|
|
4060
4073
|
break;
|
|
4061
4074
|
case "touchend":
|
|
4062
|
-
p(Z, this,
|
|
4075
|
+
p(Z, this, Pc).call(this, e);
|
|
4063
4076
|
break;
|
|
4064
4077
|
}
|
|
4065
|
-
}), f(this,
|
|
4066
|
-
let e = m(
|
|
4078
|
+
}), f(this, kc, () => {
|
|
4079
|
+
let e = m(Ec, this);
|
|
4067
4080
|
if (this.scrollTop === 0) {
|
|
4068
|
-
p(Z, this,
|
|
4081
|
+
p(Z, this, Hc).call(this, e);
|
|
4069
4082
|
return;
|
|
4070
4083
|
}
|
|
4071
|
-
if (!e && !p(Z, this,
|
|
4072
|
-
p(Z, this,
|
|
4084
|
+
if (!e && !p(Z, this, Fc).call(this)) {
|
|
4085
|
+
p(Z, this, Bc).call(this), p(Z, this, Hc).call(this);
|
|
4073
4086
|
return;
|
|
4074
4087
|
}
|
|
4075
|
-
!this.visible && this.scrollTop > 0 && !m(
|
|
4088
|
+
!this.visible && this.scrollTop > 0 && !m(wc, this) ? p(Z, this, Uc).call(this) : !m(wc, this) && p(Z, this, Lc).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
4076
4089
|
}), this.attachShadow({ mode: "open" }).appendChild(xc.content.cloneNode(!0));
|
|
4077
4090
|
}
|
|
4078
4091
|
connectedCallback() {
|
|
4079
4092
|
let e = this.getRootNode();
|
|
4080
4093
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4081
4094
|
var t, n, r;
|
|
4082
|
-
h(
|
|
4095
|
+
h(Sc, this, e.querySelector("vindral-controller")), (t = m(Sc, this)) == null || t.connectListener(this), h(Cc, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = m(Cc, this)) == null || r.addEventListener("click", m(Dc, this));
|
|
4083
4096
|
let s = this.hasAttribute("touch-enabled");
|
|
4084
|
-
if (h(
|
|
4097
|
+
if (h(Ec, this, ce() && s), !m(Ec, this)) this.setAttribute("snap", "");
|
|
4085
4098
|
else {
|
|
4086
4099
|
var i, a, o;
|
|
4087
|
-
(i = m(
|
|
4100
|
+
(i = m(Sc, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = m(Sc, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = m(Sc, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
4088
4101
|
}
|
|
4089
|
-
this.addEventListener("scroll", m(
|
|
4102
|
+
this.addEventListener("scroll", m(kc, this));
|
|
4090
4103
|
}
|
|
4091
4104
|
}
|
|
4092
4105
|
disconnectedCallback() {
|
|
4093
4106
|
var e, t, n, r, i;
|
|
4094
|
-
(e = m(
|
|
4107
|
+
(e = m(Cc, this)) == null || e.removeEventListener("click", m(Dc, this)), this.removeEventListener("scroll", m(kc, this)), (t = m(Sc, this)) == null || t.removeEventListener("touchstart", this), (n = m(Sc, this)) == null || n.removeEventListener("touchmove", this), (r = m(Sc, this)) == null || r.removeEventListener("touchend", this), (i = m(Sc, this)) == null || i.disconnectListener(this);
|
|
4095
4108
|
}
|
|
4096
4109
|
attributeChangedCallback(e, t, n) {
|
|
4097
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this,
|
|
4110
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this, Ic).call(this) && setTimeout(() => {
|
|
4098
4111
|
this.open = !1;
|
|
4099
4112
|
}, 300), e === "open")) if (n !== null) {
|
|
4100
4113
|
var r;
|
|
4101
|
-
h(
|
|
4102
|
-
top: (r = m(
|
|
4114
|
+
h(wc, this, !1), this.scrollTop > 0 && p(Z, this, Uc).call(this), this.scrollTo({
|
|
4115
|
+
top: (r = m(Cc, this)) == null ? void 0 : r.clientHeight,
|
|
4103
4116
|
behavior: "smooth"
|
|
4104
4117
|
});
|
|
4105
|
-
} else p(Z, this,
|
|
4118
|
+
} else p(Z, this, Vc).call(this);
|
|
4106
4119
|
}
|
|
4107
4120
|
set open(e) {
|
|
4108
4121
|
if (e) {
|
|
4109
4122
|
this.setAttribute("open", "");
|
|
4110
4123
|
return;
|
|
4111
4124
|
}
|
|
4112
|
-
let t = this.hasAttribute("open"), n = this.visible || p(Z, this,
|
|
4113
|
-
t ? this.removeAttribute("open") : n ? p(Z, this,
|
|
4125
|
+
let t = this.hasAttribute("open"), n = this.visible || p(Z, this, Ic).call(this);
|
|
4126
|
+
t ? this.removeAttribute("open") : n ? p(Z, this, Vc).call(this) : (h(wc, this, !1), this.removeAttribute("snap-touch"));
|
|
4114
4127
|
}
|
|
4115
4128
|
get open() {
|
|
4116
4129
|
return this.hasAttribute("open");
|
|
@@ -4122,125 +4135,125 @@ var X = /* @__PURE__ */ new WeakMap(), Sc = /* @__PURE__ */ new WeakMap(), Cc =
|
|
|
4122
4135
|
return this.hasAttribute("visible");
|
|
4123
4136
|
}
|
|
4124
4137
|
};
|
|
4125
|
-
function
|
|
4126
|
-
return p(Z, this,
|
|
4138
|
+
function jc() {
|
|
4139
|
+
return p(Z, this, Fc).call(this) || p(Z, this, zc).call(this) || p(Z, this, Ic).call(this);
|
|
4127
4140
|
}
|
|
4128
|
-
function
|
|
4141
|
+
function Mc(e) {
|
|
4129
4142
|
let t = e.touches[0];
|
|
4130
|
-
t && (h(
|
|
4143
|
+
t && (h(Tc, this, p(Z, this, jc).call(this)), m(Tc, this) && (h(wc, this, !1), h(Oc, this, t.clientY)));
|
|
4131
4144
|
}
|
|
4132
|
-
function
|
|
4133
|
-
if (!(!m(
|
|
4134
|
-
let t = e.touches[0].clientY, n = m(
|
|
4145
|
+
function Nc(e) {
|
|
4146
|
+
if (!(!m(Tc, this) || m(Oc, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4147
|
+
let t = e.touches[0].clientY, n = m(Oc, this) - t;
|
|
4135
4148
|
this.scrollTop = Math.max(0, n);
|
|
4136
4149
|
}
|
|
4137
4150
|
}
|
|
4138
|
-
function
|
|
4139
|
-
m(
|
|
4151
|
+
function Pc(e) {
|
|
4152
|
+
m(Tc, this) && !m(wc, this) && p(Z, this, Ic).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), h(Oc, this, null), h(Tc, this, !1);
|
|
4140
4153
|
}
|
|
4141
|
-
function
|
|
4154
|
+
function Fc() {
|
|
4142
4155
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4143
4156
|
}
|
|
4144
|
-
function
|
|
4157
|
+
function Ic() {
|
|
4145
4158
|
return this.scrollTop > 0;
|
|
4146
4159
|
}
|
|
4147
|
-
function
|
|
4160
|
+
function Lc() {
|
|
4148
4161
|
var e;
|
|
4149
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(
|
|
4162
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(Cc, this)) == null ? void 0 : e.clientHeight);
|
|
4150
4163
|
}
|
|
4151
|
-
function
|
|
4164
|
+
function Rc() {
|
|
4152
4165
|
var e;
|
|
4153
|
-
let t = (e = m(
|
|
4166
|
+
let t = (e = m(Cc, this)) == null ? void 0 : e.clientHeight;
|
|
4154
4167
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4155
4168
|
}
|
|
4156
|
-
function
|
|
4169
|
+
function zc() {
|
|
4157
4170
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4158
|
-
return Number.isNaN(t) ? p(Z, this,
|
|
4171
|
+
return Number.isNaN(t) ? p(Z, this, Rc).call(this) > 0 : t > 0;
|
|
4159
4172
|
}
|
|
4160
|
-
function
|
|
4173
|
+
function Bc() {
|
|
4161
4174
|
let e = this.style.scrollBehavior;
|
|
4162
4175
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4163
4176
|
top: 0,
|
|
4164
4177
|
behavior: "auto"
|
|
4165
4178
|
}), this.style.scrollBehavior = e;
|
|
4166
4179
|
}
|
|
4167
|
-
function
|
|
4168
|
-
h(
|
|
4180
|
+
function Vc() {
|
|
4181
|
+
h(wc, this, !0), this.removeAttribute("snap-touch"), p(Z, this, Wc).call(this), this.scrollTo({
|
|
4169
4182
|
top: 0,
|
|
4170
4183
|
behavior: "smooth"
|
|
4171
4184
|
});
|
|
4172
4185
|
}
|
|
4173
|
-
function
|
|
4174
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), h(
|
|
4186
|
+
function Hc(e = !1) {
|
|
4187
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), h(wc, this, !1), p(Z, this, Wc).call(this);
|
|
4175
4188
|
}
|
|
4176
|
-
function
|
|
4189
|
+
function Uc() {
|
|
4177
4190
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(v.LOCK_UI, {
|
|
4178
4191
|
bubbles: !0,
|
|
4179
4192
|
composed: !0
|
|
4180
4193
|
})));
|
|
4181
4194
|
}
|
|
4182
|
-
function
|
|
4195
|
+
function Wc() {
|
|
4183
4196
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(v.UNLOCK_UI, {
|
|
4184
4197
|
bubbles: !0,
|
|
4185
4198
|
composed: !0
|
|
4186
4199
|
})));
|
|
4187
4200
|
}
|
|
4188
|
-
e(
|
|
4201
|
+
e(Ac, "observedAttributes", [
|
|
4189
4202
|
_.USER_INTERACTING,
|
|
4190
4203
|
"open",
|
|
4191
4204
|
"touch-enabled"
|
|
4192
4205
|
]);
|
|
4193
4206
|
//#endregion
|
|
4194
4207
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4195
|
-
var
|
|
4196
|
-
|
|
4197
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4208
|
+
var Gc = 1e3, Kc = 8, qc = document.createElement("template");
|
|
4209
|
+
qc.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";
|
|
4210
|
+
var Q = /* @__PURE__ */ new WeakMap(), Jc = /* @__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(), $ = /* @__PURE__ */ new WeakSet(), il = /* @__PURE__ */ new WeakMap(), al = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new WeakMap(), sl = /* @__PURE__ */ new WeakMap(), cl = /* @__PURE__ */ new WeakMap(), ll = /* @__PURE__ */ new WeakMap(), ul = class extends hi {
|
|
4198
4211
|
constructor() {
|
|
4199
4212
|
var e, t, n, r;
|
|
4200
|
-
super(), g(this, $), f(this, Q, void 0), f(this,
|
|
4201
|
-
if (!p($, this,
|
|
4213
|
+
super(), g(this, $), f(this, Q, void 0), f(this, Jc, void 0), f(this, Yc, void 0), f(this, Xc, void 0), f(this, Zc, []), f(this, Qc, null), f(this, $c, !1), f(this, el, null), f(this, tl, null), f(this, nl, !1), f(this, rl, !1), f(this, il, (e) => {
|
|
4214
|
+
if (!p($, this, pl).call(this) || p($, this, ml).call(this)) {
|
|
4202
4215
|
e.preventDefault();
|
|
4203
4216
|
return;
|
|
4204
4217
|
}
|
|
4205
|
-
h(
|
|
4218
|
+
h($c, this, !0), h(tl, this, e.pointerId);
|
|
4206
4219
|
try {
|
|
4207
4220
|
this.setPointerCapture(e.pointerId);
|
|
4208
4221
|
} catch (e) {}
|
|
4209
|
-
p($, this,
|
|
4210
|
-
}), f(this,
|
|
4211
|
-
if (!(!p($, this,
|
|
4212
|
-
if (m(
|
|
4213
|
-
e.preventDefault(), p($, this,
|
|
4222
|
+
p($, this, Sl).call(this, e);
|
|
4223
|
+
}), f(this, al, (e) => {
|
|
4224
|
+
if (!(!p($, this, pl).call(this) || p($, this, ml).call(this))) {
|
|
4225
|
+
if (m(el, this) && (cancelAnimationFrame(m(el, this)), h(el, this, null)), m($c, this) && e.pointerId === m(tl, this)) {
|
|
4226
|
+
e.preventDefault(), p($, this, Sl).call(this, e);
|
|
4214
4227
|
return;
|
|
4215
4228
|
}
|
|
4216
|
-
h(
|
|
4229
|
+
h(el, this, requestAnimationFrame(() => {
|
|
4217
4230
|
var t;
|
|
4218
|
-
if (e.pointerType !== "mouse" || m(
|
|
4219
|
-
m(
|
|
4231
|
+
if (e.pointerType !== "mouse" || m($c, this) || !this.duration) {
|
|
4232
|
+
m(Yc, this).style.opacity = "0", h(el, this, null);
|
|
4220
4233
|
return;
|
|
4221
4234
|
}
|
|
4222
|
-
let n = p($, this,
|
|
4223
|
-
if (p($, this,
|
|
4235
|
+
let n = p($, this, xl).call(this, e.clientX), r = p($, this, yl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4236
|
+
if (p($, this, wl).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4224
4237
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4225
|
-
m(
|
|
4226
|
-
} else m(
|
|
4227
|
-
h(
|
|
4238
|
+
m(Yc, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, m(Yc, this).style.opacity = "1";
|
|
4239
|
+
} else m(Yc, this).style.opacity = "0";
|
|
4240
|
+
h(el, this, null);
|
|
4228
4241
|
}));
|
|
4229
4242
|
}
|
|
4230
|
-
}), f(this,
|
|
4231
|
-
if (e.pointerId === m(
|
|
4243
|
+
}), f(this, ol, (e) => {
|
|
4244
|
+
if (e.pointerId === m(tl, this)) {
|
|
4232
4245
|
try {
|
|
4233
4246
|
this.releasePointerCapture(e.pointerId);
|
|
4234
4247
|
} catch (e) {}
|
|
4235
|
-
h(
|
|
4248
|
+
h($c, this, !1), h(tl, this, null), e.pointerType !== "mouse" && (m(Jc, this).style.opacity = "0"), m(rl, this) && p($, this, Dl).call(this) && (h(nl, this, !1), h(rl, this, !1));
|
|
4236
4249
|
}
|
|
4237
|
-
}), f(this, ol, () => {
|
|
4238
|
-
this.duration && !p($, this, pl).call(this) && (m(qc, this).style.opacity = "1");
|
|
4239
4250
|
}), f(this, sl, () => {
|
|
4240
|
-
|
|
4241
|
-
}), f(this, cl, (
|
|
4242
|
-
|
|
4243
|
-
|
|
4251
|
+
this.duration && !p($, this, ml).call(this) && (m(Jc, this).style.opacity = "1");
|
|
4252
|
+
}), f(this, cl, () => {
|
|
4253
|
+
m(Jc, this).style.opacity = "0", m(Yc, this).style.opacity = "0";
|
|
4254
|
+
}), f(this, ll, (e) => {
|
|
4255
|
+
if (p($, this, ml).call(this) || !m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this))) return;
|
|
4256
|
+
let t = p($, this, dl).call(this);
|
|
4244
4257
|
if (t <= 0) return;
|
|
4245
4258
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4246
4259
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4248,46 +4261,46 @@ var Q = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc =
|
|
|
4248
4261
|
r = Math.max(0, n - 5);
|
|
4249
4262
|
break;
|
|
4250
4263
|
case "ArrowRight":
|
|
4251
|
-
if (p($, this,
|
|
4264
|
+
if (p($, this, Dl).call(this)) return;
|
|
4252
4265
|
r = Math.min(t, n + 5);
|
|
4253
4266
|
break;
|
|
4254
4267
|
case "Home":
|
|
4255
4268
|
r = 0;
|
|
4256
4269
|
break;
|
|
4257
4270
|
case "End":
|
|
4258
|
-
if (p($, this,
|
|
4271
|
+
if (p($, this, Dl).call(this)) return;
|
|
4259
4272
|
r = t;
|
|
4260
4273
|
break;
|
|
4261
4274
|
default: return;
|
|
4262
4275
|
}
|
|
4263
4276
|
let i = Math.min(r / t, 1);
|
|
4264
|
-
p($, this,
|
|
4265
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4277
|
+
p($, this, Cl).call(this, i);
|
|
4278
|
+
}), (e = this.shadowRoot) == null || e.appendChild(qc.content.cloneNode(!0)), h(Jc, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), h(Yc, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), h(Xc, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), this.addEventListener("pointerdown", m(il, this)), this.addEventListener("pointermove", m(al, this)), this.addEventListener("pointerup", m(ol, this)), this.addEventListener("pointercancel", m(ol, this)), this.addEventListener("mouseenter", m(sl, this)), this.addEventListener("mouseleave", m(cl, this));
|
|
4266
4279
|
}
|
|
4267
4280
|
connectedCallback() {
|
|
4268
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), p($, this,
|
|
4281
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), p($, this, bl).call(this), this.addEventListener("keydown", m(ll, this)), p($, this, Dl).call(this) && (this.range.value = "1", p($, this, bl).call(this)), p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4269
4282
|
}
|
|
4270
4283
|
disconnectedCallback() {
|
|
4271
|
-
super.disconnectedCallback(), p($, this,
|
|
4284
|
+
super.disconnectedCallback(), p($, this, vl).call(this), this.removeEventListener("pointerdown", m(il, this)), this.removeEventListener("pointermove", m(al, this)), this.removeEventListener("pointerup", m(ol, this)), this.removeEventListener("pointercancel", m(ol, this)), this.removeEventListener("mouseenter", m(sl, this)), this.removeEventListener("mouseleave", m(cl, this)), this.removeEventListener("keydown", m(ll, this)), h(tl, this, null);
|
|
4272
4285
|
}
|
|
4273
4286
|
attributeChangedCallback(e, t, n) {
|
|
4274
4287
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4275
4288
|
case _.TIMESHIFT_POSITION:
|
|
4276
|
-
if (p($, this,
|
|
4277
|
-
m(
|
|
4289
|
+
if (p($, this, Dl).call(this)) {
|
|
4290
|
+
m($c, this) ? h(rl, this, !0) : (h(nl, this, !1), h(rl, this, !1)), this.range.value = "1", p($, this, bl).call(this);
|
|
4278
4291
|
return;
|
|
4279
4292
|
}
|
|
4280
4293
|
if (m(Q, this)) {
|
|
4281
|
-
h(
|
|
4294
|
+
h(rl, this, !1);
|
|
4282
4295
|
let e = Math.max(parseFloat(n) / m(Q, this), 0);
|
|
4283
|
-
this.range.value = e.toString(), p($, this,
|
|
4296
|
+
this.range.value = e.toString(), p($, this, bl).call(this);
|
|
4284
4297
|
}
|
|
4285
4298
|
break;
|
|
4286
4299
|
case _.DURATION:
|
|
4287
|
-
h(Q, this, parseFloat(n) || 0), p($, this,
|
|
4300
|
+
h(Q, this, parseFloat(n) || 0), p($, this, bl).call(this), p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4288
4301
|
break;
|
|
4289
4302
|
case _.TIMELINE_MARKERS:
|
|
4290
|
-
h(
|
|
4303
|
+
h(Zc, this, Mr(n)), p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4291
4304
|
break;
|
|
4292
4305
|
}
|
|
4293
4306
|
}
|
|
@@ -4305,54 +4318,54 @@ var Q = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc =
|
|
|
4305
4318
|
this.setAttribute(_.DURATION, e.toString());
|
|
4306
4319
|
}
|
|
4307
4320
|
};
|
|
4308
|
-
function
|
|
4321
|
+
function dl() {
|
|
4309
4322
|
return m(Q, this) ? m(Q, this) : 1;
|
|
4310
4323
|
}
|
|
4311
|
-
function
|
|
4324
|
+
function fl() {
|
|
4312
4325
|
let e = m(Q, this);
|
|
4313
4326
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4314
4327
|
}
|
|
4315
|
-
function fl() {
|
|
4316
|
-
return p($, this, dl).call(this) !== void 0;
|
|
4317
|
-
}
|
|
4318
4328
|
function pl() {
|
|
4319
|
-
return
|
|
4329
|
+
return p($, this, fl).call(this) !== void 0;
|
|
4320
4330
|
}
|
|
4321
4331
|
function ml() {
|
|
4332
|
+
return m(nl, this);
|
|
4333
|
+
}
|
|
4334
|
+
function hl() {
|
|
4322
4335
|
var e;
|
|
4323
|
-
let t = Date.now(), n = (e = m(Q, this)) == null ? 0 : e, r = m(
|
|
4324
|
-
for (let e of m(
|
|
4325
|
-
let a =
|
|
4336
|
+
let t = Date.now(), n = (e = m(Q, this)) == null ? 0 : e, r = m(Xc, this).children, i = 0;
|
|
4337
|
+
for (let e of m(Zc, this)) {
|
|
4338
|
+
let a = Nr(e.time, t, n);
|
|
4326
4339
|
if (a === null) continue;
|
|
4327
4340
|
let o = r[i];
|
|
4328
|
-
o || (o = document.createElement("div"), o.className = "marker", m(
|
|
4341
|
+
o || (o = document.createElement("div"), o.className = "marker", m(Xc, 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++;
|
|
4329
4342
|
}
|
|
4330
|
-
for (; m(
|
|
4343
|
+
for (; m(Xc, this).children.length > i;) {
|
|
4331
4344
|
var a;
|
|
4332
|
-
(a = m(
|
|
4345
|
+
(a = m(Xc, this).lastElementChild) == null || a.remove();
|
|
4333
4346
|
}
|
|
4334
4347
|
}
|
|
4335
|
-
function
|
|
4336
|
-
let e = p($, this,
|
|
4348
|
+
function gl() {
|
|
4349
|
+
let e = p($, this, fl).call(this);
|
|
4337
4350
|
if (e === void 0) return !1;
|
|
4338
4351
|
let t = Date.now() - e * 1e3;
|
|
4339
|
-
return m(
|
|
4340
|
-
}
|
|
4341
|
-
function gl() {
|
|
4342
|
-
this.isConnected && p($, this, hl).call(this) ? m(Zc, this) === null && h(Zc, this, window.setInterval(() => {
|
|
4343
|
-
p($, this, ml).call(this), p($, this, gl).call(this);
|
|
4344
|
-
}, Wc)) : p($, this, _l).call(this);
|
|
4352
|
+
return m(Zc, this).some((e) => e.time >= t);
|
|
4345
4353
|
}
|
|
4346
4354
|
function _l() {
|
|
4347
|
-
|
|
4355
|
+
this.isConnected && p($, this, gl).call(this) ? m(Qc, this) === null && h(Qc, this, window.setInterval(() => {
|
|
4356
|
+
p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4357
|
+
}, Gc)) : p($, this, vl).call(this);
|
|
4358
|
+
}
|
|
4359
|
+
function vl() {
|
|
4360
|
+
m(Qc, this) !== null && (window.clearInterval(m(Qc, this)), h(Qc, this, null));
|
|
4348
4361
|
}
|
|
4349
|
-
function
|
|
4350
|
-
if (m(
|
|
4362
|
+
function yl(e) {
|
|
4363
|
+
if (m(Zc, this).length === 0 || !m(Q, this)) return null;
|
|
4351
4364
|
let t = this.getBoundingClientRect().width;
|
|
4352
4365
|
if (!t) return null;
|
|
4353
|
-
let n =
|
|
4354
|
-
for (let t of m(
|
|
4355
|
-
let a =
|
|
4366
|
+
let n = Kc / t, r = Date.now(), i = null;
|
|
4367
|
+
for (let t of m(Zc, this)) {
|
|
4368
|
+
let a = Nr(t.time, r, m(Q, this));
|
|
4356
4369
|
if (a === null) continue;
|
|
4357
4370
|
let o = Math.abs(a - e);
|
|
4358
4371
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4362,59 +4375,59 @@ function vl(e) {
|
|
|
4362
4375
|
}
|
|
4363
4376
|
return i;
|
|
4364
4377
|
}
|
|
4365
|
-
function
|
|
4366
|
-
let e = p($, this,
|
|
4367
|
-
!m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), m(
|
|
4378
|
+
function bl() {
|
|
4379
|
+
let e = p($, this, dl).call(this);
|
|
4380
|
+
!m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), m($c, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${p($, this, Ol).call(this, this.range.valueAsNumber * e)} of ${p($, this, Ol).call(this, e)}`), !m($c, this) && !p($, this, ml).call(this) && p($, this, El).call(this, this.range.valueAsNumber));
|
|
4368
4381
|
}
|
|
4369
|
-
function
|
|
4382
|
+
function xl(e) {
|
|
4370
4383
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4371
4384
|
return Math.max(0, Math.min(1, n));
|
|
4372
4385
|
}
|
|
4373
|
-
function
|
|
4386
|
+
function Sl(e) {
|
|
4374
4387
|
var t;
|
|
4375
|
-
let n = p($, this,
|
|
4376
|
-
p($, this,
|
|
4388
|
+
let n = p($, this, xl).call(this, e.clientX), r = p($, this, yl).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4389
|
+
p($, this, wl).call(this, i, r), m($c, this) || (m(Jc, this).style.opacity = "1"), p($, this, Cl).call(this, i);
|
|
4377
4390
|
}
|
|
4378
|
-
function
|
|
4379
|
-
if (p($, this,
|
|
4380
|
-
let t = e * p($, this,
|
|
4381
|
-
this.range.value = e.toString(), this.updateBar(), p($, this,
|
|
4391
|
+
function Cl(e) {
|
|
4392
|
+
if (p($, this, ml).call(this) || p($, this, El).call(this, e)) return;
|
|
4393
|
+
let t = e * p($, this, dl).call(this);
|
|
4394
|
+
this.range.value = e.toString(), this.updateBar(), p($, this, Tl).call(this, t);
|
|
4382
4395
|
}
|
|
4383
|
-
function
|
|
4396
|
+
function wl(e, t) {
|
|
4384
4397
|
if (!m(Q, this) || !Number.isFinite(m(Q, this))) return;
|
|
4385
|
-
let n = e * m(Q, this), r = m(Q, this) - n, i = `-${p($, this,
|
|
4386
|
-
m(
|
|
4398
|
+
let n = e * m(Q, this), r = m(Q, this) - n, i = `-${p($, this, Ol).call(this, r)}`;
|
|
4399
|
+
m(Jc, this).textContent = t ? `${t.marker.label}: ${i}` : i, m(Jc, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4387
4400
|
}
|
|
4388
|
-
function
|
|
4401
|
+
function Tl(e) {
|
|
4389
4402
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4390
4403
|
bubbles: !0,
|
|
4391
4404
|
composed: !0,
|
|
4392
4405
|
detail: e
|
|
4393
4406
|
}));
|
|
4394
4407
|
}
|
|
4395
|
-
function
|
|
4396
|
-
return m(
|
|
4408
|
+
function El(e) {
|
|
4409
|
+
return m(nl, this) || p($, this, Dl).call(this) || e < .999 ? !1 : (h(nl, this, !0), h(rl, this, !1), this.dispatchEvent(new CustomEvent(v.GO_LIVE, {
|
|
4397
4410
|
bubbles: !0,
|
|
4398
4411
|
composed: !0
|
|
4399
4412
|
})), !0);
|
|
4400
4413
|
}
|
|
4401
|
-
function
|
|
4414
|
+
function Dl() {
|
|
4402
4415
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4403
4416
|
}
|
|
4404
|
-
function
|
|
4417
|
+
function Ol(e) {
|
|
4405
4418
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4406
4419
|
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")}`;
|
|
4407
4420
|
}
|
|
4408
|
-
e(
|
|
4409
|
-
...
|
|
4421
|
+
e(ul, "observedAttributes", [
|
|
4422
|
+
...hi.observedAttributes,
|
|
4410
4423
|
_.TIMESHIFT_POSITION,
|
|
4411
4424
|
_.DURATION,
|
|
4412
4425
|
_.TIMELINE_MARKERS
|
|
4413
4426
|
]);
|
|
4414
4427
|
//#endregion
|
|
4415
4428
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4416
|
-
var
|
|
4417
|
-
|
|
4429
|
+
var kl = document.createElement("template");
|
|
4430
|
+
kl.innerHTML = `
|
|
4418
4431
|
<style>
|
|
4419
4432
|
:host {
|
|
4420
4433
|
display: var(--play-overlay-display);
|
|
@@ -4474,51 +4487,51 @@ Ol.innerHTML = `
|
|
|
4474
4487
|
</slot>
|
|
4475
4488
|
</slot>
|
|
4476
4489
|
`;
|
|
4477
|
-
var
|
|
4490
|
+
var Al = /* @__PURE__ */ new WeakMap(), jl = /* @__PURE__ */ new WeakMap(), Ml = /* @__PURE__ */ new WeakMap(), Nl = /* @__PURE__ */ new WeakMap(), Pl = class extends HTMLElement {
|
|
4478
4491
|
constructor() {
|
|
4479
|
-
super(), f(this,
|
|
4492
|
+
super(), f(this, Al, null), f(this, jl, () => {
|
|
4480
4493
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4481
4494
|
bubbles: !0,
|
|
4482
4495
|
composed: !0
|
|
4483
4496
|
}));
|
|
4484
|
-
}), f(this,
|
|
4497
|
+
}), f(this, Ml, (e) => {
|
|
4485
4498
|
let { key: t } = e;
|
|
4486
4499
|
if (!this.keysUsed.includes(t)) {
|
|
4487
|
-
this.removeEventListener("keyup", m(
|
|
4500
|
+
this.removeEventListener("keyup", m(Ml, this));
|
|
4488
4501
|
return;
|
|
4489
4502
|
}
|
|
4490
4503
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4491
4504
|
bubbles: !0,
|
|
4492
4505
|
composed: !0
|
|
4493
4506
|
}));
|
|
4494
|
-
}), f(this,
|
|
4507
|
+
}), f(this, Nl, (e) => {
|
|
4495
4508
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4496
4509
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4497
|
-
this.removeEventListener("keyup", m(
|
|
4510
|
+
this.removeEventListener("keyup", m(Ml, this));
|
|
4498
4511
|
return;
|
|
4499
4512
|
}
|
|
4500
|
-
this.addEventListener("keyup", m(
|
|
4501
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4513
|
+
this.addEventListener("keyup", m(Ml, this), { once: !0 });
|
|
4514
|
+
}), this.attachShadow({ mode: "open" }).appendChild(kl.content.cloneNode(!0));
|
|
4502
4515
|
}
|
|
4503
4516
|
get keysUsed() {
|
|
4504
4517
|
return ["Enter", " "];
|
|
4505
4518
|
}
|
|
4506
4519
|
connectedCallback() {
|
|
4507
4520
|
var e;
|
|
4508
|
-
h(
|
|
4521
|
+
h(Al, this, this.closest("vindral-controller")), (e = m(Al, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4509
4522
|
}
|
|
4510
4523
|
enable() {
|
|
4511
|
-
this.addEventListener("click", m(
|
|
4524
|
+
this.addEventListener("click", m(jl, this)), this.addEventListener("keydown", m(Nl, this)), this.tabIndex = 0;
|
|
4512
4525
|
}
|
|
4513
4526
|
disable() {
|
|
4514
|
-
this.removeEventListener("click", m(
|
|
4527
|
+
this.removeEventListener("click", m(jl, this)), this.removeEventListener("keydown", m(Nl, this)), this.removeEventListener("keyup", m(Ml, this)), this.tabIndex = -1;
|
|
4515
4528
|
}
|
|
4516
4529
|
disconnectedCallback() {
|
|
4517
4530
|
var e;
|
|
4518
|
-
(e = m(
|
|
4531
|
+
(e = m(Al, this)) == null || e.disconnectListener(this), this.disable();
|
|
4519
4532
|
}
|
|
4520
4533
|
};
|
|
4521
|
-
e(
|
|
4534
|
+
e(Pl, "observedAttributes", [
|
|
4522
4535
|
"hidden",
|
|
4523
4536
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4524
4537
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4526,88 +4539,88 @@ e(Nl, "observedAttributes", [
|
|
|
4526
4539
|
]);
|
|
4527
4540
|
//#endregion
|
|
4528
4541
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4529
|
-
var
|
|
4530
|
-
|
|
4531
|
-
var
|
|
4542
|
+
var Fl = document.createElement("template");
|
|
4543
|
+
Fl.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";
|
|
4544
|
+
var Il = class extends HTMLElement {
|
|
4532
4545
|
constructor() {
|
|
4533
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4546
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Fl.content.cloneNode(!0));
|
|
4534
4547
|
}
|
|
4535
4548
|
attributeChangedCallback(e, t, n) {
|
|
4536
4549
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4537
4550
|
}
|
|
4538
4551
|
};
|
|
4539
|
-
e(
|
|
4552
|
+
e(Il, "observedAttributes", [
|
|
4540
4553
|
"backdrop",
|
|
4541
4554
|
"poster",
|
|
4542
4555
|
"disable-backdrop"
|
|
4543
4556
|
]);
|
|
4544
4557
|
//#endregion
|
|
4545
4558
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4546
|
-
var
|
|
4547
|
-
|
|
4548
|
-
var
|
|
4559
|
+
var Ll = document.createElement("template");
|
|
4560
|
+
Ll.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";
|
|
4561
|
+
var Rl = /* @__PURE__ */ new WeakMap(), zl = /* @__PURE__ */ new WeakMap(), Bl = class extends HTMLElement {
|
|
4549
4562
|
constructor() {
|
|
4550
|
-
super(), f(this,
|
|
4563
|
+
super(), f(this, Rl, void 0), f(this, zl, void 0);
|
|
4551
4564
|
let e = this.attachShadow({ mode: "open" });
|
|
4552
|
-
e.appendChild(
|
|
4565
|
+
e.appendChild(Ll.content.cloneNode(!0)), h(Rl, this, e.querySelector("#title")), h(zl, this, e.querySelector("#description"));
|
|
4553
4566
|
}
|
|
4554
4567
|
connectedCallback() {
|
|
4555
4568
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4556
4569
|
}
|
|
4557
4570
|
attributeChangedCallback(e, t, n) {
|
|
4558
|
-
t !== n && (e === "title" ? m(
|
|
4571
|
+
t !== n && (e === "title" ? m(Rl, this).textContent = n : e === "description" && (m(zl, this).textContent = n));
|
|
4559
4572
|
}
|
|
4560
4573
|
};
|
|
4561
|
-
e(
|
|
4574
|
+
e(Bl, "observedAttributes", [
|
|
4562
4575
|
"title",
|
|
4563
4576
|
"description",
|
|
4564
4577
|
"hidden"
|
|
4565
4578
|
]);
|
|
4566
4579
|
//#endregion
|
|
4567
4580
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4568
|
-
var
|
|
4569
|
-
|
|
4570
|
-
var
|
|
4581
|
+
var Vl = document.createElement("template");
|
|
4582
|
+
Vl.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";
|
|
4583
|
+
var Hl = /* @__PURE__ */ new WeakMap(), Ul = class extends HTMLElement {
|
|
4571
4584
|
constructor() {
|
|
4572
|
-
super(), f(this,
|
|
4585
|
+
super(), f(this, Hl, null), this.attachShadow({ mode: "open" }).appendChild(Vl.content.cloneNode(!0));
|
|
4573
4586
|
}
|
|
4574
4587
|
connectedCallback() {
|
|
4575
4588
|
var e;
|
|
4576
|
-
h(
|
|
4589
|
+
h(Hl, this, this.closest("vindral-controller")), (e = m(Hl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4577
4590
|
}
|
|
4578
4591
|
disconnectedCallback() {
|
|
4579
4592
|
var e;
|
|
4580
|
-
(e = m(
|
|
4593
|
+
(e = m(Hl, this)) == null || e.disconnectListener(this);
|
|
4581
4594
|
}
|
|
4582
4595
|
attributeChangedCallback(e, t, n) {
|
|
4583
4596
|
t !== n && e === "hidden" && !y(n) && this.focus();
|
|
4584
4597
|
}
|
|
4585
4598
|
};
|
|
4586
|
-
e(
|
|
4599
|
+
e(Ul, "observedAttributes", ["hidden"]);
|
|
4587
4600
|
//#endregion
|
|
4588
4601
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4589
|
-
var
|
|
4590
|
-
|
|
4591
|
-
var
|
|
4602
|
+
var Wl, Gl = document.createElement("template");
|
|
4603
|
+
Gl.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";
|
|
4604
|
+
var Kl = (e) => `${Math.round(e * 100)}%`, ql = /* @__PURE__ */ new WeakMap(), Jl = class extends hi {
|
|
4592
4605
|
constructor() {
|
|
4593
4606
|
var e;
|
|
4594
|
-
super(), f(this,
|
|
4607
|
+
super(), f(this, ql, () => {
|
|
4595
4608
|
let e = this.range.valueAsNumber;
|
|
4596
4609
|
this.dispatchEvent(new CustomEvent(v.SET_VOLUME, {
|
|
4597
4610
|
bubbles: !0,
|
|
4598
4611
|
composed: !0,
|
|
4599
4612
|
detail: e
|
|
4600
4613
|
}));
|
|
4601
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4614
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Gl.content.cloneNode(!0));
|
|
4602
4615
|
}
|
|
4603
4616
|
connectedCallback() {
|
|
4604
|
-
super.connectedCallback(), this.range.addEventListener("input", m(
|
|
4617
|
+
super.connectedCallback(), this.range.addEventListener("input", m(ql, this)), this.range.setAttribute("aria-label", "volume");
|
|
4605
4618
|
}
|
|
4606
4619
|
disconnectedCallback() {
|
|
4607
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", m(
|
|
4620
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", m(ql, this));
|
|
4608
4621
|
}
|
|
4609
4622
|
attributeChangedCallback(e, t, n) {
|
|
4610
|
-
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4623
|
+
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Kl(this.range.valueAsNumber)), this.updateBar());
|
|
4611
4624
|
}
|
|
4612
4625
|
get volume() {
|
|
4613
4626
|
var e;
|
|
@@ -4617,15 +4630,15 @@ var Gl = (e) => `${Math.round(e * 100)}%`, Kl = /* @__PURE__ */ new WeakMap(), q
|
|
|
4617
4630
|
return this.hasAttribute(_.MUTED);
|
|
4618
4631
|
}
|
|
4619
4632
|
};
|
|
4620
|
-
|
|
4621
|
-
...b(
|
|
4633
|
+
Wl = Jl, e(Jl, "observedAttributes", [
|
|
4634
|
+
...b(Wl, "observedAttributes", Wl),
|
|
4622
4635
|
_.MUTED,
|
|
4623
4636
|
_.VOLUME
|
|
4624
4637
|
]);
|
|
4625
4638
|
//#endregion
|
|
4626
4639
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4627
|
-
function
|
|
4628
|
-
customElements.define("vindral-controller",
|
|
4640
|
+
function Yl() {
|
|
4641
|
+
customElements.define("vindral-controller", va), customElements.define("vindral-control-bar", Ln), customElements.define("vindral-advanced-rendition-menu", Ke), customElements.define("vindral-advanced-rendition-menu-list", at), customElements.define("vindral-play-button", es), customElements.define("vindral-mute-button", Jo), customElements.define("vindral-buffering-overlay", Mt), customElements.define("vindral-scroll-overlay", Ac), customElements.define("vindral-play-overlay", Ul), customElements.define("vindral-user-input-play-overlay", Pl), customElements.define("vindral-fullscreen-button", co), customElements.define("vindral-rendition-levels-menu", nc), customElements.define("vindral-rendition-levels-menu-list", dc), customElements.define("vindral-channel-grid-button", An), customElements.define("vindral-channel-grid", nn), customElements.define("vindral-channel-grid-item", Kt), customElements.define("vindral-pip-button", Zo), customElements.define("vindral-airplay-button", Tt), customElements.define("vindral-cast-button", It), customElements.define("vindral-cast-overlay", Ht), customElements.define("vindral-buffering-icon", kt), customElements.define("vindral-language-menu", mo), customElements.define("vindral-language-menu-list", ko), customElements.define("vindral-center-overlay", Il), customElements.define("vindral-message", Bl), customElements.define("vindral-volume-range", Jl), customElements.define("vindral-poster-overlay", Js), customElements.define("vindral-player", Ns), customElements.define("vindral-seek-bar", ul), customElements.define("vindral-live-button", Go);
|
|
4629
4642
|
}
|
|
4630
4643
|
//#endregion
|
|
4631
|
-
export {
|
|
4644
|
+
export { Yl as t };
|