@vindral/web-sdk 4.5.0 → 4.5.1-1-g7401e41cc
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/{zRKuZnIT.js → B-XEedn4.js} +758 -712
- package/{C5AsBfiL.js → BRKrFfT9.js} +1 -1
- package/{C02TEUyE.js → Bbln-Kci.js} +981 -966
- package/{D7vM_Gpt.js → C4DIyUFR.js} +2 -2
- package/core.js +1 -1
- package/legacy.es.js +79 -33
- package/legacy.umd.js +12 -11
- package/package.json +1 -1
- package/player.js +3 -3
- package/{C2-H3s2r.js → rVXtcXLn.js} +18 -18
- package/vindral-player-component.js +2 -2
|
@@ -1,139 +1,139 @@
|
|
|
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 "./B-XEedn4.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";
|
|
6
6
|
import { t as pe } from "./FYiEDBC4.js";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { t as
|
|
7
|
+
import { _, a as v, b as me, c as he, d as ge, f as _e, g as y, h as ve, i as b, l as ye, m as be, n as xe, o as Se, p as Ce, r as x, s as S, t as we, u as Te, v as Ee, y as De } from "./C4DIyUFR.js";
|
|
8
|
+
import { t as Oe } from "./BdFcdkj1.js";
|
|
9
9
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
10
|
-
var
|
|
10
|
+
var ke = ({ title: e, subTitle: t = "Live stream", poster: n }) => {
|
|
11
11
|
document.title = e, "mediaSession" in navigator && (navigator.mediaSession.metadata = new MediaMetadata({
|
|
12
12
|
title: e,
|
|
13
13
|
artist: t,
|
|
14
14
|
artwork: n ? [{ src: n }] : []
|
|
15
15
|
}));
|
|
16
|
-
},
|
|
17
|
-
function
|
|
16
|
+
}, Ae = (e) => e === "mse" || e === "webcodecs" || e === "wasm";
|
|
17
|
+
function je(e) {
|
|
18
18
|
if (e === null || e === "auto") return;
|
|
19
|
-
let t = e.split(",").filter(
|
|
19
|
+
let t = e.split(",").filter(Ae);
|
|
20
20
|
return t.length > 0 ? t : void 0;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Me(e) {
|
|
23
23
|
if (e === "no-preference" || e === "prefer-hardware" || e === "prefer-software") return e;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region ../../libs/player-next/src/components/VindralMenuButton.ts
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
var
|
|
27
|
+
var Ne = document.createElement("template");
|
|
28
|
+
Ne.innerHTML = "\n <style>\n :host {\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n";
|
|
29
|
+
var Pe = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakSet(), Be = class extends b {
|
|
30
30
|
constructor() {
|
|
31
31
|
var e;
|
|
32
|
-
super(), g(this,
|
|
32
|
+
super(), g(this, ze), f(this, Pe, void 0), f(this, Fe, void 0), f(this, C, void 0), f(this, Ie, null), f(this, Le, (e) => {
|
|
33
33
|
e.composedPath().includes(this) || this.hide();
|
|
34
|
-
}), f(this,
|
|
34
|
+
}), f(this, Re, () => {
|
|
35
35
|
this.hide();
|
|
36
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
36
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Ne.content.cloneNode(!0));
|
|
37
37
|
}
|
|
38
38
|
connectedCallback() {
|
|
39
39
|
var e, t, n, r;
|
|
40
40
|
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-haspopup", "listbox");
|
|
41
41
|
let i = (e = this.getAttribute("list-position")) == null ? "top" : e;
|
|
42
|
-
(t = m(
|
|
42
|
+
(t = m(Fe, this)) == null || t.setAttribute("list-position", i);
|
|
43
43
|
let a = this.getRootNode(), o = [...(n = (r = this.shadowRoot) == null ? void 0 : r.querySelectorAll(":not(:defined)")) == null ? [] : n].map((e) => customElements.whenDefined(e.localName));
|
|
44
44
|
Promise.all(o).then(() => {
|
|
45
45
|
if (a instanceof Document || a instanceof ShadowRoot) {
|
|
46
46
|
var e;
|
|
47
|
-
h(
|
|
47
|
+
h(Ie, this, a.querySelector("vindral-controller")), (e = m(Ie, this)) == null || e.connectListener(this);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
set button(e) {
|
|
52
|
-
h(
|
|
52
|
+
h(Pe, this, e);
|
|
53
53
|
}
|
|
54
54
|
set listbox(e) {
|
|
55
|
-
h(
|
|
55
|
+
h(Fe, this, e);
|
|
56
56
|
}
|
|
57
57
|
set listboxSlot(e) {
|
|
58
58
|
h(C, this, e);
|
|
59
59
|
}
|
|
60
60
|
enable() {
|
|
61
|
-
super.enable(), this.addEventListener("change", m(
|
|
61
|
+
super.enable(), this.addEventListener("change", m(Re, this)), document.addEventListener("click", m(Le, this));
|
|
62
62
|
}
|
|
63
63
|
hide() {
|
|
64
64
|
var e, t;
|
|
65
|
-
!m(C, this) || (e = m(C, this)) != null && e.hidden || (m(C, this).hidden = !0, (t = m(
|
|
65
|
+
!m(C, this) || (e = m(C, this)) != null && e.hidden || (m(C, this).hidden = !0, (t = m(Pe, this)) == null || t.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(y.UNLOCK_UI, {
|
|
66
66
|
bubbles: !0,
|
|
67
67
|
composed: !0
|
|
68
68
|
})), this.focus());
|
|
69
69
|
}
|
|
70
70
|
handleClick(e) {
|
|
71
|
-
m(C, this) && !e.composedPath().includes(m(C, this)) && p(
|
|
71
|
+
m(C, this) && !e.composedPath().includes(m(C, this)) && p(ze, this, Ve).call(this);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
function
|
|
74
|
+
function Ve() {
|
|
75
75
|
var e;
|
|
76
|
-
(e = m(C, this)) != null && e.hidden ? p(
|
|
76
|
+
(e = m(C, this)) != null && e.hidden ? p(ze, this, He).call(this) : this.hide();
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function He() {
|
|
79
79
|
var e, t, n;
|
|
80
|
-
(e = m(C, this)) != null && e.hidden && (m(C, this).hidden = !1, (t = m(
|
|
80
|
+
(e = m(C, this)) != null && e.hidden && (m(C, this).hidden = !1, (t = m(Pe, this)) == null || t.setAttribute("aria-expanded", "true"), (n = m(Fe, this)) == null || n.focus(), this.dispatchEvent(new CustomEvent(y.LOCK_UI, {
|
|
81
81
|
bubbles: !0,
|
|
82
82
|
composed: !0
|
|
83
83
|
})));
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region ../../libs/player-next/src/components/AdvancedRenditionMenu.ts
|
|
87
|
-
var
|
|
88
|
-
|
|
87
|
+
var Ue, We = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon icon-tabler icon-tabler-settings-filled\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"#2c3e50\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path d=\"M14.647 4.081a.724 .724 0 0 0 1.08 .448c2.439 -1.485 5.23 1.305 3.745 3.744a.724 .724 0 0 0 .447 1.08c2.775 .673 2.775 4.62 0 5.294a.724 .724 0 0 0 -.448 1.08c1.485 2.439 -1.305 5.23 -3.744 3.745a.724 .724 0 0 0 -1.08 .447c-.673 2.775 -4.62 2.775 -5.294 0a.724 .724 0 0 0 -1.08 -.448c-2.439 1.485 -5.23 -1.305 -3.745 -3.744a.724 .724 0 0 0 -.447 -1.08c-2.775 -.673 -2.775 -4.62 0 -5.294a.724 .724 0 0 0 .448 -1.08c-1.485 -2.439 1.305 -5.23 3.744 -3.745a.722 .722 0 0 0 1.08 -.447c.673 -2.775 4.62 -2.775 5.294 0zm-2.647 4.919a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z\" stroke-width=\"0\" fill=\"currentColor\" />\n</svg>\n", Ge = document.createElement("template");
|
|
88
|
+
Ge.innerHTML = `
|
|
89
89
|
<style>
|
|
90
90
|
:host {
|
|
91
91
|
display: var(--rendition-menu-display);
|
|
92
92
|
}
|
|
93
93
|
</style>
|
|
94
94
|
|
|
95
|
-
<slot name="button">${
|
|
95
|
+
<slot name="button">${We}</slot>
|
|
96
96
|
<slot name="listbox" hidden>
|
|
97
97
|
<vindral-advanced-rendition-menu-list id="listbox" part="listbox"></vindral-advanced-rendition-menu-list>
|
|
98
98
|
</slot>
|
|
99
99
|
`;
|
|
100
|
-
var
|
|
100
|
+
var Ke = /* @__PURE__ */ new WeakSet(), qe = class extends Be {
|
|
101
101
|
constructor() {
|
|
102
102
|
var e, t, n, r;
|
|
103
|
-
super(), g(this,
|
|
103
|
+
super(), g(this, Ke), (e = this.shadowRoot) == null || e.appendChild(Ge.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]");
|
|
104
104
|
}
|
|
105
105
|
connectedCallback() {
|
|
106
|
-
super.connectedCallback(), p(
|
|
106
|
+
super.connectedCallback(), p(Ke, this, Je).call(this), this.setAttribute("aria-label", "Advanced rendition controls");
|
|
107
107
|
}
|
|
108
108
|
attributeChangedCallback(e, t, n) {
|
|
109
|
-
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && p(
|
|
109
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && p(Ke, this, Je).call(this);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
-
|
|
113
|
-
function
|
|
112
|
+
Ue = qe;
|
|
113
|
+
function Je() {
|
|
114
114
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
115
115
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
116
116
|
}
|
|
117
|
-
e(
|
|
117
|
+
e(qe, "observedAttributes", [...x(Ue, "observedAttributes", Ue), _.RENDITION_LEVELS]);
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region ../../libs/player-next/src/components/AdvancedRenditionMenuList.ts
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
var
|
|
120
|
+
var Ye = document.createElement("template");
|
|
121
|
+
Ye.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: 220px !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 .mode-toggle {\n display: flex;\n gap: var(--padding-1);\n margin-bottom: var(--padding-2);\n }\n\n .mode-btn {\n flex: 1;\n padding: var(--padding-1) var(--padding-2);\n border: none;\n border-radius: 4px;\n font-size: 11px;\n font-weight: 500;\n cursor: pointer;\n background: var(--bg-component);\n color: var(--fg-default);\n transition: background 0.15s;\n }\n\n .mode-btn:hover {\n background: var(--bg-component-hover);\n }\n\n .mode-btn[data-active=\"true\"] {\n background: var(--accent);\n color: #ffffff;\n }\n\n .setting-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--padding-2);\n margin-bottom: var(--padding-2);\n padding: 0 var(--padding-1);\n }\n\n .setting-label {\n font-size: 10px;\n color: var(--fg-subtle);\n text-transform: uppercase;\n letter-spacing: 0.04em;\n }\n\n .setting-toggle-btn {\n border: none;\n border-radius: 999px;\n background: var(--bg-component);\n color: var(--fg-default);\n font-size: 10px;\n font-weight: 600;\n min-width: 44px;\n padding: 4px 10px;\n cursor: pointer;\n transition: background 0.15s;\n }\n\n .setting-toggle-btn[data-active=\"true\"] {\n background: var(--accent);\n color: #ffffff;\n }\n\n .setting-toggle-btn:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .quality-status-text {\n font-size: 10px;\n color: var(--fg-subtle);\n margin-bottom: var(--padding-2);\n padding: 0 var(--padding-1);\n font-style: italic;\n }\n\n .menu {\n display: grid;\n gap: var(--padding-1);\n }\n\n .menu-item {\n display: flex;\n align-items: center;\n gap: var(--padding-2);\n padding: var(--padding-2);\n border-radius: 4px;\n cursor: pointer;\n font-size: 13px;\n position: relative;\n }\n\n .menu-item:hover {\n background: var(--bg-component-hover);\n }\n\n .menu-item[data-selected=\"true\"] {\n background: var(--bg-component-active);\n border: 1px solid var(--fg-extra-subtle);\n }\n\n .menu-item[data-capped=\"true\"] {\n opacity: 0.5;\n }\n\n .menu-item:focus-visible {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n outline: 0;\n }\n\n .menu-item-info {\n display: flex;\n flex-direction: column;\n gap: 2px;\n }\n\n .menu-item-title {\n font-weight: 500;\n }\n\n .menu-item-subtitle {\n font-size: 10px;\n opacity: 0.6;\n }\n\n .current-label {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n color: var(--accent);\n margin-left: auto;\n display: none;\n }\n\n .menu-item[data-playing=\"true\"] .current-label {\n display: block;\n }\n </style>\n\n <slot>\n <div class=\"mode-toggle\">\n <button class=\"mode-btn\" data-mode=\"auto\">Auto (ABR)</button>\n <button class=\"mode-btn\" data-mode=\"fixed\">Fixed</button>\n </div>\n <div class=\"setting-row\">\n <span class=\"setting-label\">Size cap</span>\n <button id=\"size-cap-toggle\" class=\"setting-toggle-btn\" type=\"button\"></button>\n </div>\n <div class=\"quality-status-text\" id=\"quality-status-text\"></div>\n <div class=\"menu\" role=\"menu\" aria-label=\"Quality options\"></div>\n </slot>\n";
|
|
122
|
+
var Xe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakSet(), at = class extends HTMLElement {
|
|
123
123
|
constructor() {
|
|
124
|
-
super(), g(this,
|
|
124
|
+
super(), g(this, T), f(this, Xe, []), f(this, Ze, 2 ** 53 - 1), f(this, w, !1), f(this, Qe, !0), f(this, $e, null), f(this, et, null), f(this, tt, []), f(this, nt, null), f(this, rt, null), f(this, it, null), e(this, "handleEvent", (e) => {
|
|
125
125
|
switch (e.type) {
|
|
126
126
|
case "keydown":
|
|
127
|
-
p(
|
|
127
|
+
p(T, this, _t).call(this, e);
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
130
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Ye.content.cloneNode(!0));
|
|
131
131
|
}
|
|
132
132
|
connectedCallback() {
|
|
133
133
|
let e = this.getRootNode();
|
|
134
134
|
if (e instanceof ShadowRoot) {
|
|
135
135
|
var t;
|
|
136
|
-
h(nt, this, e.host.closest("vindral-controller")), (t = m(nt, this)) == null || t.connectListener(this), p(
|
|
136
|
+
h(nt, this, e.host.closest("vindral-controller")), (t = m(nt, this)) == null || t.connectListener(this), p(T, this, dt).call(this), p(T, this, ot).call(this), p(T, this, st).call(this), p(T, this, ft).call(this), h(rt, this, e.host), this.addEventListener("keydown", this);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
disconnectedCallback() {
|
|
@@ -141,13 +141,13 @@ var Ye = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ze =
|
|
|
141
141
|
(e = m(nt, this)) == null || e.disconnectListener(this), (t = m(it, this)) == null || t.disconnect(), h(it, this, null), this.removeEventListener("keydown", this);
|
|
142
142
|
}
|
|
143
143
|
attributeChangedCallback(e, t, n) {
|
|
144
|
-
t !== n && (e === _.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === _.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1), e === _.ABR_ENABLED && (h(
|
|
144
|
+
t !== n && (e === _.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === _.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1), e === _.ABR_ENABLED && (h(w, this, S(n, !1)), p(T, this, lt).call(this), p(T, this, mt).call(this)), e === _.RENDITION_LEVEL && n && (h($e, this, JSON.parse(n)), p(T, this, mt).call(this)), e === _.SIZE_BASED_RESOLUTION_CAP_ENABLED && (h(Qe, this, S(n, !0)), p(T, this, ut).call(this)));
|
|
145
145
|
}
|
|
146
146
|
set list(e) {
|
|
147
|
-
h(
|
|
147
|
+
h(Xe, this, e), p(T, this, ft).call(this);
|
|
148
148
|
}
|
|
149
149
|
set maxVideoBitrate(e) {
|
|
150
|
-
h(
|
|
150
|
+
h(Ze, this, e), p(T, this, mt).call(this);
|
|
151
151
|
}
|
|
152
152
|
get keysUsed() {
|
|
153
153
|
return [
|
|
@@ -170,55 +170,55 @@ function ot() {
|
|
|
170
170
|
var e, t;
|
|
171
171
|
let n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("[data-mode=\"auto\"]"), r = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[data-mode=\"fixed\"]");
|
|
172
172
|
n == null || n.addEventListener("click", () => {
|
|
173
|
-
h(
|
|
173
|
+
h(w, this, !0), p(T, this, lt).call(this), p(T, this, mt).call(this), this.dispatchEvent(new CustomEvent(y.SET_ABR_MODE, {
|
|
174
174
|
bubbles: !0,
|
|
175
175
|
composed: !0,
|
|
176
176
|
detail: !0
|
|
177
177
|
}));
|
|
178
178
|
}), r == null || r.addEventListener("click", () => {
|
|
179
|
-
let e = p(
|
|
180
|
-
e && this.dispatchEvent(new CustomEvent(
|
|
179
|
+
let e = p(T, this, ct).call(this);
|
|
180
|
+
e && this.dispatchEvent(new CustomEvent(y.SET_RENDITION, {
|
|
181
181
|
bubbles: !0,
|
|
182
182
|
composed: !0,
|
|
183
183
|
detail: e
|
|
184
|
-
})), h(
|
|
184
|
+
})), h(w, this, !1), p(T, this, lt).call(this), p(T, this, mt).call(this), this.dispatchEvent(new CustomEvent(y.SET_ABR_MODE, {
|
|
185
185
|
bubbles: !0,
|
|
186
186
|
composed: !0,
|
|
187
187
|
detail: !1
|
|
188
188
|
}));
|
|
189
|
-
}), p(
|
|
189
|
+
}), p(T, this, lt).call(this);
|
|
190
190
|
}
|
|
191
191
|
function st() {
|
|
192
192
|
var e;
|
|
193
193
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#size-cap-toggle");
|
|
194
194
|
t == null || t.addEventListener("click", () => {
|
|
195
195
|
let e = !m(Qe, this);
|
|
196
|
-
h(Qe, this, e), p(
|
|
196
|
+
h(Qe, this, e), p(T, this, ut).call(this), this.dispatchEvent(new CustomEvent(y.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
197
197
|
bubbles: !0,
|
|
198
198
|
composed: !0,
|
|
199
199
|
detail: e
|
|
200
200
|
}));
|
|
201
|
-
}), p(
|
|
201
|
+
}), p(T, this, ut).call(this);
|
|
202
202
|
}
|
|
203
203
|
function ct() {
|
|
204
|
-
let e = [...m(
|
|
204
|
+
let e = [...m(Xe, this)].sort((e, t) => {
|
|
205
205
|
var n, r;
|
|
206
206
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
207
207
|
});
|
|
208
208
|
return e.find((e) => {
|
|
209
209
|
var t;
|
|
210
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= m(
|
|
210
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= m(Ze, this);
|
|
211
211
|
}) || e[e.length - 1] || null;
|
|
212
212
|
}
|
|
213
213
|
function lt() {
|
|
214
214
|
var e, t, n;
|
|
215
215
|
let r = (e = this.shadowRoot) == null ? void 0 : e.querySelector("[data-mode=\"auto\"]"), i = (t = this.shadowRoot) == null ? void 0 : t.querySelector("[data-mode=\"fixed\"]"), a = (n = this.shadowRoot) == null ? void 0 : n.querySelector("#quality-status-text");
|
|
216
|
-
r && i && (r.setAttribute("data-active", String(m(
|
|
216
|
+
r && i && (r.setAttribute("data-active", String(m(w, this))), i.setAttribute("data-active", String(!m(w, this)))), a && (a.textContent = m(w, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), p(T, this, ut).call(this);
|
|
217
217
|
}
|
|
218
218
|
function ut() {
|
|
219
219
|
var e;
|
|
220
220
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#size-cap-toggle");
|
|
221
|
-
t && (t.textContent = m(Qe, this) ? "On" : "Off", t.setAttribute("aria-pressed", String(m(Qe, this))), t.setAttribute("data-active", String(m(Qe, this))), t.disabled = !m(
|
|
221
|
+
t && (t.textContent = m(Qe, this) ? "On" : "Off", t.setAttribute("aria-pressed", String(m(Qe, this))), t.setAttribute("data-active", String(m(Qe, this))), t.disabled = !m(w, this), t.title = m(w, this) ? "Toggle size-based resolution cap" : "Only available in Auto (ABR) mode");
|
|
222
222
|
}
|
|
223
223
|
function dt() {
|
|
224
224
|
var e;
|
|
@@ -240,7 +240,7 @@ function dt() {
|
|
|
240
240
|
function ft() {
|
|
241
241
|
var e;
|
|
242
242
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
243
|
-
t && (h(tt, this, []), t.innerHTML = "", m(
|
|
243
|
+
t && (h(tt, this, []), t.innerHTML = "", m(Xe, this).sort((e, t) => {
|
|
244
244
|
var n, r;
|
|
245
245
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
246
246
|
}).forEach((e) => {
|
|
@@ -250,44 +250,44 @@ function ft() {
|
|
|
250
250
|
let te = document.createElement("div");
|
|
251
251
|
te.className = "menu-item-info";
|
|
252
252
|
let ne = document.createElement("span");
|
|
253
|
-
ne.className = "menu-item-title", ne.textContent = e.video ?
|
|
253
|
+
ne.className = "menu-item-title", ne.textContent = e.video ? me(e.video) : "";
|
|
254
254
|
let re = document.createElement("span");
|
|
255
255
|
re.classList.add("menu-item-subtitle");
|
|
256
|
-
let ie = p(
|
|
257
|
-
re.textContent = `${
|
|
256
|
+
let ie = p(T, this, pt).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
257
|
+
re.textContent = `${De(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ie}fps`, te.appendChild(ne), te.appendChild(re), d.appendChild(te);
|
|
258
258
|
let ae = document.createElement("span");
|
|
259
|
-
ae.className = "current-label", ae.textContent = "Current", d.appendChild(ae), d.addEventListener("click", () => p(
|
|
259
|
+
ae.className = "current-label", ae.textContent = "Current", d.appendChild(ae), d.addEventListener("click", () => p(T, this, gt).call(this, e)), m(tt, this).push({
|
|
260
260
|
el: d,
|
|
261
261
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c,
|
|
262
262
|
bitrate: (u = (ee = e.video) == null ? void 0 : ee.bitRate) == null ? 0 : u
|
|
263
263
|
}), t.appendChild(d);
|
|
264
|
-
}), p(
|
|
264
|
+
}), p(T, this, mt).call(this));
|
|
265
265
|
}
|
|
266
266
|
function pt(e) {
|
|
267
267
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
268
268
|
}
|
|
269
269
|
function mt() {
|
|
270
270
|
var e;
|
|
271
|
-
let t = (e = m($e, this)) == null || (e = e.video) == null ? void 0 : e.id, n = p(
|
|
271
|
+
let t = (e = m($e, this)) == null || (e = e.video) == null ? void 0 : e.id, n = p(T, this, ht).call(this), r = n == null ? void 0 : n.id;
|
|
272
272
|
h(et, this, null), m(tt, this).forEach((e) => {
|
|
273
273
|
let n = e.id, i = e.bitrate;
|
|
274
274
|
e.el.setAttribute("data-playing", String(n === t));
|
|
275
275
|
let a = n === r;
|
|
276
|
-
if (e.el.setAttribute("data-selected", String(a)), a ? (e.el.setAttribute("aria-selected", "true"), e.el.tabIndex = 0, h(et, this, e.el)) : (e.el.removeAttribute("aria-selected"), e.el.tabIndex = -1), m(
|
|
277
|
-
let t = i > m(
|
|
276
|
+
if (e.el.setAttribute("data-selected", String(a)), a ? (e.el.setAttribute("aria-selected", "true"), e.el.tabIndex = 0, h(et, this, e.el)) : (e.el.removeAttribute("aria-selected"), e.el.tabIndex = -1), m(w, this)) {
|
|
277
|
+
let t = i > m(Ze, this);
|
|
278
278
|
e.el.setAttribute("data-capped", String(t));
|
|
279
279
|
} else e.el.removeAttribute("data-capped");
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
function ht() {
|
|
283
283
|
let e = [...m(tt, this)].sort((e, t) => t.bitrate - e.bitrate);
|
|
284
|
-
return e.find((e) => e.bitrate <= m(
|
|
284
|
+
return e.find((e) => e.bitrate <= m(Ze, this)) || e[e.length - 1];
|
|
285
285
|
}
|
|
286
286
|
function gt(e) {
|
|
287
287
|
this.dispatchEvent(new Event("change", {
|
|
288
288
|
bubbles: !0,
|
|
289
289
|
composed: !0
|
|
290
|
-
})), this.dispatchEvent(new CustomEvent(
|
|
290
|
+
})), this.dispatchEvent(new CustomEvent(y.SET_RENDITION, {
|
|
291
291
|
bubbles: !0,
|
|
292
292
|
composed: !0,
|
|
293
293
|
detail: e
|
|
@@ -300,17 +300,17 @@ function _t(e) {
|
|
|
300
300
|
(a = m(rt, this)) == null || a.hide();
|
|
301
301
|
} else if (t === "Enter" || t === " ") {
|
|
302
302
|
var o;
|
|
303
|
-
(o = p(
|
|
304
|
-
} else p(
|
|
303
|
+
(o = p(T, this, yt).call(this)) == null || (o = o.el) == null || o.click();
|
|
304
|
+
} else p(T, this, vt).call(this, e);
|
|
305
305
|
}
|
|
306
306
|
function vt(e) {
|
|
307
307
|
var t;
|
|
308
|
-
let { key: n } = e, r = m(tt, this), i = (t = p(
|
|
308
|
+
let { key: n } = e, r = m(tt, this), i = (t = p(T, this, yt).call(this)) == null ? r[0] : t;
|
|
309
309
|
if (!i) return;
|
|
310
310
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
311
311
|
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);
|
|
312
312
|
let s = r[o];
|
|
313
|
-
s && (p(
|
|
313
|
+
s && (p(T, this, bt).call(this, s.id), s.el.focus());
|
|
314
314
|
}
|
|
315
315
|
function yt() {
|
|
316
316
|
return m(tt, this).find((e) => e.el.tabIndex === 0);
|
|
@@ -352,7 +352,7 @@ St.innerHTML = `
|
|
|
352
352
|
<slot name="exit">${Ct}</slot>
|
|
353
353
|
</slot>
|
|
354
354
|
`;
|
|
355
|
-
var wt = /* @__PURE__ */ new WeakSet(), Tt = class extends
|
|
355
|
+
var wt = /* @__PURE__ */ new WeakSet(), Tt = class extends b {
|
|
356
356
|
constructor() {
|
|
357
357
|
var e;
|
|
358
358
|
super(), g(this, wt), (e = this.shadowRoot) == null || e.appendChild(St.content.cloneNode(!0));
|
|
@@ -373,7 +373,7 @@ var wt = /* @__PURE__ */ new WeakSet(), Tt = class extends S {
|
|
|
373
373
|
return this.hasAttribute(_.IS_AIRPLAYING);
|
|
374
374
|
}
|
|
375
375
|
handleClick(e) {
|
|
376
|
-
this.dispatchEvent(new CustomEvent(
|
|
376
|
+
this.dispatchEvent(new CustomEvent(y.REQUEST_AIRPLAY, {
|
|
377
377
|
bubbles: !0,
|
|
378
378
|
composed: !0
|
|
379
379
|
}));
|
|
@@ -384,7 +384,7 @@ function Et() {
|
|
|
384
384
|
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
385
385
|
}
|
|
386
386
|
e(Tt, "observedAttributes", [
|
|
387
|
-
...
|
|
387
|
+
...x(xt, "observedAttributes", xt),
|
|
388
388
|
_.AIRPLAY_AVAILABLE,
|
|
389
389
|
_.IS_AIRPLAYING
|
|
390
390
|
]);
|
|
@@ -558,7 +558,7 @@ Pt.innerHTML = `
|
|
|
558
558
|
}
|
|
559
559
|
</style>
|
|
560
560
|
`;
|
|
561
|
-
var Ft = /* @__PURE__ */ new WeakSet(), It = class extends
|
|
561
|
+
var Ft = /* @__PURE__ */ new WeakSet(), It = class extends b {
|
|
562
562
|
constructor() {
|
|
563
563
|
var e;
|
|
564
564
|
super(), g(this, Ft), (e = this.shadowRoot) == null || e.appendChild(Pt.content.cloneNode(!0));
|
|
@@ -593,7 +593,7 @@ function Rt() {
|
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
e(It, "observedAttributes", [
|
|
596
|
-
...
|
|
596
|
+
...x(Nt, "observedAttributes", Nt),
|
|
597
597
|
_.CAST_AVAILABLE,
|
|
598
598
|
_.IS_CASTING
|
|
599
599
|
]);
|
|
@@ -701,33 +701,33 @@ e(Kt, "observedAttributes", [
|
|
|
701
701
|
//#region ../../libs/player-next/src/components/ChannelGrid.ts
|
|
702
702
|
var qt = document.createElement("template");
|
|
703
703
|
qt.innerHTML = "\n <style>\n :host {\n cursor: default;\n display: flex;\n flex-direction: column;\n box-sizing: border-box !important;\n border-radius: 4px;\n background-color: var(--bg-subtle);\n padding: var(--padding-2) !important;\n\n position: absolute;\n bottom: 0;\n right: 0;\n\n z-index: 5;\n width: 100%;\n max-height: 75%;\n\n @container (width < 768px) {\n padding: var(--padding-1) !important;\n }\n }\n\n :host([hidden]) {\n display: none;\n }\n\n .wrapper {\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n height: 100%;\n }\n\n .wrapper::-webkit-scrollbar {\n display: none;\n }\n\n slot#grid {\n display: grid;\n gap: var(--padding-2);\n grid-template-columns: repeat(4, minmax(0, 1fr));\n\n @container (width < 768px) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--padding-1);\n }\n @container (width < 1024px) and (width >= 768px) {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n @container (width >= 1024px) {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n }\n }\n\n /* Smart TV */\n @media (width < 1024px) and (width >= 768px) and (-webkit-min-device-pixel-ratio: 2) {\n slot#grid {\n grid-template-columns: repeat(4, minmax(0, 1fr)) !important;\n }\n }\n\n :host([mode=\"list\"]) slot#grid {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n </style>\n\n <div class=\"wrapper\">\n <slot name=\"grid\" id=\"grid\"></slot>\n </div>\n";
|
|
704
|
-
var Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(),
|
|
704
|
+
var Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakSet(), nn = class extends HTMLElement {
|
|
705
705
|
constructor() {
|
|
706
|
-
super(), g(this,
|
|
706
|
+
super(), g(this, O), f(this, Jt, null), f(this, Yt, null), f(this, Xt, []), f(this, E, []), f(this, D, void 0), f(this, Zt, void 0), f(this, Qt, void 0), f(this, $t, void 0), f(this, en, void 0), f(this, tn, void 0), e(this, "handleEvent", (e) => {
|
|
707
707
|
switch (e.type) {
|
|
708
708
|
case "keydown":
|
|
709
|
-
p(
|
|
709
|
+
p(O, this, gn).call(this, e);
|
|
710
710
|
break;
|
|
711
711
|
}
|
|
712
712
|
}), this.attachShadow({ mode: "open" }).appendChild(qt.content.cloneNode(!0));
|
|
713
713
|
}
|
|
714
714
|
connectedCallback() {
|
|
715
715
|
var e, t, n;
|
|
716
|
-
h(Yt, this, this.closest("vindral-controller")), (e = m(Yt, this)) == null || e.connectListener(this), p(
|
|
717
|
-
p(
|
|
716
|
+
h(Yt, this, this.closest("vindral-controller")), (e = m(Yt, this)) == null || e.connectListener(this), p(O, this, rn).call(this), (t = m(Jt, this)) == null || t.observe((n = this.shadowRoot) == null ? void 0 : n.querySelector(".wrapper")), p(O, this, un).call(this), h(Qt, this, window.setInterval(() => {
|
|
717
|
+
p(O, this, mn).call(this);
|
|
718
718
|
}, 1e4));
|
|
719
719
|
}
|
|
720
720
|
disconnectedCallback() {
|
|
721
721
|
var e, t;
|
|
722
|
-
clearInterval(m(Qt, this)), p(
|
|
722
|
+
clearInterval(m(Qt, this)), p(O, this, Sn).call(this), this.removeEventListener("keydown", this), (e = m(Jt, this)) == null || e.disconnect(), (t = m(Yt, this)) == null || t.disconnectListener(this);
|
|
723
723
|
}
|
|
724
724
|
attributeChangedCallback(e, t, n) {
|
|
725
725
|
if (t !== n) switch (e) {
|
|
726
726
|
case _.CHANNEL_ID:
|
|
727
|
-
p(
|
|
727
|
+
p(O, this, pn).call(this, n);
|
|
728
728
|
break;
|
|
729
729
|
case _.CHANNELS:
|
|
730
|
-
h(Xt, this, JSON.parse(n)), p(
|
|
730
|
+
h(Xt, this, JSON.parse(n)), p(O, this, un).call(this);
|
|
731
731
|
break;
|
|
732
732
|
case "authentication-token":
|
|
733
733
|
h(Zt, this, n);
|
|
@@ -751,37 +751,37 @@ var Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xt =
|
|
|
751
751
|
focus() {
|
|
752
752
|
var e;
|
|
753
753
|
let t = Ut();
|
|
754
|
-
t && t !== this && !this.contains(t) && h($t, this, t), (e = m(
|
|
754
|
+
t && t !== this && !this.contains(t) && h($t, this, t), (e = m(D, this)) == null || e.focus();
|
|
755
755
|
}
|
|
756
756
|
};
|
|
757
757
|
function rn() {
|
|
758
758
|
h(Jt, this, new IntersectionObserver((e) => {
|
|
759
759
|
e.forEach((e) => {
|
|
760
760
|
let { target: t, isIntersecting: n } = e;
|
|
761
|
-
t instanceof Kt ? p(
|
|
761
|
+
t instanceof Kt ? p(O, this, ln).call(this, t, n) : p(O, this, an).call(this, n);
|
|
762
762
|
});
|
|
763
763
|
}, { root: m(Yt, this) }));
|
|
764
764
|
}
|
|
765
765
|
function an(e) {
|
|
766
|
-
e ? p(
|
|
766
|
+
e ? p(O, this, on).call(this) : p(O, this, sn).call(this);
|
|
767
767
|
}
|
|
768
768
|
function on() {
|
|
769
|
-
this.dispatchEvent(new CustomEvent(
|
|
769
|
+
this.dispatchEvent(new CustomEvent(y.CHANNEL_GRID_OPENED, {
|
|
770
770
|
bubbles: !0,
|
|
771
771
|
composed: !0
|
|
772
|
-
})), p(
|
|
772
|
+
})), p(O, this, cn).call(this), this.addEventListener("keydown", this), m(D, this) && (m(D, this).tabIndex = 0);
|
|
773
773
|
}
|
|
774
774
|
function sn() {
|
|
775
|
-
p(
|
|
775
|
+
p(O, this, Sn).call(this), m(D, this) && (m(D, this).tabIndex = -1), this.dispatchEvent(new CustomEvent(y.CHANNEL_GRID_CLOSED, {
|
|
776
776
|
bubbles: !0,
|
|
777
777
|
composed: !0
|
|
778
|
-
})), p(
|
|
778
|
+
})), p(O, this, yn).call(this), this.removeEventListener("keydown", this);
|
|
779
779
|
}
|
|
780
780
|
function cn() {
|
|
781
781
|
var e;
|
|
782
|
-
p(
|
|
782
|
+
p(O, this, Sn).call(this), h(tn, this, () => {
|
|
783
783
|
clearTimeout(m(en, this)), h(en, this, window.setTimeout(() => {
|
|
784
|
-
p(
|
|
784
|
+
p(O, this, xn).call(this) && this.focus(), p(O, this, Sn).call(this);
|
|
785
785
|
}, 100));
|
|
786
786
|
}), (e = this.parentElement) == null || e.addEventListener("scroll", m(tn, this));
|
|
787
787
|
}
|
|
@@ -790,19 +790,19 @@ function ln(e, t) {
|
|
|
790
790
|
}
|
|
791
791
|
function un() {
|
|
792
792
|
var e;
|
|
793
|
-
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), n = new Map(m(
|
|
794
|
-
h(
|
|
793
|
+
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), n = new Map(m(E, this).map((e) => [e.id, e])), r = this.getAttribute("channel-id");
|
|
794
|
+
h(E, this, m(Xt, this).map((e) => {
|
|
795
795
|
var i;
|
|
796
796
|
let a = n.get(e.channelId);
|
|
797
|
-
if (a) return p(
|
|
798
|
-
let o = p(
|
|
797
|
+
if (a) return p(O, this, dn).call(this, a.element, e), a;
|
|
798
|
+
let o = p(O, this, fn).call(this, e, r);
|
|
799
799
|
return (i = m(Jt, this)) == null || i.observe(o.element), t.contains(o.element) || t.appendChild(o.element), o;
|
|
800
800
|
})), n.forEach((e, t) => {
|
|
801
801
|
if (!m(Xt, this).some((e) => e.channelId === t)) {
|
|
802
802
|
var n;
|
|
803
803
|
(n = m(Jt, this)) == null || n.unobserve(e.element), e.element.remove();
|
|
804
804
|
}
|
|
805
|
-
}), m(
|
|
805
|
+
}), m(E, this).sort((e, t) => e.element.hasAttribute("offline") && !t.element.hasAttribute("offline") ? 1 : -1).forEach((e) => {
|
|
806
806
|
t.contains(e.element) || t.appendChild(e.element);
|
|
807
807
|
});
|
|
808
808
|
}
|
|
@@ -811,67 +811,67 @@ function dn(e, t) {
|
|
|
811
811
|
}
|
|
812
812
|
function fn(e, t) {
|
|
813
813
|
let n = document.createElement("vindral-channel-grid-item");
|
|
814
|
-
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), m(Zt, this) && n.setAttribute("authentication-token", m(Zt, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), h(
|
|
814
|
+
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), m(Zt, this) && n.setAttribute("authentication-token", m(Zt, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), h(D, this, n)), n.tabIndex = -1, n.onclick = () => p(O, this, hn).call(this, e), {
|
|
815
815
|
element: n,
|
|
816
816
|
thumbnail: e.thumbnailUrls[0] || "",
|
|
817
817
|
id: e.channelId
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
820
|
function pn(e) {
|
|
821
|
-
m(
|
|
822
|
-
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, h(
|
|
821
|
+
m(E, this).forEach((t) => {
|
|
822
|
+
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, h(D, this, t.element)) : (t.element.tabIndex = -1, t.element.setAttribute("aria-selected", "false"));
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
825
|
function mn() {
|
|
826
|
-
this.hasAttribute("hidden") || m(
|
|
826
|
+
this.hasAttribute("hidden") || m(E, this).forEach((e) => e.element.updateThumbnail());
|
|
827
827
|
}
|
|
828
828
|
function hn(e) {
|
|
829
829
|
var t;
|
|
830
|
-
p(
|
|
830
|
+
p(O, this, Cn).call(this), (t = m(Yt, this)) == null || t.setAttribute("channel-id", e.channelId);
|
|
831
831
|
}
|
|
832
832
|
function gn(e) {
|
|
833
833
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
834
|
-
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") p(
|
|
834
|
+
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") p(O, this, Cn).call(this);
|
|
835
835
|
else if (t === "Enter" || t === " ") {
|
|
836
836
|
var a;
|
|
837
|
-
(a = m(
|
|
838
|
-
} else p(
|
|
837
|
+
(a = m(D, this)) == null || a.click();
|
|
838
|
+
} else p(O, this, _n).call(this, e);
|
|
839
839
|
}
|
|
840
840
|
function _n(e) {
|
|
841
|
-
if (!m(
|
|
842
|
-
let { key: t } = e, n = m(
|
|
841
|
+
if (!m(D, this)) return;
|
|
842
|
+
let { key: t } = e, n = m(E, this).findIndex((e) => e.element === m(D, this)), r = m(D, this).getBoundingClientRect();
|
|
843
843
|
switch (t) {
|
|
844
844
|
case "ArrowUp":
|
|
845
|
-
if (n = p(
|
|
846
|
-
p(
|
|
845
|
+
if (n = p(O, this, vn).call(this, r, -1, 0), n < 0) {
|
|
846
|
+
p(O, this, Cn).call(this);
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
849
|
break;
|
|
850
850
|
case "ArrowDown":
|
|
851
|
-
n = p(
|
|
851
|
+
n = p(O, this, vn).call(this, r, 1, 0);
|
|
852
852
|
break;
|
|
853
853
|
case "ArrowLeft":
|
|
854
|
-
n = p(
|
|
854
|
+
n = p(O, this, vn).call(this, r, 0, -1);
|
|
855
855
|
break;
|
|
856
856
|
case "ArrowRight":
|
|
857
|
-
n = p(
|
|
857
|
+
n = p(O, this, vn).call(this, r, 0, 1);
|
|
858
858
|
break;
|
|
859
859
|
case "Home":
|
|
860
860
|
n = 0;
|
|
861
861
|
break;
|
|
862
862
|
case "End":
|
|
863
|
-
n = m(
|
|
863
|
+
n = m(E, this).length - 1;
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
866
|
-
if (n >= 0 && n < m(
|
|
867
|
-
let e = m(
|
|
866
|
+
if (n >= 0 && n < m(E, this).length) {
|
|
867
|
+
let e = m(E, this)[n];
|
|
868
868
|
if (!e) return;
|
|
869
|
-
m(
|
|
869
|
+
m(D, this).setAttribute("aria-selected", "false"), m(D, this).tabIndex = -1, h(D, this, e.element), m(D, this).setAttribute("aria-selected", "true"), m(D, this).tabIndex = 0, m(D, this).focus();
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
function vn(e, t, n) {
|
|
873
873
|
let r = -1, i = Infinity;
|
|
874
|
-
return m(
|
|
874
|
+
return m(E, this).filter((e) => e.element.getBoundingClientRect().width > 0).forEach((a, o) => {
|
|
875
875
|
let s = a.element.getBoundingClientRect(), c = t === 0 || t < 0 && s.top < e.top || t > 0 && s.top > e.top, l = n === 0 || n < 0 && s.left < e.left || n > 0 && s.left > e.left;
|
|
876
876
|
if (c && l) {
|
|
877
877
|
let t = Math.sqrt((s.top - e.top) ** 2 + (s.left - e.left) ** 2);
|
|
@@ -892,7 +892,7 @@ function bn(e) {
|
|
|
892
892
|
}
|
|
893
893
|
function xn() {
|
|
894
894
|
let e = this.parentElement;
|
|
895
|
-
return e ? p(
|
|
895
|
+
return e ? p(O, this, bn).call(this, e) ? e.hasAttribute("open") : !this.hasAttribute("hidden") : !1;
|
|
896
896
|
}
|
|
897
897
|
function Sn() {
|
|
898
898
|
if (m(en, this) && (clearTimeout(m(en, this)), h(en, this, void 0)), m(tn, this)) {
|
|
@@ -902,7 +902,7 @@ function Sn() {
|
|
|
902
902
|
}
|
|
903
903
|
function Cn() {
|
|
904
904
|
let e = this.parentElement;
|
|
905
|
-
if (p(
|
|
905
|
+
if (p(O, this, bn).call(this, e)) {
|
|
906
906
|
e.open = !1;
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
@@ -933,60 +933,60 @@ En.innerHTML = `
|
|
|
933
933
|
</style>
|
|
934
934
|
<slot name="button">${Tn}</slot>
|
|
935
935
|
`;
|
|
936
|
-
var Dn = /* @__PURE__ */ new WeakMap(),
|
|
936
|
+
var Dn = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), An = class extends b {
|
|
937
937
|
constructor() {
|
|
938
938
|
var e, t;
|
|
939
|
-
super(), g(this,
|
|
940
|
-
e.composedPath().includes(this) || p(
|
|
939
|
+
super(), g(this, A), f(this, Dn, void 0), f(this, k, void 0), f(this, On, void 0), f(this, kn, (e) => {
|
|
940
|
+
e.composedPath().includes(this) || p(A, this, Nn).call(this);
|
|
941
941
|
}), (e = this.shadowRoot) == null || e.appendChild(En.content.cloneNode(!0)), h(Dn, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"));
|
|
942
942
|
}
|
|
943
943
|
connectedCallback() {
|
|
944
|
-
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), p(
|
|
944
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), p(A, this, Pn).call(this);
|
|
945
945
|
let e = this.getRootNode();
|
|
946
946
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
947
947
|
var t;
|
|
948
|
-
h(
|
|
948
|
+
h(k, this, e.querySelector("vindral-channel-grid")), ((t = m(k, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (m(k, this).hidden = !1, m(k, this).style.position = "relative", h(On, this, m(k, this).parentElement));
|
|
949
949
|
}
|
|
950
|
-
p(
|
|
950
|
+
p(A, this, Fn).call(this);
|
|
951
951
|
}
|
|
952
952
|
disconnectedCallback() {}
|
|
953
953
|
attributeChangedCallback(e, t, n) {
|
|
954
|
-
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && p(
|
|
954
|
+
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && p(A, this, Pn).call(this);
|
|
955
955
|
}
|
|
956
956
|
enable() {
|
|
957
957
|
super.enable(), document.addEventListener("click", m(kn, this));
|
|
958
958
|
}
|
|
959
959
|
handleClick(e) {
|
|
960
|
-
p(
|
|
960
|
+
p(A, this, jn).call(this);
|
|
961
961
|
}
|
|
962
962
|
get isOpen() {
|
|
963
963
|
var e;
|
|
964
|
-
return m(On, this) ? m(On, this).hasAttribute("open") : !((e = m(
|
|
964
|
+
return m(On, this) ? m(On, this).hasAttribute("open") : !((e = m(k, this)) != null && e.hidden);
|
|
965
965
|
}
|
|
966
966
|
};
|
|
967
967
|
wn = An;
|
|
968
968
|
function jn() {
|
|
969
|
-
if (m(On, this)) m(On, this).hasAttribute("open") ? p(
|
|
969
|
+
if (m(On, this)) m(On, this).hasAttribute("open") ? p(A, this, Nn).call(this) : p(A, this, Mn).call(this);
|
|
970
970
|
else {
|
|
971
971
|
var e;
|
|
972
|
-
(e = m(
|
|
972
|
+
(e = m(k, this)) != null && e.hidden ? p(A, this, Mn).call(this) : p(A, this, Nn).call(this);
|
|
973
973
|
}
|
|
974
|
-
p(
|
|
974
|
+
p(A, this, Fn).call(this);
|
|
975
975
|
}
|
|
976
976
|
function Mn() {
|
|
977
977
|
if (m(On, this)) m(On, this).setAttribute("open", "");
|
|
978
978
|
else {
|
|
979
979
|
var e;
|
|
980
|
-
if (!((e = m(
|
|
981
|
-
m(
|
|
980
|
+
if (!((e = m(k, this)) != null && e.hidden)) return;
|
|
981
|
+
m(k, this).hidden = !1, m(k, this).focus();
|
|
982
982
|
}
|
|
983
983
|
m(Dn, this).setAttribute("aria-expanded", "true");
|
|
984
984
|
}
|
|
985
985
|
function Nn() {
|
|
986
986
|
if (m(On, this)) m(On, this).open = !1;
|
|
987
987
|
else {
|
|
988
|
-
if (!m(
|
|
989
|
-
m(
|
|
988
|
+
if (!m(k, this) || m(k, this).hidden) return;
|
|
989
|
+
m(k, this).hidden = !0;
|
|
990
990
|
}
|
|
991
991
|
m(Dn, this).setAttribute("aria-expanded", "false");
|
|
992
992
|
}
|
|
@@ -997,7 +997,7 @@ function Fn() {
|
|
|
997
997
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
998
998
|
}
|
|
999
999
|
e(An, "observedAttributes", [
|
|
1000
|
-
...
|
|
1000
|
+
...x(wn, "observedAttributes", wn),
|
|
1001
1001
|
_.CHANNEL_GROUP_ID,
|
|
1002
1002
|
_.CHANNELS,
|
|
1003
1003
|
"hidden"
|
|
@@ -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,
|
|
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(), j = /* @__PURE__ */ new WeakSet(), yr = class {
|
|
1211
|
+
constructor({ onChange: e, probe: t = sr, now: n = () => performance.now() }) {
|
|
1212
|
+
g(this, j), 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(
|
|
1213
|
-
m(
|
|
1215
|
+
if (p(j, 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(j, this, xr).call(this), m(pr, this) && p(j, 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(j, this, Cr).call(this), p(j, this, xr).call(this));
|
|
1231
1234
|
}
|
|
1232
1235
|
applyLoadedDuration(e) {
|
|
1233
|
-
p(
|
|
1236
|
+
p(j, this, br).call(this), m(lr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1234
1237
|
}
|
|
1235
1238
|
stop() {
|
|
1236
|
-
p(
|
|
1239
|
+
p(j, 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(j, 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(j, this, Cr).call(this);
|
|
1250
1250
|
}
|
|
1251
1251
|
function Sr() {
|
|
1252
|
-
m(
|
|
1252
|
+
m(vr, this) === null && h(vr, this, window.setInterval(() => p(j, 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
|
-
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) =>
|
|
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) => Ee.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,121 +1361,121 @@ 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
|
-
},
|
|
1364
|
+
}, M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__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(), F = /* @__PURE__ */ new WeakMap(), I = /* @__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,
|
|
1364
|
-
m(
|
|
1365
|
-
}), f(this,
|
|
1366
|
-
m(
|
|
1367
|
-
}), h(
|
|
1366
|
+
g(this, I), f(this, M, void 0), f(this, N, void 0), f(this, P, 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, F, re.get().createContext("HlsPlayer")), f(this, Wr, () => p(I, this, si).call(this, !0)), f(this, Gr, () => p(I, this, si).call(this, !1)), f(this, Kr, () => {
|
|
1367
|
+
m(M, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(M, this).paused && p(I, this, si).call(this, !1);
|
|
1368
|
+
}), f(this, qr, () => {
|
|
1369
|
+
m(M, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(I, this, si).call(this, !1);
|
|
1370
|
+
}), h(N, this, t), h(Rr, this, n == null ? void 0 : n.maxVideoBitRate), m(N, this).style.position = "absolute", m(N, this).style.top = "0", m(N, this).style.left = "0", m(N, this).style.width = "100%", m(N, this).style.height = "100%", m(N, this).style.opacity = "0", m(N, this).style.pointerEvents = "none", m(N, this).style.transition = "opacity 0.12s linear";
|
|
1368
1371
|
let r = document.createElement("video");
|
|
1369
|
-
h(
|
|
1372
|
+
h(M, this, r), t.appendChild(m(M, this)), m(M, this).style.width = "100%", m(M, this).style.height = "100%", m(M, this).setAttribute("playsinline", ""), m(M, this).setAttribute("webkit-playsinline", ""), m(M, this).setAttribute("preload", "metadata"), p(I, this, ai).call(this), h(Ur, this, m(M, 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(N, this).classList.remove("active"), m(N, this).style.opacity = "0", m(N, this).style.pointerEvents = "none", h(Vr, this, null);
|
|
1373
1376
|
}
|
|
1374
1377
|
play() {
|
|
1375
1378
|
var e = this;
|
|
1376
1379
|
return t(function* () {
|
|
1377
1380
|
try {
|
|
1378
|
-
return m(
|
|
1381
|
+
return m(P, e) ? (e.userPaused = !1, yield m(M, e).play()) : Promise.reject("HLS not initialized");
|
|
1379
1382
|
} catch (t) {
|
|
1380
|
-
m(
|
|
1383
|
+
m(F, e).error("Failed to play timeshift video:", t);
|
|
1381
1384
|
}
|
|
1382
1385
|
})();
|
|
1383
1386
|
}
|
|
1384
1387
|
seek(e) {
|
|
1385
1388
|
var n = this;
|
|
1386
1389
|
return t(function* () {
|
|
1387
|
-
if (m(
|
|
1388
|
-
h(
|
|
1390
|
+
if (m(F, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1391
|
+
h(Vr, n, null);
|
|
1389
1392
|
return;
|
|
1390
1393
|
}
|
|
1391
|
-
if (h(
|
|
1392
|
-
else return p(
|
|
1394
|
+
if (h(Vr, n, e.time > .1 ? e.time : null), n.isActive() && m(P, n)) p(I, n, $r).call(n, e.time);
|
|
1395
|
+
else return p(I, n, ei).call(n, e);
|
|
1393
1396
|
})();
|
|
1394
1397
|
}
|
|
1395
1398
|
shouldIgnoreTimeupdate() {
|
|
1396
|
-
if (m(
|
|
1397
|
-
let e = m(
|
|
1398
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (h(
|
|
1399
|
+
if (m(Vr, this) == null) return !1;
|
|
1400
|
+
let e = m(M, this).currentTime;
|
|
1401
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (h(Vr, this, null), !1);
|
|
1399
1402
|
}
|
|
1400
1403
|
isPipSupported() {
|
|
1401
|
-
return "pictureInPictureEnabled" in document && !m(
|
|
1404
|
+
return "pictureInPictureEnabled" in document && !m(M, this).disablePictureInPicture;
|
|
1402
1405
|
}
|
|
1403
1406
|
requestPictureInPicture() {
|
|
1404
|
-
return m(
|
|
1407
|
+
return m(M, this).requestPictureInPicture();
|
|
1405
1408
|
}
|
|
1406
1409
|
exitPictureInPicture() {
|
|
1407
|
-
return document.pictureInPictureElement === m(
|
|
1410
|
+
return document.pictureInPictureElement === m(M, this) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1408
1411
|
}
|
|
1409
1412
|
isActive() {
|
|
1410
|
-
return m(
|
|
1413
|
+
return m(N, this).style.opacity === "1" || m(N, this).classList.contains("active");
|
|
1411
1414
|
}
|
|
1412
1415
|
cleanup() {
|
|
1413
|
-
p(
|
|
1416
|
+
p(I, this, oi).call(this), p(I, this, Qr).call(this), m(Lr, this) && (cancelAnimationFrame(m(Lr, this)), h(Lr, this, void 0)), h(Vr, this, null), m(M, this).remove();
|
|
1414
1417
|
}
|
|
1415
1418
|
addEventListener(e, t) {
|
|
1416
|
-
m(
|
|
1419
|
+
m(M, this).addEventListener(e, t);
|
|
1417
1420
|
}
|
|
1418
1421
|
removeEventListener(e, t) {
|
|
1419
|
-
m(
|
|
1422
|
+
m(M, this).removeEventListener(e, t);
|
|
1420
1423
|
}
|
|
1421
1424
|
dispatchEvent(e) {
|
|
1422
|
-
return m(
|
|
1425
|
+
return m(M, this).dispatchEvent(e);
|
|
1423
1426
|
}
|
|
1424
1427
|
setTimeshiftUrl(e) {
|
|
1425
|
-
m(
|
|
1428
|
+
m(Ir, this) !== e && (m(F, this).debug("HLSPlayer Setting timeshift URL to", e), h(Ir, this, e));
|
|
1426
1429
|
}
|
|
1427
1430
|
get videoElement() {
|
|
1428
|
-
return m(
|
|
1431
|
+
return m(M, this);
|
|
1429
1432
|
}
|
|
1430
1433
|
pause() {
|
|
1431
|
-
this.userPaused = !0, m(
|
|
1434
|
+
this.userPaused = !0, m(M, this).pause();
|
|
1432
1435
|
}
|
|
1433
1436
|
get paused() {
|
|
1434
|
-
return m(
|
|
1437
|
+
return m(M, this).paused;
|
|
1435
1438
|
}
|
|
1436
1439
|
set volume(e) {
|
|
1437
|
-
m(
|
|
1440
|
+
m(M, this).volume = e;
|
|
1438
1441
|
}
|
|
1439
1442
|
get volume() {
|
|
1440
|
-
return m(
|
|
1443
|
+
return m(M, this).volume;
|
|
1441
1444
|
}
|
|
1442
1445
|
set muted(e) {
|
|
1443
|
-
h(
|
|
1446
|
+
h(Ur, this, e), m(M, 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
|
-
m(
|
|
1452
|
+
m(M, this).currentTime = e;
|
|
1450
1453
|
}
|
|
1451
1454
|
get currentTime() {
|
|
1452
|
-
return m(
|
|
1455
|
+
return m(M, this).currentTime;
|
|
1453
1456
|
}
|
|
1454
1457
|
get seeking() {
|
|
1455
|
-
return m(
|
|
1458
|
+
return m(M, this).seeking;
|
|
1456
1459
|
}
|
|
1457
1460
|
get duration() {
|
|
1458
|
-
return m(
|
|
1461
|
+
return m(M, 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(P, this) && p(I, 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(
|
|
1472
|
-
m(
|
|
1474
|
+
if (h(Fr, e, t), !t.isSupported()) {
|
|
1475
|
+
m(F, e).warn("HLS not supported");
|
|
1473
1476
|
return;
|
|
1474
1477
|
}
|
|
1475
|
-
h(
|
|
1478
|
+
h(P, e, new t({
|
|
1476
1479
|
capLevelToPlayerSize: !0,
|
|
1477
1480
|
enableWorker: !0,
|
|
1478
1481
|
backBufferLength: 30,
|
|
@@ -1491,114 +1494,114 @@ function Jr() {
|
|
|
1491
1494
|
startFragPrefetch: !0,
|
|
1492
1495
|
testBandwidth: !1,
|
|
1493
1496
|
debug: !1
|
|
1494
|
-
})), m(
|
|
1495
|
-
m(
|
|
1496
|
-
}), m(
|
|
1497
|
+
})), m(P, e).attachMedia(m(M, e)), m(P, e).on(t.Events.MEDIA_ATTACHED, () => m(F, e).debug("[HLS] media attached")), m(P, e).on(t.Events.MANIFEST_PARSED, () => m(F, e).debug("[HLS] manifest parsed")), m(P, e).on(t.Events.ERROR, (t, n) => {
|
|
1498
|
+
m(F, e).error("[HLS] error:", n), n.fatal && p(I, e, Zr).call(e, n);
|
|
1499
|
+
}), m(P, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1497
1500
|
var t;
|
|
1498
|
-
!m(
|
|
1499
|
-
}), m(
|
|
1501
|
+
!m(Rr, e) || ((t = m(P, e)) == null ? void 0 : t.levels.length) === 0 || p(I, e, Xr).call(e, m(Rr, e));
|
|
1502
|
+
}), m(P, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1500
1503
|
var t, n;
|
|
1501
|
-
m(
|
|
1504
|
+
m(F, e).debug("Level switched:", (t = m(P, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = m(P, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1502
1505
|
});
|
|
1503
1506
|
})();
|
|
1504
1507
|
}
|
|
1505
|
-
function
|
|
1506
|
-
if (!m(
|
|
1507
|
-
m(
|
|
1508
|
+
function Xr(e) {
|
|
1509
|
+
if (!m(P, this)) {
|
|
1510
|
+
m(F, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1508
1511
|
return;
|
|
1509
1512
|
}
|
|
1510
|
-
let t = m(
|
|
1513
|
+
let t = m(P, this).levels.map((e, t) => ({
|
|
1511
1514
|
i: t,
|
|
1512
1515
|
bitrate: e.bitrate
|
|
1513
1516
|
})).filter((t) => e >= t.bitrate * .8).map((e) => e.i).pop();
|
|
1514
1517
|
if (t === void 0) {
|
|
1515
1518
|
var n;
|
|
1516
|
-
t = 0, m(
|
|
1519
|
+
t = 0, m(F, this).debug("No level fits under bitrate cap: " + e + ", defaulting to lowest level: " + ((n = m(P, this).levels[0]) == null ? void 0 : n.bitrate));
|
|
1517
1520
|
}
|
|
1518
|
-
let r = m(
|
|
1519
|
-
m(
|
|
1521
|
+
let r = m(P, this).currentLevel;
|
|
1522
|
+
m(P, this).autoLevelCapping = t, r !== t && (m(F, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), m(P, this).currentLevel = t);
|
|
1520
1523
|
}
|
|
1521
|
-
function
|
|
1522
|
-
if (!m(
|
|
1523
|
-
m(
|
|
1524
|
+
function Zr(e) {
|
|
1525
|
+
if (!m(Fr, this)) {
|
|
1526
|
+
m(F, 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;
|
|
1530
|
-
m(
|
|
1533
|
+
m(F, this).warn("[HLS] network error -> startLoad"), (n = m(P, this)) == null || n.startLoad();
|
|
1531
1534
|
break;
|
|
1532
1535
|
case t.ErrorTypes.MEDIA_ERROR:
|
|
1533
1536
|
var r;
|
|
1534
|
-
m(
|
|
1537
|
+
m(F, this).warn("[HLS] media error -> recoverMediaError"), (r = m(P, this)) == null || r.recoverMediaError();
|
|
1535
1538
|
break;
|
|
1536
1539
|
default:
|
|
1537
|
-
m(
|
|
1540
|
+
m(F, this).error("[HLS] fatal -> destroy"), p(I, this, Qr).call(this);
|
|
1538
1541
|
break;
|
|
1539
1542
|
}
|
|
1540
1543
|
}
|
|
1541
|
-
function
|
|
1542
|
-
m(
|
|
1544
|
+
function Qr() {
|
|
1545
|
+
m(P, this) && (m(P, this).destroy(), h(P, 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(
|
|
1550
|
-
h(
|
|
1551
|
-
m(
|
|
1552
|
+
let t = p(I, this, ii).call(this, m(M, this), e);
|
|
1553
|
+
h(Vr, this, t > .1 ? t : null), m(Lr, this) && cancelAnimationFrame(m(Lr, this)), h(Lr, this, requestAnimationFrame(() => {
|
|
1554
|
+
m(M, 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(
|
|
1560
|
-
m(
|
|
1561
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(Hr, n, (t = m(Hr, n), ++t));
|
|
1562
|
+
if (!m(Ir, n)) {
|
|
1563
|
+
m(F, n).warn("No timeshift URL");
|
|
1561
1564
|
return;
|
|
1562
1565
|
}
|
|
1563
|
-
if (!m(
|
|
1564
|
-
h(
|
|
1566
|
+
if (!m(P, n) && (yield p(I, n, Yr).call(n), !p(I, n, ci).call(n, a))) return;
|
|
1567
|
+
h(zr, n, !1), h(Br, n, !1), m(P, n) && (!m(P, n).url || m(P, n).url !== m(Ir, n)) && (m(F, n).debug("Loading timeshift URL", m(Ir, n)), m(P, n).loadSource(m(Ir, n)));
|
|
1565
1568
|
let o = n.muted;
|
|
1566
|
-
m(
|
|
1569
|
+
m(M, n).muted = !0, yield p(I, n, ti).call(n), p(I, n, ci).call(n, a) && (p(I, n, $r).call(n, r), !(i && (yield n.play(), !p(I, n, ci).call(n, a))) && p(I, n, ni).call(n, o, a));
|
|
1567
1570
|
})();
|
|
1568
1571
|
}
|
|
1569
|
-
function
|
|
1570
|
-
return m(
|
|
1571
|
-
m(
|
|
1572
|
+
function ti() {
|
|
1573
|
+
return m(M, this).duration && !Number.isNaN(m(M, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1574
|
+
m(F, this).debug("Waiting for duration...");
|
|
1572
1575
|
let t = () => {
|
|
1573
|
-
m(
|
|
1576
|
+
m(F, this).debug("Duration loaded:", m(M, this).duration), m(M, this).removeEventListener("loadedmetadata", t), clearTimeout(n), e();
|
|
1574
1577
|
}, n = setTimeout(() => {
|
|
1575
|
-
m(
|
|
1578
|
+
m(F, this).debug("Duration timeout, proceeding anyway"), m(M, this).removeEventListener("loadedmetadata", t), e();
|
|
1576
1579
|
}, 2e4);
|
|
1577
|
-
m(
|
|
1580
|
+
m(M, this).addEventListener("loadedmetadata", t);
|
|
1578
1581
|
});
|
|
1579
1582
|
}
|
|
1580
|
-
function
|
|
1581
|
-
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(
|
|
1582
|
-
m(
|
|
1583
|
+
function ni(e, t) {
|
|
1584
|
+
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(M, this).readyState >= n && m(M, this).videoWidth > 0 && m(M, this).videoHeight > 0, i = () => {
|
|
1585
|
+
m(zr, this) || m(Br, this) || !p(I, this, ci).call(this, t) || (h(Br, this, !0), m(F, this).debug("Revealing timeshift video"), m(N, this).classList.add("active"), m(N, this).style.opacity = "1", m(N, this).style.pointerEvents = "auto", m(M, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || p(I, this, ri).call(this, t));
|
|
1583
1586
|
}, a = () => {
|
|
1584
|
-
m(
|
|
1587
|
+
m(zr, this) || m(Br, this) || !p(I, this, ci).call(this, t) || r() && (s(), i());
|
|
1585
1588
|
}, o = !1, s = () => {
|
|
1586
|
-
o || (o = !0, m(
|
|
1589
|
+
o || (o = !0, m(M, this).removeEventListener("canplay", a), m(M, this).removeEventListener("canplaythrough", a), m(M, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1587
1590
|
};
|
|
1588
1591
|
if (r()) {
|
|
1589
1592
|
i();
|
|
1590
1593
|
return;
|
|
1591
1594
|
}
|
|
1592
|
-
m(
|
|
1595
|
+
m(M, this).addEventListener("canplay", a), m(M, this).addEventListener("canplaythrough", a), m(M, this).addEventListener("loadeddata", a);
|
|
1593
1596
|
let c = setTimeout(() => {
|
|
1594
|
-
m(
|
|
1597
|
+
m(F, 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(
|
|
1602
|
+
p(I, this, ci).call(this, e) && (m(M, this).muted = !1);
|
|
1600
1603
|
};
|
|
1601
|
-
"requestVideoFrameCallback" in m(
|
|
1604
|
+
"requestVideoFrameCallback" in m(M, this) ? m(M, this).requestVideoFrameCallback(() => {
|
|
1602
1605
|
setTimeout(() => {
|
|
1603
1606
|
t();
|
|
1604
1607
|
}, 100);
|
|
@@ -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
|
-
return m(
|
|
1614
|
-
}
|
|
1615
|
-
function ii() {
|
|
1616
|
-
for (let e of ci._) m(j, this).addEventListener(e, m(Ur, this));
|
|
1617
|
-
for (let e of li._) m(j, this).addEventListener(e, m(Wr, this));
|
|
1618
|
-
m(j, this).addEventListener("timeupdate", m(Gr, this)), m(j, this).addEventListener("progress", m(Kr, this));
|
|
1616
|
+
return m(F, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1619
1617
|
}
|
|
1620
1618
|
function ai() {
|
|
1621
|
-
for (let e of
|
|
1622
|
-
for (let e of
|
|
1623
|
-
m(
|
|
1619
|
+
for (let e of li._) m(M, this).addEventListener(e, m(Wr, this));
|
|
1620
|
+
for (let e of ui._) m(M, this).addEventListener(e, m(Gr, this));
|
|
1621
|
+
m(M, this).addEventListener("timeupdate", m(Kr, this)), m(M, this).addEventListener("progress", m(qr, this));
|
|
1622
|
+
}
|
|
1623
|
+
function oi() {
|
|
1624
|
+
for (let e of li._) m(M, this).removeEventListener(e, m(Wr, this));
|
|
1625
|
+
for (let e of ui._) m(M, this).removeEventListener(e, m(Gr, this));
|
|
1626
|
+
m(M, this).removeEventListener("timeupdate", m(Kr, this)), m(M, this).removeEventListener("progress", m(qr, this));
|
|
1624
1627
|
}
|
|
1625
|
-
function
|
|
1626
|
-
let t = e && (m(
|
|
1627
|
-
m(
|
|
1628
|
+
function si(e) {
|
|
1629
|
+
let t = e && (m(M, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || m(M, this).seeking || m(M, this).paused && !this.userPaused);
|
|
1630
|
+
m(M, 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,440 +1928,440 @@ 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(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), U = /* @__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,
|
|
1934
|
+
super(), g(this, U), f(this, vi, /* @__PURE__ */ new Map()), f(this, yi, 2e3), f(this, bi, null), f(this, xi, new yr({ onChange: (e) => p(U, this, W).call(this, _.DURATION, e.toString()) })), f(this, Si, null), f(this, Ci, void 0), f(this, L, void 0), f(this, R, void 0), f(this, wi, void 0), f(this, z, void 0), f(this, Ti, xe), f(this, Ei, void 0), f(this, Di, void 0), f(this, Oi, void 0), f(this, ki, void 0), f(this, B, void 0), f(this, Ai, void 0), f(this, ji, void 0), f(this, Mi, void 0), f(this, V, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, Fi, void 0), f(this, H, 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
|
-
p(
|
|
1927
|
-
}), f(this, Bi, (e) => {
|
|
1928
|
-
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1939
|
+
p(U, this, W).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1929
1940
|
}), f(this, Vi, (e) => {
|
|
1941
|
+
p(U, this, W).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1942
|
+
}), f(this, Hi, (e) => {
|
|
1930
1943
|
switch (e) {
|
|
1931
1944
|
case "playing":
|
|
1932
|
-
p(
|
|
1945
|
+
p(U, this, G).call(this, _.PAUSED), p(U, this, G).call(this, _.BUFFERING);
|
|
1933
1946
|
break;
|
|
1934
1947
|
case "paused":
|
|
1935
|
-
p(
|
|
1948
|
+
p(U, this, W).call(this, _.PAUSED, ""), p(U, this, G).call(this, _.BUFFERING);
|
|
1936
1949
|
break;
|
|
1937
1950
|
case "buffering":
|
|
1938
|
-
p(
|
|
1951
|
+
p(U, this, G).call(this, _.PAUSED), p(U, this, W).call(this, _.BUFFERING, "");
|
|
1939
1952
|
break;
|
|
1940
1953
|
default: break;
|
|
1941
1954
|
}
|
|
1942
|
-
}), f(this,
|
|
1943
|
-
p(
|
|
1944
|
-
}), f(this, Ui, ({ channelId: e }) => {
|
|
1945
|
-
var t;
|
|
1946
|
-
this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1955
|
+
}), f(this, Ui, (e) => {
|
|
1956
|
+
p(U, this, W).call(this, _.VOLUME, e.volume.toString()), e.isMuted ? p(U, this, W).call(this, _.MUTED, "") : p(U, this, G).call(this, _.MUTED);
|
|
1947
1957
|
}), f(this, Wi, ({ channelId: e }) => {
|
|
1948
1958
|
var t;
|
|
1949
|
-
|
|
1950
|
-
}), f(this, Gi, (e) => {
|
|
1951
|
-
h(pa, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1952
|
-
}), f(this, Ki, (e) => {
|
|
1959
|
+
this.setAttribute(_.CHANNEL_ID, e), ((t = m(L, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(U, this, G).call(this, _.BUFFERING);
|
|
1960
|
+
}), f(this, Gi, ({ channelId: e }) => {
|
|
1953
1961
|
var t;
|
|
1954
|
-
|
|
1962
|
+
m(Ei, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = m(L, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(U, this, G).call(this, _.BUFFERING);
|
|
1963
|
+
}), f(this, Ki, (e) => {
|
|
1964
|
+
h(ma, this, Date.now()), p(U, this, W).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1955
1965
|
}), f(this, qi, (e) => {
|
|
1956
1966
|
var t;
|
|
1957
|
-
|
|
1967
|
+
p(U, this, W).call(this, _.LANGUAGES, JSON.stringify(e)), (t = m(L, this)) != null && t.language && p(U, this, W).call(this, _.LANGUAGE, m(L, this).language);
|
|
1968
|
+
}), f(this, Ji, (e) => {
|
|
1969
|
+
var t;
|
|
1970
|
+
if (p(U, this, W).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = m(L, this)) != null && t.textTrack) {
|
|
1958
1971
|
var n, r;
|
|
1959
|
-
p(
|
|
1972
|
+
p(U, this, W).call(this, _.TEXT_TRACK, (n = (r = m(L, 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(U, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), p(U, this, G).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (p(U, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), p(U, this, G).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
1965
1976
|
}), f(this, Xi, (e) => {
|
|
1977
|
+
e || p(U, this, G).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
|
-
if (!r[0] || !m(
|
|
1981
|
+
if (!r[0] || !m(z, 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
|
-
m(
|
|
1988
|
+
m(H, this).error(`Invalid duration format: ${i}`);
|
|
1976
1989
|
return;
|
|
1977
1990
|
}
|
|
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(
|
|
1994
|
+
m(z, 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(
|
|
2004
|
+
p(U, this, G).call(this, _.PAUSED), p(U, this, G).call(this, _.BUFFERING);
|
|
1994
2005
|
}), f(this, $i, () => {
|
|
1995
|
-
|
|
2006
|
+
p(U, this, W).call(this, _.PAUSED, ""), p(U, this, G).call(this, _.BUFFERING);
|
|
1996
2007
|
}), f(this, ea, () => {
|
|
1997
|
-
m(
|
|
2008
|
+
m(da, this).call(this), p(U, this, G).call(this, _.BUFFERING);
|
|
1998
2009
|
}), f(this, ta, () => {
|
|
1999
|
-
|
|
2000
|
-
if (!m(R, this) || m(R, this).seeking || (e = (t = m(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2001
|
-
let n = m(R, this).currentTime;
|
|
2002
|
-
n !== void 0 && p(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2010
|
+
m(z, this) && m(xi, this).applyLoadedDuration(m(z, this).duration);
|
|
2003
2011
|
}), f(this, na, () => {
|
|
2004
|
-
|
|
2012
|
+
var e, t;
|
|
2013
|
+
if (!m(z, this) || m(z, this).seeking || (e = (t = m(z, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2014
|
+
let n = m(z, this).currentTime;
|
|
2015
|
+
n !== void 0 && p(U, this, W).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2005
2016
|
}), f(this, ra, () => {
|
|
2006
|
-
p(
|
|
2017
|
+
m(z, this) && (p(U, this, W).call(this, _.VOLUME, m(z, this).volume.toString()), m(z, this).muted ? p(U, this, W).call(this, _.MUTED, "") : p(U, this, G).call(this, _.MUTED));
|
|
2007
2018
|
}), f(this, ia, () => {
|
|
2008
|
-
p(
|
|
2019
|
+
p(U, this, W).call(this, _.BUFFERING, "");
|
|
2009
2020
|
}), f(this, aa, () => {
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2021
|
+
p(U, this, G).call(this, _.BUFFERING);
|
|
2022
|
+
}), f(this, oa, () => {
|
|
2023
|
+
if (m(Li, this)) {
|
|
2024
|
+
if (m(R, this) !== m(z, this)) {
|
|
2025
|
+
h(Li, this, !1);
|
|
2013
2026
|
return;
|
|
2014
2027
|
}
|
|
2015
|
-
h(
|
|
2028
|
+
h(Li, this, !1), p(U, 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(
|
|
2036
|
+
p(U, this, Ra).call(this, e);
|
|
2024
2037
|
break;
|
|
2025
2038
|
case "pointerup":
|
|
2026
|
-
p(
|
|
2039
|
+
p(U, this, za).call(this, e);
|
|
2027
2040
|
break;
|
|
2028
2041
|
case "mouseleave":
|
|
2029
|
-
p(
|
|
2042
|
+
p(U, this, qa).call(this);
|
|
2030
2043
|
break;
|
|
2031
2044
|
case "dblclick":
|
|
2032
|
-
p(
|
|
2045
|
+
p(U, this, Va).call(this, e);
|
|
2033
2046
|
break;
|
|
2034
2047
|
case "mousemove":
|
|
2035
|
-
p(
|
|
2048
|
+
p(U, 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(
|
|
2054
|
+
p(U, this, qa).call(this), m(la, this).call(this, e);
|
|
2042
2055
|
break;
|
|
2043
2056
|
}
|
|
2044
|
-
}), f(this,
|
|
2045
|
-
if (m(
|
|
2046
|
-
case
|
|
2057
|
+
}), f(this, ca, (e) => {
|
|
2058
|
+
if (m(L, this) && (m(H, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2059
|
+
case y.PLAY:
|
|
2047
2060
|
this.removeAttribute(_.PAUSED);
|
|
2048
2061
|
break;
|
|
2049
|
-
case
|
|
2062
|
+
case y.PAUSE:
|
|
2050
2063
|
this.setAttribute(_.PAUSED, "");
|
|
2051
2064
|
break;
|
|
2052
|
-
case
|
|
2065
|
+
case y.MUTE:
|
|
2053
2066
|
this.setAttribute(_.MUTED, "");
|
|
2054
2067
|
break;
|
|
2055
|
-
case
|
|
2068
|
+
case y.UNMUTE:
|
|
2056
2069
|
this.removeAttribute(_.MUTED);
|
|
2057
2070
|
break;
|
|
2058
|
-
case
|
|
2071
|
+
case y.LOCK_UI:
|
|
2059
2072
|
this.setAttribute(_.UI_LOCKED, "");
|
|
2060
2073
|
break;
|
|
2061
|
-
case
|
|
2074
|
+
case y.UNLOCK_UI:
|
|
2062
2075
|
this.removeAttribute(_.UI_LOCKED);
|
|
2063
2076
|
break;
|
|
2064
|
-
case
|
|
2077
|
+
case y.ENTER_FULLSCREEN:
|
|
2065
2078
|
this.setAttribute(_.FULLSCREEN, "");
|
|
2066
2079
|
break;
|
|
2067
|
-
case
|
|
2080
|
+
case y.EXIT_FULLSCREEN:
|
|
2068
2081
|
this.removeAttribute(_.FULLSCREEN);
|
|
2069
2082
|
break;
|
|
2070
|
-
case
|
|
2083
|
+
case y.SET_RENDITION:
|
|
2071
2084
|
{
|
|
2072
2085
|
let t = e.detail;
|
|
2073
|
-
t.audio && (m(
|
|
2086
|
+
t.audio && (m(L, this).maxAudioBitRate = t.audio.bitRate), t.video && (m(L, this).maxVideoBitRate = t.video.bitRate, m(L, this).maxSize = t.video, this.setAttribute(_.MAX_VIDEO_BITRATE, String(t.video.bitRate)));
|
|
2074
2087
|
}
|
|
2075
2088
|
break;
|
|
2076
|
-
case
|
|
2089
|
+
case y.SET_ABR_MODE:
|
|
2077
2090
|
{
|
|
2078
2091
|
let t = e.detail;
|
|
2079
|
-
t ? (m(
|
|
2092
|
+
t ? (m(L, this).abrEnabled = !0, this.setAttribute(_.ABR_ENABLED, "")) : (m(L, this).abrEnabled = !1, this.removeAttribute(_.ABR_ENABLED)), p(U, this, W).call(this, _.ABR_ENABLED, String(t));
|
|
2080
2093
|
}
|
|
2081
2094
|
break;
|
|
2082
|
-
case
|
|
2095
|
+
case y.SET_SIZE_BASED_RESOLUTION_CAP_MODE:
|
|
2083
2096
|
{
|
|
2084
2097
|
let t = e.detail;
|
|
2085
2098
|
this.setAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
2086
2099
|
}
|
|
2087
2100
|
break;
|
|
2088
|
-
case
|
|
2089
|
-
m(
|
|
2101
|
+
case y.CHANNEL_GRID_OPENED:
|
|
2102
|
+
m(Ii, this) === null && p(U, this, Wa).call(this);
|
|
2090
2103
|
break;
|
|
2091
|
-
case
|
|
2092
|
-
m(
|
|
2104
|
+
case y.CHANNEL_GRID_CLOSED:
|
|
2105
|
+
m(Ii, this) !== null && (clearTimeout(m(Ii, this)), h(Ii, this, null));
|
|
2093
2106
|
break;
|
|
2094
|
-
case
|
|
2107
|
+
case y.ENTER_PIP:
|
|
2095
2108
|
this.setAttribute(_.IS_PIP, "");
|
|
2096
2109
|
break;
|
|
2097
|
-
case
|
|
2110
|
+
case y.EXIT_PIP:
|
|
2098
2111
|
this.removeAttribute(_.IS_PIP);
|
|
2099
2112
|
break;
|
|
2100
|
-
case
|
|
2113
|
+
case y.REQUEST_AIRPLAY:
|
|
2101
2114
|
var t;
|
|
2102
|
-
(t = m(
|
|
2115
|
+
(t = m(Mi, this)) == null || t.showPlaybackTargetPicker();
|
|
2103
2116
|
break;
|
|
2104
|
-
case
|
|
2105
|
-
|
|
2117
|
+
case y.SET_LANGUAGE:
|
|
2118
|
+
v(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
2106
2119
|
break;
|
|
2107
|
-
case
|
|
2108
|
-
|
|
2120
|
+
case y.SET_TEXT_TRACK:
|
|
2121
|
+
v(e.detail) ? this.setAttribute(_.TEXT_TRACK, e.detail) : this.removeAttribute(_.TEXT_TRACK);
|
|
2109
2122
|
break;
|
|
2110
|
-
case
|
|
2111
|
-
m(
|
|
2123
|
+
case y.REQUEST_USER_INPUT:
|
|
2124
|
+
m(L, this).play(), m(L, this).muted = !1;
|
|
2112
2125
|
break;
|
|
2113
|
-
case
|
|
2126
|
+
case y.SET_VOLUME:
|
|
2114
2127
|
{
|
|
2115
2128
|
let t = e.detail;
|
|
2116
|
-
m(
|
|
2129
|
+
m(L, this).muted && t > 0 ? (m(L, this).muted = !1, m(z, this) && (m(z, this).muted = !1)) : t === 0 && (m(L, this).muted = !0, m(z, this) && (m(z, this).muted = !0)), this.setAttribute(_.VOLUME, t.toString());
|
|
2117
2130
|
}
|
|
2118
2131
|
break;
|
|
2119
|
-
case
|
|
2132
|
+
case y.SEEK:
|
|
2120
2133
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2121
2134
|
break;
|
|
2122
|
-
case
|
|
2123
|
-
m(
|
|
2135
|
+
case y.GO_LIVE:
|
|
2136
|
+
m(da, this).call(this);
|
|
2124
2137
|
break;
|
|
2125
|
-
case
|
|
2138
|
+
case y.TOGGLE_DEBUG_PANEL:
|
|
2126
2139
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
2127
2140
|
break;
|
|
2128
|
-
case
|
|
2141
|
+
case y.SET_TARGET_BUFFER_TIME:
|
|
2129
2142
|
{
|
|
2130
|
-
let t = Math.max(50, Math.min(
|
|
2143
|
+
let t = Math.max(50, Math.min(we, e.detail));
|
|
2131
2144
|
this.setAttribute("target-buffer-time", String(t));
|
|
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(
|
|
2142
|
-
}), f(this,
|
|
2154
|
+
p(U, 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(z, this) || p(U, this, Ca).call(this), m(R, this) !== m(z, this) && (e && p(U, this, Xa).call(this), h(R, this, m(z, this)), p(U, this, xa).call(this), p(U, this, Sa).call(this), p(U, this, Da).call(this), (t = m(L, this)) == null || t.pause(), h(Li, this, e));
|
|
2163
|
+
}), f(this, pa, (e) => {
|
|
2151
2164
|
var t, n, r, i;
|
|
2152
|
-
e && p(
|
|
2153
|
-
p(
|
|
2165
|
+
e && p(U, this, Xa).call(this), (t = m(z, this)) == null || t.hide(), h(R, this, m(wi, this)), p(U, this, Da).call(this), this.hasAttribute(_.PAUSED) ? (n = m(R, this)) == null || n.pause() : (r = m(R, this)) == null || r.play(), p(U, this, Ta).call(this), p(U, this, ba).call(this), (i = m(z, this)) == null || i.pause(), e && (h(Li, this, !1), setTimeout(() => {
|
|
2166
|
+
p(U, 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(z, this)) == null || n.seek({
|
|
2160
2173
|
time: parseFloat(e),
|
|
2161
2174
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2162
2175
|
});
|
|
2163
2176
|
return;
|
|
2164
2177
|
}
|
|
2165
|
-
m(
|
|
2166
|
-
}), f(this,
|
|
2178
|
+
m(R, this) !== m(wi, this) && m(pa, this).call(this, t);
|
|
2179
|
+
}), f(this, ma, null), f(this, ha, () => {
|
|
2167
2180
|
var e;
|
|
2168
|
-
let t = (e = m(
|
|
2181
|
+
let t = (e = m(L, 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(
|
|
2177
|
-
let i =
|
|
2178
|
-
h(
|
|
2189
|
+
r.appendChild(gi.content.cloneNode(!0));
|
|
2190
|
+
let i = ye(this.getAttribute("log-level"));
|
|
2191
|
+
h(H, this, re.get().createContext("VindralController")), m(H, 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
|
-
|
|
2184
|
-
for (let t of Object.values(
|
|
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(
|
|
2196
|
+
S(e.getAttribute("auto-instance-enabled"), !0) && (yield p(U, e, ya).call(e));
|
|
2197
|
+
for (let t of Object.values(y)) 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(U, 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(
|
|
2191
|
-
for (let e of Object.values(
|
|
2192
|
-
p(
|
|
2203
|
+
p(U, this, La).call(this), p(U, this, ro).call(this), m(zi, this).unload(), (e = m(L, this)) == null || e.unload(), (t = m(B, this)) == null || t.unload(), (n = m(Ai, this)) == null || n.unload(), (r = m(ji, this)) == null || r.unload(), (i = m(V, this)) == null || i.unload(), p(U, this, wa).call(this);
|
|
2204
|
+
for (let e of Object.values(y)) this.removeEventListener(e, m(ca, this));
|
|
2205
|
+
p(U, 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) {
|
|
2196
|
-
switch (m(
|
|
2209
|
+
switch (m(H, this).debug("Attribute changed", {
|
|
2197
2210
|
name: e,
|
|
2198
2211
|
oldValue: t,
|
|
2199
2212
|
newValue: n
|
|
2200
2213
|
}), e) {
|
|
2201
2214
|
case "channel-id":
|
|
2202
|
-
h(
|
|
2215
|
+
h(Ei, this, n), m(L, this) && n && (m(L, this).channelId = n, m(L, this).play(), p(U, this, W).call(this, _.BUFFERING, ""), p(U, this, W).call(this, _.CHANNEL_ID, n), p(U, this, W).call(this, _.POSTER_SRC, m(L, 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
|
-
if (
|
|
2224
|
+
if (v(n)) {
|
|
2212
2225
|
var r;
|
|
2213
|
-
(r = m(
|
|
2226
|
+
(r = m(R, this)) == null || r.pause(), p(U, this, W).call(this, _.PAUSED, "");
|
|
2214
2227
|
} else {
|
|
2215
2228
|
var i;
|
|
2216
|
-
p(
|
|
2229
|
+
p(U, this, G).call(this, _.NEEDS_USER_INPUT_VIDEO), p(U, this, G).call(this, _.PAUSED), (i = m(R, this)) == null || i.play();
|
|
2217
2230
|
}
|
|
2218
2231
|
break;
|
|
2219
2232
|
case "target-buffer-time":
|
|
2220
2233
|
if (n) {
|
|
2221
2234
|
let e = parseInt(n, 10);
|
|
2222
|
-
Number.isNaN(e) || (m(
|
|
2235
|
+
Number.isNaN(e) || (m(L, this) && (m(L, this).targetBufferTime = e), p(U, this, W).call(this, _.TARGET_BUFFER_TIME, String(e)));
|
|
2223
2236
|
}
|
|
2224
2237
|
break;
|
|
2225
2238
|
case "min-buffer-time":
|
|
2226
|
-
if (m(
|
|
2227
|
-
let e =
|
|
2228
|
-
e !== void 0 && m(
|
|
2239
|
+
if (m(L, this) && v(n)) {
|
|
2240
|
+
let e = Ce(n);
|
|
2241
|
+
e !== void 0 && m(L, this).updateBufferTimeConfig({ minBufferTime: e });
|
|
2229
2242
|
}
|
|
2230
2243
|
break;
|
|
2231
2244
|
case "max-buffer-time":
|
|
2232
|
-
if (m(
|
|
2233
|
-
let e =
|
|
2234
|
-
e !== void 0 && m(
|
|
2245
|
+
if (m(L, this) && v(n)) {
|
|
2246
|
+
let e = Ce(n);
|
|
2247
|
+
e !== void 0 && m(L, this).updateBufferTimeConfig({ maxBufferTime: e });
|
|
2235
2248
|
}
|
|
2236
2249
|
break;
|
|
2237
2250
|
case _.DEBUG_PANEL_OPEN:
|
|
2238
|
-
|
|
2251
|
+
v(n) ? p(U, this, W).call(this, _.DEBUG_PANEL_OPEN, "") : p(U, this, G).call(this, _.DEBUG_PANEL_OPEN), p(U, this, to).call(this);
|
|
2239
2252
|
break;
|
|
2240
2253
|
case "user-interacting":
|
|
2241
|
-
|
|
2254
|
+
v(n) ? p(U, this, W).call(this, _.USER_INTERACTING, "") : p(U, this, G).call(this, _.USER_INTERACTING);
|
|
2242
2255
|
break;
|
|
2243
2256
|
case "muted":
|
|
2244
|
-
if (m(
|
|
2257
|
+
if (m(L, this)) if (v(n)) {
|
|
2245
2258
|
var a;
|
|
2246
|
-
if (m(
|
|
2259
|
+
if (m(L, this).muted = !0, m(z, this) && (m(z, this).muted = !0), p(U, this, W).call(this, _.MUTED, ""), (a = m(V, this)) != null && a.isMediaElementSource) {
|
|
2247
2260
|
var o;
|
|
2248
|
-
(o = m(
|
|
2261
|
+
(o = m(V, this)) == null || o.stop(), p(U, this, W).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2249
2262
|
left: null,
|
|
2250
2263
|
right: null
|
|
2251
2264
|
}));
|
|
2252
2265
|
}
|
|
2253
2266
|
} else {
|
|
2254
2267
|
var s;
|
|
2255
|
-
m(
|
|
2268
|
+
m(L, this).muted = !1, m(z, this) && (m(z, this).muted = !1), p(U, this, G).call(this, _.MUTED), p(U, this, G).call(this, _.NEEDS_USER_INPUT_AUDIO), m(L, this).volume === 0 && (m(L, this).volume = .3), (s = m(V, this)) == null || s.start();
|
|
2256
2269
|
}
|
|
2257
2270
|
break;
|
|
2258
2271
|
case "ui-locked":
|
|
2259
|
-
|
|
2272
|
+
v(n) ? p(U, this, Ka).call(this) : p(U, this, qa).call(this);
|
|
2260
2273
|
break;
|
|
2261
2274
|
case "is-fullscreen":
|
|
2262
|
-
|
|
2275
|
+
v(n) ? p(U, this, Za).call(this) : p(U, this, Qa).call(this);
|
|
2263
2276
|
break;
|
|
2264
2277
|
case "abr-enabled":
|
|
2265
2278
|
{
|
|
2266
|
-
let e =
|
|
2267
|
-
m(
|
|
2279
|
+
let e = S(n == null ? null : n, !1);
|
|
2280
|
+
m(L, this) && (m(L, this).abrEnabled = e, e && (m(L, this).sizeBasedResolutionCapEnabled = S(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0))), e ? p(U, this, W).call(this, _.ABR_ENABLED, "") : p(U, this, G).call(this, _.ABR_ENABLED);
|
|
2268
2281
|
}
|
|
2269
2282
|
break;
|
|
2270
2283
|
case "size-based-resolution-cap-enabled":
|
|
2271
2284
|
{
|
|
2272
|
-
let e =
|
|
2273
|
-
m(
|
|
2285
|
+
let e = S(n == null ? null : n, !0);
|
|
2286
|
+
m(L, this) && (m(L, this).sizeBasedResolutionCapEnabled = e), p(U, this, W).call(this, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, e ? "true" : "false");
|
|
2274
2287
|
}
|
|
2275
2288
|
break;
|
|
2276
2289
|
case "max-video-bit-rate":
|
|
2277
|
-
h(
|
|
2290
|
+
h(Oi, this, n), v(n) ? p(U, this, W).call(this, _.MAX_VIDEO_BITRATE, n) : p(U, this, G).call(this, _.MAX_VIDEO_BITRATE), m(z, this) && (m(z, this).maxVideoBitRate = n ? Ce(n) : void 0);
|
|
2278
2291
|
break;
|
|
2279
2292
|
case "max-initial-bit-rate":
|
|
2280
|
-
h(
|
|
2293
|
+
h(ki, this, n), v(n) ? p(U, this, W).call(this, _.MAX_INITIAL_BITRATE, n) : p(U, this, G).call(this, _.MAX_INITIAL_BITRATE);
|
|
2281
2294
|
break;
|
|
2282
2295
|
case "is-pip":
|
|
2283
|
-
|
|
2296
|
+
v(n) ? p(U, this, Ya).call(this) : p(U, this, Xa).call(this);
|
|
2284
2297
|
break;
|
|
2285
2298
|
case "is-airplaying":
|
|
2286
|
-
if (
|
|
2299
|
+
if (v(n)) {
|
|
2287
2300
|
var c, l;
|
|
2288
|
-
(c = m(
|
|
2301
|
+
(c = m(L, this)) != null && c.mediaElement && (m(L, this).mediaElement.style.display = "hidden"), (l = m(L, this)) == null || l.pause();
|
|
2289
2302
|
} else {
|
|
2290
2303
|
var u;
|
|
2291
|
-
(u = m(
|
|
2304
|
+
(u = m(L, this)) != null && u.mediaElement && (m(L, this).mediaElement.style.display = "block");
|
|
2292
2305
|
}
|
|
2293
2306
|
break;
|
|
2294
2307
|
case "is-casting":
|
|
2295
|
-
if (
|
|
2308
|
+
if (v(n)) {
|
|
2296
2309
|
var ee, d;
|
|
2297
|
-
(ee = m(
|
|
2310
|
+
(ee = m(Ai, this)) != null && ee.isFullscreen() && p(U, this, Qa).call(this), (d = m(L, this)) == null || d.pause();
|
|
2298
2311
|
} else if (!document.hidden) {
|
|
2299
2312
|
var te;
|
|
2300
|
-
(te = m(
|
|
2313
|
+
(te = m(L, 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
|
-
m(
|
|
2323
|
+
m(L, this) && (m(L, this).language = n, v(n) ? p(U, this, W).call(this, _.LANGUAGE, n) : p(U, this, G).call(this, _.LANGUAGE));
|
|
2311
2324
|
break;
|
|
2312
2325
|
case "text-track":
|
|
2313
|
-
m(
|
|
2326
|
+
m(L, this) && (m(L, this).textTrack = n, v(n) ? p(U, this, W).call(this, _.TEXT_TRACK, n) : p(U, this, G).call(this, _.TEXT_TRACK));
|
|
2314
2327
|
break;
|
|
2315
2328
|
case "log-level":
|
|
2316
|
-
|
|
2329
|
+
v(n) && m(H, this).setLevel(ye(n));
|
|
2317
2330
|
break;
|
|
2318
2331
|
case "authentication-token":
|
|
2319
|
-
if (
|
|
2332
|
+
if (v(n)) {
|
|
2320
2333
|
var ne, re;
|
|
2321
|
-
(ne = m(
|
|
2322
|
-
} else p(
|
|
2334
|
+
(ne = m(L, this)) == null || ne.updateAuthenticationToken(n), (re = m(Mi, this)) == null || re.updateAuthenticationToken(n), p(U, this, W).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2335
|
+
} else p(U, this, G).call(this, _.AUTHENTICATION_TOKEN);
|
|
2323
2336
|
break;
|
|
2324
2337
|
case "volume":
|
|
2325
|
-
if (
|
|
2338
|
+
if (v(n)) {
|
|
2326
2339
|
let e = parseFloat(n);
|
|
2327
|
-
m(
|
|
2340
|
+
m(z, this) && (m(z, this).volume = e), m(L, this) && (m(L, this).volume = e);
|
|
2328
2341
|
}
|
|
2329
2342
|
break;
|
|
2330
2343
|
case "timeshift-position":
|
|
2331
|
-
|
|
2344
|
+
v(n) ? p(U, this, W).call(this, _.TIMESHIFT_POSITION, n) : p(U, this, G).call(this, _.TIMESHIFT_POSITION);
|
|
2332
2345
|
break;
|
|
2333
2346
|
case "timeline-markers":
|
|
2334
|
-
|
|
2347
|
+
v(n) ? p(U, this, W).call(this, _.TIMELINE_MARKERS, n) : p(U, this, G).call(this, _.TIMELINE_MARKERS);
|
|
2335
2348
|
break;
|
|
2336
2349
|
case "drm-headers":
|
|
2337
|
-
if (
|
|
2338
|
-
let e =
|
|
2350
|
+
if (v(n)) {
|
|
2351
|
+
let e = Te(n);
|
|
2339
2352
|
if (e) {
|
|
2340
2353
|
var ie;
|
|
2341
|
-
(ie = m(
|
|
2342
|
-
} else m(
|
|
2354
|
+
(ie = m(L, this)) == null || ie.drm.setHeaders(e);
|
|
2355
|
+
} else m(H, this).warn("Invalid DRM headers format:", n);
|
|
2343
2356
|
}
|
|
2344
2357
|
break;
|
|
2345
2358
|
case "drm-queryparams":
|
|
2346
|
-
if (
|
|
2347
|
-
let e =
|
|
2359
|
+
if (v(n)) {
|
|
2360
|
+
let e = Te(n);
|
|
2348
2361
|
if (e) {
|
|
2349
2362
|
var ae;
|
|
2350
|
-
(ae = m(
|
|
2351
|
-
} else m(
|
|
2363
|
+
(ae = m(L, this)) == null || ae.drm.setQueryParams(e);
|
|
2364
|
+
} else m(H, this).warn("Invalid DRM query parameters format:", n);
|
|
2352
2365
|
}
|
|
2353
2366
|
break;
|
|
2354
2367
|
}
|
|
@@ -2356,36 +2369,36 @@ var gi = [
|
|
|
2356
2369
|
_.USER_INTERACTING,
|
|
2357
2370
|
_.PAUSED,
|
|
2358
2371
|
_.HIDE_UI_ON_PAUSE
|
|
2359
|
-
].includes(e) && p(
|
|
2372
|
+
].includes(e) && p(U, 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
|
-
(((r = m(
|
|
2381
|
+
(((r = m(L, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
2369
2382
|
break;
|
|
2370
2383
|
case _.MUTED:
|
|
2371
2384
|
var i;
|
|
2372
|
-
((i = m(
|
|
2385
|
+
((i = m(L, 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
|
{
|
|
2379
2392
|
var a, o;
|
|
2380
|
-
let t = (a = (o = m(
|
|
2393
|
+
let t = (a = (o = m(L, this)) == null ? void 0 : o.sizeBasedResolutionCapEnabled) == null ? S(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0) : a;
|
|
2381
2394
|
e.setAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
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");
|
|
@@ -2394,7 +2407,7 @@ var gi = [
|
|
|
2394
2407
|
}
|
|
2395
2408
|
case _.TIMELINE_MARKERS: {
|
|
2396
2409
|
let t = this.getAttribute(_.TIMELINE_MARKERS);
|
|
2397
|
-
|
|
2410
|
+
v(t) && e.setAttribute(_.TIMELINE_MARKERS, t);
|
|
2398
2411
|
break;
|
|
2399
2412
|
}
|
|
2400
2413
|
case _.DEBUG_PANEL_OPEN:
|
|
@@ -2407,68 +2420,68 @@ var gi = [
|
|
|
2407
2420
|
}
|
|
2408
2421
|
case _.PLAYBACK_LATENCY: {
|
|
2409
2422
|
var s;
|
|
2410
|
-
let t = (s = m(
|
|
2423
|
+
let t = (s = m(L, this)) == null ? void 0 : s.playbackLatency;
|
|
2411
2424
|
typeof t == "number" && e.setAttribute(_.PLAYBACK_LATENCY, String(t));
|
|
2412
2425
|
break;
|
|
2413
2426
|
}
|
|
2414
2427
|
case _.CONNECTION_STATE:
|
|
2415
|
-
m(
|
|
2428
|
+
m(L, this) && e.setAttribute(_.CONNECTION_STATE, m(L, this).connectionState);
|
|
2416
2429
|
break;
|
|
2417
2430
|
case _.ABR_ENABLED:
|
|
2418
|
-
m(
|
|
2431
|
+
m(L, this) ? e.setAttribute(_.ABR_ENABLED, String(m(L, this).abrEnabled)) : v(this.getAttribute(_.ABR_ENABLED)) ? e.setAttribute(_.ABR_ENABLED, this.getAttribute(_.ABR_ENABLED) || "") : e.removeAttribute(_.ABR_ENABLED);
|
|
2419
2432
|
break;
|
|
2420
2433
|
}
|
|
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
|
-
return m(
|
|
2443
|
+
return m(L, this);
|
|
2431
2444
|
}
|
|
2432
2445
|
get fullscreen() {
|
|
2433
|
-
return p(
|
|
2446
|
+
return p(U, 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(
|
|
2459
|
+
p(U, 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(
|
|
2455
|
-
m(
|
|
2456
|
-
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o =
|
|
2457
|
-
headers:
|
|
2458
|
-
queryParams:
|
|
2466
|
+
if (!m(Ei, e)) return;
|
|
2467
|
+
let r = m(R, e) === m(wi, e);
|
|
2468
|
+
m(xi, e).stop(), yield (t = m(L, e)) == null ? void 0 : t.unload(), r && h(R, e, void 0);
|
|
2469
|
+
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = Ce(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = _e(e.getAttribute(_.MEDIA)), l = e.getAttribute(_.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = Ce(e.getAttribute("max-video-bit-rate")), te = Ce(e.getAttribute("max-initial-bit-rate")), ne = ge(e.getAttribute("max-size")), re = Ce(e.getAttribute("min-buffer-time")), ie = Ce(e.getAttribute("max-buffer-time")), oe = S(e.getAttribute("burst-enabled")), se = S(e.getAttribute("mse-enabled")), ce = S(e.getAttribute("mse-opus-enabled")), le = S(e.getAttribute("ios-background-play-enabled")), f = S(e.getAttribute("ios-wake-lock-enabled")), g = S(e.getAttribute("stream-to-media-element-enabled")), ue = S(e.getAttribute("ios-media-element-enabled")), de = S(e.getAttribute("abr-enabled"), !0), fe = S(e.getAttribute("size-based-resolution-cap-enabled")), pe = S(e.getAttribute("telemetry-enabled")), me = ve(e.getAttribute("video-codecs")), y = he(e.getAttribute("poster")), b = Se(e.getAttribute("advanced")), xe = ye(e.getAttribute("log-level")), x = {
|
|
2470
|
+
headers: Te(e.getAttribute("drm-headers")),
|
|
2471
|
+
queryParams: Te(e.getAttribute("drm-queryparams")),
|
|
2459
2472
|
widevine: {
|
|
2460
|
-
videoRobustness:
|
|
2461
|
-
audioRobustness:
|
|
2473
|
+
videoRobustness: be(e.getAttribute("drm-widevine-video-robustness")),
|
|
2474
|
+
audioRobustness: be(e.getAttribute("drm-widevine-audio-robustness"))
|
|
2462
2475
|
},
|
|
2463
2476
|
playready: {
|
|
2464
|
-
videoRobustness:
|
|
2465
|
-
audioRobustness:
|
|
2477
|
+
videoRobustness: be(e.getAttribute("drm-playready-video-robustness")),
|
|
2478
|
+
audioRobustness: be(e.getAttribute("drm-playready-audio-robustness"))
|
|
2466
2479
|
}
|
|
2467
|
-
},
|
|
2468
|
-
h(
|
|
2469
|
-
url: m(
|
|
2470
|
-
channelId: m(
|
|
2471
|
-
channelGroupId: m(
|
|
2480
|
+
}, we = Me(e.getAttribute("webcodecs-hardware-acceleration")), Ee = je(e.getAttribute("decoders")), De = S(e.getAttribute("offscreen-canvas-enabled")), Oe = S(e.getAttribute("webtransport-enabled")), ke = Ce(e.getAttribute("reconnect-retries")), Ae = ke === void 0 ? void 0 : (e) => e.reconnectRetries < ke, Ne = e.getAttribute("language") || void 0;
|
|
2481
|
+
h(L, e, new ae({
|
|
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,
|
|
@@ -2490,161 +2503,161 @@ function va() {
|
|
|
2490
2503
|
sizeBasedResolutionCapEnabled: fe,
|
|
2491
2504
|
telemetryEnabled: pe,
|
|
2492
2505
|
videoCodecs: me,
|
|
2493
|
-
poster:
|
|
2506
|
+
poster: y,
|
|
2494
2507
|
textTrack: l,
|
|
2495
2508
|
advanced: b,
|
|
2496
|
-
logLevel:
|
|
2509
|
+
logLevel: xe,
|
|
2497
2510
|
language: Ne,
|
|
2498
|
-
drm:
|
|
2511
|
+
drm: x,
|
|
2499
2512
|
webtransportEnabled: Oe,
|
|
2500
|
-
webcodecsHardwareAcceleration:
|
|
2513
|
+
webcodecsHardwareAcceleration: we,
|
|
2501
2514
|
decoders: Ee,
|
|
2502
2515
|
offscreenCanvasEnabled: De,
|
|
2503
|
-
reconnectHandler:
|
|
2504
|
-
})), h(
|
|
2505
|
-
let Pe =
|
|
2506
|
-
Pe && p(
|
|
2516
|
+
reconnectHandler: Ae
|
|
2517
|
+
})), h(wi, e, new di(m(L, e))), m(R, e) || h(R, e, m(wi, e)), p(U, e, ba).call(e), h(Si, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), m(Si, e) && (m(L, e).attach(m(Si, e)), m(zi, e).observe(m(Si, e))), e.setAttribute(_.MEDIA, m(L, e).media), m(L, e).muted && p(U, e, W).call(e, _.MUTED, ""), m(L, e).abrEnabled ? p(U, e, W).call(e, _.ABR_ENABLED, "") : p(U, e, G).call(e, _.ABR_ENABLED), p(U, e, W).call(e, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, m(L, e).sizeBasedResolutionCapEnabled ? "true" : "false"), p(U, e, W).call(e, _.VOLUME, m(L, e).volume.toString()), v(y) || p(U, e, W).call(e, _.POSTER_SRC, m(L, e).getThumbnailUrl());
|
|
2518
|
+
let Pe = S(e.getAttribute(_.AIRPLAY_ENABLED), !1), Fe = S(e.getAttribute(_.CAST_ENABLED), !0), C = S(e.getAttribute(_.FULLSCREEN_ENABLED), !0), Ie = S(e.getAttribute(_.PIP_ENABLED), !0), Le = S(e.getAttribute(_.VU_METER_ENABLED), !1), Re = S(e.getAttribute(_.TIMESHIFT_ENABLED), !1);
|
|
2519
|
+
Pe && p(U, e, Pa).call(e, m(L, e)), Fe && p(U, e, ja).call(e, m(L, e)), C && p(U, e, Oa).call(e, m(L, e)), Ie && p(U, e, Ea).call(e, m(L, e)), i || m(L, e).play(), Le && p(U, e, Fa).call(e, m(L, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2507
2520
|
bubbles: !0,
|
|
2508
2521
|
composed: !0,
|
|
2509
|
-
detail: m(
|
|
2510
|
-
})), Re && (p(
|
|
2522
|
+
detail: m(L, e)
|
|
2523
|
+
})), Re && (p(U, e, Ca).call(e), C && p(U, 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(
|
|
2527
|
+
m(L, this) && (m(L, this).on("rendition levels", m(Bi, this)), m(L, this).on("rendition level", m(Vi, this)), m(L, this).on("playback state", m(Hi, this)), m(L, this).on("volume state", m(Ui, this)), m(L, this).on("channel switch failed", m(Wi, this)), m(L, this).on("channel switch", m(Gi, this)), m(L, this).on("channels", m(Ki, this)), m(L, this).on("languages", m(qi, this)), m(L, this).on("text tracks", m(Ji, this)), m(L, this).on("needs user input", m(Yi, this)), m(L, this).on("is live", m(Xi, this)), m(L, this).on("timeshift info", m(Zi, this)));
|
|
2518
2528
|
}
|
|
2519
2529
|
function xa() {
|
|
2520
|
-
m(
|
|
2530
|
+
m(L, this) && (m(L, this).off("playback state", m(Hi, this)), m(L, this).off("volume state", m(Ui, this)), m(L, this).off("channel switch failed", m(Wi, this)), m(L, this).off("channel switch", m(Gi, this)), m(L, this).off("channels", m(Ki, this)), m(L, this).off("languages", m(qi, this)), m(L, this).off("text tracks", m(Ji, this)), m(L, this).off("needs user input", m(Yi, this)), m(L, this).off("is live", m(Xi, this)), m(L, this).off("timeshift info", m(Zi, this)));
|
|
2521
2531
|
}
|
|
2522
2532
|
function Sa() {
|
|
2533
|
+
m(z, this) && (m(z, this).addEventListener("playing", m(Qi, this)), m(z, this).addEventListener("pause", m($i, this)), m(z, this).addEventListener("ended", m(ea, this)), m(z, this).addEventListener("timeupdate", m(na, this)), m(z, this).addEventListener("volumechange", m(ra, this)), m(z, this).addEventListener("hlsbuffering", m(ia, this)), m(z, this).addEventListener("hlsnotbuffering", m(aa, this)), m(z, this).addEventListener("timeshiftready", m(oa, this)));
|
|
2534
|
+
}
|
|
2535
|
+
function Ca() {
|
|
2523
2536
|
var e, t, n, r;
|
|
2524
|
-
let i =
|
|
2525
|
-
p(
|
|
2537
|
+
let i = Ce(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = m(R, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = S(this.getAttribute(_.MUTED), (n = (r = m(R, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2538
|
+
p(U, this, wa).call(this), h(z, this, new Jr(m(Ci, this), {
|
|
2526
2539
|
volume: a,
|
|
2527
2540
|
muted: o,
|
|
2528
|
-
maxVideoBitRate: m(
|
|
2529
|
-
})), 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(z, this).addEventListener("durationchange", m(ta, this));
|
|
2533
2543
|
}
|
|
2534
2544
|
function wa() {
|
|
2535
|
-
m(
|
|
2545
|
+
m(z, this) && (p(U, this, Ta).call(this), m(z, this).removeEventListener("durationchange", m(ta, this)), m(z, this).cleanup(), m(R, this) === m(z, this) && h(R, this, void 0), h(z, this, void 0));
|
|
2536
2546
|
}
|
|
2537
|
-
function Ta(
|
|
2538
|
-
|
|
2539
|
-
|
|
2547
|
+
function Ta() {
|
|
2548
|
+
m(z, this) && (m(z, this).removeEventListener("playing", m(Qi, this)), m(z, this).removeEventListener("pause", m($i, this)), m(z, this).removeEventListener("ended", m(ea, this)), m(z, this).removeEventListener("timeupdate", m(na, this)), m(z, this).removeEventListener("volumechange", m(ra, this)), m(z, this).removeEventListener("hlsbuffering", m(ia, this)), m(z, this).removeEventListener("hlsnotbuffering", m(aa, this)), m(z, this).removeEventListener("timeshiftready", m(oa, this)));
|
|
2549
|
+
}
|
|
2550
|
+
function Ea(e) {
|
|
2551
|
+
e.mediaElement instanceof HTMLVideoElement && (h(B, this, new rr(e.mediaElement)), m(B, this).isSupported() && (m(H, this).debug("PIP is supported"), p(U, this, W).call(this, _.PIP_AVAILABLE, "")), m(B, this).on("on picture in picture change", (e) => {
|
|
2552
|
+
e ? p(U, this, W).call(this, _.IS_PIP, "") : p(U, this, G).call(this, _.IS_PIP);
|
|
2540
2553
|
}));
|
|
2541
2554
|
}
|
|
2542
|
-
function
|
|
2555
|
+
function Da() {
|
|
2543
2556
|
var e;
|
|
2544
|
-
if (!m(
|
|
2557
|
+
if (!m(B, this)) return;
|
|
2545
2558
|
let t = null;
|
|
2546
|
-
m(
|
|
2547
|
-
e ? p(
|
|
2559
|
+
m(R, this) === m(z, this) && m(z, this) ? t = m(z, this).videoElement : ((e = m(L, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = m(L, this).mediaElement), t && t !== m(B, this).videoElement && (m(H, this).debug("Updating PIP target to", m(R, this) === m(z, this) ? "HLS" : "Vindral"), m(B, this).unload(), h(B, this, new rr(t)), m(B, this).on("on picture in picture change", (e) => {
|
|
2560
|
+
e ? p(U, this, W).call(this, _.IS_PIP, "") : p(U, this, G).call(this, _.IS_PIP);
|
|
2548
2561
|
}));
|
|
2549
2562
|
}
|
|
2550
|
-
function
|
|
2551
|
-
let t = !
|
|
2552
|
-
h(
|
|
2553
|
-
e ? p(
|
|
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) => {
|
|
2566
|
+
e ? p(U, this, W).call(this, _.FULLSCREEN, "") : p(U, this, G).call(this, _.FULLSCREEN);
|
|
2554
2567
|
});
|
|
2555
2568
|
}
|
|
2556
|
-
function
|
|
2569
|
+
function ka() {
|
|
2557
2570
|
var e;
|
|
2558
|
-
m(
|
|
2559
|
-
e ? p(
|
|
2571
|
+
m(z, this) && (h(ji, this, !qn.isFullscreenApiSupported(this) && qn.isFullscreenApiSupported((e = m(z, this)) == null ? void 0 : e.videoElement) ? new qn(m(z, this).videoElement) : new qn(this)), m(ji, this).on("on fullscreen change", (e) => {
|
|
2572
|
+
e ? p(U, this, W).call(this, _.FULLSCREEN, "") : p(U, this, G).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 Oe({
|
|
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(
|
|
2585
|
+
p(U, this, W).call(this, _.CAST_AVAILABLE, ""), (e = m(Ni, this)) == null || e.on("connected", p(U, this, Ma).bind(this)), (t = m(Ni, this)) == null || t.on("resumed", p(U, this, Ma).bind(this)), (n = m(Ni, this)) == null || n.on("disconnected", p(U, this, Na).bind(this));
|
|
2573
2586
|
}).catch((e) => {
|
|
2574
|
-
m(
|
|
2587
|
+
m(H, this).warn("Failed to initialize CastSender", e);
|
|
2575
2588
|
});
|
|
2576
2589
|
}
|
|
2577
|
-
function
|
|
2590
|
+
function Ma() {
|
|
2578
2591
|
var e, t;
|
|
2579
|
-
p(
|
|
2580
|
-
let n = (e = (t = m(
|
|
2581
|
-
p(
|
|
2592
|
+
p(U, this, W).call(this, _.IS_CASTING, "");
|
|
2593
|
+
let n = (e = (t = m(Ni, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2594
|
+
p(U, this, W).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2582
2595
|
}
|
|
2583
|
-
function
|
|
2584
|
-
p(
|
|
2596
|
+
function Na() {
|
|
2597
|
+
p(U, this, G).call(this, _.IS_CASTING), p(U, this, G).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(
|
|
2596
|
-
p(
|
|
2597
|
-
}), m(
|
|
2598
|
-
p(
|
|
2599
|
-
}), m(
|
|
2600
|
-
p(
|
|
2608
|
+
})), m(Mi, this).once("available", () => {
|
|
2609
|
+
p(U, this, W).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2610
|
+
}), m(Mi, this).on("connected", () => {
|
|
2611
|
+
p(U, this, W).call(this, _.IS_AIRPLAYING, "");
|
|
2612
|
+
}), m(Mi, this).on("disconnected", () => {
|
|
2613
|
+
p(U, this, G).call(this, _.IS_AIRPLAYING);
|
|
2601
2614
|
});
|
|
2602
2615
|
}
|
|
2603
|
-
function
|
|
2616
|
+
function Fa(e) {
|
|
2604
2617
|
var t;
|
|
2605
|
-
if ((t = m(
|
|
2606
|
-
if (e.audioNode) h(
|
|
2607
|
-
else if (e.mediaElement instanceof HTMLMediaElement) h(
|
|
2618
|
+
if ((t = m(V, this)) == null || t.unload(), !se()) {
|
|
2619
|
+
if (e.audioNode) h(V, this, new Pr(e.audioNode));
|
|
2620
|
+
else if (e.mediaElement instanceof HTMLMediaElement) h(V, this, new Pr(e.mediaElement));
|
|
2608
2621
|
else return;
|
|
2609
|
-
m(
|
|
2610
|
-
p(
|
|
2611
|
-
}), p(
|
|
2622
|
+
m(V, this).on("on decibel change", (e) => {
|
|
2623
|
+
p(U, this, W).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
2624
|
+
}), p(U, this, W).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2612
2625
|
left: null,
|
|
2613
2626
|
right: null
|
|
2614
|
-
})), (!m(
|
|
2627
|
+
})), (!m(V, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && m(V, this).start();
|
|
2615
2628
|
}
|
|
2616
2629
|
}
|
|
2617
|
-
function Fa() {
|
|
2618
|
-
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(Li, this, e);
|
|
2620
|
-
}
|
|
2621
2630
|
function Ia() {
|
|
2622
|
-
let e =
|
|
2623
|
-
|
|
2631
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./rVXtcXLn.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), m(L, this));
|
|
2632
|
+
window._vindralDebug = e, h(Ri, this, e);
|
|
2624
2633
|
}
|
|
2625
|
-
function La(
|
|
2626
|
-
|
|
2634
|
+
function La() {
|
|
2635
|
+
let e = window;
|
|
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(U, 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(U, 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(U, this, Ga).call(this) : p(U, this, qa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(U, this, qa).call(this);
|
|
2644
|
+
}
|
|
2645
|
+
function Ba(e) {
|
|
2633
2646
|
switch (e) {
|
|
2634
|
-
case "dblclick-fullscreen": return
|
|
2647
|
+
case "dblclick-fullscreen": return S(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(U, this, Ba).call(this, "dblclick-fullscreen") && (!m(Ai, this) || e.target instanceof b || e.target instanceof Be || 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(U, 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(
|
|
2681
|
+
if (!m(L, 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(H, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2671
2684
|
else {
|
|
2672
|
-
h(
|
|
2673
|
-
let n = yield m(
|
|
2674
|
-
p(
|
|
2685
|
+
h(ma, e, t);
|
|
2686
|
+
let n = yield m(L, e).getApiClient().getChannels(m(Di, e));
|
|
2687
|
+
p(U, e, W).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2675
2688
|
}
|
|
2676
|
-
h(
|
|
2689
|
+
h(Ii, e, window.setTimeout(() => void p(U, 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,87 +2705,87 @@ 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() {
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2709
|
+
p(U, this, Ka).call(this), m(bi, this) && clearTimeout(m(bi, this)), m(yi, this) && h(bi, this, self.setTimeout(() => {
|
|
2710
|
+
p(U, this, Ga).call(this);
|
|
2711
|
+
}, m(yi, this)));
|
|
2704
2712
|
}
|
|
2705
2713
|
function Ja() {
|
|
2706
2714
|
var e;
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
});
|
|
2715
|
+
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2716
|
+
(e = m(L, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2710
2717
|
}
|
|
2711
2718
|
function Ya() {
|
|
2712
2719
|
var e;
|
|
2713
|
-
(e = m(
|
|
2714
|
-
m(
|
|
2720
|
+
p(U, this, Da).call(this), p(U, this, $a).call(this), (e = m(B, this)) == null || e.request().catch((e) => {
|
|
2721
|
+
m(H, this).warn("Failed to enter picture in picture:", e);
|
|
2715
2722
|
});
|
|
2716
2723
|
}
|
|
2717
2724
|
function Xa() {
|
|
2718
|
-
|
|
2725
|
+
var e;
|
|
2726
|
+
(e = m(B, this)) == null || e.exit().catch((e) => {
|
|
2727
|
+
m(H, this).warn("Failed to exit picture in picture:", e);
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
function Za() {
|
|
2731
|
+
let e = p(U, this, Aa).call(this);
|
|
2719
2732
|
if (!e) {
|
|
2720
|
-
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(
|
|
2733
|
+
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(U, this, W).call(this, _.FULLSCREEN, "");
|
|
2721
2734
|
return;
|
|
2722
2735
|
}
|
|
2723
|
-
e != null && e.isFullscreenApiSupported() ? (p(
|
|
2724
|
-
m(ma, this).call(this);
|
|
2725
|
-
}).catch((e) => {
|
|
2726
|
-
m(V, this).warn("Failed to enter fullscreen:", e);
|
|
2727
|
-
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2728
|
-
}
|
|
2729
|
-
function Za() {
|
|
2730
|
-
let e = p(H, this, ka).call(this);
|
|
2731
|
-
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2736
|
+
e != null && e.isFullscreenApiSupported() ? (p(U, this, $a).call(this), e == null || e.request().then(() => {
|
|
2732
2737
|
m(ha, this).call(this);
|
|
2733
2738
|
}).catch((e) => {
|
|
2734
|
-
m(
|
|
2735
|
-
}) : (this.
|
|
2739
|
+
m(H, this).warn("Failed to enter fullscreen:", e);
|
|
2740
|
+
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(U, this, W).call(this, _.FULLSCREEN, ""));
|
|
2736
2741
|
}
|
|
2737
2742
|
function Qa() {
|
|
2738
|
-
|
|
2743
|
+
let e = p(U, this, Aa).call(this);
|
|
2744
|
+
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2745
|
+
m(ga, this).call(this);
|
|
2746
|
+
}).catch((e) => {
|
|
2747
|
+
m(H, this).warn("Failed to exit fullscreen:", e);
|
|
2748
|
+
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), p(U, this, G).call(this, _.FULLSCREEN));
|
|
2739
2749
|
}
|
|
2740
2750
|
function $a() {
|
|
2741
|
-
|
|
2751
|
+
m(L, this) && m(L, 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(U, this, eo).call(this) ? p(U, this, no).call(this) : p(U, this, ro).call(this);
|
|
2748
2758
|
}
|
|
2749
2759
|
function no() {
|
|
2750
|
-
m(
|
|
2760
|
+
m(_a, this) === null && (p(U, this, io).call(this), h(_a, this, window.setInterval(() => p(U, this, io).call(this), 1e3)));
|
|
2751
2761
|
}
|
|
2752
2762
|
function ro() {
|
|
2753
|
-
|
|
2763
|
+
m(_a, this) && (clearInterval(m(_a, this)), h(_a, this, null)), this.removeAttribute(_.DRIFT), p(U, this, G).call(this, _.DRIFT), p(U, this, G).call(this, _.PLAYBACK_LATENCY), p(U, this, G).call(this, _.CONNECTION_STATE);
|
|
2764
|
+
}
|
|
2765
|
+
function io() {
|
|
2766
|
+
if (!m(L, this)) return;
|
|
2754
2767
|
try {
|
|
2755
|
-
let e = m(
|
|
2768
|
+
let e = m(L, this).getStatistics().drift;
|
|
2756
2769
|
if (typeof e == "number") {
|
|
2757
2770
|
let t = Math.round(e * 10) / 10;
|
|
2758
|
-
p(
|
|
2771
|
+
p(U, this, W).call(this, _.DRIFT, String(t));
|
|
2759
2772
|
}
|
|
2760
2773
|
} catch (e) {}
|
|
2761
|
-
let e = m(
|
|
2762
|
-
typeof e == "number" && p(
|
|
2763
|
-
let t = m(
|
|
2764
|
-
typeof t == "number" ? p(
|
|
2774
|
+
let e = m(L, this).targetBufferTime;
|
|
2775
|
+
typeof e == "number" && p(U, this, W).call(this, _.TARGET_BUFFER_TIME, String(e));
|
|
2776
|
+
let t = m(L, this).playbackLatency;
|
|
2777
|
+
typeof t == "number" ? p(U, this, W).call(this, _.PLAYBACK_LATENCY, String(t)) : p(U, this, G).call(this, _.PLAYBACK_LATENCY), p(U, this, W).call(this, _.CONNECTION_STATE, m(L, this).connectionState);
|
|
2765
2778
|
}
|
|
2766
|
-
function
|
|
2779
|
+
function W(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
|
-
function
|
|
2783
|
+
function G(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(
|
|
2775
|
-
...
|
|
2787
|
+
e(va, "observedAttributes", [
|
|
2788
|
+
...Ee,
|
|
2776
2789
|
"url",
|
|
2777
2790
|
"edge-url",
|
|
2778
2791
|
"target-buffer-time",
|
|
@@ -2811,7 +2824,9 @@ e(_a, "observedAttributes", [
|
|
|
2811
2824
|
"auto-instance-enabled",
|
|
2812
2825
|
"language"
|
|
2813
2826
|
]);
|
|
2814
|
-
|
|
2827
|
+
//#endregion
|
|
2828
|
+
//#region ../../libs/player-next/src/components/FullscreenButton.ts
|
|
2829
|
+
var ao, oo = document.createElement("template");
|
|
2815
2830
|
oo.innerHTML = `
|
|
2816
2831
|
<style>
|
|
2817
2832
|
:host {
|
|
@@ -2836,7 +2851,7 @@ oo.innerHTML = `
|
|
|
2836
2851
|
</slot>
|
|
2837
2852
|
</slot>
|
|
2838
2853
|
`;
|
|
2839
|
-
var so = class extends
|
|
2854
|
+
var so = class extends b {
|
|
2840
2855
|
constructor() {
|
|
2841
2856
|
var e;
|
|
2842
2857
|
super(), (e = this.shadowRoot) == null || e.appendChild(oo.content.cloneNode(!0));
|
|
@@ -2857,14 +2872,14 @@ var so = class extends S {
|
|
|
2857
2872
|
return this.hasAttribute(_.FULLSCREEN);
|
|
2858
2873
|
}
|
|
2859
2874
|
handleClick(e) {
|
|
2860
|
-
let t = this.isFullscreen ?
|
|
2875
|
+
let t = this.isFullscreen ? y.EXIT_FULLSCREEN : y.ENTER_FULLSCREEN;
|
|
2861
2876
|
this.dispatchEvent(new CustomEvent(t, {
|
|
2862
2877
|
bubbles: !0,
|
|
2863
2878
|
composed: !0
|
|
2864
2879
|
}));
|
|
2865
2880
|
}
|
|
2866
2881
|
};
|
|
2867
|
-
ao = so, e(so, "observedAttributes", [...
|
|
2882
|
+
ao = so, e(so, "observedAttributes", [...x(ao, "observedAttributes", ao), _.FULLSCREEN]);
|
|
2868
2883
|
//#endregion
|
|
2869
2884
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2870
2885
|
var co, lo = "\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", uo = document.createElement("template");
|
|
@@ -2880,7 +2895,7 @@ uo.innerHTML = `
|
|
|
2880
2895
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2881
2896
|
</slot>
|
|
2882
2897
|
`;
|
|
2883
|
-
var fo = /* @__PURE__ */ new WeakSet(), po = class extends
|
|
2898
|
+
var fo = /* @__PURE__ */ new WeakSet(), po = class extends Be {
|
|
2884
2899
|
constructor() {
|
|
2885
2900
|
var e, t, n, r;
|
|
2886
2901
|
super(), g(this, fo), (e = this.shadowRoot) == null || e.appendChild(uo.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]");
|
|
@@ -2898,7 +2913,7 @@ function mo() {
|
|
|
2898
2913
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2899
2914
|
}
|
|
2900
2915
|
e(po, "observedAttributes", [
|
|
2901
|
-
...
|
|
2916
|
+
...x(co, "observedAttributes", co),
|
|
2902
2917
|
_.LANGUAGES,
|
|
2903
2918
|
_.TEXT_TRACKS
|
|
2904
2919
|
]);
|
|
@@ -3019,12 +3034,12 @@ ho.innerHTML = `
|
|
|
3019
3034
|
<div class="menu"></div>
|
|
3020
3035
|
</div>
|
|
3021
3036
|
`;
|
|
3022
|
-
var go = /* @__PURE__ */ new WeakMap(), _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(),
|
|
3037
|
+
var go = /* @__PURE__ */ new WeakMap(), _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(), K = /* @__PURE__ */ new WeakSet(), Oo = class extends HTMLElement {
|
|
3023
3038
|
constructor() {
|
|
3024
|
-
super(), g(this,
|
|
3039
|
+
super(), g(this, K), f(this, go, []), f(this, _o, []), f(this, vo, void 0), f(this, yo, void 0), f(this, bo, []), f(this, xo, []), f(this, So, null), f(this, Co, null), f(this, wo, null), f(this, To, null), f(this, Eo, null), f(this, Do, null), e(this, "handleEvent", (e) => {
|
|
3025
3040
|
switch (e.type) {
|
|
3026
3041
|
case "keydown":
|
|
3027
|
-
p(
|
|
3042
|
+
p(K, this, Lo).call(this, e);
|
|
3028
3043
|
break;
|
|
3029
3044
|
}
|
|
3030
3045
|
}), this.attachShadow({ mode: "open" }).appendChild(ho.content.cloneNode(!0));
|
|
@@ -3033,7 +3048,7 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3033
3048
|
let e = this.getRootNode();
|
|
3034
3049
|
if (e instanceof ShadowRoot) {
|
|
3035
3050
|
var t, n, r;
|
|
3036
|
-
h(wo, this, e.host.closest("vindral-controller")), (t = m(wo, this)) == null || t.connectListener(this), h(So, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), h(Co, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), p(
|
|
3051
|
+
h(wo, this, e.host.closest("vindral-controller")), (t = m(wo, this)) == null || t.connectListener(this), h(So, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), h(Co, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), p(K, this, ko).call(this), p(K, this, Ao).call(this), h(To, this, e.host), this.addEventListener("keydown", this);
|
|
3037
3052
|
}
|
|
3038
3053
|
}
|
|
3039
3054
|
disconnectedCallback() {
|
|
@@ -3043,16 +3058,16 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3043
3058
|
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
3059
|
}
|
|
3045
3060
|
set languages(e) {
|
|
3046
|
-
h(go, this, e), p(
|
|
3061
|
+
h(go, this, e), p(K, this, Mo).call(this), p(K, this, Po).call(this);
|
|
3047
3062
|
}
|
|
3048
3063
|
set textTracks(e) {
|
|
3049
|
-
h(_o, this, e), p(
|
|
3064
|
+
h(_o, this, e), p(K, this, jo).call(this), p(K, this, Fo).call(this);
|
|
3050
3065
|
}
|
|
3051
3066
|
set language(e) {
|
|
3052
|
-
h(vo, this, e), p(
|
|
3067
|
+
h(vo, this, e), p(K, this, Po).call(this);
|
|
3053
3068
|
}
|
|
3054
3069
|
set textTrack(e) {
|
|
3055
|
-
h(yo, this, e), p(
|
|
3070
|
+
h(yo, this, e), p(K, this, Fo).call(this);
|
|
3056
3071
|
}
|
|
3057
3072
|
get keysUsed() {
|
|
3058
3073
|
return [
|
|
@@ -3086,34 +3101,34 @@ function ko() {
|
|
|
3086
3101
|
}).observe(this);
|
|
3087
3102
|
}
|
|
3088
3103
|
function Ao() {
|
|
3089
|
-
m(So, this) && (p(
|
|
3104
|
+
m(So, this) && (p(K, this, Mo).call(this), p(K, this, Po).call(this)), m(Co, this) && (p(K, this, jo).call(this), p(K, this, Fo).call(this));
|
|
3090
3105
|
}
|
|
3091
3106
|
function jo() {
|
|
3092
3107
|
m(Co, this).innerHTML = "", h(xo, this, []);
|
|
3093
|
-
let e = p(
|
|
3108
|
+
let e = p(K, this, No).call(this, "Off", "textTrack", void 0);
|
|
3094
3109
|
m(Co, this).appendChild(e), m(xo, this).push({
|
|
3095
3110
|
element: e,
|
|
3096
3111
|
value: void 0
|
|
3097
3112
|
}), m(_o, this).forEach((e) => {
|
|
3098
|
-
let t = p(
|
|
3113
|
+
let t = p(K, this, No).call(this, e, "textTrack", e);
|
|
3099
3114
|
m(Co, this).appendChild(t), m(xo, this).push({
|
|
3100
3115
|
element: t,
|
|
3101
3116
|
value: e
|
|
3102
3117
|
});
|
|
3103
|
-
}), p(
|
|
3118
|
+
}), p(K, this, Fo).call(this);
|
|
3104
3119
|
}
|
|
3105
3120
|
function Mo() {
|
|
3106
3121
|
m(So, this).innerHTML = "", h(bo, this, []), m(go, this).forEach((e) => {
|
|
3107
|
-
let t = p(
|
|
3122
|
+
let t = p(K, this, No).call(this, e, "language", e);
|
|
3108
3123
|
m(So, this).appendChild(t), m(bo, this).push({
|
|
3109
3124
|
element: t,
|
|
3110
3125
|
value: e
|
|
3111
3126
|
});
|
|
3112
|
-
}), p(
|
|
3127
|
+
}), p(K, this, Po).call(this);
|
|
3113
3128
|
}
|
|
3114
3129
|
function No(e, t, n) {
|
|
3115
3130
|
let r = document.createElement("div");
|
|
3116
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(
|
|
3131
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(K, this, Io).call(this, n, t)), r;
|
|
3117
3132
|
}
|
|
3118
3133
|
function Po() {
|
|
3119
3134
|
m(Eo, this) && (m(Eo, this).removeAttribute("aria-selected"), m(Eo, this).tabIndex = -1);
|
|
@@ -3134,7 +3149,7 @@ function Io(e, t) {
|
|
|
3134
3149
|
bubbles: !0,
|
|
3135
3150
|
composed: !0
|
|
3136
3151
|
}));
|
|
3137
|
-
let n = t === "language" ?
|
|
3152
|
+
let n = t === "language" ? y.SET_LANGUAGE : y.SET_TEXT_TRACK;
|
|
3138
3153
|
this.dispatchEvent(new CustomEvent(n, {
|
|
3139
3154
|
bubbles: !0,
|
|
3140
3155
|
composed: !0,
|
|
@@ -3148,17 +3163,17 @@ function Lo(e) {
|
|
|
3148
3163
|
(a = m(To, this)) == null || a.hide();
|
|
3149
3164
|
} else if (t === "Enter" || t === " ") {
|
|
3150
3165
|
var o;
|
|
3151
|
-
(o = p(
|
|
3152
|
-
} else p(
|
|
3166
|
+
(o = p(K, this, Bo).call(this)) == null || (o = o.element) == null || o.click();
|
|
3167
|
+
} else p(K, this, Ro).call(this, e);
|
|
3153
3168
|
}
|
|
3154
3169
|
function Ro(e) {
|
|
3155
3170
|
var t;
|
|
3156
|
-
let { key: n } = e, r = [...m(bo, this), ...m(xo, this)], i = (t = p(
|
|
3171
|
+
let { key: n } = e, r = [...m(bo, this), ...m(xo, this)], i = (t = p(K, this, Bo).call(this)) == null ? r[0] : t;
|
|
3157
3172
|
if (!i) return;
|
|
3158
3173
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3159
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(
|
|
3174
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(K, this, zo).call(this, a, "left") : n === "ArrowRight" ? o = p(K, this, zo).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
3175
|
let s = r[o];
|
|
3161
|
-
s && (p(
|
|
3176
|
+
s && (p(K, this, Vo).call(this, s.value), s.element.focus());
|
|
3162
3177
|
}
|
|
3163
3178
|
function zo(e, t) {
|
|
3164
3179
|
let n = m(bo, this).length, r = m(xo, this).length;
|
|
@@ -3180,7 +3195,7 @@ e(Oo, "observedAttributes", [
|
|
|
3180
3195
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3181
3196
|
var Ho, Uo = document.createElement("template");
|
|
3182
3197
|
Uo.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";
|
|
3183
|
-
var Wo = class extends
|
|
3198
|
+
var Wo = class extends b {
|
|
3184
3199
|
constructor() {
|
|
3185
3200
|
var e;
|
|
3186
3201
|
super(), (e = this.shadowRoot) == null || e.appendChild(Uo.content.cloneNode(!0));
|
|
@@ -3208,14 +3223,14 @@ var Wo = class extends S {
|
|
|
3208
3223
|
e ? this.removeAttribute(_.TIMESHIFT_POSITION) : this.setAttribute(_.TIMESHIFT_POSITION, "");
|
|
3209
3224
|
}
|
|
3210
3225
|
handleClick(e) {
|
|
3211
|
-
this.isLive || this.dispatchEvent(new CustomEvent(
|
|
3226
|
+
this.isLive || this.dispatchEvent(new CustomEvent(y.GO_LIVE, {
|
|
3212
3227
|
bubbles: !0,
|
|
3213
3228
|
composed: !0
|
|
3214
3229
|
}));
|
|
3215
3230
|
}
|
|
3216
3231
|
};
|
|
3217
3232
|
Ho = Wo, e(Wo, "observedAttributes", [
|
|
3218
|
-
...
|
|
3233
|
+
...x(Ho, "observedAttributes", Ho),
|
|
3219
3234
|
_.TIMESHIFT_POSITION,
|
|
3220
3235
|
_.DURATION
|
|
3221
3236
|
]);
|
|
@@ -3250,7 +3265,7 @@ Ko.innerHTML = `
|
|
|
3250
3265
|
</slot>
|
|
3251
3266
|
</slot>
|
|
3252
3267
|
`;
|
|
3253
|
-
var qo = class extends
|
|
3268
|
+
var qo = class extends b {
|
|
3254
3269
|
constructor() {
|
|
3255
3270
|
var e;
|
|
3256
3271
|
super(), (e = this.shadowRoot) == null || e.appendChild(Ko.content.cloneNode(!0));
|
|
@@ -3271,14 +3286,14 @@ var qo = class extends S {
|
|
|
3271
3286
|
return this.hasAttribute(_.MUTED);
|
|
3272
3287
|
}
|
|
3273
3288
|
handleClick(e) {
|
|
3274
|
-
let t = this.muted ?
|
|
3289
|
+
let t = this.muted ? y.UNMUTE : y.MUTE;
|
|
3275
3290
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3276
3291
|
bubbles: !0,
|
|
3277
3292
|
composed: !0
|
|
3278
3293
|
}));
|
|
3279
3294
|
}
|
|
3280
3295
|
};
|
|
3281
|
-
Go = qo, e(qo, "observedAttributes", [...
|
|
3296
|
+
Go = qo, e(qo, "observedAttributes", [...x(Go, "observedAttributes", Go), _.MUTED]);
|
|
3282
3297
|
//#endregion
|
|
3283
3298
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3284
3299
|
var Jo, Yo = document.createElement("template");
|
|
@@ -3296,7 +3311,7 @@ Yo.innerHTML = `
|
|
|
3296
3311
|
<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
3312
|
</slot>
|
|
3298
3313
|
`;
|
|
3299
|
-
var Xo = class extends
|
|
3314
|
+
var Xo = class extends b {
|
|
3300
3315
|
constructor() {
|
|
3301
3316
|
var e;
|
|
3302
3317
|
super(), (e = this.shadowRoot) == null || e.appendChild(Yo.content.cloneNode(!0));
|
|
@@ -3317,7 +3332,7 @@ var Xo = class extends S {
|
|
|
3317
3332
|
return this.hasAttribute(_.IS_PIP);
|
|
3318
3333
|
}
|
|
3319
3334
|
handleClick(e) {
|
|
3320
|
-
let t = this.isPictureInPictureActive ?
|
|
3335
|
+
let t = this.isPictureInPictureActive ? y.EXIT_PIP : y.ENTER_PIP;
|
|
3321
3336
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3322
3337
|
bubbles: !0,
|
|
3323
3338
|
composed: !0
|
|
@@ -3325,7 +3340,7 @@ var Xo = class extends S {
|
|
|
3325
3340
|
}
|
|
3326
3341
|
};
|
|
3327
3342
|
Jo = Xo, e(Xo, "observedAttributes", [
|
|
3328
|
-
...
|
|
3343
|
+
...x(Jo, "observedAttributes", Jo),
|
|
3329
3344
|
_.IS_PIP,
|
|
3330
3345
|
_.PIP_AVAILABLE
|
|
3331
3346
|
]);
|
|
@@ -3356,7 +3371,7 @@ Qo.innerHTML = `
|
|
|
3356
3371
|
</slot>
|
|
3357
3372
|
</slot>
|
|
3358
3373
|
`;
|
|
3359
|
-
var $o = class extends
|
|
3374
|
+
var $o = class extends b {
|
|
3360
3375
|
constructor() {
|
|
3361
3376
|
var e;
|
|
3362
3377
|
super(), (e = this.shadowRoot) == null || e.appendChild(Qo.content.cloneNode(!0));
|
|
@@ -3377,23 +3392,23 @@ var $o = class extends S {
|
|
|
3377
3392
|
return this.hasAttribute(_.PAUSED);
|
|
3378
3393
|
}
|
|
3379
3394
|
handleClick(e) {
|
|
3380
|
-
let t = this.paused ?
|
|
3395
|
+
let t = this.paused ? y.PLAY : y.PAUSE;
|
|
3381
3396
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3382
3397
|
bubbles: !0,
|
|
3383
3398
|
composed: !0
|
|
3384
3399
|
}));
|
|
3385
3400
|
}
|
|
3386
3401
|
};
|
|
3387
|
-
Zo = $o, e($o, "observedAttributes", [...
|
|
3402
|
+
Zo = $o, e($o, "observedAttributes", [...x(Zo, "observedAttributes", Zo), _.PAUSED]);
|
|
3388
3403
|
//#endregion
|
|
3389
3404
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3390
|
-
var
|
|
3405
|
+
var q = {
|
|
3391
3406
|
TITLE: "title",
|
|
3392
3407
|
OFFLINE: "offline",
|
|
3393
3408
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3394
3409
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3395
3410
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3396
|
-
}, es = Object.values(
|
|
3411
|
+
}, es = Object.values(q), ts = /* @__PURE__ */ new WeakMap(), 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 WeakSet(), ls = class extends pe {
|
|
3397
3412
|
constructor(e) {
|
|
3398
3413
|
super(), g(this, cs), f(this, ts, void 0), f(this, ns, void 0), f(this, rs, !1), f(this, is, !1), f(this, as, !0), f(this, os, null), f(this, ss, null), h(ns, this, e), h(ts, this, new fe({
|
|
3399
3414
|
publicEndpoint: e.url,
|
|
@@ -3441,7 +3456,7 @@ function ps() {
|
|
|
3441
3456
|
}
|
|
3442
3457
|
//#endregion
|
|
3443
3458
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3444
|
-
var ms = /\/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, hs = navigator.userAgent.toLowerCase(), gs = ms.test(hs), _s = (e) =>
|
|
3459
|
+
var ms = /\/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, hs = navigator.userAgent.toLowerCase(), gs = ms.test(hs), _s = (e) => va.observedAttributes.includes(e), vs = `
|
|
3445
3460
|
<style>
|
|
3446
3461
|
:host {
|
|
3447
3462
|
container-type: inline-size;
|
|
@@ -3487,7 +3502,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3487
3502
|
// needs to be higher than bottom bar/UI
|
|
3488
3503
|
}
|
|
3489
3504
|
|
|
3490
|
-
:host([${
|
|
3505
|
+
:host([${q.OFFLINE}]) {
|
|
3491
3506
|
aspect-ratio: 16 / 9;
|
|
3492
3507
|
vindral-controller {
|
|
3493
3508
|
--vindral-ui-display: none;
|
|
@@ -3598,84 +3613,84 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3598
3613
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3599
3614
|
</vindral-center-overlay>
|
|
3600
3615
|
</vindral-controller>
|
|
3601
|
-
`, xs = document.createElement("template"), Ss = /* @__PURE__ */ new WeakMap(),
|
|
3616
|
+
`, xs = document.createElement("template"), Ss = /* @__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
3617
|
constructor() {
|
|
3603
|
-
super(), g(this,
|
|
3618
|
+
super(), g(this, Y), f(this, Ss, 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
3619
|
Array.from(this.attributes).forEach((e) => {
|
|
3605
3620
|
m(ks, this).call(this, e.name, e.value);
|
|
3606
3621
|
});
|
|
3607
3622
|
}), f(this, ks, (e, t) => {
|
|
3608
|
-
_s(e) && (
|
|
3623
|
+
_s(e) && (v(t) ? m(J, this).setAttribute(e, t) : m(J, this).removeAttribute(e));
|
|
3609
3624
|
}), f(this, As, () => {
|
|
3610
3625
|
Array.from(this.children).forEach((e) => {
|
|
3611
3626
|
m(Ds, this).add(e);
|
|
3612
3627
|
});
|
|
3613
3628
|
}), f(this, js, () => {
|
|
3614
|
-
let e = m(
|
|
3629
|
+
let e = m(J, this).instance;
|
|
3615
3630
|
e && (e.on("is live", (e) => {
|
|
3616
|
-
e ? (this.removeAttribute(
|
|
3631
|
+
e ? (this.removeAttribute(q.OFFLINE), p(Y, this, zs).call(this)) : (this.setAttribute(q.OFFLINE, ""), p(Y, this, Rs).call(this, "Stream is offline", "Please stand by"));
|
|
3617
3632
|
}), e.on("channels", (e) => {
|
|
3618
|
-
let t = m(
|
|
3619
|
-
n && p(
|
|
3633
|
+
let t = m(J, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3634
|
+
n && p(Y, this, Ls).call(this, n);
|
|
3620
3635
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3621
3636
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3622
|
-
n && p(
|
|
3637
|
+
n && p(Y, this, Ls).call(this, n);
|
|
3623
3638
|
}), e.on("error", (e) => {
|
|
3624
3639
|
if (e.code() === "connection_failed") {
|
|
3625
|
-
p(
|
|
3640
|
+
p(Y, this, Rs).call(this, "Stream is offline", "Please stand by");
|
|
3626
3641
|
return;
|
|
3627
3642
|
}
|
|
3628
|
-
e.isFatal() && (e.code() === "access_forbidden" ? p(
|
|
3643
|
+
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(q.OFFLINE, ""), m(J, this).dispatchEvent(new CustomEvent(y.EXIT_FULLSCREEN)), m(J, this).dispatchEvent(new CustomEvent(y.EXIT_PIP)));
|
|
3629
3644
|
}));
|
|
3630
3645
|
}), f(this, Ms, () => {
|
|
3631
|
-
m(
|
|
3632
|
-
}), h(Ss, this, this.attachShadow({ mode: "open" })), p(
|
|
3646
|
+
m(J, this).connect(), m(ws, this).setAttribute("hidden", ""), p(Y, this, zs).call(this), m(J, this).focus();
|
|
3647
|
+
}), h(Ss, this, this.attachShadow({ mode: "open" })), p(Y, this, Fs).call(this), h(J, this, m(Ss, this).querySelector("vindral-controller")), h(Cs, this, m(Ss, this).querySelector("#vindral-message")), h(ws, this, m(Ss, this).querySelector("#play-overlay")), h(Ts, this, m(Ss, this).querySelector("#center-overlay"));
|
|
3633
3648
|
}
|
|
3634
3649
|
connectedCallback() {
|
|
3635
|
-
this.setAttribute(
|
|
3650
|
+
this.setAttribute(q.OFFLINE, ""), m(J, this).addEventListener("vindral-instance-ready", m(js, this)), p(Y, this, Is).call(this);
|
|
3636
3651
|
}
|
|
3637
3652
|
disconnectedCallback() {
|
|
3638
3653
|
var e;
|
|
3639
|
-
m(
|
|
3654
|
+
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
3655
|
}
|
|
3641
3656
|
attributeChangedCallback(e, t, n) {
|
|
3642
|
-
if (t !== n) if (e === _.MEDIA || e ===
|
|
3643
|
-
else if (e ===
|
|
3657
|
+
if (t !== n) if (e === _.MEDIA || e === q.ADVANCED_RENDITION_MENU_ENABLED) p(Y, this, Fs).call(this);
|
|
3658
|
+
else if (e === q.REFRESH_POSTER_ENABLED) {
|
|
3644
3659
|
let e = m(Ss, this).querySelector("vindral-poster-overlay");
|
|
3645
|
-
e && (e.disabled =
|
|
3660
|
+
e && (e.disabled = S(this.getAttribute(q.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3646
3661
|
} else m(ks, this).call(this, e, n);
|
|
3647
3662
|
}
|
|
3648
3663
|
get instance() {
|
|
3649
|
-
return m(
|
|
3664
|
+
return m(J, this).instance;
|
|
3650
3665
|
}
|
|
3651
3666
|
get airPlay() {
|
|
3652
|
-
return m(
|
|
3667
|
+
return m(J, this).airPlay;
|
|
3653
3668
|
}
|
|
3654
3669
|
get timelineMarkers() {
|
|
3655
|
-
return m(
|
|
3670
|
+
return m(J, this).timelineMarkers;
|
|
3656
3671
|
}
|
|
3657
3672
|
set timelineMarkers(e) {
|
|
3658
|
-
m(
|
|
3673
|
+
m(J, this).timelineMarkers = e;
|
|
3659
3674
|
}
|
|
3660
3675
|
};
|
|
3661
3676
|
function Ps() {
|
|
3662
|
-
let e = _e(this.getAttribute(_.MEDIA)), t =
|
|
3677
|
+
let e = _e(this.getAttribute(_.MEDIA)), t = S(this.getAttribute(q.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3663
3678
|
return e === "audio" ? bs : ys(t);
|
|
3664
3679
|
}
|
|
3665
3680
|
function Fs() {
|
|
3666
|
-
let e = m(Ss, this).hasChildNodes(), t = 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)), xs.innerHTML = p(
|
|
3681
|
+
let e = m(Ss, this).hasChildNodes(), t = e ? m(J, this) : void 0, n = e ? m(ws, this) : void 0;
|
|
3682
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)), xs.innerHTML = p(Y, this, Ps).call(this);
|
|
3668
3683
|
let r = xs.content.cloneNode(!0);
|
|
3669
|
-
h(
|
|
3670
|
-
m(
|
|
3671
|
-
}), m(Os, this).call(this), m(Ss, this).innerHTML = "", m(Ss, this).appendChild(r), this.isConnected && (m(
|
|
3684
|
+
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) => {
|
|
3685
|
+
m(J, this).appendChild(e);
|
|
3686
|
+
}), m(Os, this).call(this), m(Ss, this).innerHTML = "", m(Ss, this).appendChild(r), this.isConnected && (m(J, this).addEventListener("vindral-instance-ready", m(js, this)), m(Es, this) && m(ws, this).addEventListener("click", m(Ms, this)));
|
|
3672
3687
|
}
|
|
3673
3688
|
function Is() {
|
|
3674
3689
|
var e;
|
|
3675
|
-
if (
|
|
3676
|
-
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
|
-
if (!
|
|
3678
|
-
this.setAttribute(
|
|
3690
|
+
if (S(this.getAttribute(q.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3691
|
+
let t = this.getAttribute("url") || "https://lb.cdn.vindral.com", n = this.getAttribute("channel-id"), r = (e = this.getAttribute("authentication-token")) == null ? void 0 : e, i = this.hasAttribute("infinite-reconnect");
|
|
3692
|
+
if (!n) {
|
|
3693
|
+
this.setAttribute(q.OFFLINE, ""), p(Y, this, Rs).call(this, "Invalid options", "Please enter a channel id to start the stream");
|
|
3679
3694
|
return;
|
|
3680
3695
|
}
|
|
3681
3696
|
h(Es, this, new ls({
|
|
@@ -3684,15 +3699,15 @@ function Is() {
|
|
|
3684
3699
|
authenticationToken: r,
|
|
3685
3700
|
infiniteReconnect: i
|
|
3686
3701
|
})), m(Es, this).on("live", (e) => {
|
|
3687
|
-
m(
|
|
3702
|
+
m(J, this).connect(), this.removeAttribute("offline"), p(Y, this, zs).call(this), p(Y, this, Ls).call(this, e);
|
|
3688
3703
|
}), m(Es, this).on("timeout", () => {
|
|
3689
|
-
p(
|
|
3704
|
+
p(Y, this, zs).call(this), m(ws, this).removeAttribute("hidden");
|
|
3690
3705
|
}), m(Es, this).on("error", (e) => {
|
|
3691
|
-
this.setAttribute(
|
|
3706
|
+
this.setAttribute(q.OFFLINE, ""), p(Y, this, Rs).call(this, e.title, e.message);
|
|
3692
3707
|
}), m(ws, this).addEventListener("click", m(Ms, this)), this.hasAttribute("paused") && m(Es, this).start();
|
|
3693
3708
|
}
|
|
3694
3709
|
function Ls(e) {
|
|
3695
|
-
let t =
|
|
3710
|
+
let t = he(this.getAttribute("title"), !1);
|
|
3696
3711
|
if (!t) return;
|
|
3697
3712
|
let n = this.getAttribute("poster"), r = typeof t == "string" ? t : e.name, i;
|
|
3698
3713
|
if (typeof n == "string") i = n;
|
|
@@ -3700,7 +3715,7 @@ function Ls(e) {
|
|
|
3700
3715
|
var a, o;
|
|
3701
3716
|
i = (a = (o = this.instance) == null ? void 0 : o.getThumbnailUrl()) == null ? e.thumbnailUrls.length ? e.thumbnailUrls[0] : void 0 : a;
|
|
3702
3717
|
}
|
|
3703
|
-
|
|
3718
|
+
ke({
|
|
3704
3719
|
title: r,
|
|
3705
3720
|
poster: i
|
|
3706
3721
|
});
|
|
@@ -3713,7 +3728,7 @@ function Rs(e, t) {
|
|
|
3713
3728
|
function zs() {
|
|
3714
3729
|
m(Cs, this).setAttribute("hidden", ""), m(Ts, this).removeAttribute("backdrop");
|
|
3715
3730
|
}
|
|
3716
|
-
e(Ns, "observedAttributes", [...
|
|
3731
|
+
e(Ns, "observedAttributes", [...va.observedAttributes, ...es]);
|
|
3717
3732
|
//#endregion
|
|
3718
3733
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3719
3734
|
var Bs = document.createElement("template");
|
|
@@ -3818,7 +3833,7 @@ ec.innerHTML = `
|
|
|
3818
3833
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3819
3834
|
</slot>
|
|
3820
3835
|
`;
|
|
3821
|
-
var tc = /* @__PURE__ */ new WeakSet(), nc = class extends
|
|
3836
|
+
var tc = /* @__PURE__ */ new WeakSet(), nc = class extends Be {
|
|
3822
3837
|
constructor() {
|
|
3823
3838
|
var e, t, n, r;
|
|
3824
3839
|
super(), g(this, tc), (e = this.shadowRoot) == null || e.appendChild(ec.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]");
|
|
@@ -3835,17 +3850,17 @@ function rc() {
|
|
|
3835
3850
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3836
3851
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3837
3852
|
}
|
|
3838
|
-
e(nc, "observedAttributes", [...
|
|
3853
|
+
e(nc, "observedAttributes", [...x(Qs, "observedAttributes", Qs), _.RENDITION_LEVELS]);
|
|
3839
3854
|
//#endregion
|
|
3840
3855
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3841
3856
|
var ic = document.createElement("template");
|
|
3842
3857
|
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(),
|
|
3858
|
+
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
3859
|
constructor() {
|
|
3845
|
-
super(), g(this,
|
|
3860
|
+
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
3861
|
switch (e.type) {
|
|
3847
3862
|
case "keydown":
|
|
3848
|
-
p(
|
|
3863
|
+
p(X, this, _c).call(this, e);
|
|
3849
3864
|
break;
|
|
3850
3865
|
}
|
|
3851
3866
|
}), this.attachShadow({ mode: "open" }).appendChild(ic.content.cloneNode(!0));
|
|
@@ -3854,7 +3869,7 @@ var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc =
|
|
|
3854
3869
|
let e = this.getRootNode();
|
|
3855
3870
|
if (e instanceof ShadowRoot) {
|
|
3856
3871
|
var t;
|
|
3857
|
-
h(lc, this, e.host.closest("vindral-controller")), (t = m(lc, this)) == null || t.connectListener(this), p(
|
|
3872
|
+
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
3873
|
}
|
|
3859
3874
|
}
|
|
3860
3875
|
disconnectedCallback() {
|
|
@@ -3865,10 +3880,10 @@ var ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc =
|
|
|
3865
3880
|
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
3881
|
}
|
|
3867
3882
|
set list(e) {
|
|
3868
|
-
h(ac, this, e), p(
|
|
3883
|
+
h(ac, this, e), p(X, this, pc).call(this);
|
|
3869
3884
|
}
|
|
3870
3885
|
set maxVideoBitrate(e) {
|
|
3871
|
-
h(oc, this, e), p(
|
|
3886
|
+
h(oc, this, e), p(X, this, hc).call(this);
|
|
3872
3887
|
}
|
|
3873
3888
|
get keysUsed() {
|
|
3874
3889
|
return [
|
|
@@ -3910,14 +3925,14 @@ function pc() {
|
|
|
3910
3925
|
var n, r, i, a, o, s, c, l;
|
|
3911
3926
|
let u = document.createElement("div");
|
|
3912
3927
|
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(
|
|
3914
|
-
u.textContent = e.video ?
|
|
3928
|
+
let ee = p(X, this, mc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3929
|
+
u.textContent = e.video ? me(e.video) : "";
|
|
3915
3930
|
let d = document.createElement("span");
|
|
3916
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${
|
|
3931
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${De(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => p(X, this, gc).call(this, e)), m(cc, this).push({
|
|
3917
3932
|
el: u,
|
|
3918
3933
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3919
3934
|
}), t.appendChild(u);
|
|
3920
|
-
}), p(
|
|
3935
|
+
}), p(X, this, hc).call(this));
|
|
3921
3936
|
}
|
|
3922
3937
|
function mc(e) {
|
|
3923
3938
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
@@ -3943,7 +3958,7 @@ function gc(e) {
|
|
|
3943
3958
|
this.dispatchEvent(new Event("change", {
|
|
3944
3959
|
bubbles: !0,
|
|
3945
3960
|
composed: !0
|
|
3946
|
-
})), this.dispatchEvent(new CustomEvent(
|
|
3961
|
+
})), this.dispatchEvent(new CustomEvent(y.SET_RENDITION, {
|
|
3947
3962
|
bubbles: !0,
|
|
3948
3963
|
composed: !0,
|
|
3949
3964
|
detail: e
|
|
@@ -3956,17 +3971,17 @@ function _c(e) {
|
|
|
3956
3971
|
(a = m(uc, this)) == null || a.hide();
|
|
3957
3972
|
} else if (t === "Enter" || t === " ") {
|
|
3958
3973
|
var o;
|
|
3959
|
-
(o = p(
|
|
3960
|
-
} else p(
|
|
3974
|
+
(o = p(X, this, yc).call(this)) == null || (o = o.el) == null || o.click();
|
|
3975
|
+
} else p(X, this, vc).call(this, e);
|
|
3961
3976
|
}
|
|
3962
3977
|
function vc(e) {
|
|
3963
3978
|
var t;
|
|
3964
|
-
let { key: n } = e, r = m(cc, this), i = (t = p(
|
|
3979
|
+
let { key: n } = e, r = m(cc, this), i = (t = p(X, this, yc).call(this)) == null ? r[0] : t;
|
|
3965
3980
|
if (!i) return;
|
|
3966
3981
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3967
3982
|
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
3983
|
let s = r[o];
|
|
3969
|
-
s && (p(
|
|
3984
|
+
s && (p(X, this, bc).call(this, s.id), s.el.focus());
|
|
3970
3985
|
}
|
|
3971
3986
|
function yc() {
|
|
3972
3987
|
return m(cc, this).find((e) => e.el.tabIndex === 0);
|
|
@@ -4046,71 +4061,71 @@ xc.innerHTML = `
|
|
|
4046
4061
|
<div id="scroll-area"></div>
|
|
4047
4062
|
<slot id="content"></slot>
|
|
4048
4063
|
`;
|
|
4049
|
-
var
|
|
4064
|
+
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
4065
|
constructor() {
|
|
4051
|
-
super(), g(this, Z), f(this,
|
|
4066
|
+
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
4067
|
this.open && (this.open = !1);
|
|
4053
|
-
}), f(this,
|
|
4068
|
+
}), f(this, Oc, null), e(this, "handleEvent", (e) => {
|
|
4054
4069
|
switch (e.type) {
|
|
4055
4070
|
case "touchstart":
|
|
4056
|
-
p(Z, this,
|
|
4071
|
+
p(Z, this, Mc).call(this, e);
|
|
4057
4072
|
break;
|
|
4058
4073
|
case "touchmove":
|
|
4059
|
-
p(Z, this,
|
|
4074
|
+
p(Z, this, Nc).call(this, e);
|
|
4060
4075
|
break;
|
|
4061
4076
|
case "touchend":
|
|
4062
|
-
p(Z, this,
|
|
4077
|
+
p(Z, this, Pc).call(this, e);
|
|
4063
4078
|
break;
|
|
4064
4079
|
}
|
|
4065
|
-
}), f(this,
|
|
4066
|
-
let e = m(
|
|
4080
|
+
}), f(this, kc, () => {
|
|
4081
|
+
let e = m(Ec, this);
|
|
4067
4082
|
if (this.scrollTop === 0) {
|
|
4068
|
-
p(Z, this,
|
|
4083
|
+
p(Z, this, Hc).call(this, e);
|
|
4069
4084
|
return;
|
|
4070
4085
|
}
|
|
4071
|
-
if (!e && !p(Z, this,
|
|
4072
|
-
p(Z, this,
|
|
4086
|
+
if (!e && !p(Z, this, Fc).call(this)) {
|
|
4087
|
+
p(Z, this, Bc).call(this), p(Z, this, Hc).call(this);
|
|
4073
4088
|
return;
|
|
4074
4089
|
}
|
|
4075
|
-
!this.visible && this.scrollTop > 0 && !m(
|
|
4090
|
+
!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
4091
|
}), this.attachShadow({ mode: "open" }).appendChild(xc.content.cloneNode(!0));
|
|
4077
4092
|
}
|
|
4078
4093
|
connectedCallback() {
|
|
4079
4094
|
let e = this.getRootNode();
|
|
4080
4095
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
4081
4096
|
var t, n, r;
|
|
4082
|
-
h(
|
|
4097
|
+
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
4098
|
let s = this.hasAttribute("touch-enabled");
|
|
4084
|
-
if (h(
|
|
4099
|
+
if (h(Ec, this, ce() && s), !m(Ec, this)) this.setAttribute("snap", "");
|
|
4085
4100
|
else {
|
|
4086
4101
|
var i, a, o;
|
|
4087
|
-
(i = m(
|
|
4102
|
+
(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
4103
|
}
|
|
4089
|
-
this.addEventListener("scroll", m(
|
|
4104
|
+
this.addEventListener("scroll", m(kc, this));
|
|
4090
4105
|
}
|
|
4091
4106
|
}
|
|
4092
4107
|
disconnectedCallback() {
|
|
4093
4108
|
var e, t, n, r, i;
|
|
4094
|
-
(e = m(
|
|
4109
|
+
(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
4110
|
}
|
|
4096
4111
|
attributeChangedCallback(e, t, n) {
|
|
4097
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this,
|
|
4112
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && p(Z, this, Ic).call(this) && setTimeout(() => {
|
|
4098
4113
|
this.open = !1;
|
|
4099
4114
|
}, 300), e === "open")) if (n !== null) {
|
|
4100
4115
|
var r;
|
|
4101
|
-
h(
|
|
4102
|
-
top: (r = m(
|
|
4116
|
+
h(wc, this, !1), this.scrollTop > 0 && p(Z, this, Uc).call(this), this.scrollTo({
|
|
4117
|
+
top: (r = m(Cc, this)) == null ? void 0 : r.clientHeight,
|
|
4103
4118
|
behavior: "smooth"
|
|
4104
4119
|
});
|
|
4105
|
-
} else p(Z, this,
|
|
4120
|
+
} else p(Z, this, Vc).call(this);
|
|
4106
4121
|
}
|
|
4107
4122
|
set open(e) {
|
|
4108
4123
|
if (e) {
|
|
4109
4124
|
this.setAttribute("open", "");
|
|
4110
4125
|
return;
|
|
4111
4126
|
}
|
|
4112
|
-
let t = this.hasAttribute("open"), n = this.visible || p(Z, this,
|
|
4113
|
-
t ? this.removeAttribute("open") : n ? p(Z, this,
|
|
4127
|
+
let t = this.hasAttribute("open"), n = this.visible || p(Z, this, Ic).call(this);
|
|
4128
|
+
t ? this.removeAttribute("open") : n ? p(Z, this, Vc).call(this) : (h(wc, this, !1), this.removeAttribute("snap-touch"));
|
|
4114
4129
|
}
|
|
4115
4130
|
get open() {
|
|
4116
4131
|
return this.hasAttribute("open");
|
|
@@ -4122,125 +4137,125 @@ var X = /* @__PURE__ */ new WeakMap(), Sc = /* @__PURE__ */ new WeakMap(), Cc =
|
|
|
4122
4137
|
return this.hasAttribute("visible");
|
|
4123
4138
|
}
|
|
4124
4139
|
};
|
|
4125
|
-
function
|
|
4126
|
-
return p(Z, this,
|
|
4140
|
+
function jc() {
|
|
4141
|
+
return p(Z, this, Fc).call(this) || p(Z, this, zc).call(this) || p(Z, this, Ic).call(this);
|
|
4127
4142
|
}
|
|
4128
|
-
function
|
|
4143
|
+
function Mc(e) {
|
|
4129
4144
|
let t = e.touches[0];
|
|
4130
|
-
t && (h(
|
|
4145
|
+
t && (h(Tc, this, p(Z, this, jc).call(this)), m(Tc, this) && (h(wc, this, !1), h(Oc, this, t.clientY)));
|
|
4131
4146
|
}
|
|
4132
|
-
function
|
|
4133
|
-
if (!(!m(
|
|
4134
|
-
let t = e.touches[0].clientY, n = m(
|
|
4147
|
+
function Nc(e) {
|
|
4148
|
+
if (!(!m(Tc, this) || m(Oc, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4149
|
+
let t = e.touches[0].clientY, n = m(Oc, this) - t;
|
|
4135
4150
|
this.scrollTop = Math.max(0, n);
|
|
4136
4151
|
}
|
|
4137
4152
|
}
|
|
4138
|
-
function
|
|
4139
|
-
m(
|
|
4153
|
+
function Pc(e) {
|
|
4154
|
+
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
4155
|
}
|
|
4141
|
-
function
|
|
4156
|
+
function Fc() {
|
|
4142
4157
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4143
4158
|
}
|
|
4144
|
-
function
|
|
4159
|
+
function Ic() {
|
|
4145
4160
|
return this.scrollTop > 0;
|
|
4146
4161
|
}
|
|
4147
|
-
function
|
|
4162
|
+
function Lc() {
|
|
4148
4163
|
var e;
|
|
4149
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(
|
|
4164
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = m(Cc, this)) == null ? void 0 : e.clientHeight);
|
|
4150
4165
|
}
|
|
4151
|
-
function
|
|
4166
|
+
function Rc() {
|
|
4152
4167
|
var e;
|
|
4153
|
-
let t = (e = m(
|
|
4168
|
+
let t = (e = m(Cc, this)) == null ? void 0 : e.clientHeight;
|
|
4154
4169
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4155
4170
|
}
|
|
4156
|
-
function
|
|
4171
|
+
function zc() {
|
|
4157
4172
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4158
|
-
return Number.isNaN(t) ? p(Z, this,
|
|
4173
|
+
return Number.isNaN(t) ? p(Z, this, Rc).call(this) > 0 : t > 0;
|
|
4159
4174
|
}
|
|
4160
|
-
function
|
|
4175
|
+
function Bc() {
|
|
4161
4176
|
let e = this.style.scrollBehavior;
|
|
4162
4177
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4163
4178
|
top: 0,
|
|
4164
4179
|
behavior: "auto"
|
|
4165
4180
|
}), this.style.scrollBehavior = e;
|
|
4166
4181
|
}
|
|
4167
|
-
function
|
|
4168
|
-
h(
|
|
4182
|
+
function Vc() {
|
|
4183
|
+
h(wc, this, !0), this.removeAttribute("snap-touch"), p(Z, this, Wc).call(this), this.scrollTo({
|
|
4169
4184
|
top: 0,
|
|
4170
4185
|
behavior: "smooth"
|
|
4171
4186
|
});
|
|
4172
4187
|
}
|
|
4173
|
-
function
|
|
4174
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), h(
|
|
4188
|
+
function Hc(e = !1) {
|
|
4189
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), h(wc, this, !1), p(Z, this, Wc).call(this);
|
|
4175
4190
|
}
|
|
4176
|
-
function
|
|
4177
|
-
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(
|
|
4191
|
+
function Uc() {
|
|
4192
|
+
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(y.LOCK_UI, {
|
|
4178
4193
|
bubbles: !0,
|
|
4179
4194
|
composed: !0
|
|
4180
4195
|
})));
|
|
4181
4196
|
}
|
|
4182
|
-
function
|
|
4183
|
-
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(
|
|
4197
|
+
function Wc() {
|
|
4198
|
+
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(y.UNLOCK_UI, {
|
|
4184
4199
|
bubbles: !0,
|
|
4185
4200
|
composed: !0
|
|
4186
4201
|
})));
|
|
4187
4202
|
}
|
|
4188
|
-
e(
|
|
4203
|
+
e(Ac, "observedAttributes", [
|
|
4189
4204
|
_.USER_INTERACTING,
|
|
4190
4205
|
"open",
|
|
4191
4206
|
"touch-enabled"
|
|
4192
4207
|
]);
|
|
4193
4208
|
//#endregion
|
|
4194
4209
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4195
|
-
var
|
|
4196
|
-
|
|
4197
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4210
|
+
var Gc = 1e3, Kc = 8, qc = document.createElement("template");
|
|
4211
|
+
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";
|
|
4212
|
+
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
4213
|
constructor() {
|
|
4199
4214
|
var e, t, n, r;
|
|
4200
|
-
super(), g(this, $), f(this, Q, void 0), f(this,
|
|
4201
|
-
if (!p($, this,
|
|
4215
|
+
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) => {
|
|
4216
|
+
if (!p($, this, pl).call(this) || p($, this, ml).call(this)) {
|
|
4202
4217
|
e.preventDefault();
|
|
4203
4218
|
return;
|
|
4204
4219
|
}
|
|
4205
|
-
h(
|
|
4220
|
+
h($c, this, !0), h(tl, this, e.pointerId);
|
|
4206
4221
|
try {
|
|
4207
4222
|
this.setPointerCapture(e.pointerId);
|
|
4208
4223
|
} catch (e) {}
|
|
4209
|
-
p($, this,
|
|
4210
|
-
}), f(this,
|
|
4211
|
-
if (!(!p($, this,
|
|
4212
|
-
if (m(
|
|
4213
|
-
e.preventDefault(), p($, this,
|
|
4224
|
+
p($, this, Sl).call(this, e);
|
|
4225
|
+
}), f(this, al, (e) => {
|
|
4226
|
+
if (!(!p($, this, pl).call(this) || p($, this, ml).call(this))) {
|
|
4227
|
+
if (m(el, this) && (cancelAnimationFrame(m(el, this)), h(el, this, null)), m($c, this) && e.pointerId === m(tl, this)) {
|
|
4228
|
+
e.preventDefault(), p($, this, Sl).call(this, e);
|
|
4214
4229
|
return;
|
|
4215
4230
|
}
|
|
4216
|
-
h(
|
|
4231
|
+
h(el, this, requestAnimationFrame(() => {
|
|
4217
4232
|
var t;
|
|
4218
|
-
if (e.pointerType !== "mouse" || m(
|
|
4219
|
-
m(
|
|
4233
|
+
if (e.pointerType !== "mouse" || m($c, this) || !this.duration) {
|
|
4234
|
+
m(Yc, this).style.opacity = "0", h(el, this, null);
|
|
4220
4235
|
return;
|
|
4221
4236
|
}
|
|
4222
|
-
let n = p($, this,
|
|
4223
|
-
if (p($, this,
|
|
4237
|
+
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;
|
|
4238
|
+
if (p($, this, wl).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4224
4239
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4225
|
-
m(
|
|
4226
|
-
} else m(
|
|
4227
|
-
h(
|
|
4240
|
+
m(Yc, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, m(Yc, this).style.opacity = "1";
|
|
4241
|
+
} else m(Yc, this).style.opacity = "0";
|
|
4242
|
+
h(el, this, null);
|
|
4228
4243
|
}));
|
|
4229
4244
|
}
|
|
4230
|
-
}), f(this,
|
|
4231
|
-
if (e.pointerId === m(
|
|
4245
|
+
}), f(this, ol, (e) => {
|
|
4246
|
+
if (e.pointerId === m(tl, this)) {
|
|
4232
4247
|
try {
|
|
4233
4248
|
this.releasePointerCapture(e.pointerId);
|
|
4234
4249
|
} catch (e) {}
|
|
4235
|
-
h(
|
|
4250
|
+
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
4251
|
}
|
|
4237
|
-
}), f(this, ol, () => {
|
|
4238
|
-
this.duration && !p($, this, pl).call(this) && (m(qc, this).style.opacity = "1");
|
|
4239
4252
|
}), f(this, sl, () => {
|
|
4240
|
-
|
|
4241
|
-
}), f(this, cl, (
|
|
4242
|
-
|
|
4243
|
-
|
|
4253
|
+
this.duration && !p($, this, ml).call(this) && (m(Jc, this).style.opacity = "1");
|
|
4254
|
+
}), f(this, cl, () => {
|
|
4255
|
+
m(Jc, this).style.opacity = "0", m(Yc, this).style.opacity = "0";
|
|
4256
|
+
}), f(this, ll, (e) => {
|
|
4257
|
+
if (p($, this, ml).call(this) || !m(Q, this) || m(Q, this) <= 0 || !Number.isFinite(m(Q, this))) return;
|
|
4258
|
+
let t = p($, this, dl).call(this);
|
|
4244
4259
|
if (t <= 0) return;
|
|
4245
4260
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4246
4261
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4248,46 +4263,46 @@ var Q = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc =
|
|
|
4248
4263
|
r = Math.max(0, n - 5);
|
|
4249
4264
|
break;
|
|
4250
4265
|
case "ArrowRight":
|
|
4251
|
-
if (p($, this,
|
|
4266
|
+
if (p($, this, Dl).call(this)) return;
|
|
4252
4267
|
r = Math.min(t, n + 5);
|
|
4253
4268
|
break;
|
|
4254
4269
|
case "Home":
|
|
4255
4270
|
r = 0;
|
|
4256
4271
|
break;
|
|
4257
4272
|
case "End":
|
|
4258
|
-
if (p($, this,
|
|
4273
|
+
if (p($, this, Dl).call(this)) return;
|
|
4259
4274
|
r = t;
|
|
4260
4275
|
break;
|
|
4261
4276
|
default: return;
|
|
4262
4277
|
}
|
|
4263
4278
|
let i = Math.min(r / t, 1);
|
|
4264
|
-
p($, this,
|
|
4265
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4279
|
+
p($, this, Cl).call(this, i);
|
|
4280
|
+
}), (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
4281
|
}
|
|
4267
4282
|
connectedCallback() {
|
|
4268
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), p($, this,
|
|
4283
|
+
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
4284
|
}
|
|
4270
4285
|
disconnectedCallback() {
|
|
4271
|
-
super.disconnectedCallback(), p($, this,
|
|
4286
|
+
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
4287
|
}
|
|
4273
4288
|
attributeChangedCallback(e, t, n) {
|
|
4274
4289
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4275
4290
|
case _.TIMESHIFT_POSITION:
|
|
4276
|
-
if (p($, this,
|
|
4277
|
-
m(
|
|
4291
|
+
if (p($, this, Dl).call(this)) {
|
|
4292
|
+
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
4293
|
return;
|
|
4279
4294
|
}
|
|
4280
4295
|
if (m(Q, this)) {
|
|
4281
|
-
h(
|
|
4296
|
+
h(rl, this, !1);
|
|
4282
4297
|
let e = Math.max(parseFloat(n) / m(Q, this), 0);
|
|
4283
|
-
this.range.value = e.toString(), p($, this,
|
|
4298
|
+
this.range.value = e.toString(), p($, this, bl).call(this);
|
|
4284
4299
|
}
|
|
4285
4300
|
break;
|
|
4286
4301
|
case _.DURATION:
|
|
4287
|
-
h(Q, this, parseFloat(n) || 0), p($, this,
|
|
4302
|
+
h(Q, this, parseFloat(n) || 0), p($, this, bl).call(this), p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4288
4303
|
break;
|
|
4289
4304
|
case _.TIMELINE_MARKERS:
|
|
4290
|
-
h(
|
|
4305
|
+
h(Zc, this, Mr(n)), p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4291
4306
|
break;
|
|
4292
4307
|
}
|
|
4293
4308
|
}
|
|
@@ -4305,54 +4320,54 @@ var Q = /* @__PURE__ */ new WeakMap(), qc = /* @__PURE__ */ new WeakMap(), Jc =
|
|
|
4305
4320
|
this.setAttribute(_.DURATION, e.toString());
|
|
4306
4321
|
}
|
|
4307
4322
|
};
|
|
4308
|
-
function
|
|
4323
|
+
function dl() {
|
|
4309
4324
|
return m(Q, this) ? m(Q, this) : 1;
|
|
4310
4325
|
}
|
|
4311
|
-
function
|
|
4326
|
+
function fl() {
|
|
4312
4327
|
let e = m(Q, this);
|
|
4313
4328
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4314
4329
|
}
|
|
4315
|
-
function fl() {
|
|
4316
|
-
return p($, this, dl).call(this) !== void 0;
|
|
4317
|
-
}
|
|
4318
4330
|
function pl() {
|
|
4319
|
-
return
|
|
4331
|
+
return p($, this, fl).call(this) !== void 0;
|
|
4320
4332
|
}
|
|
4321
4333
|
function ml() {
|
|
4334
|
+
return m(nl, this);
|
|
4335
|
+
}
|
|
4336
|
+
function hl() {
|
|
4322
4337
|
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 =
|
|
4338
|
+
let t = Date.now(), n = (e = m(Q, this)) == null ? 0 : e, r = m(Xc, this).children, i = 0;
|
|
4339
|
+
for (let e of m(Zc, this)) {
|
|
4340
|
+
let a = Nr(e.time, t, n);
|
|
4326
4341
|
if (a === null) continue;
|
|
4327
4342
|
let o = r[i];
|
|
4328
|
-
o || (o = document.createElement("div"), o.className = "marker", m(
|
|
4343
|
+
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
4344
|
}
|
|
4330
|
-
for (; m(
|
|
4345
|
+
for (; m(Xc, this).children.length > i;) {
|
|
4331
4346
|
var a;
|
|
4332
|
-
(a = m(
|
|
4347
|
+
(a = m(Xc, this).lastElementChild) == null || a.remove();
|
|
4333
4348
|
}
|
|
4334
4349
|
}
|
|
4335
|
-
function
|
|
4336
|
-
let e = p($, this,
|
|
4350
|
+
function gl() {
|
|
4351
|
+
let e = p($, this, fl).call(this);
|
|
4337
4352
|
if (e === void 0) return !1;
|
|
4338
4353
|
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);
|
|
4354
|
+
return m(Zc, this).some((e) => e.time >= t);
|
|
4345
4355
|
}
|
|
4346
4356
|
function _l() {
|
|
4347
|
-
|
|
4357
|
+
this.isConnected && p($, this, gl).call(this) ? m(Qc, this) === null && h(Qc, this, window.setInterval(() => {
|
|
4358
|
+
p($, this, hl).call(this), p($, this, _l).call(this);
|
|
4359
|
+
}, Gc)) : p($, this, vl).call(this);
|
|
4360
|
+
}
|
|
4361
|
+
function vl() {
|
|
4362
|
+
m(Qc, this) !== null && (window.clearInterval(m(Qc, this)), h(Qc, this, null));
|
|
4348
4363
|
}
|
|
4349
|
-
function
|
|
4350
|
-
if (m(
|
|
4364
|
+
function yl(e) {
|
|
4365
|
+
if (m(Zc, this).length === 0 || !m(Q, this)) return null;
|
|
4351
4366
|
let t = this.getBoundingClientRect().width;
|
|
4352
4367
|
if (!t) return null;
|
|
4353
|
-
let n =
|
|
4354
|
-
for (let t of m(
|
|
4355
|
-
let a =
|
|
4368
|
+
let n = Kc / t, r = Date.now(), i = null;
|
|
4369
|
+
for (let t of m(Zc, this)) {
|
|
4370
|
+
let a = Nr(t.time, r, m(Q, this));
|
|
4356
4371
|
if (a === null) continue;
|
|
4357
4372
|
let o = Math.abs(a - e);
|
|
4358
4373
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4362,59 +4377,59 @@ function vl(e) {
|
|
|
4362
4377
|
}
|
|
4363
4378
|
return i;
|
|
4364
4379
|
}
|
|
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(
|
|
4380
|
+
function bl() {
|
|
4381
|
+
let e = p($, this, dl).call(this);
|
|
4382
|
+
!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
4383
|
}
|
|
4369
|
-
function
|
|
4384
|
+
function xl(e) {
|
|
4370
4385
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4371
4386
|
return Math.max(0, Math.min(1, n));
|
|
4372
4387
|
}
|
|
4373
|
-
function
|
|
4388
|
+
function Sl(e) {
|
|
4374
4389
|
var t;
|
|
4375
|
-
let n = p($, this,
|
|
4376
|
-
p($, this,
|
|
4390
|
+
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;
|
|
4391
|
+
p($, this, wl).call(this, i, r), m($c, this) || (m(Jc, this).style.opacity = "1"), p($, this, Cl).call(this, i);
|
|
4377
4392
|
}
|
|
4378
|
-
function
|
|
4379
|
-
if (p($, this,
|
|
4380
|
-
let t = e * p($, this,
|
|
4381
|
-
this.range.value = e.toString(), this.updateBar(), p($, this,
|
|
4393
|
+
function Cl(e) {
|
|
4394
|
+
if (p($, this, ml).call(this) || p($, this, El).call(this, e)) return;
|
|
4395
|
+
let t = e * p($, this, dl).call(this);
|
|
4396
|
+
this.range.value = e.toString(), this.updateBar(), p($, this, Tl).call(this, t);
|
|
4382
4397
|
}
|
|
4383
|
-
function
|
|
4398
|
+
function wl(e, t) {
|
|
4384
4399
|
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(
|
|
4400
|
+
let n = e * m(Q, this), r = m(Q, this) - n, i = `-${p($, this, Ol).call(this, r)}`;
|
|
4401
|
+
m(Jc, this).textContent = t ? `${t.marker.label}: ${i}` : i, m(Jc, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4387
4402
|
}
|
|
4388
|
-
function
|
|
4403
|
+
function Tl(e) {
|
|
4389
4404
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4390
4405
|
bubbles: !0,
|
|
4391
4406
|
composed: !0,
|
|
4392
4407
|
detail: e
|
|
4393
4408
|
}));
|
|
4394
4409
|
}
|
|
4395
|
-
function
|
|
4396
|
-
return m(
|
|
4410
|
+
function El(e) {
|
|
4411
|
+
return m(nl, this) || p($, this, Dl).call(this) || e < .999 ? !1 : (h(nl, this, !0), h(rl, this, !1), this.dispatchEvent(new CustomEvent(y.GO_LIVE, {
|
|
4397
4412
|
bubbles: !0,
|
|
4398
4413
|
composed: !0
|
|
4399
4414
|
})), !0);
|
|
4400
4415
|
}
|
|
4401
|
-
function
|
|
4416
|
+
function Dl() {
|
|
4402
4417
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4403
4418
|
}
|
|
4404
|
-
function
|
|
4419
|
+
function Ol(e) {
|
|
4405
4420
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4406
4421
|
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
4422
|
}
|
|
4408
|
-
e(
|
|
4409
|
-
...
|
|
4423
|
+
e(ul, "observedAttributes", [
|
|
4424
|
+
...hi.observedAttributes,
|
|
4410
4425
|
_.TIMESHIFT_POSITION,
|
|
4411
4426
|
_.DURATION,
|
|
4412
4427
|
_.TIMELINE_MARKERS
|
|
4413
4428
|
]);
|
|
4414
4429
|
//#endregion
|
|
4415
4430
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4416
|
-
var
|
|
4417
|
-
|
|
4431
|
+
var kl = document.createElement("template");
|
|
4432
|
+
kl.innerHTML = `
|
|
4418
4433
|
<style>
|
|
4419
4434
|
:host {
|
|
4420
4435
|
display: var(--play-overlay-display);
|
|
@@ -4474,51 +4489,51 @@ Ol.innerHTML = `
|
|
|
4474
4489
|
</slot>
|
|
4475
4490
|
</slot>
|
|
4476
4491
|
`;
|
|
4477
|
-
var
|
|
4492
|
+
var Al = /* @__PURE__ */ new WeakMap(), jl = /* @__PURE__ */ new WeakMap(), Ml = /* @__PURE__ */ new WeakMap(), Nl = /* @__PURE__ */ new WeakMap(), Pl = class extends HTMLElement {
|
|
4478
4493
|
constructor() {
|
|
4479
|
-
super(), f(this,
|
|
4480
|
-
this.dispatchEvent(new CustomEvent(
|
|
4494
|
+
super(), f(this, Al, null), f(this, jl, () => {
|
|
4495
|
+
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, {
|
|
4481
4496
|
bubbles: !0,
|
|
4482
4497
|
composed: !0
|
|
4483
4498
|
}));
|
|
4484
|
-
}), f(this,
|
|
4499
|
+
}), f(this, Ml, (e) => {
|
|
4485
4500
|
let { key: t } = e;
|
|
4486
4501
|
if (!this.keysUsed.includes(t)) {
|
|
4487
|
-
this.removeEventListener("keyup", m(
|
|
4502
|
+
this.removeEventListener("keyup", m(Ml, this));
|
|
4488
4503
|
return;
|
|
4489
4504
|
}
|
|
4490
|
-
this.dispatchEvent(new CustomEvent(
|
|
4505
|
+
this.dispatchEvent(new CustomEvent(y.REQUEST_USER_INPUT, {
|
|
4491
4506
|
bubbles: !0,
|
|
4492
4507
|
composed: !0
|
|
4493
4508
|
}));
|
|
4494
|
-
}), f(this,
|
|
4509
|
+
}), f(this, Nl, (e) => {
|
|
4495
4510
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4496
4511
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4497
|
-
this.removeEventListener("keyup", m(
|
|
4512
|
+
this.removeEventListener("keyup", m(Ml, this));
|
|
4498
4513
|
return;
|
|
4499
4514
|
}
|
|
4500
|
-
this.addEventListener("keyup", m(
|
|
4501
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4515
|
+
this.addEventListener("keyup", m(Ml, this), { once: !0 });
|
|
4516
|
+
}), this.attachShadow({ mode: "open" }).appendChild(kl.content.cloneNode(!0));
|
|
4502
4517
|
}
|
|
4503
4518
|
get keysUsed() {
|
|
4504
4519
|
return ["Enter", " "];
|
|
4505
4520
|
}
|
|
4506
4521
|
connectedCallback() {
|
|
4507
4522
|
var e;
|
|
4508
|
-
h(
|
|
4523
|
+
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
4524
|
}
|
|
4510
4525
|
enable() {
|
|
4511
|
-
this.addEventListener("click", m(
|
|
4526
|
+
this.addEventListener("click", m(jl, this)), this.addEventListener("keydown", m(Nl, this)), this.tabIndex = 0;
|
|
4512
4527
|
}
|
|
4513
4528
|
disable() {
|
|
4514
|
-
this.removeEventListener("click", m(
|
|
4529
|
+
this.removeEventListener("click", m(jl, this)), this.removeEventListener("keydown", m(Nl, this)), this.removeEventListener("keyup", m(Ml, this)), this.tabIndex = -1;
|
|
4515
4530
|
}
|
|
4516
4531
|
disconnectedCallback() {
|
|
4517
4532
|
var e;
|
|
4518
|
-
(e = m(
|
|
4533
|
+
(e = m(Al, this)) == null || e.disconnectListener(this), this.disable();
|
|
4519
4534
|
}
|
|
4520
4535
|
};
|
|
4521
|
-
e(
|
|
4536
|
+
e(Pl, "observedAttributes", [
|
|
4522
4537
|
"hidden",
|
|
4523
4538
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4524
4539
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4526,88 +4541,88 @@ e(Nl, "observedAttributes", [
|
|
|
4526
4541
|
]);
|
|
4527
4542
|
//#endregion
|
|
4528
4543
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4529
|
-
var
|
|
4530
|
-
|
|
4531
|
-
var
|
|
4544
|
+
var Fl = document.createElement("template");
|
|
4545
|
+
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";
|
|
4546
|
+
var Il = class extends HTMLElement {
|
|
4532
4547
|
constructor() {
|
|
4533
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4548
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Fl.content.cloneNode(!0));
|
|
4534
4549
|
}
|
|
4535
4550
|
attributeChangedCallback(e, t, n) {
|
|
4536
4551
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4537
4552
|
}
|
|
4538
4553
|
};
|
|
4539
|
-
e(
|
|
4554
|
+
e(Il, "observedAttributes", [
|
|
4540
4555
|
"backdrop",
|
|
4541
4556
|
"poster",
|
|
4542
4557
|
"disable-backdrop"
|
|
4543
4558
|
]);
|
|
4544
4559
|
//#endregion
|
|
4545
4560
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4546
|
-
var
|
|
4547
|
-
|
|
4548
|
-
var
|
|
4561
|
+
var Ll = document.createElement("template");
|
|
4562
|
+
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";
|
|
4563
|
+
var Rl = /* @__PURE__ */ new WeakMap(), zl = /* @__PURE__ */ new WeakMap(), Bl = class extends HTMLElement {
|
|
4549
4564
|
constructor() {
|
|
4550
|
-
super(), f(this,
|
|
4565
|
+
super(), f(this, Rl, void 0), f(this, zl, void 0);
|
|
4551
4566
|
let e = this.attachShadow({ mode: "open" });
|
|
4552
|
-
e.appendChild(
|
|
4567
|
+
e.appendChild(Ll.content.cloneNode(!0)), h(Rl, this, e.querySelector("#title")), h(zl, this, e.querySelector("#description"));
|
|
4553
4568
|
}
|
|
4554
4569
|
connectedCallback() {
|
|
4555
4570
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4556
4571
|
}
|
|
4557
4572
|
attributeChangedCallback(e, t, n) {
|
|
4558
|
-
t !== n && (e === "title" ? m(
|
|
4573
|
+
t !== n && (e === "title" ? m(Rl, this).textContent = n : e === "description" && (m(zl, this).textContent = n));
|
|
4559
4574
|
}
|
|
4560
4575
|
};
|
|
4561
|
-
e(
|
|
4576
|
+
e(Bl, "observedAttributes", [
|
|
4562
4577
|
"title",
|
|
4563
4578
|
"description",
|
|
4564
4579
|
"hidden"
|
|
4565
4580
|
]);
|
|
4566
4581
|
//#endregion
|
|
4567
4582
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4568
|
-
var
|
|
4569
|
-
|
|
4570
|
-
var
|
|
4583
|
+
var Vl = document.createElement("template");
|
|
4584
|
+
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";
|
|
4585
|
+
var Hl = /* @__PURE__ */ new WeakMap(), Ul = class extends HTMLElement {
|
|
4571
4586
|
constructor() {
|
|
4572
|
-
super(), f(this,
|
|
4587
|
+
super(), f(this, Hl, null), this.attachShadow({ mode: "open" }).appendChild(Vl.content.cloneNode(!0));
|
|
4573
4588
|
}
|
|
4574
4589
|
connectedCallback() {
|
|
4575
4590
|
var e;
|
|
4576
|
-
h(
|
|
4591
|
+
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
4592
|
}
|
|
4578
4593
|
disconnectedCallback() {
|
|
4579
4594
|
var e;
|
|
4580
|
-
(e = m(
|
|
4595
|
+
(e = m(Hl, this)) == null || e.disconnectListener(this);
|
|
4581
4596
|
}
|
|
4582
4597
|
attributeChangedCallback(e, t, n) {
|
|
4583
|
-
t !== n && e === "hidden" && !
|
|
4598
|
+
t !== n && e === "hidden" && !v(n) && this.focus();
|
|
4584
4599
|
}
|
|
4585
4600
|
};
|
|
4586
|
-
e(
|
|
4601
|
+
e(Ul, "observedAttributes", ["hidden"]);
|
|
4587
4602
|
//#endregion
|
|
4588
4603
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4589
|
-
var
|
|
4590
|
-
|
|
4591
|
-
var
|
|
4604
|
+
var Wl, Gl = document.createElement("template");
|
|
4605
|
+
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";
|
|
4606
|
+
var Kl = (e) => `${Math.round(e * 100)}%`, ql = /* @__PURE__ */ new WeakMap(), Jl = class extends hi {
|
|
4592
4607
|
constructor() {
|
|
4593
4608
|
var e;
|
|
4594
|
-
super(), f(this,
|
|
4609
|
+
super(), f(this, ql, () => {
|
|
4595
4610
|
let e = this.range.valueAsNumber;
|
|
4596
|
-
this.dispatchEvent(new CustomEvent(
|
|
4611
|
+
this.dispatchEvent(new CustomEvent(y.SET_VOLUME, {
|
|
4597
4612
|
bubbles: !0,
|
|
4598
4613
|
composed: !0,
|
|
4599
4614
|
detail: e
|
|
4600
4615
|
}));
|
|
4601
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4616
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Gl.content.cloneNode(!0));
|
|
4602
4617
|
}
|
|
4603
4618
|
connectedCallback() {
|
|
4604
|
-
super.connectedCallback(), this.range.addEventListener("input", m(
|
|
4619
|
+
super.connectedCallback(), this.range.addEventListener("input", m(ql, this)), this.range.setAttribute("aria-label", "volume");
|
|
4605
4620
|
}
|
|
4606
4621
|
disconnectedCallback() {
|
|
4607
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", m(
|
|
4622
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", m(ql, this));
|
|
4608
4623
|
}
|
|
4609
4624
|
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",
|
|
4625
|
+
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
4626
|
}
|
|
4612
4627
|
get volume() {
|
|
4613
4628
|
var e;
|
|
@@ -4617,15 +4632,15 @@ var Gl = (e) => `${Math.round(e * 100)}%`, Kl = /* @__PURE__ */ new WeakMap(), q
|
|
|
4617
4632
|
return this.hasAttribute(_.MUTED);
|
|
4618
4633
|
}
|
|
4619
4634
|
};
|
|
4620
|
-
|
|
4621
|
-
...
|
|
4635
|
+
Wl = Jl, e(Jl, "observedAttributes", [
|
|
4636
|
+
...x(Wl, "observedAttributes", Wl),
|
|
4622
4637
|
_.MUTED,
|
|
4623
4638
|
_.VOLUME
|
|
4624
4639
|
]);
|
|
4625
4640
|
//#endregion
|
|
4626
4641
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4627
|
-
function
|
|
4628
|
-
customElements.define("vindral-controller",
|
|
4642
|
+
function Yl() {
|
|
4643
|
+
customElements.define("vindral-controller", va), customElements.define("vindral-control-bar", Ln), customElements.define("vindral-advanced-rendition-menu", qe), customElements.define("vindral-advanced-rendition-menu-list", at), customElements.define("vindral-play-button", $o), customElements.define("vindral-mute-button", qo), 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", so), 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", Xo), 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", po), customElements.define("vindral-language-menu-list", Oo), 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", Wo);
|
|
4629
4644
|
}
|
|
4630
4645
|
//#endregion
|
|
4631
|
-
export {
|
|
4646
|
+
export { Yl as t };
|