@vindral/web-sdk 4.1.3 → 4.1.4
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/{CvnFcokQ.js → CFOrqywf.js} +1 -1
- package/{DykhWWFG.js → DTm3XZjU.js} +8 -8
- package/{ypJV-2eL.js → DnKcKE7j.js} +1 -1
- package/core.js +1 -1
- package/legacy.es.js +1163 -1162
- package/legacy.umd.js +9 -9
- package/package.json +1 -1
- package/player.js +155 -157
package/player.js
CHANGED
|
@@ -24,11 +24,11 @@ var G = (d, a, t) => new Promise((i, s) => {
|
|
|
24
24
|
}, u = (v) => v.done ? i(v.value) : Promise.resolve(v.value).then(o, p);
|
|
25
25
|
u((t = t.apply(d, a)).next());
|
|
26
26
|
});
|
|
27
|
-
import { L as jr, V as Vr, i as Yr,
|
|
27
|
+
import { L as jr, V as Vr, i as Yr, C as Jr, A as Qr, a as Wr, b as Zr } from "./DTm3XZjU.js";
|
|
28
28
|
import { E as li } from "./Bx7s5QdT.js";
|
|
29
|
-
import { CastSender as
|
|
30
|
-
import { A as
|
|
31
|
-
const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d / a : (d / a).toFixed(t),
|
|
29
|
+
import { CastSender as to } from "./cast-sender.js";
|
|
30
|
+
import { A as eo, d as io } from "./Bs3ZbgIy.js";
|
|
31
|
+
const Xi = 1e3, ji = Xi * 1e3, $s = ji * 1e3, Bi = (d, a, t) => d % a === 0 ? d / a : (d / a).toFixed(t), so = (d, a = 1) => d >= $s ? `${Bi(d, $s, a)} Gbit/s` : d >= ji ? `${Bi(d, ji, a)} Mbit/s` : d >= Xi ? `${Bi(d, Xi, a)} Kbit/s` : `${d} bit/s`, no = ({ width: d, height: a }) => `${d}x${a}`, ro = ({
|
|
32
32
|
title: d,
|
|
33
33
|
subTitle: a = "Live stream",
|
|
34
34
|
poster: t
|
|
@@ -102,14 +102,14 @@ function Vs(d) {
|
|
|
102
102
|
function Ki(d) {
|
|
103
103
|
return d === "trace" || d === "debug" || d === "info" || d === "warn" || d === "error" || d === "off" ? d : "off";
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function oo(d) {
|
|
106
106
|
if (d === null)
|
|
107
107
|
return;
|
|
108
108
|
const a = d.split(",").map((t) => t.trim()).filter((t) => t === "h264" || t === "av1");
|
|
109
109
|
if (a.length !== 0)
|
|
110
110
|
return a;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ao(d) {
|
|
113
113
|
if (d !== null)
|
|
114
114
|
try {
|
|
115
115
|
const a = JSON.parse(d);
|
|
@@ -122,7 +122,7 @@ function oo(d) {
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function lo(d) {
|
|
126
126
|
if (d !== null)
|
|
127
127
|
try {
|
|
128
128
|
const a = JSON.parse(d);
|
|
@@ -148,7 +148,7 @@ function bi(d) {
|
|
|
148
148
|
function L(d) {
|
|
149
149
|
return typeof d == "string";
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function N(d, a) {
|
|
152
152
|
if (d === null)
|
|
153
153
|
return a != null ? a : void 0;
|
|
154
154
|
const t = d.toLowerCase();
|
|
@@ -336,7 +336,7 @@ Se = new WeakSet(), Yi = function() {
|
|
|
336
336
|
n.IS_AIRPLAYING
|
|
337
337
|
]);
|
|
338
338
|
let Vi = me;
|
|
339
|
-
const Ws = document.createElement("template"),
|
|
339
|
+
const Ws = document.createElement("template"), ho = (
|
|
340
340
|
/* SVG */
|
|
341
341
|
`
|
|
342
342
|
<svg width="24" height="24" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -391,7 +391,7 @@ Ws.innerHTML = /* HTML */
|
|
|
391
391
|
}
|
|
392
392
|
</style>
|
|
393
393
|
|
|
394
|
-
<slot name="icon">${
|
|
394
|
+
<slot name="icon">${ho}</slot>
|
|
395
395
|
`;
|
|
396
396
|
var $t;
|
|
397
397
|
class Zs extends HTMLElement {
|
|
@@ -784,13 +784,13 @@ hn.innerHTML = /* HTML */
|
|
|
784
784
|
<slot name="grid" id="grid"></slot>
|
|
785
785
|
</div>
|
|
786
786
|
`;
|
|
787
|
-
var
|
|
787
|
+
var mt, vt, Xt, O, T, jt, Ne, Ue, Re, k, cn, un, pn, Wi, bn, mn, vn, gn, fn, En, An, ce;
|
|
788
788
|
class dn extends HTMLElement {
|
|
789
789
|
constructor() {
|
|
790
790
|
super();
|
|
791
791
|
l(this, k);
|
|
792
|
-
l(this, bt, null);
|
|
793
792
|
l(this, mt, null);
|
|
793
|
+
l(this, vt, null);
|
|
794
794
|
l(this, Xt, []);
|
|
795
795
|
l(this, O, []);
|
|
796
796
|
l(this, T);
|
|
@@ -809,13 +809,13 @@ class dn extends HTMLElement {
|
|
|
809
809
|
}
|
|
810
810
|
connectedCallback() {
|
|
811
811
|
var t, i, s;
|
|
812
|
-
c(this,
|
|
812
|
+
c(this, vt, this.closest("vindral-controller")), (t = e(this, vt)) == null || t.connectListener(this), r(this, k, cn).call(this), (s = e(this, mt)) == null || s.observe((i = this.shadowRoot) == null ? void 0 : i.querySelector(".wrapper")), r(this, k, Wi).call(this), c(this, Ne, window.setInterval(() => {
|
|
813
813
|
r(this, k, gn).call(this);
|
|
814
814
|
}, 1e4));
|
|
815
815
|
}
|
|
816
816
|
disconnectedCallback() {
|
|
817
817
|
var t;
|
|
818
|
-
clearInterval(e(this, Ne)), this.removeEventListener("keydown", this), (t = e(this,
|
|
818
|
+
clearInterval(e(this, Ne)), this.removeEventListener("keydown", this), (t = e(this, mt)) == null || t.disconnect();
|
|
819
819
|
}
|
|
820
820
|
attributeChangedCallback(t, i, s) {
|
|
821
821
|
if (i !== s)
|
|
@@ -840,8 +840,8 @@ class dn extends HTMLElement {
|
|
|
840
840
|
c(this, Ue, an()), (t = e(this, T)) == null || t.focus();
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
|
|
844
|
-
c(this,
|
|
843
|
+
mt = new WeakMap(), vt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T = new WeakMap(), jt = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), Re = new WeakMap(), k = new WeakSet(), cn = function() {
|
|
844
|
+
c(this, mt, new IntersectionObserver(
|
|
845
845
|
(t) => {
|
|
846
846
|
t.forEach((i) => {
|
|
847
847
|
const { target: s, isIntersecting: o } = i;
|
|
@@ -849,7 +849,7 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
849
849
|
});
|
|
850
850
|
},
|
|
851
851
|
{
|
|
852
|
-
root: e(this,
|
|
852
|
+
root: e(this, vt)
|
|
853
853
|
}
|
|
854
854
|
));
|
|
855
855
|
}, un = function(t) {
|
|
@@ -876,10 +876,10 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
876
876
|
if (u)
|
|
877
877
|
return r(this, k, bn).call(this, u.element, p), u;
|
|
878
878
|
const v = r(this, k, mn).call(this, p, s);
|
|
879
|
-
return (g = e(this,
|
|
879
|
+
return (g = e(this, mt)) == null || g.observe(v.element), t.contains(v.element) || t.appendChild(v.element), v;
|
|
880
880
|
})), i.forEach((p, u) => {
|
|
881
881
|
var v;
|
|
882
|
-
e(this, Xt).some((g) => g.channelId === u) || ((v = e(this,
|
|
882
|
+
e(this, Xt).some((g) => g.channelId === u) || ((v = e(this, mt)) == null || v.unobserve(p.element), p.element.remove());
|
|
883
883
|
}), e(this, O).sort((p, u) => p.element.hasAttribute("offline") && !u.element.hasAttribute("offline") ? 1 : -1).forEach((p) => {
|
|
884
884
|
t.contains(p.element) || t.appendChild(p.element);
|
|
885
885
|
});
|
|
@@ -896,11 +896,11 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
896
896
|
this.hasAttribute("hidden") || e(this, O).forEach((t) => t.element.updateThumbnail());
|
|
897
897
|
}, fn = function(t) {
|
|
898
898
|
var i;
|
|
899
|
-
(i = e(this,
|
|
899
|
+
(i = e(this, vt)) == null || i.setAttribute("channel-id", t.channelId);
|
|
900
900
|
}, En = function(t) {
|
|
901
901
|
var u, v, g;
|
|
902
902
|
const { key: i, ctrlKey: s, altKey: o, metaKey: p } = t;
|
|
903
|
-
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((u = this.parentElement) == null || u.removeAttribute("open"), (v = e(this,
|
|
903
|
+
s || o || p || this.keysUsed.includes(i) && (t.preventDefault(), t.stopPropagation(), i === "Tab" || i === "Escape" ? ((u = this.parentElement) == null || u.removeAttribute("open"), (v = e(this, vt)) == null || v.focus()) : i === "Enter" || i === " " ? (g = e(this, T)) == null || g.click() : r(this, k, An).call(this, t));
|
|
904
904
|
}, An = function(t) {
|
|
905
905
|
var u;
|
|
906
906
|
if (!e(this, T)) return;
|
|
@@ -953,7 +953,7 @@ bt = new WeakMap(), mt = new WeakMap(), Xt = new WeakMap(), O = new WeakMap(), T
|
|
|
953
953
|
"mode",
|
|
954
954
|
"hidden"
|
|
955
955
|
]);
|
|
956
|
-
const
|
|
956
|
+
const co = (
|
|
957
957
|
/* SVG */
|
|
958
958
|
`
|
|
959
959
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -979,7 +979,7 @@ yn.innerHTML = /* HTML */
|
|
|
979
979
|
display: none;
|
|
980
980
|
}
|
|
981
981
|
</style>
|
|
982
|
-
<slot name="button">${
|
|
982
|
+
<slot name="button">${co}</slot>
|
|
983
983
|
`;
|
|
984
984
|
var Vt, _, j, wi, R, kn, ts, gi, es, is;
|
|
985
985
|
const ge = class ge extends tt {
|
|
@@ -1088,7 +1088,7 @@ class In extends HTMLElement {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
m(In, "observedAttributes", []);
|
|
1091
|
-
class
|
|
1091
|
+
class uo extends li {
|
|
1092
1092
|
constructor(t) {
|
|
1093
1093
|
super();
|
|
1094
1094
|
m(this, "config");
|
|
@@ -1217,7 +1217,7 @@ const St = class St extends li {
|
|
|
1217
1217
|
m(St, "isFullscreenApiSupported", (t) => (t.requestFullscreen || t.webkitRequestFullscreen || t.webkitEnterFullscreen || t.mozRequestFullScreen) !== void 0);
|
|
1218
1218
|
let be = St;
|
|
1219
1219
|
var Ii, Ci, Li, Ti, Yt, xi, Si, _e, Jt;
|
|
1220
|
-
class
|
|
1220
|
+
class po extends li {
|
|
1221
1221
|
constructor(t) {
|
|
1222
1222
|
super();
|
|
1223
1223
|
m(this, "unload", () => {
|
|
@@ -1728,15 +1728,15 @@ Sn.innerHTML = /* HTML */
|
|
|
1728
1728
|
</div>
|
|
1729
1729
|
`;
|
|
1730
1730
|
const qi = ["ArrowDown", "ArrowLeft", "ArrowRight", "Tab", "Enter", " ", "f", "m"];
|
|
1731
|
-
var Ri, it, Oe,
|
|
1731
|
+
var Ri, it, Oe, gt, ft, b, Fe, st, nt, ee, rt, B, V, F, ot, He, ze, U, Et, h, ss, Nn, Un, Rn, ns, _n, Pn, Mn, Ge, Dn, On, Fn, Hn, $e, _i, Pi, zn, Rt, rs, os, fi, pt, Gn, $n, Bn, as, Mi, Di, ls, A, w;
|
|
1732
1732
|
const fe = class fe extends HTMLElement {
|
|
1733
1733
|
constructor() {
|
|
1734
1734
|
super();
|
|
1735
1735
|
l(this, h);
|
|
1736
1736
|
l(this, it, /* @__PURE__ */ new Map());
|
|
1737
1737
|
l(this, Oe, 2e3);
|
|
1738
|
-
l(this, vt, null);
|
|
1739
1738
|
l(this, gt, null);
|
|
1739
|
+
l(this, ft, null);
|
|
1740
1740
|
l(this, b);
|
|
1741
1741
|
l(this, Fe, e(fe, Ri));
|
|
1742
1742
|
l(this, st);
|
|
@@ -1750,7 +1750,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1750
1750
|
l(this, He);
|
|
1751
1751
|
l(this, ze);
|
|
1752
1752
|
l(this, U);
|
|
1753
|
-
l(this,
|
|
1753
|
+
l(this, Et, null);
|
|
1754
1754
|
l(this, Ge, 0);
|
|
1755
1755
|
m(this, "handleEvent", (t) => {
|
|
1756
1756
|
switch (t.type) {
|
|
@@ -1815,11 +1815,11 @@ const fe = class fe extends HTMLElement {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
break;
|
|
1817
1817
|
case f.CHANNEL_GRID_OPENED: {
|
|
1818
|
-
e(this,
|
|
1818
|
+
e(this, Et) === null && r(this, h, rs).call(this);
|
|
1819
1819
|
break;
|
|
1820
1820
|
}
|
|
1821
1821
|
case f.CHANNEL_GRID_CLOSED: {
|
|
1822
|
-
e(this,
|
|
1822
|
+
e(this, Et) !== null && (clearTimeout(e(this, Et)), c(this, Et, null));
|
|
1823
1823
|
break;
|
|
1824
1824
|
}
|
|
1825
1825
|
case f.ENTER_PIP:
|
|
@@ -1878,7 +1878,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
connectedCallback() {
|
|
1880
1880
|
return G(this, null, function* () {
|
|
1881
|
-
|
|
1881
|
+
N(this.getAttribute("auto-instance-enabled"), !0) && (yield r(this, h, ss).call(this));
|
|
1882
1882
|
for (const i of Object.values(f))
|
|
1883
1883
|
this.addEventListener(i, e(this, $e));
|
|
1884
1884
|
window.PointerEvent ? (this.addEventListener("pointerdown", this), this.addEventListener("pointermove", this), this.addEventListener("pointerup", this)) : this.addEventListener("mousemove", this), this.addEventListener("mouseleave", this), this.addEventListener("keydown", this), this.addEventListener("resize", this), this.addEventListener("dblclick", this), this.connectListener(this), this.tabIndex = 0, this.focus({ preventScroll: !0 });
|
|
@@ -1892,7 +1892,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1892
1892
|
this.disconnectListener(this);
|
|
1893
1893
|
}
|
|
1894
1894
|
attributeChangedCallback(t, i, s) {
|
|
1895
|
-
var o, p, u, v, g, P, et, J,
|
|
1895
|
+
var o, p, u, v, g, P, et, J, Lt, Tt, xt, hi, di, ci, ui;
|
|
1896
1896
|
if (i != s)
|
|
1897
1897
|
switch (e(this, U).debug("Attribute changed", { name: t, oldValue: i, newValue: s }), t) {
|
|
1898
1898
|
case "channel-id":
|
|
@@ -1935,7 +1935,7 @@ const fe = class fe extends HTMLElement {
|
|
|
1935
1935
|
L(s) ? ((P = e(this, b)) != null && P.mediaElement && (e(this, b).mediaElement.style.display = "hidden"), (et = e(this, b)) == null || et.pause()) : (J = e(this, b)) != null && J.mediaElement && (e(this, b).mediaElement.style.display = "block");
|
|
1936
1936
|
break;
|
|
1937
1937
|
case "is-casting":
|
|
1938
|
-
L(s) ? ((
|
|
1938
|
+
L(s) ? ((Lt = e(this, B)) != null && Lt.isFullscreen() && r(this, h, as).call(this), (Tt = e(this, b)) == null || Tt.pause()) : document.hidden || (xt = e(this, b)) == null || xt.play();
|
|
1939
1939
|
break;
|
|
1940
1940
|
case "cast-receiver-id":
|
|
1941
1941
|
c(this, He, s);
|
|
@@ -2022,12 +2022,12 @@ const fe = class fe extends HTMLElement {
|
|
|
2022
2022
|
r(this, h, ss).call(this);
|
|
2023
2023
|
}
|
|
2024
2024
|
};
|
|
2025
|
-
Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(),
|
|
2025
|
+
Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), gt = new WeakMap(), ft = new WeakMap(), b = new WeakMap(), Fe = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), ee = new WeakMap(), rt = new WeakMap(), B = new WeakMap(), V = new WeakMap(), F = new WeakMap(), ot = new WeakMap(), He = new WeakMap(), ze = new WeakMap(), U = new WeakMap(), Et = new WeakMap(), h = new WeakSet(), ss = function() {
|
|
2026
2026
|
return G(this, null, function* () {
|
|
2027
2027
|
var Hs, zs;
|
|
2028
2028
|
if (!e(this, st)) return;
|
|
2029
2029
|
yield (Hs = e(this, b)) == null ? void 0 : Hs.unload();
|
|
2030
|
-
const t = this.hasAttribute(n.PAUSED), i = this.hasAttribute(n.MUTED), s = Vs(this.getAttribute(n.MEDIA)), o = this.getAttribute(n.TEXT_TRACK) || void 0, p = this.getAttribute("edge-url") || void 0, u = this.getAttribute("authentication-token") || void 0, v = bi(this.getAttribute("max-video-bit-rate")), g =
|
|
2030
|
+
const t = this.hasAttribute(n.PAUSED), i = this.hasAttribute(n.MUTED), s = Vs(this.getAttribute(n.MEDIA)), o = this.getAttribute(n.TEXT_TRACK) || void 0, p = this.getAttribute("edge-url") || void 0, u = this.getAttribute("authentication-token") || void 0, v = bi(this.getAttribute("max-video-bit-rate")), g = ao(this.getAttribute("max-size")), P = bi(this.getAttribute("min-buffer-time")), et = bi(this.getAttribute("max-buffer-time")), J = N(this.getAttribute("burst-enabled")), Lt = N(this.getAttribute("mse-enabled")), Tt = N(this.getAttribute("mse-opus-enabled")), xt = N(this.getAttribute("ios-background-play-enabled")), hi = N(this.getAttribute("ios-wake-lock-enabled")), di = N(this.getAttribute("ios-media-element-enabled")), ci = N(this.getAttribute("abr-enabled")), ui = N(this.getAttribute("size-based-resolution-cap-enabled")), z = N(this.getAttribute("telemetry-enabled")), Ur = oo(this.getAttribute("video-codecs")), Os = Ys(this.getAttribute("poster")), Rr = lo(this.getAttribute("advanced")), _r = Ki(this.getAttribute("log-level")), Pr = {
|
|
2031
2031
|
headers: mi(this.getAttribute("drm-headers")),
|
|
2032
2032
|
queryParams: mi(this.getAttribute("drm-queryparams")),
|
|
2033
2033
|
widevine: {
|
|
@@ -2038,7 +2038,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2038
2038
|
videoRobustness: vi(this.getAttribute("drm-playready-video-robustness")),
|
|
2039
2039
|
audioRobustness: vi(this.getAttribute("drm-playready-audio-robustness"))
|
|
2040
2040
|
}
|
|
2041
|
-
}, Mr =
|
|
2041
|
+
}, Mr = N(this.getAttribute("webtransport-enabled")), Fs = bi(this.getAttribute("reconnect-retries")), Dr = Fs !== void 0 ? (y) => y.reconnectRetries < Fs : void 0, Or = this.getAttribute("language") || void 0;
|
|
2042
2042
|
c(this, b, new Vr({
|
|
2043
2043
|
url: e(this, Fe),
|
|
2044
2044
|
channelId: e(this, st),
|
|
@@ -2052,9 +2052,9 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2052
2052
|
minBufferTime: P,
|
|
2053
2053
|
maxBufferTime: et,
|
|
2054
2054
|
burstEnabled: J,
|
|
2055
|
-
mseEnabled:
|
|
2056
|
-
mseOpusEnabled:
|
|
2057
|
-
iosBackgroundPlayEnabled:
|
|
2055
|
+
mseEnabled: Lt,
|
|
2056
|
+
mseOpusEnabled: Tt,
|
|
2057
|
+
iosBackgroundPlayEnabled: xt,
|
|
2058
2058
|
iosWakeLockEnabled: hi,
|
|
2059
2059
|
iosMediaElementEnabled: di,
|
|
2060
2060
|
abrEnabled: ci,
|
|
@@ -2109,14 +2109,14 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2109
2109
|
y != null && y.forVideo ? (r(this, h, A).call(this, n.NEEDS_USER_INPUT_VIDEO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_AUDIO)) : y != null && y.forAudio && (r(this, h, A).call(this, n.NEEDS_USER_INPUT_AUDIO, ""), r(this, h, w).call(this, n.NEEDS_USER_INPUT_VIDEO));
|
|
2110
2110
|
}), e(this, b).on("is live", (y) => {
|
|
2111
2111
|
y || r(this, h, w).call(this, n.BUFFERING);
|
|
2112
|
-
}), c(this,
|
|
2113
|
-
const Fr =
|
|
2112
|
+
}), c(this, ft, (zs = this.shadowRoot) == null ? void 0 : zs.querySelector("#video")), e(this, ft) && e(this, b).attach(e(this, ft)), this.setAttribute(n.MEDIA, e(this, b).media), e(this, b).muted && r(this, h, A).call(this, n.MUTED, ""), r(this, h, A).call(this, n.VOLUME, e(this, b).volume.toString()), L(Os) || r(this, h, A).call(this, n.POSTER_SRC, e(this, b).getThumbnailUrl());
|
|
2113
|
+
const Fr = N(this.getAttribute(n.AIRPLAY_ENABLED), !1), Hr = N(this.getAttribute(n.CAST_ENABLED), !0), zr = N(this.getAttribute(n.FULLSCREEN_ENABLED), !0), Gr = N(this.getAttribute(n.PIP_ENABLED), !0), $r = N(this.getAttribute(n.VU_METER_ENABLED), !1);
|
|
2114
2114
|
Fr && r(this, h, Pn).call(this, e(this, b)), Hr && r(this, h, Rn).call(this, e(this, b)), zr && r(this, h, Un).call(this, e(this, b)), Gr && r(this, h, Nn).call(this, e(this, b)), t || e(this, b).play(), $r && r(this, h, Mn).call(this, e(this, b)), this.dispatchEvent(
|
|
2115
2115
|
new CustomEvent("vindral-instance-ready", { bubbles: !0, composed: !0, detail: e(this, b) })
|
|
2116
2116
|
);
|
|
2117
2117
|
});
|
|
2118
2118
|
}, Nn = function(t) {
|
|
2119
|
-
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new
|
|
2119
|
+
t.mediaElement instanceof HTMLVideoElement && (c(this, rt, new po(t.mediaElement)), e(this, rt).isSupported() && (e(this, U).debug("PIP is supported"), r(this, h, A).call(this, n.PIP_AVAILABLE, "")), e(this, rt).on("on picture in picture change", (i) => {
|
|
2120
2120
|
i ? r(this, h, A).call(this, n.IS_PIP, "") : r(this, h, w).call(this, n.IS_PIP);
|
|
2121
2121
|
}));
|
|
2122
2122
|
}, Un = function(t) {
|
|
@@ -2125,7 +2125,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2125
2125
|
s ? r(this, h, A).call(this, n.FULLSCREEN, "") : r(this, h, w).call(this, n.FULLSCREEN);
|
|
2126
2126
|
});
|
|
2127
2127
|
}, Rn = function(t) {
|
|
2128
|
-
c(this, ot, new
|
|
2128
|
+
c(this, ot, new to({
|
|
2129
2129
|
background: e(this, ze),
|
|
2130
2130
|
receiverApplicationId: e(this, He),
|
|
2131
2131
|
options: t.getCastOptions()
|
|
@@ -2146,7 +2146,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2146
2146
|
var s;
|
|
2147
2147
|
(s = e(this, V)) == null || s.unload();
|
|
2148
2148
|
const i = t.getCastOptions();
|
|
2149
|
-
c(this, V, new
|
|
2149
|
+
c(this, V, new uo({
|
|
2150
2150
|
url: i.url,
|
|
2151
2151
|
channelId: i.channelId,
|
|
2152
2152
|
authenticationToken: i.authenticationToken,
|
|
@@ -2172,10 +2172,10 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2172
2172
|
}), r(this, h, A).call(this, n.VOLUME_LEVEL, JSON.stringify({ left: null, right: null })), (!e(this, F).isMediaElementSource || !this.hasAttribute(n.MUTED)) && e(this, F).start();
|
|
2173
2173
|
}
|
|
2174
2174
|
}, Ge = new WeakMap(), Dn = function(t) {
|
|
2175
|
-
t.pointerType !== "mouse" && t.timeStamp - e(this, Ge) < 250 || (r(this, h, fi).call(this), e(this,
|
|
2175
|
+
t.pointerType !== "mouse" && t.timeStamp - e(this, Ge) < 250 || (r(this, h, fi).call(this), e(this, gt) && clearTimeout(e(this, gt)), t.target instanceof HTMLElement && ([this, e(this, ft)].includes(t.target) || t.target.localName === "vindral-scroll-overlay") && r(this, h, pt).call(this));
|
|
2176
2176
|
}, On = function(t) {
|
|
2177
2177
|
const i = this.hasAttribute(n.USER_INTERACTING);
|
|
2178
|
-
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this,
|
|
2178
|
+
t.pointerType === "touch" && t.target instanceof HTMLElement ? [this, e(this, ft)].includes(t.target) && i ? r(this, h, os).call(this) : r(this, h, pt).call(this) : t.composedPath().some((s) => s instanceof HTMLElement && ["vindral-play-button"].includes(s == null ? void 0 : s.localName)) && r(this, h, pt).call(this);
|
|
2179
2179
|
}, Fn = function(t) {
|
|
2180
2180
|
!e(this, B) || t.target instanceof tt || t.target instanceof Ms || t.target instanceof Ds || (this.hasAttribute(n.FULLSCREEN) ? this.removeAttribute(n.FULLSCREEN) : this.setAttribute(n.FULLSCREEN, ""));
|
|
2181
2181
|
}, Hn = function(t) {
|
|
@@ -2207,7 +2207,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2207
2207
|
const i = yield e(this, b).getApiClient().getChannels(e(this, nt));
|
|
2208
2208
|
r(this, h, A).call(this, n.CHANNELS, JSON.stringify(i));
|
|
2209
2209
|
}
|
|
2210
|
-
c(this,
|
|
2210
|
+
c(this, Et, window.setTimeout(() => void r(this, h, rs).call(this), 1e4));
|
|
2211
2211
|
});
|
|
2212
2212
|
}, os = function() {
|
|
2213
2213
|
!this.hasAttribute(n.USER_INTERACTING) || this.hasAttribute(n.UI_LOCKED) || (this.dispatchEvent(
|
|
@@ -2220,7 +2220,7 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2220
2220
|
);
|
|
2221
2221
|
});
|
|
2222
2222
|
}, pt = function() {
|
|
2223
|
-
r(this, h, fi).call(this), e(this,
|
|
2223
|
+
r(this, h, fi).call(this), e(this, gt) && clearTimeout(e(this, gt)), e(this, Oe) && c(this, gt, self.setTimeout(() => {
|
|
2224
2224
|
r(this, h, os).call(this);
|
|
2225
2225
|
}, e(this, Oe)));
|
|
2226
2226
|
}, Gn = function() {
|
|
@@ -2292,12 +2292,12 @@ Ri = new WeakMap(), it = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(),
|
|
|
2292
2292
|
"language"
|
|
2293
2293
|
]), l(fe, Ri, "https://lb.cdn.vindral.com");
|
|
2294
2294
|
let Le = fe;
|
|
2295
|
-
const Kn = document.createElement("template"),
|
|
2295
|
+
const Kn = document.createElement("template"), bo = (
|
|
2296
2296
|
/* SVG */
|
|
2297
2297
|
`
|
|
2298
2298
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-maximize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 8v-2a2 2 0 0 1 2 -2h2" /><path d="M4 16v2a2 2 0 0 0 2 2h2" /><path d="M16 4h2a2 2 0 0 1 2 2v2" /><path d="M16 20h2a2 2 0 0 0 2 -2v-2" /></svg>
|
|
2299
2299
|
`
|
|
2300
|
-
),
|
|
2300
|
+
), mo = (
|
|
2301
2301
|
/* SVG */
|
|
2302
2302
|
`
|
|
2303
2303
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-minimize"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 19v-2a2 2 0 0 1 2 -2h2" /><path d="M15 5v2a2 2 0 0 0 2 2h2" /><path d="M5 15h2a2 2 0 0 1 2 2v2" /><path d="M5 9h2a2 2 0 0 0 2 -2v-2" /></svg>
|
|
@@ -2320,8 +2320,8 @@ Kn.innerHTML = /* HTML */
|
|
|
2320
2320
|
</style>
|
|
2321
2321
|
|
|
2322
2322
|
<slot name="icon">
|
|
2323
|
-
<slot name="enter">${
|
|
2324
|
-
<slot name="exit">${
|
|
2323
|
+
<slot name="enter">${bo}</slot>
|
|
2324
|
+
<slot name="exit">${mo}</slot>
|
|
2325
2325
|
</slot>
|
|
2326
2326
|
`;
|
|
2327
2327
|
const Ee = class Ee extends tt {
|
|
@@ -2351,7 +2351,7 @@ const Ee = class Ee extends tt {
|
|
|
2351
2351
|
};
|
|
2352
2352
|
m(Ee, "observedAttributes", [...q(Ee, Ee, "observedAttributes"), n.FULLSCREEN]);
|
|
2353
2353
|
let hs = Ee;
|
|
2354
|
-
const
|
|
2354
|
+
const vo = (
|
|
2355
2355
|
/* SVG */
|
|
2356
2356
|
`
|
|
2357
2357
|
<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>
|
|
@@ -2365,7 +2365,7 @@ qn.innerHTML = /* HTML */
|
|
|
2365
2365
|
}
|
|
2366
2366
|
</style>
|
|
2367
2367
|
|
|
2368
|
-
<slot name="button">${
|
|
2368
|
+
<slot name="button">${vo}</slot>
|
|
2369
2369
|
<slot name="listbox" hidden>
|
|
2370
2370
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2371
2371
|
</slot>
|
|
@@ -2390,7 +2390,7 @@ Be = new WeakSet(), cs = function() {
|
|
|
2390
2390
|
i && s ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2391
2391
|
}, m(Ae, "observedAttributes", [...q(Ae, Ae, "observedAttributes"), n.LANGUAGES, n.TEXT_TRACKS]);
|
|
2392
2392
|
let ds = Ae;
|
|
2393
|
-
const Xn = document.createElement("template"),
|
|
2393
|
+
const Xn = document.createElement("template"), go = (
|
|
2394
2394
|
/* SVG */
|
|
2395
2395
|
`
|
|
2396
2396
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
|
|
@@ -2472,7 +2472,7 @@ Xn.innerHTML = /* HTML */
|
|
|
2472
2472
|
}
|
|
2473
2473
|
|
|
2474
2474
|
[role="menuitem"][aria-selected="true"]::before {
|
|
2475
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
2475
|
+
content: url("data:image/svg+xml,${encodeURIComponent(go)}");
|
|
2476
2476
|
position: absolute;
|
|
2477
2477
|
left: var(--padding-3);
|
|
2478
2478
|
top: calc(50% - 8px);
|
|
@@ -2511,7 +2511,7 @@ Xn.innerHTML = /* HTML */
|
|
|
2511
2511
|
<div class="menu"></div>
|
|
2512
2512
|
</div>
|
|
2513
2513
|
`;
|
|
2514
|
-
var Ke, qe, Xe, je, Q, K, _t,
|
|
2514
|
+
var Ke, qe, Xe, je, Q, K, _t, At, ie, Ve, at, W, E, Vn, Yn, us, ps, Ei, ue, pe, Jn, Qn, Wn, bs, ms, Zn;
|
|
2515
2515
|
class jn extends HTMLElement {
|
|
2516
2516
|
constructor() {
|
|
2517
2517
|
super();
|
|
@@ -2523,7 +2523,7 @@ class jn extends HTMLElement {
|
|
|
2523
2523
|
l(this, Q, []);
|
|
2524
2524
|
l(this, K, []);
|
|
2525
2525
|
l(this, _t, null);
|
|
2526
|
-
l(this,
|
|
2526
|
+
l(this, At, null);
|
|
2527
2527
|
l(this, ie, null);
|
|
2528
2528
|
l(this, Ve, null);
|
|
2529
2529
|
l(this, at, null);
|
|
@@ -2540,7 +2540,7 @@ class jn extends HTMLElement {
|
|
|
2540
2540
|
connectedCallback() {
|
|
2541
2541
|
var i, s, o;
|
|
2542
2542
|
const t = this.getRootNode();
|
|
2543
|
-
t instanceof ShadowRoot && (c(this, ie, t.host.closest("vindral-controller")), (i = e(this, ie)) == null || i.connectListener(this), c(this, _t, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), c(this,
|
|
2543
|
+
t instanceof ShadowRoot && (c(this, ie, t.host.closest("vindral-controller")), (i = e(this, ie)) == null || i.connectListener(this), c(this, _t, (s = this.shadowRoot) == null ? void 0 : s.querySelector("#languages .menu")), c(this, At, (o = this.shadowRoot) == null ? void 0 : o.querySelector("#text-tracks .menu")), r(this, E, Vn).call(this), r(this, E, Yn).call(this), c(this, Ve, t.host), this.addEventListener("keydown", this));
|
|
2544
2544
|
}
|
|
2545
2545
|
disconnectedCallback() {
|
|
2546
2546
|
this.removeEventListener("keydown", this);
|
|
@@ -2567,7 +2567,7 @@ class jn extends HTMLElement {
|
|
|
2567
2567
|
e(this, at) ? e(this, at).focus() : e(this, W) && e(this, W).focus();
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
|
-
Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(), Q = new WeakMap(), K = new WeakMap(), _t = new WeakMap(),
|
|
2570
|
+
Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(), Q = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), At = new WeakMap(), ie = new WeakMap(), Ve = new WeakMap(), at = new WeakMap(), W = new WeakMap(), E = new WeakSet(), Vn = function() {
|
|
2571
2571
|
const t = (s) => {
|
|
2572
2572
|
s.forEach((o) => {
|
|
2573
2573
|
if (o.intersectionRatio !== 1)
|
|
@@ -2585,13 +2585,13 @@ Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(),
|
|
|
2585
2585
|
// 0 means any intersection is enough to be considered "inside"
|
|
2586
2586
|
}).observe(this);
|
|
2587
2587
|
}, Yn = function() {
|
|
2588
|
-
e(this, _t) && (r(this, E, ps).call(this), r(this, E, ue).call(this)), e(this,
|
|
2588
|
+
e(this, _t) && (r(this, E, ps).call(this), r(this, E, ue).call(this)), e(this, At) && (r(this, E, us).call(this), r(this, E, pe).call(this));
|
|
2589
2589
|
}, us = function() {
|
|
2590
|
-
e(this,
|
|
2590
|
+
e(this, At).innerHTML = "", c(this, K, []);
|
|
2591
2591
|
const t = r(this, E, Ei).call(this, "Off", "textTrack", void 0);
|
|
2592
|
-
e(this,
|
|
2592
|
+
e(this, At).appendChild(t), e(this, K).push({ element: t, value: void 0 }), e(this, qe).forEach((i) => {
|
|
2593
2593
|
const s = r(this, E, Ei).call(this, i, "textTrack", i);
|
|
2594
|
-
e(this,
|
|
2594
|
+
e(this, At).appendChild(s), e(this, K).push({ element: s, value: i });
|
|
2595
2595
|
}), r(this, E, pe).call(this);
|
|
2596
2596
|
}, ps = function() {
|
|
2597
2597
|
e(this, _t).innerHTML = "", c(this, Q, []), e(this, Ke).forEach((t) => {
|
|
@@ -2645,7 +2645,7 @@ Ke = new WeakMap(), qe = new WeakMap(), Xe = new WeakMap(), je = new WeakMap(),
|
|
|
2645
2645
|
n.LANGUAGE,
|
|
2646
2646
|
n.TEXT_TRACK
|
|
2647
2647
|
]);
|
|
2648
|
-
const tr = document.createElement("template"),
|
|
2648
|
+
const tr = document.createElement("template"), fo = (
|
|
2649
2649
|
/* SVG */
|
|
2650
2650
|
`
|
|
2651
2651
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -2653,7 +2653,7 @@ const tr = document.createElement("template"), go = (
|
|
|
2653
2653
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" />
|
|
2654
2654
|
</g></svg>
|
|
2655
2655
|
`
|
|
2656
|
-
),
|
|
2656
|
+
), Eo = (
|
|
2657
2657
|
/* SVG */
|
|
2658
2658
|
`
|
|
2659
2659
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" <g fill="none" stroke="currentColor">
|
|
@@ -2677,8 +2677,8 @@ tr.innerHTML = /* HTML */
|
|
|
2677
2677
|
</style>
|
|
2678
2678
|
|
|
2679
2679
|
<slot name="icon">
|
|
2680
|
-
<slot name="mute">${
|
|
2681
|
-
<slot name="unmute">${
|
|
2680
|
+
<slot name="mute">${fo}</slot>
|
|
2681
|
+
<slot name="unmute">${Eo}</slot>
|
|
2682
2682
|
</slot>
|
|
2683
2683
|
`;
|
|
2684
2684
|
const ye = class ye extends tt {
|
|
@@ -2708,7 +2708,7 @@ const ye = class ye extends tt {
|
|
|
2708
2708
|
};
|
|
2709
2709
|
m(ye, "observedAttributes", [...q(ye, ye, "observedAttributes"), n.MUTED]);
|
|
2710
2710
|
let vs = ye;
|
|
2711
|
-
const er = document.createElement("template"),
|
|
2711
|
+
const er = document.createElement("template"), Ao = (
|
|
2712
2712
|
/* SVG */
|
|
2713
2713
|
`
|
|
2714
2714
|
<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>
|
|
@@ -2725,7 +2725,7 @@ er.innerHTML = /* HTML */
|
|
|
2725
2725
|
display: none !important;
|
|
2726
2726
|
}
|
|
2727
2727
|
</style>
|
|
2728
|
-
<slot name="icon">${
|
|
2728
|
+
<slot name="icon">${Ao}</slot>
|
|
2729
2729
|
`;
|
|
2730
2730
|
const ke = class ke extends tt {
|
|
2731
2731
|
constructor() {
|
|
@@ -2760,12 +2760,12 @@ const ke = class ke extends tt {
|
|
|
2760
2760
|
};
|
|
2761
2761
|
m(ke, "observedAttributes", [...q(ke, ke, "observedAttributes"), n.IS_PIP, n.PIP_AVAILABLE]);
|
|
2762
2762
|
let gs = ke;
|
|
2763
|
-
const ir = document.createElement("template"),
|
|
2763
|
+
const ir = document.createElement("template"), yo = (
|
|
2764
2764
|
/* SVG */
|
|
2765
2765
|
`
|
|
2766
2766
|
<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>
|
|
2767
2767
|
`
|
|
2768
|
-
),
|
|
2768
|
+
), ko = (
|
|
2769
2769
|
/* SVG */
|
|
2770
2770
|
`
|
|
2771
2771
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /><path d="M17 4h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2z" /></svg>
|
|
@@ -2788,8 +2788,8 @@ ir.innerHTML = /* HTML */
|
|
|
2788
2788
|
</style>
|
|
2789
2789
|
|
|
2790
2790
|
<slot name="icon">
|
|
2791
|
-
<slot name="play">${
|
|
2792
|
-
<slot name="pause">${
|
|
2791
|
+
<slot name="play">${yo}</slot>
|
|
2792
|
+
<slot name="pause">${ko}</slot>
|
|
2793
2793
|
</slot>
|
|
2794
2794
|
`;
|
|
2795
2795
|
const we = class we extends tt {
|
|
@@ -2824,61 +2824,61 @@ const X = {
|
|
|
2824
2824
|
OFFLINE: "offline",
|
|
2825
2825
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
2826
2826
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
2827
|
-
},
|
|
2828
|
-
var Ye, se,
|
|
2829
|
-
class
|
|
2827
|
+
}, wo = Object.values(X);
|
|
2828
|
+
var Ye, se, yt, Pt, kt, wt, lt, H, Es, sr, As, ys;
|
|
2829
|
+
class Io extends li {
|
|
2830
2830
|
constructor(t) {
|
|
2831
2831
|
super();
|
|
2832
2832
|
l(this, H);
|
|
2833
2833
|
l(this, Ye);
|
|
2834
2834
|
l(this, se);
|
|
2835
|
-
l(this,
|
|
2835
|
+
l(this, yt, !1);
|
|
2836
2836
|
l(this, Pt, !1);
|
|
2837
|
-
l(this,
|
|
2838
|
-
l(this,
|
|
2837
|
+
l(this, kt, !0);
|
|
2838
|
+
l(this, wt, null);
|
|
2839
2839
|
l(this, lt, null);
|
|
2840
|
-
c(this, se, t), c(this, Ye, new
|
|
2840
|
+
c(this, se, t), c(this, Ye, new eo({
|
|
2841
2841
|
publicEndpoint: t.url,
|
|
2842
2842
|
tokenFactory: () => t.authenticationToken
|
|
2843
2843
|
}));
|
|
2844
2844
|
}
|
|
2845
2845
|
start(t = 5e3) {
|
|
2846
|
-
e(this, lt) && clearInterval(e(this, lt)), c(this,
|
|
2847
|
-
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this,
|
|
2846
|
+
e(this, lt) && clearInterval(e(this, lt)), c(this, yt, !1), c(this, Pt, !1), r(this, H, ys).call(this), r(this, H, Es).call(this), c(this, lt, window.setInterval(() => {
|
|
2847
|
+
!e(this, Pt) && !e(this, se).infiniteReconnect && !e(this, wt) && e(this, kt) && c(this, wt, window.setTimeout(() => r(this, H, sr).call(this), 300 * 1e3)), !e(this, Pt) && e(this, kt) && r(this, H, Es).call(this);
|
|
2848
2848
|
}, t));
|
|
2849
2849
|
}
|
|
2850
2850
|
stop() {
|
|
2851
2851
|
r(this, H, As).call(this), e(this, lt) && (window.clearInterval(e(this, lt)), c(this, lt, null));
|
|
2852
2852
|
}
|
|
2853
2853
|
}
|
|
2854
|
-
Ye = new WeakMap(), se = new WeakMap(),
|
|
2854
|
+
Ye = new WeakMap(), se = new WeakMap(), yt = new WeakMap(), Pt = new WeakMap(), kt = new WeakMap(), wt = new WeakMap(), lt = new WeakMap(), H = new WeakSet(), Es = function() {
|
|
2855
2855
|
return G(this, null, function* () {
|
|
2856
|
-
if (e(this,
|
|
2856
|
+
if (e(this, yt))
|
|
2857
2857
|
return;
|
|
2858
|
-
c(this,
|
|
2858
|
+
c(this, yt, !0);
|
|
2859
2859
|
let t = "Stream is offline", i = "Please stand by";
|
|
2860
2860
|
try {
|
|
2861
2861
|
const s = yield e(this, Ye).getChannel(e(this, se).channelId);
|
|
2862
2862
|
if (s.isLive) {
|
|
2863
|
-
c(this, Pt, !0), r(this, H, ys).call(this), this.emit("live", s), c(this,
|
|
2863
|
+
c(this, Pt, !0), r(this, H, ys).call(this), this.emit("live", s), c(this, yt, !1);
|
|
2864
2864
|
return;
|
|
2865
2865
|
}
|
|
2866
2866
|
} catch (s) {
|
|
2867
|
-
|
|
2867
|
+
io(s) && (s.status === 403 || s.status === 401) && (t = "Forbidden", i = "You do not have permission to view this stream");
|
|
2868
2868
|
}
|
|
2869
|
-
e(this,
|
|
2869
|
+
e(this, kt) && this.emit("error", { title: t, message: i }), c(this, yt, !1);
|
|
2870
2870
|
});
|
|
2871
2871
|
}, sr = function() {
|
|
2872
|
-
this.stop(), c(this,
|
|
2872
|
+
this.stop(), c(this, kt, !1), this.emit("timeout");
|
|
2873
2873
|
}, As = function() {
|
|
2874
|
-
e(this,
|
|
2874
|
+
e(this, wt) && (window.clearTimeout(e(this, wt)), c(this, wt, null));
|
|
2875
2875
|
}, ys = function() {
|
|
2876
|
-
r(this, H, As).call(this), c(this,
|
|
2876
|
+
r(this, H, As).call(this), c(this, kt, !0);
|
|
2877
2877
|
};
|
|
2878
|
-
const
|
|
2878
|
+
const Co = new RegExp(
|
|
2879
2879
|
"/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/",
|
|
2880
2880
|
"i"
|
|
2881
|
-
),
|
|
2881
|
+
), Lo = navigator.userAgent.toLowerCase(), To = Co.test(Lo), xo = (d) => Le.observedAttributes.includes(d), nr = (
|
|
2882
2882
|
/* HTML */
|
|
2883
2883
|
`
|
|
2884
2884
|
<style>
|
|
@@ -2890,7 +2890,7 @@ const Io = new RegExp(
|
|
|
2890
2890
|
display: flex;
|
|
2891
2891
|
justify-content: center;
|
|
2892
2892
|
|
|
2893
|
-
--vindral-volume-range-display: ${
|
|
2893
|
+
--vindral-volume-range-display: ${To ? "none" : "flex"};
|
|
2894
2894
|
--vindral-airplay-button-display: none;
|
|
2895
2895
|
--vindral-play-overlay-display: none;
|
|
2896
2896
|
--vindral-grid-item-offline-display: none;
|
|
@@ -2958,7 +2958,7 @@ const Io = new RegExp(
|
|
|
2958
2958
|
}
|
|
2959
2959
|
</style>
|
|
2960
2960
|
`
|
|
2961
|
-
),
|
|
2961
|
+
), So = (
|
|
2962
2962
|
/* HTML */
|
|
2963
2963
|
`
|
|
2964
2964
|
${nr}
|
|
@@ -2993,7 +2993,7 @@ const Io = new RegExp(
|
|
|
2993
2993
|
<vindral-message id="vindral-message" slot="overlay" hidden></vindral-message>
|
|
2994
2994
|
</vindral-controller>
|
|
2995
2995
|
`
|
|
2996
|
-
),
|
|
2996
|
+
), No = (
|
|
2997
2997
|
/* HTML */
|
|
2998
2998
|
`
|
|
2999
2999
|
${nr}
|
|
@@ -3020,11 +3020,11 @@ const Io = new RegExp(
|
|
|
3020
3020
|
</vindral-controller>
|
|
3021
3021
|
`
|
|
3022
3022
|
), Xs = document.createElement("template");
|
|
3023
|
-
var Z, x, M, ht, dt, Oi, Je, Fi,
|
|
3023
|
+
var Z, x, M, ht, dt, Oi, Je, Fi, S, ks, or, Qe, Ai, bt;
|
|
3024
3024
|
class rr extends HTMLElement {
|
|
3025
3025
|
constructor() {
|
|
3026
3026
|
super();
|
|
3027
|
-
l(this,
|
|
3027
|
+
l(this, S);
|
|
3028
3028
|
l(this, Z);
|
|
3029
3029
|
l(this, x);
|
|
3030
3030
|
l(this, M);
|
|
@@ -3036,28 +3036,31 @@ class rr extends HTMLElement {
|
|
|
3036
3036
|
});
|
|
3037
3037
|
});
|
|
3038
3038
|
l(this, Je, (t, i) => {
|
|
3039
|
-
|
|
3039
|
+
xo(t) && (L(i) ? e(this, x).setAttribute(t, i) : e(this, x).removeAttribute(t));
|
|
3040
3040
|
});
|
|
3041
|
-
l(this, Fi, () => Vs(this.getAttribute(n.MEDIA)) === "audio" ?
|
|
3041
|
+
l(this, Fi, () => Vs(this.getAttribute(n.MEDIA)) === "audio" ? No : So);
|
|
3042
3042
|
l(this, Qe, () => {
|
|
3043
3043
|
const t = e(this, x).instance;
|
|
3044
3044
|
t && (t.on("is live", (i) => {
|
|
3045
|
-
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this,
|
|
3045
|
+
i ? (this.removeAttribute(X.OFFLINE), e(this, M).setAttribute("hidden", "")) : (this.setAttribute(X.OFFLINE, ""), e(this, M).removeAttribute("hidden"), r(this, S, bt).call(this, "Stream is offline", "Please stand by"));
|
|
3046
3046
|
}), t.on("channels", (i) => {
|
|
3047
3047
|
const s = e(this, x).getAttribute("channel-id"), o = i.find((p) => p.channelId === s);
|
|
3048
|
-
o && r(this,
|
|
3048
|
+
o && r(this, S, Ai).call(this, o);
|
|
3049
3049
|
}), t.on("channel switch", ({ channelId: i }) => {
|
|
3050
3050
|
const s = t.channels.find((o) => o.channelId === i);
|
|
3051
|
-
s && r(this,
|
|
3051
|
+
s && r(this, S, Ai).call(this, s);
|
|
3052
3052
|
}), t.on("error", (i) => {
|
|
3053
|
-
|
|
3054
|
-
|
|
3053
|
+
if (i.code() === Jr) {
|
|
3054
|
+
r(this, S, bt).call(this, "Stream is offline", "Please stand by");
|
|
3055
|
+
return;
|
|
3056
|
+
}
|
|
3057
|
+
i.isFatal() && (i.code() === Qr ? r(this, S, bt).call(this, "Forbidden", "You do not have permission to view this stream") : i.code() === Wr ? r(this, S, bt).call(this, "Stream is offline", "Please stand by") : r(this, S, bt).call(this, "An error occurred", i.message), e(this, ht).removeAttribute("hidden"), this.setAttribute(X.OFFLINE, ""), e(this, x).dispatchEvent(new CustomEvent(f.EXIT_FULLSCREEN)), e(this, x).dispatchEvent(new CustomEvent(f.EXIT_PIP)));
|
|
3055
3058
|
}));
|
|
3056
3059
|
});
|
|
3057
|
-
c(this, Z, this.attachShadow({ mode: "open" })), r(this,
|
|
3060
|
+
c(this, Z, this.attachShadow({ mode: "open" })), r(this, S, ks).call(this), c(this, x, e(this, Z).querySelector("vindral-controller")), c(this, M, e(this, Z).querySelector("#vindral-message")), c(this, ht, e(this, Z).querySelector("#play-overlay"));
|
|
3058
3061
|
}
|
|
3059
3062
|
connectedCallback() {
|
|
3060
|
-
this.setAttribute(X.OFFLINE, ""), e(this, x).addEventListener("vindral-instance-ready", e(this, Qe)), r(this,
|
|
3063
|
+
this.setAttribute(X.OFFLINE, ""), e(this, x).addEventListener("vindral-instance-ready", e(this, Qe)), r(this, S, or).call(this);
|
|
3061
3064
|
}
|
|
3062
3065
|
disconnectedCallback() {
|
|
3063
3066
|
var t;
|
|
@@ -3066,10 +3069,10 @@ class rr extends HTMLElement {
|
|
|
3066
3069
|
attributeChangedCallback(t, i, s) {
|
|
3067
3070
|
if (i !== s)
|
|
3068
3071
|
if (t === n.MEDIA)
|
|
3069
|
-
r(this,
|
|
3072
|
+
r(this, S, ks).call(this);
|
|
3070
3073
|
else if (t === X.REFRESH_POSTER_ENABLED) {
|
|
3071
3074
|
const o = e(this, Z).querySelector("vindral-poster-overlay");
|
|
3072
|
-
o && (o.disabled =
|
|
3075
|
+
o && (o.disabled = N(this.getAttribute(X.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3073
3076
|
} else
|
|
3074
3077
|
e(this, Je).call(this, t, s);
|
|
3075
3078
|
}
|
|
@@ -3080,7 +3083,7 @@ class rr extends HTMLElement {
|
|
|
3080
3083
|
return e(this, x).airPlay;
|
|
3081
3084
|
}
|
|
3082
3085
|
}
|
|
3083
|
-
Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Oi = new WeakMap(), Je = new WeakMap(), Fi = new WeakMap(),
|
|
3086
|
+
Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Oi = new WeakMap(), Je = new WeakMap(), Fi = new WeakMap(), S = new WeakSet(), ks = function() {
|
|
3084
3087
|
Xs.innerHTML = e(this, Fi).call(this);
|
|
3085
3088
|
const t = Xs.content.cloneNode(!0);
|
|
3086
3089
|
c(this, x, t.querySelector("vindral-controller")), c(this, M, t.querySelector("#vindral-message")), c(this, ht, t.querySelector("#play-overlay")), this.children.length > 0 && Array.from(this.children).forEach((i) => {
|
|
@@ -3088,24 +3091,24 @@ Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt
|
|
|
3088
3091
|
}), e(this, Oi).call(this), e(this, Z).innerHTML = "", e(this, Z).appendChild(t);
|
|
3089
3092
|
}, or = function() {
|
|
3090
3093
|
var p;
|
|
3091
|
-
if (
|
|
3094
|
+
if (N(this.getAttribute(X.STREAM_POLL_ENABLED), !0) === !1)
|
|
3092
3095
|
return;
|
|
3093
3096
|
const t = this.getAttribute("url"), i = this.getAttribute("channel-id"), s = (p = this.getAttribute("authentication-token")) != null ? p : void 0, o = this.hasAttribute("infinite-reconnect");
|
|
3094
3097
|
if (!t || !i) {
|
|
3095
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3098
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, bt).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3096
3099
|
return;
|
|
3097
3100
|
}
|
|
3098
|
-
c(this, dt, new
|
|
3101
|
+
c(this, dt, new Io({
|
|
3099
3102
|
url: t,
|
|
3100
3103
|
channelId: i,
|
|
3101
3104
|
authenticationToken: s,
|
|
3102
3105
|
infiniteReconnect: o
|
|
3103
3106
|
})), e(this, dt).on("live", (u) => {
|
|
3104
|
-
e(this, x).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), r(this,
|
|
3107
|
+
e(this, x).connect(), this.removeAttribute("offline"), e(this, M).setAttribute("hidden", ""), r(this, S, Ai).call(this, u);
|
|
3105
3108
|
}), e(this, dt).on("timeout", () => {
|
|
3106
3109
|
e(this, M).setAttribute("hidden", ""), e(this, ht).removeAttribute("hidden");
|
|
3107
3110
|
}), e(this, dt).on("error", (u) => {
|
|
3108
|
-
this.setAttribute(X.OFFLINE, ""), r(this,
|
|
3111
|
+
this.setAttribute(X.OFFLINE, ""), r(this, S, bt).call(this, u.title, u.message);
|
|
3109
3112
|
}), e(this, ht).addEventListener("click", () => {
|
|
3110
3113
|
e(this, x).connect(), e(this, ht).setAttribute("hidden", ""), e(this, M).setAttribute("hidden", ""), e(this, x).focus();
|
|
3111
3114
|
}), this.hasAttribute("paused") && e(this, dt).start();
|
|
@@ -3115,15 +3118,15 @@ Z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), ht = new WeakMap(), dt
|
|
|
3115
3118
|
if (!i) return;
|
|
3116
3119
|
const s = this.getAttribute("poster"), o = typeof i == "string" ? i : t.name;
|
|
3117
3120
|
let p;
|
|
3118
|
-
typeof s == "string" ? p = s : p = (v = (u = this.instance) == null ? void 0 : u.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0,
|
|
3121
|
+
typeof s == "string" ? p = s : p = (v = (u = this.instance) == null ? void 0 : u.getThumbnailUrl()) != null ? v : t.thumbnailUrls.length ? t.thumbnailUrls[0] : void 0, ro({
|
|
3119
3122
|
title: o,
|
|
3120
3123
|
poster: p
|
|
3121
3124
|
});
|
|
3122
|
-
},
|
|
3125
|
+
}, bt = function(t, i) {
|
|
3123
3126
|
e(this, M).setAttribute("title", t), e(this, M).setAttribute("description", i);
|
|
3124
3127
|
const s = this.getAttribute("poster");
|
|
3125
3128
|
s && e(this, M).setAttribute("background-image", s), e(this, M).removeAttribute("hidden");
|
|
3126
|
-
}, m(rr, "observedAttributes", [...Le.observedAttributes, ...
|
|
3129
|
+
}, m(rr, "observedAttributes", [...Le.observedAttributes, ...wo]);
|
|
3127
3130
|
const ar = document.createElement("template");
|
|
3128
3131
|
ar.innerHTML = /* HTML */
|
|
3129
3132
|
`
|
|
@@ -3161,14 +3164,14 @@ ar.innerHTML = /* HTML */
|
|
|
3161
3164
|
}
|
|
3162
3165
|
</style>
|
|
3163
3166
|
`;
|
|
3164
|
-
const
|
|
3165
|
-
var ne,
|
|
3167
|
+
const Uo = 6e3;
|
|
3168
|
+
var ne, It, Mt, re, Y, hr, yi, ws, Hi;
|
|
3166
3169
|
class lr extends HTMLElement {
|
|
3167
3170
|
constructor() {
|
|
3168
3171
|
super();
|
|
3169
3172
|
l(this, Y);
|
|
3170
3173
|
l(this, ne, null);
|
|
3171
|
-
l(this,
|
|
3174
|
+
l(this, It, null);
|
|
3172
3175
|
l(this, Mt, null);
|
|
3173
3176
|
l(this, re, () => {
|
|
3174
3177
|
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? r(this, Y, hr).call(this) : r(this, Y, yi).call(this);
|
|
@@ -3204,10 +3207,10 @@ class lr extends HTMLElement {
|
|
|
3204
3207
|
return this.hasAttribute(n.PAUSED);
|
|
3205
3208
|
}
|
|
3206
3209
|
}
|
|
3207
|
-
ne = new WeakMap(),
|
|
3208
|
-
e(this,
|
|
3210
|
+
ne = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(), Y = new WeakSet(), hr = function() {
|
|
3211
|
+
e(this, It) === null && (r(this, Y, yi).call(this), c(this, It, window.setInterval(() => r(this, Y, ws).call(this), Uo)));
|
|
3209
3212
|
}, yi = function() {
|
|
3210
|
-
e(this,
|
|
3213
|
+
e(this, It) !== null && (clearInterval(e(this, It)), c(this, It, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3211
3214
|
}, ws = function() {
|
|
3212
3215
|
if (!this.posterSrc) return;
|
|
3213
3216
|
const t = new URL(this.posterSrc), i = new Image();
|
|
@@ -3218,7 +3221,7 @@ ne = new WeakMap(), wt = new WeakMap(), Mt = new WeakMap(), re = new WeakMap(),
|
|
|
3218
3221
|
"disabled",
|
|
3219
3222
|
"intersecting"
|
|
3220
3223
|
]);
|
|
3221
|
-
const
|
|
3224
|
+
const Ro = (
|
|
3222
3225
|
/* SVG */
|
|
3223
3226
|
`
|
|
3224
3227
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-settings-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -3235,7 +3238,7 @@ dr.innerHTML = /* HTML */
|
|
|
3235
3238
|
}
|
|
3236
3239
|
</style>
|
|
3237
3240
|
|
|
3238
|
-
<slot name="button">${
|
|
3241
|
+
<slot name="button">${Ro}</slot>
|
|
3239
3242
|
<slot name="listbox" hidden>
|
|
3240
3243
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3241
3244
|
</slot>
|
|
@@ -3260,7 +3263,7 @@ We = new WeakSet(), Cs = function() {
|
|
|
3260
3263
|
!t || t === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3261
3264
|
}, m(Ie, "observedAttributes", [...q(Ie, Ie, "observedAttributes"), n.RENDITION_LEVELS]);
|
|
3262
3265
|
let Is = Ie;
|
|
3263
|
-
const cr = document.createElement("template"),
|
|
3266
|
+
const cr = document.createElement("template"), _o = (
|
|
3264
3267
|
/* SVG */
|
|
3265
3268
|
`
|
|
3266
3269
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="#fff" viewBox="0 0 78.369 78.369" xml:space="preserve"><path d="M78.049 19.015 29.458 67.606a1.094 1.094 0 0 1-1.548 0L.32 40.015a1.094 1.094 0 0 1 0-1.547l6.704-6.704a1.095 1.095 0 0 1 1.548 0l20.113 20.112 41.113-41.113a1.095 1.095 0 0 1 1.548 0l6.703 6.704a1.094 1.094 0 0 1 0 1.548z"/></svg>
|
|
@@ -3339,7 +3342,7 @@ cr.innerHTML = /* HTML */
|
|
|
3339
3342
|
}
|
|
3340
3343
|
|
|
3341
3344
|
[role="menuitem"][aria-selected="true"]::before {
|
|
3342
|
-
content: url("data:image/svg+xml,${encodeURIComponent(
|
|
3345
|
+
content: url("data:image/svg+xml,${encodeURIComponent(_o)}");
|
|
3343
3346
|
position: absolute;
|
|
3344
3347
|
left: calc(var(--padding-3) - var(--padding-1));
|
|
3345
3348
|
top: calc(50% - 8px);
|
|
@@ -3369,14 +3372,14 @@ cr.innerHTML = /* HTML */
|
|
|
3369
3372
|
<div class="menu"></div>
|
|
3370
3373
|
</slot>
|
|
3371
3374
|
`;
|
|
3372
|
-
var Dt, Ze,
|
|
3375
|
+
var Dt, Ze, Ct, ct, Ot, ti, C, pr, Ls, br, Ts, mr, vr, gr, xs, fr;
|
|
3373
3376
|
class ur extends HTMLElement {
|
|
3374
3377
|
constructor() {
|
|
3375
3378
|
super();
|
|
3376
3379
|
l(this, C);
|
|
3377
3380
|
l(this, Dt, []);
|
|
3378
3381
|
l(this, Ze, Number.MAX_SAFE_INTEGER);
|
|
3379
|
-
l(this,
|
|
3382
|
+
l(this, Ct, null);
|
|
3380
3383
|
l(this, ct, []);
|
|
3381
3384
|
l(this, Ot, null);
|
|
3382
3385
|
l(this, ti, null);
|
|
@@ -3412,10 +3415,10 @@ class ur extends HTMLElement {
|
|
|
3412
3415
|
}
|
|
3413
3416
|
focus() {
|
|
3414
3417
|
var t;
|
|
3415
|
-
(t = e(this,
|
|
3418
|
+
(t = e(this, Ct)) == null || t.focus();
|
|
3416
3419
|
}
|
|
3417
3420
|
}
|
|
3418
|
-
Dt = new WeakMap(), Ze = new WeakMap(),
|
|
3421
|
+
Dt = new WeakMap(), Ze = new WeakMap(), Ct = new WeakMap(), ct = new WeakMap(), Ot = new WeakMap(), ti = new WeakMap(), C = new WeakSet(), pr = function() {
|
|
3419
3422
|
const t = (s) => {
|
|
3420
3423
|
s.forEach((o) => {
|
|
3421
3424
|
if (o.intersectionRatio !== 1)
|
|
@@ -3439,18 +3442,18 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3439
3442
|
var p, u;
|
|
3440
3443
|
return (p = s.video) != null && p.bitRate && ((u = o.video) != null && u.bitRate) ? o.video.bitRate - s.video.bitRate : 0;
|
|
3441
3444
|
}).forEach((s) => {
|
|
3442
|
-
var v, g, P, et, J,
|
|
3445
|
+
var v, g, P, et, J, Lt, Tt, xt;
|
|
3443
3446
|
const o = document.createElement("div");
|
|
3444
3447
|
o.setAttribute("role", "menuitem"), o.setAttribute("value", String((v = s.video) == null ? void 0 : v.height)), o.classList.add("menu-item"), o.tabIndex = -1;
|
|
3445
3448
|
const p = r(this, C, br).call(this, (g = s.video) == null ? void 0 : g.frameRate);
|
|
3446
|
-
o.textContent = s.video ?
|
|
3449
|
+
o.textContent = s.video ? no(s.video) : "";
|
|
3447
3450
|
const u = document.createElement("span");
|
|
3448
|
-
u.classList.add("menu-item-subtitle"), u.textContent = `${
|
|
3451
|
+
u.classList.add("menu-item-subtitle"), u.textContent = `${so(((et = (P = s.video) == null ? void 0 : P.bitRate) != null ? et : 0) + ((Lt = (J = s.audio) == null ? void 0 : J.bitRate) != null ? Lt : 0))}, ${p}p`, o.appendChild(u), o.addEventListener("click", () => r(this, C, mr).call(this, s)), e(this, ct).push({ el: o, id: (xt = (Tt = s.video) == null ? void 0 : Tt.id) != null ? xt : -1 }), t.appendChild(o);
|
|
3449
3452
|
}), r(this, C, Ts).call(this));
|
|
3450
3453
|
}, br = function(t) {
|
|
3451
3454
|
return t ? t[0] % t[1] === 0 ? (t[0] / t[1]).toString() : (t[0] / t[1]).toFixed(2) : "";
|
|
3452
3455
|
}, Ts = function() {
|
|
3453
|
-
e(this,
|
|
3456
|
+
e(this, Ct) && (e(this, Ct).removeAttribute("aria-selected"), e(this, Ct).tabIndex = -1);
|
|
3454
3457
|
const t = e(this, Dt).sort(
|
|
3455
3458
|
(s, o) => {
|
|
3456
3459
|
var p, u;
|
|
@@ -3467,7 +3470,7 @@ Dt = new WeakMap(), Ze = new WeakMap(), It = new WeakMap(), ct = new WeakMap(),
|
|
|
3467
3470
|
var p;
|
|
3468
3471
|
return o.id === ((p = i.video) == null ? void 0 : p.id);
|
|
3469
3472
|
});
|
|
3470
|
-
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this,
|
|
3473
|
+
s && (s.el.tabIndex = 0, s.el.setAttribute("aria-selected", "true"), c(this, Ct, s.el));
|
|
3471
3474
|
}
|
|
3472
3475
|
}, mr = function(t) {
|
|
3473
3476
|
this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
@@ -3608,7 +3611,7 @@ class Ar extends HTMLElement {
|
|
|
3608
3611
|
this.open && (this.open = !1);
|
|
3609
3612
|
});
|
|
3610
3613
|
const g = this.hasAttribute("touch-enabled");
|
|
3611
|
-
if (!
|
|
3614
|
+
if (!Zr() || !g) {
|
|
3612
3615
|
this.setAttribute("snap", ""), this.addEventListener("scroll", e(this, Gi));
|
|
3613
3616
|
return;
|
|
3614
3617
|
}
|
|
@@ -3659,12 +3662,12 @@ ut = new WeakMap(), Ft = new WeakMap(), oe = new WeakMap(), ei = new WeakMap(),
|
|
|
3659
3662
|
}, Rs = function() {
|
|
3660
3663
|
this.visible = !1, this.dispatchEvent(new CustomEvent(f.UNLOCK_UI, { bubbles: !0, composed: !0 }));
|
|
3661
3664
|
}, m(Ar, "observedAttributes", [n.USER_INTERACTING, "open", "touch-enabled"]);
|
|
3662
|
-
const Ir = document.createElement("template"),
|
|
3665
|
+
const Ir = document.createElement("template"), Po = (
|
|
3663
3666
|
/* SVG */
|
|
3664
3667
|
`
|
|
3665
3668
|
<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>
|
|
3666
3669
|
`
|
|
3667
|
-
),
|
|
3670
|
+
), Mo = (
|
|
3668
3671
|
/* SVG */
|
|
3669
3672
|
`
|
|
3670
3673
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" clip-rule="evenodd" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" /></g></svg>
|
|
@@ -3723,8 +3726,8 @@ Ir.innerHTML = /* HTML */
|
|
|
3723
3726
|
</style>
|
|
3724
3727
|
|
|
3725
3728
|
<slot name="icon">
|
|
3726
|
-
<slot name="play">${
|
|
3727
|
-
<slot name="unmute">${
|
|
3729
|
+
<slot name="play">${Po}</slot>
|
|
3730
|
+
<slot name="unmute">${Mo}</slot>
|
|
3728
3731
|
</slot>
|
|
3729
3732
|
`;
|
|
3730
3733
|
var ae, ii, Ht, si;
|
|
@@ -3797,14 +3800,12 @@ Lr.innerHTML = /* HTML */
|
|
|
3797
3800
|
font-size: 20px;
|
|
3798
3801
|
color: var(--fg-strong);
|
|
3799
3802
|
pointer-events: none;
|
|
3803
|
+
transition: opacity 100ms;
|
|
3804
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
3800
3805
|
}
|
|
3801
3806
|
|
|
3802
3807
|
:host([hidden]) {
|
|
3803
|
-
|
|
3804
|
-
}
|
|
3805
|
-
|
|
3806
|
-
#background {
|
|
3807
|
-
opacity: 0.7;
|
|
3808
|
+
opacity: 0;
|
|
3808
3809
|
}
|
|
3809
3810
|
|
|
3810
3811
|
#message-container {
|
|
@@ -3822,12 +3823,9 @@ Lr.innerHTML = /* HTML */
|
|
|
3822
3823
|
|
|
3823
3824
|
#title,
|
|
3824
3825
|
#description {
|
|
3825
|
-
position: static;
|
|
3826
|
-
width: 100%;
|
|
3827
3826
|
text-align: center;
|
|
3828
3827
|
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
|
|
3829
3828
|
margin: 0;
|
|
3830
|
-
pointer-events: none;
|
|
3831
3829
|
}
|
|
3832
3830
|
|
|
3833
3831
|
#title {
|
|
@@ -3890,7 +3888,7 @@ class Tr extends HTMLElement {
|
|
|
3890
3888
|
}
|
|
3891
3889
|
}
|
|
3892
3890
|
ni = new WeakMap(), ri = new WeakMap(), oi = new WeakMap(), m(Tr, "observedAttributes", ["title", "description", "background-image", "hidden"]);
|
|
3893
|
-
const xr = document.createElement("template"),
|
|
3891
|
+
const xr = document.createElement("template"), Do = (
|
|
3894
3892
|
/* SVG */
|
|
3895
3893
|
`
|
|
3896
3894
|
<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>
|
|
@@ -3946,7 +3944,7 @@ xr.innerHTML = /* HTML */
|
|
|
3946
3944
|
}
|
|
3947
3945
|
</style>
|
|
3948
3946
|
|
|
3949
|
-
<slot id="play" name="icon">${
|
|
3947
|
+
<slot id="play" name="icon">${Do}</slot>
|
|
3950
3948
|
`;
|
|
3951
3949
|
var le;
|
|
3952
3950
|
class Sr extends HTMLElement {
|
|
@@ -3978,7 +3976,7 @@ Nr.innerHTML = /* HTML */
|
|
|
3978
3976
|
}
|
|
3979
3977
|
</style>
|
|
3980
3978
|
`;
|
|
3981
|
-
const
|
|
3979
|
+
const Oo = (d) => `${Math.round(d * 100)}%`;
|
|
3982
3980
|
var ai;
|
|
3983
3981
|
const Ce = class Ce extends Ds {
|
|
3984
3982
|
constructor() {
|
|
@@ -3997,7 +3995,7 @@ const Ce = class Ce extends Ds {
|
|
|
3997
3995
|
super.disconnectedCallback(), this.range.removeEventListener("input", e(this, ai));
|
|
3998
3996
|
}
|
|
3999
3997
|
attributeChangedCallback(t, i, s) {
|
|
4000
|
-
super.attributeChangedCallback(t, i, s), (t === n.MUTED || t === n.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
3998
|
+
super.attributeChangedCallback(t, i, s), (t === n.MUTED || t === n.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Oo(this.range.valueAsNumber)), this.updateBar());
|
|
4001
3999
|
}
|
|
4002
4000
|
get volume() {
|
|
4003
4001
|
var t;
|
|
@@ -4009,9 +4007,9 @@ const Ce = class Ce extends Ds {
|
|
|
4009
4007
|
};
|
|
4010
4008
|
ai = new WeakMap(), m(Ce, "observedAttributes", [...q(Ce, Ce, "observedAttributes"), n.MUTED, n.VOLUME]);
|
|
4011
4009
|
let _s = Ce;
|
|
4012
|
-
function
|
|
4010
|
+
function Bo() {
|
|
4013
4011
|
customElements.define("vindral-controller", Le), customElements.define("vindral-control-bar", In), customElements.define("vindral-play-button", fs), customElements.define("vindral-mute-button", vs), customElements.define("vindral-buffering-overlay", en), customElements.define("vindral-scroll-overlay", Ar), customElements.define("vindral-play-overlay", Sr), customElements.define("vindral-user-input-play-overlay", Cr), customElements.define("vindral-fullscreen-button", hs), customElements.define("vindral-rendition-levels-menu", Is), customElements.define("vindral-rendition-levels-menu-list", ur), customElements.define("vindral-channel-grid-button", Zi), customElements.define("vindral-channel-grid", dn), customElements.define("vindral-channel-grid-item", Ps), customElements.define("vindral-pip-button", gs), customElements.define("vindral-airplay-button", Vi), customElements.define("vindral-cast-button", Ji), customElements.define("vindral-cast-overlay", on), customElements.define("vindral-buffering-icon", Zs), customElements.define("vindral-language-menu", ds), customElements.define("vindral-language-menu-list", jn), customElements.define("vindral-message", Tr), customElements.define("vindral-volume-range", _s), customElements.define("vindral-poster-overlay", lr), customElements.define("vindral-player", rr);
|
|
4014
4012
|
}
|
|
4015
4013
|
export {
|
|
4016
|
-
|
|
4014
|
+
Bo as registerComponents
|
|
4017
4015
|
};
|