@vindral/web-sdk 4.5.1-1-g7401e41cc → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{rVXtcXLn.js → C2-H3s2r.js} +18 -18
- package/{B-XEedn4.js → C3YYzwmQ.js} +1 -1
- package/{C4DIyUFR.js → D7vM_Gpt.js} +2 -2
- package/{Bbln-Kci.js → ci2nH0xq.js} +632 -634
- package/core.js +1 -1
- package/legacy.es.js +1 -1
- package/legacy.umd.js +1 -1
- package/package.json +1 -1
- package/player.js +3 -3
- 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 "./C3YYzwmQ.js";
|
|
3
3
|
import { M as le } from "./C01DcfYu.js";
|
|
4
4
|
import { a as f, i as p, n as m, r as h, t as g } from "./B7hT-BKr.js";
|
|
5
5
|
import { c as ue, n as de, t as fe } from "./DeYmk5AL.js";
|
|
6
6
|
import { t as pe } from "./FYiEDBC4.js";
|
|
7
|
-
import { _
|
|
8
|
-
import { t as
|
|
7
|
+
import { _ as me, a as he, c as ge, d as _e, f as ve, g as _, h as v, i as y, l as ye, m as be, n as b, o as x, p as xe, r as S, s as Se, t as Ce, u as we, v as Te, y as Ee } from "./D7vM_Gpt.js";
|
|
8
|
+
import { t as De } from "./BdFcdkj1.js";
|
|
9
9
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
10
|
-
var
|
|
10
|
+
var Oe = ({ 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
|
+
}, ke = (e) => e === "mse" || e === "webcodecs" || e === "wasm";
|
|
17
|
+
function Ae(e) {
|
|
18
18
|
if (e === null || e === "auto") return;
|
|
19
|
-
let t = e.split(",").filter(
|
|
19
|
+
let t = e.split(",").filter(ke);
|
|
20
20
|
return t.length > 0 ? t : void 0;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function je(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 Me = document.createElement("template");
|
|
28
|
+
Me.innerHTML = "\n <style>\n :host {\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n";
|
|
29
|
+
var Ne = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakSet(), ze = class extends S {
|
|
30
30
|
constructor() {
|
|
31
31
|
var e;
|
|
32
|
-
super(), g(this,
|
|
32
|
+
super(), g(this, Re), f(this, Ne, void 0), f(this, Pe, void 0), f(this, C, void 0), f(this, Fe, null), f(this, Ie, (e) => {
|
|
33
33
|
e.composedPath().includes(this) || this.hide();
|
|
34
|
-
}), f(this,
|
|
34
|
+
}), f(this, Le, () => {
|
|
35
35
|
this.hide();
|
|
36
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
36
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Me.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(Pe, 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(Fe, this, a.querySelector("vindral-controller")), (e = m(Fe, this)) == null || e.connectListener(this);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
set button(e) {
|
|
52
|
-
h(
|
|
52
|
+
h(Ne, this, e);
|
|
53
53
|
}
|
|
54
54
|
set listbox(e) {
|
|
55
|
-
h(
|
|
55
|
+
h(Pe, 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(Le, this)), document.addEventListener("click", m(Ie, 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(Ne, this)) == null || t.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(v.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(Re, this, Be).call(this);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
function
|
|
74
|
+
function Be() {
|
|
75
75
|
var e;
|
|
76
|
-
(e = m(C, this)) != null && e.hidden ? p(
|
|
76
|
+
(e = m(C, this)) != null && e.hidden ? p(Re, this, Ve).call(this) : this.hide();
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ve() {
|
|
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(Ne, this)) == null || t.setAttribute("aria-expanded", "true"), (n = m(Pe, this)) == null || n.focus(), this.dispatchEvent(new CustomEvent(v.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 He, Ue = "\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", We = document.createElement("template");
|
|
88
|
+
We.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">${Ue}</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 Ge = /* @__PURE__ */ new WeakSet(), Ke = class extends ze {
|
|
101
101
|
constructor() {
|
|
102
102
|
var e, t, n, r;
|
|
103
|
-
super(), g(this,
|
|
103
|
+
super(), g(this, Ge), (e = this.shadowRoot) == null || e.appendChild(We.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(Ge, this, qe).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(Ge, this, qe).call(this);
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
-
|
|
113
|
-
function
|
|
112
|
+
He = Ke;
|
|
113
|
+
function qe() {
|
|
114
114
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
115
115
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
116
116
|
}
|
|
117
|
-
e(
|
|
117
|
+
e(Ke, "observedAttributes", [...b(He, "observedAttributes", He), _.RENDITION_LEVELS]);
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region ../../libs/player-next/src/components/AdvancedRenditionMenuList.ts
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
var
|
|
120
|
+
var Je = document.createElement("template");
|
|
121
|
+
Je.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 Ye = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ze = /* @__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(), w = /* @__PURE__ */ new WeakSet(), at = class extends HTMLElement {
|
|
123
123
|
constructor() {
|
|
124
|
-
super(), g(this,
|
|
124
|
+
super(), g(this, w), f(this, Ye, []), f(this, Xe, 2 ** 53 - 1), f(this, Ze, !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(w, this, _t).call(this, e);
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
130
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Je.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(w, this, dt).call(this), p(w, this, ot).call(this), p(w, this, st).call(this), p(w, 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 Xe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), w =
|
|
|
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(Ze, this, x(n, !1)), p(w, this, lt).call(this), p(w, this, mt).call(this)), e === _.RENDITION_LEVEL && n && (h($e, this, JSON.parse(n)), p(w, this, mt).call(this)), e === _.SIZE_BASED_RESOLUTION_CAP_ENABLED && (h(Qe, this, x(n, !0)), p(w, this, ut).call(this)));
|
|
145
145
|
}
|
|
146
146
|
set list(e) {
|
|
147
|
-
h(
|
|
147
|
+
h(Ye, this, e), p(w, this, ft).call(this);
|
|
148
148
|
}
|
|
149
149
|
set maxVideoBitrate(e) {
|
|
150
|
-
h(
|
|
150
|
+
h(Xe, this, e), p(w, 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(Ze, this, !0), p(w, this, lt).call(this), p(w, this, mt).call(this), this.dispatchEvent(new CustomEvent(v.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(w, this, ct).call(this);
|
|
180
|
+
e && this.dispatchEvent(new CustomEvent(v.SET_RENDITION, {
|
|
181
181
|
bubbles: !0,
|
|
182
182
|
composed: !0,
|
|
183
183
|
detail: e
|
|
184
|
-
})), h(
|
|
184
|
+
})), h(Ze, this, !1), p(w, this, lt).call(this), p(w, this, mt).call(this), this.dispatchEvent(new CustomEvent(v.SET_ABR_MODE, {
|
|
185
185
|
bubbles: !0,
|
|
186
186
|
composed: !0,
|
|
187
187
|
detail: !1
|
|
188
188
|
}));
|
|
189
|
-
}), p(
|
|
189
|
+
}), p(w, 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(w, this, ut).call(this), this.dispatchEvent(new CustomEvent(v.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
197
197
|
bubbles: !0,
|
|
198
198
|
composed: !0,
|
|
199
199
|
detail: e
|
|
200
200
|
}));
|
|
201
|
-
}), p(
|
|
201
|
+
}), p(w, this, ut).call(this);
|
|
202
202
|
}
|
|
203
203
|
function ct() {
|
|
204
|
-
let e = [...m(
|
|
204
|
+
let e = [...m(Ye, 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(Xe, 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(Ze, this))), i.setAttribute("data-active", String(!m(Ze, this)))), a && (a.textContent = m(Ze, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), p(w, 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(Ze, this), t.title = m(Ze, 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(Ye, 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 ? Ee(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(w, this, pt).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
257
|
+
re.textContent = `${Te(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${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(w, 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(w, 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(w, 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(Ze, this)) {
|
|
277
|
+
let t = i > m(Xe, 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(Xe, 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(v.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(w, this, yt).call(this)) == null || (o = o.el) == null || o.click();
|
|
304
|
+
} else p(w, 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(w, 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(w, 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 S {
|
|
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 b {
|
|
|
373
373
|
return this.hasAttribute(_.IS_AIRPLAYING);
|
|
374
374
|
}
|
|
375
375
|
handleClick(e) {
|
|
376
|
-
this.dispatchEvent(new CustomEvent(
|
|
376
|
+
this.dispatchEvent(new CustomEvent(v.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
|
+
...b(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 S {
|
|
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
|
+
...b(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(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), tn = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), nn = class extends HTMLElement {
|
|
705
705
|
constructor() {
|
|
706
|
-
super(), g(this,
|
|
706
|
+
super(), g(this, D), f(this, Jt, null), f(this, Yt, null), f(this, Xt, []), f(this, T, []), f(this, E, 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(D, 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(D, this, rn).call(this), (t = m(Jt, this)) == null || t.observe((n = this.shadowRoot) == null ? void 0 : n.querySelector(".wrapper")), p(D, this, un).call(this), h(Qt, this, window.setInterval(() => {
|
|
717
|
+
p(D, 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(D, 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(D, 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(D, 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(E, 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(D, this, ln).call(this, t, n) : p(D, 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(D, this, on).call(this) : p(D, this, sn).call(this);
|
|
767
767
|
}
|
|
768
768
|
function on() {
|
|
769
|
-
this.dispatchEvent(new CustomEvent(
|
|
769
|
+
this.dispatchEvent(new CustomEvent(v.CHANNEL_GRID_OPENED, {
|
|
770
770
|
bubbles: !0,
|
|
771
771
|
composed: !0
|
|
772
|
-
})), p(
|
|
772
|
+
})), p(D, this, cn).call(this), this.addEventListener("keydown", this), m(E, this) && (m(E, this).tabIndex = 0);
|
|
773
773
|
}
|
|
774
774
|
function sn() {
|
|
775
|
-
p(
|
|
775
|
+
p(D, this, Sn).call(this), m(E, this) && (m(E, this).tabIndex = -1), this.dispatchEvent(new CustomEvent(v.CHANNEL_GRID_CLOSED, {
|
|
776
776
|
bubbles: !0,
|
|
777
777
|
composed: !0
|
|
778
|
-
})), p(
|
|
778
|
+
})), p(D, this, yn).call(this), this.removeEventListener("keydown", this);
|
|
779
779
|
}
|
|
780
780
|
function cn() {
|
|
781
781
|
var e;
|
|
782
|
-
p(
|
|
782
|
+
p(D, this, Sn).call(this), h(tn, this, () => {
|
|
783
783
|
clearTimeout(m(en, this)), h(en, this, window.setTimeout(() => {
|
|
784
|
-
p(
|
|
784
|
+
p(D, this, xn).call(this) && this.focus(), p(D, 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(T, this).map((e) => [e.id, e])), r = this.getAttribute("channel-id");
|
|
794
|
+
h(T, 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(D, this, dn).call(this, a.element, e), a;
|
|
798
|
+
let o = p(D, 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(T, 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(E, this, n)), n.tabIndex = -1, n.onclick = () => p(D, 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(T, this).forEach((t) => {
|
|
822
|
+
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, h(E, 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(T, this).forEach((e) => e.element.updateThumbnail());
|
|
827
827
|
}
|
|
828
828
|
function hn(e) {
|
|
829
829
|
var t;
|
|
830
|
-
p(
|
|
830
|
+
p(D, 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(D, this, Cn).call(this);
|
|
835
835
|
else if (t === "Enter" || t === " ") {
|
|
836
836
|
var a;
|
|
837
|
-
(a = m(
|
|
838
|
-
} else p(
|
|
837
|
+
(a = m(E, this)) == null || a.click();
|
|
838
|
+
} else p(D, 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(E, this)) return;
|
|
842
|
+
let { key: t } = e, n = m(T, this).findIndex((e) => e.element === m(E, this)), r = m(E, this).getBoundingClientRect();
|
|
843
843
|
switch (t) {
|
|
844
844
|
case "ArrowUp":
|
|
845
|
-
if (n = p(
|
|
846
|
-
p(
|
|
845
|
+
if (n = p(D, this, vn).call(this, r, -1, 0), n < 0) {
|
|
846
|
+
p(D, this, Cn).call(this);
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
849
|
break;
|
|
850
850
|
case "ArrowDown":
|
|
851
|
-
n = p(
|
|
851
|
+
n = p(D, this, vn).call(this, r, 1, 0);
|
|
852
852
|
break;
|
|
853
853
|
case "ArrowLeft":
|
|
854
|
-
n = p(
|
|
854
|
+
n = p(D, this, vn).call(this, r, 0, -1);
|
|
855
855
|
break;
|
|
856
856
|
case "ArrowRight":
|
|
857
|
-
n = p(
|
|
857
|
+
n = p(D, 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(T, this).length - 1;
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
866
|
-
if (n >= 0 && n < m(
|
|
867
|
-
let e = m(
|
|
866
|
+
if (n >= 0 && n < m(T, this).length) {
|
|
867
|
+
let e = m(T, this)[n];
|
|
868
868
|
if (!e) return;
|
|
869
|
-
m(
|
|
869
|
+
m(E, this).setAttribute("aria-selected", "false"), m(E, this).tabIndex = -1, h(E, this, e.element), m(E, this).setAttribute("aria-selected", "true"), m(E, this).tabIndex = 0, m(E, 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(T, 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(D, 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(D, 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(), O = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), An = class extends S {
|
|
937
937
|
constructor() {
|
|
938
938
|
var e, t;
|
|
939
|
-
super(), g(this,
|
|
940
|
-
e.composedPath().includes(this) || p(
|
|
939
|
+
super(), g(this, k), f(this, Dn, void 0), f(this, O, void 0), f(this, On, void 0), f(this, kn, (e) => {
|
|
940
|
+
e.composedPath().includes(this) || p(k, 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(k, 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(O, this, e.querySelector("vindral-channel-grid")), ((t = m(O, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (m(O, this).hidden = !1, m(O, this).style.position = "relative", h(On, this, m(O, this).parentElement));
|
|
949
949
|
}
|
|
950
|
-
p(
|
|
950
|
+
p(k, 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(k, 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(k, 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(O, 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(k, this, Nn).call(this) : p(k, this, Mn).call(this);
|
|
970
970
|
else {
|
|
971
971
|
var e;
|
|
972
|
-
(e = m(
|
|
972
|
+
(e = m(O, this)) != null && e.hidden ? p(k, this, Mn).call(this) : p(k, this, Nn).call(this);
|
|
973
973
|
}
|
|
974
|
-
p(
|
|
974
|
+
p(k, 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(O, this)) != null && e.hidden)) return;
|
|
981
|
+
m(O, this).hidden = !1, m(O, 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(O, this) || m(O, this).hidden) return;
|
|
989
|
+
m(O, 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
|
+
...b(wn, "observedAttributes", wn),
|
|
1001
1001
|
_.CHANNEL_GROUP_ID,
|
|
1002
1002
|
_.CHANNELS,
|
|
1003
1003
|
"hidden"
|
|
@@ -1207,12 +1207,12 @@ function cr() {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
//#endregion
|
|
1209
1209
|
//#region ../../libs/player-next/src/timeshift/TimeshiftDurationSource.ts
|
|
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(),
|
|
1210
|
+
var lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), _r = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), yr = class {
|
|
1211
1211
|
constructor({ onChange: e, probe: t = sr, now: n = () => performance.now() }) {
|
|
1212
|
-
g(this,
|
|
1212
|
+
g(this, A), f(this, lr, void 0), f(this, ur, void 0), f(this, dr, void 0), f(this, fr, void 0), f(this, pr, !0), f(this, mr, !1), f(this, hr, 0), f(this, gr, 0), f(this, _r, 0), f(this, vr, null), h(lr, this, e), h(ur, this, t), h(dr, this, n);
|
|
1213
1213
|
}
|
|
1214
1214
|
start({ multivariantUrl: e, params: t, windowCapSeconds: n }) {
|
|
1215
|
-
if (p(
|
|
1215
|
+
if (p(A, this, br).call(this), !(n > 0)) {
|
|
1216
1216
|
m(lr, this).call(this, n);
|
|
1217
1217
|
return;
|
|
1218
1218
|
}
|
|
@@ -1225,31 +1225,31 @@ var lr = /* @__PURE__ */ new WeakMap(), ur = /* @__PURE__ */ new WeakMap(), dr =
|
|
|
1225
1225
|
m(lr, this).call(this, n);
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
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(
|
|
1228
|
+
h(gr, this, n), h(hr, this, Math.min(Math.max(e, 0), n)), h(_r, this, m(dr, this).call(this)), h(mr, this, !0), p(A, this, xr).call(this), m(pr, this) && p(A, this, Sr).call(this);
|
|
1229
1229
|
}
|
|
1230
1230
|
});
|
|
1231
1231
|
}
|
|
1232
1232
|
setLive(e) {
|
|
1233
|
-
h(pr, this, e), !(!m(fr, this) || e) && (p(
|
|
1233
|
+
h(pr, this, e), !(!m(fr, this) || e) && (p(A, this, Cr).call(this), p(A, this, xr).call(this));
|
|
1234
1234
|
}
|
|
1235
1235
|
applyLoadedDuration(e) {
|
|
1236
|
-
p(
|
|
1236
|
+
p(A, this, br).call(this), m(lr, this).call(this, Number.isNaN(e) ? 0 : e);
|
|
1237
1237
|
}
|
|
1238
1238
|
stop() {
|
|
1239
|
-
p(
|
|
1239
|
+
p(A, this, br).call(this);
|
|
1240
1240
|
}
|
|
1241
1241
|
};
|
|
1242
1242
|
function br() {
|
|
1243
1243
|
var e;
|
|
1244
|
-
(e = m(fr, this)) == null || e.abort(), h(fr, this, void 0), p(
|
|
1244
|
+
(e = m(fr, this)) == null || e.abort(), h(fr, this, void 0), p(A, this, Cr).call(this), h(mr, this, !1);
|
|
1245
1245
|
}
|
|
1246
1246
|
function xr() {
|
|
1247
1247
|
if (!m(mr, this)) return;
|
|
1248
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(
|
|
1249
|
+
m(lr, this).call(this, t), t >= m(gr, this) && p(A, this, Cr).call(this);
|
|
1250
1250
|
}
|
|
1251
1251
|
function Sr() {
|
|
1252
|
-
m(vr, this) === null && h(vr, this, window.setInterval(() => p(
|
|
1252
|
+
m(vr, this) === null && h(vr, this, window.setInterval(() => p(A, this, xr).call(this), 1e3));
|
|
1253
1253
|
}
|
|
1254
1254
|
function Cr() {
|
|
1255
1255
|
m(vr, this) !== null && (clearInterval(m(vr, this)), h(vr, this, null));
|
|
@@ -1259,7 +1259,7 @@ function Cr() {
|
|
|
1259
1259
|
var wr = (e) => {
|
|
1260
1260
|
var t;
|
|
1261
1261
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
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) =>
|
|
1262
|
+
return !n && (t = e.nodeName) != null && t.includes("-") && (globalThis.customElements.upgrade(e), n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0), Array.isArray(n) ? n.filter((e) => me.includes(e)) : [];
|
|
1263
1263
|
};
|
|
1264
1264
|
//#endregion
|
|
1265
1265
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
@@ -1361,110 +1361,110 @@ var Er = re.get().createContext("TimelineMarkers"), Dr = /^\d{4}-\d{2}-\d{2}[T ]
|
|
|
1361
1361
|
get isMediaElementSource() {
|
|
1362
1362
|
return this.source instanceof HTMLMediaElement;
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), Fr = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Br = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Hr = /* @__PURE__ */ new WeakMap(), Ur = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), qr = /* @__PURE__ */ new WeakMap(), Jr = class {
|
|
1365
1365
|
constructor(t, n) {
|
|
1366
|
-
g(this,
|
|
1367
|
-
m(
|
|
1366
|
+
g(this, F), f(this, j, void 0), f(this, M, void 0), f(this, N, void 0), f(this, Fr, void 0), f(this, Ir, void 0), e(this, "userPaused", !0), f(this, Lr, void 0), f(this, Rr, void 0), f(this, zr, !1), f(this, Br, !1), f(this, Vr, null), f(this, Hr, 0), f(this, Ur, !1), f(this, P, re.get().createContext("HlsPlayer")), f(this, Wr, () => p(F, this, si).call(this, !0)), f(this, Gr, () => p(F, this, si).call(this, !1)), f(this, Kr, () => {
|
|
1367
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !m(j, this).paused && p(F, this, si).call(this, !1);
|
|
1368
1368
|
}), f(this, qr, () => {
|
|
1369
|
-
m(
|
|
1370
|
-
}), h(
|
|
1369
|
+
m(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && p(F, this, si).call(this, !1);
|
|
1370
|
+
}), h(M, this, t), h(Rr, this, n == null ? void 0 : n.maxVideoBitRate), m(M, this).style.position = "absolute", m(M, this).style.top = "0", m(M, this).style.left = "0", m(M, this).style.width = "100%", m(M, this).style.height = "100%", m(M, this).style.opacity = "0", m(M, this).style.pointerEvents = "none", m(M, this).style.transition = "opacity 0.12s linear";
|
|
1371
1371
|
let r = document.createElement("video");
|
|
1372
|
-
h(
|
|
1372
|
+
h(j, this, r), t.appendChild(m(j, this)), m(j, this).style.width = "100%", m(j, this).style.height = "100%", m(j, this).setAttribute("playsinline", ""), m(j, this).setAttribute("webkit-playsinline", ""), m(j, this).setAttribute("preload", "metadata"), p(F, this, ai).call(this), h(Ur, this, m(j, this).muted), (n == null ? void 0 : n.volume) !== void 0 && (this.volume = n.volume), (n == null ? void 0 : n.muted) !== void 0 && (this.muted = n.muted);
|
|
1373
1373
|
}
|
|
1374
1374
|
hide() {
|
|
1375
|
-
h(zr, this, !0), h(Br, this, !1), m(
|
|
1375
|
+
h(zr, this, !0), h(Br, this, !1), m(M, this).classList.remove("active"), m(M, this).style.opacity = "0", m(M, this).style.pointerEvents = "none", h(Vr, this, null);
|
|
1376
1376
|
}
|
|
1377
1377
|
play() {
|
|
1378
1378
|
var e = this;
|
|
1379
1379
|
return t(function* () {
|
|
1380
1380
|
try {
|
|
1381
|
-
return m(
|
|
1381
|
+
return m(N, e) ? (e.userPaused = !1, yield m(j, e).play()) : Promise.reject("HLS not initialized");
|
|
1382
1382
|
} catch (t) {
|
|
1383
|
-
m(
|
|
1383
|
+
m(P, e).error("Failed to play timeshift video:", t);
|
|
1384
1384
|
}
|
|
1385
1385
|
})();
|
|
1386
1386
|
}
|
|
1387
1387
|
seek(e) {
|
|
1388
1388
|
var n = this;
|
|
1389
1389
|
return t(function* () {
|
|
1390
|
-
if (m(
|
|
1390
|
+
if (m(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1391
1391
|
h(Vr, n, null);
|
|
1392
1392
|
return;
|
|
1393
1393
|
}
|
|
1394
|
-
if (h(Vr, n, e.time > .1 ? e.time : null), n.isActive() && m(
|
|
1395
|
-
else return p(
|
|
1394
|
+
if (h(Vr, n, e.time > .1 ? e.time : null), n.isActive() && m(N, n)) p(F, n, $r).call(n, e.time);
|
|
1395
|
+
else return p(F, n, ei).call(n, e);
|
|
1396
1396
|
})();
|
|
1397
1397
|
}
|
|
1398
1398
|
shouldIgnoreTimeupdate() {
|
|
1399
1399
|
if (m(Vr, this) == null) return !1;
|
|
1400
|
-
let e = m(
|
|
1400
|
+
let e = m(j, this).currentTime;
|
|
1401
1401
|
return !Number.isFinite(e) || e <= .1 ? !0 : (h(Vr, this, null), !1);
|
|
1402
1402
|
}
|
|
1403
1403
|
isPipSupported() {
|
|
1404
|
-
return "pictureInPictureEnabled" in document && !m(
|
|
1404
|
+
return "pictureInPictureEnabled" in document && !m(j, this).disablePictureInPicture;
|
|
1405
1405
|
}
|
|
1406
1406
|
requestPictureInPicture() {
|
|
1407
|
-
return m(
|
|
1407
|
+
return m(j, this).requestPictureInPicture();
|
|
1408
1408
|
}
|
|
1409
1409
|
exitPictureInPicture() {
|
|
1410
|
-
return document.pictureInPictureElement === m(
|
|
1410
|
+
return document.pictureInPictureElement === m(j, this) ? document.exitPictureInPicture() : Promise.resolve();
|
|
1411
1411
|
}
|
|
1412
1412
|
isActive() {
|
|
1413
|
-
return m(
|
|
1413
|
+
return m(M, this).style.opacity === "1" || m(M, this).classList.contains("active");
|
|
1414
1414
|
}
|
|
1415
1415
|
cleanup() {
|
|
1416
|
-
p(
|
|
1416
|
+
p(F, this, oi).call(this), p(F, this, Qr).call(this), m(Lr, this) && (cancelAnimationFrame(m(Lr, this)), h(Lr, this, void 0)), h(Vr, this, null), m(j, this).remove();
|
|
1417
1417
|
}
|
|
1418
1418
|
addEventListener(e, t) {
|
|
1419
|
-
m(
|
|
1419
|
+
m(j, this).addEventListener(e, t);
|
|
1420
1420
|
}
|
|
1421
1421
|
removeEventListener(e, t) {
|
|
1422
|
-
m(
|
|
1422
|
+
m(j, this).removeEventListener(e, t);
|
|
1423
1423
|
}
|
|
1424
1424
|
dispatchEvent(e) {
|
|
1425
|
-
return m(
|
|
1425
|
+
return m(j, this).dispatchEvent(e);
|
|
1426
1426
|
}
|
|
1427
1427
|
setTimeshiftUrl(e) {
|
|
1428
|
-
m(Ir, this) !== e && (m(
|
|
1428
|
+
m(Ir, this) !== e && (m(P, this).debug("HLSPlayer Setting timeshift URL to", e), h(Ir, this, e));
|
|
1429
1429
|
}
|
|
1430
1430
|
get videoElement() {
|
|
1431
|
-
return m(
|
|
1431
|
+
return m(j, this);
|
|
1432
1432
|
}
|
|
1433
1433
|
pause() {
|
|
1434
|
-
this.userPaused = !0, m(
|
|
1434
|
+
this.userPaused = !0, m(j, this).pause();
|
|
1435
1435
|
}
|
|
1436
1436
|
get paused() {
|
|
1437
|
-
return m(
|
|
1437
|
+
return m(j, this).paused;
|
|
1438
1438
|
}
|
|
1439
1439
|
set volume(e) {
|
|
1440
|
-
m(
|
|
1440
|
+
m(j, this).volume = e;
|
|
1441
1441
|
}
|
|
1442
1442
|
get volume() {
|
|
1443
|
-
return m(
|
|
1443
|
+
return m(j, this).volume;
|
|
1444
1444
|
}
|
|
1445
1445
|
set muted(e) {
|
|
1446
|
-
h(Ur, this, e), m(
|
|
1446
|
+
h(Ur, this, e), m(j, this).muted = e;
|
|
1447
1447
|
}
|
|
1448
1448
|
get muted() {
|
|
1449
1449
|
return m(Ur, this);
|
|
1450
1450
|
}
|
|
1451
1451
|
set currentTime(e) {
|
|
1452
|
-
m(
|
|
1452
|
+
m(j, this).currentTime = e;
|
|
1453
1453
|
}
|
|
1454
1454
|
get currentTime() {
|
|
1455
|
-
return m(
|
|
1455
|
+
return m(j, this).currentTime;
|
|
1456
1456
|
}
|
|
1457
1457
|
get seeking() {
|
|
1458
|
-
return m(
|
|
1458
|
+
return m(j, this).seeking;
|
|
1459
1459
|
}
|
|
1460
1460
|
get duration() {
|
|
1461
|
-
return m(
|
|
1461
|
+
return m(j, this).duration;
|
|
1462
1462
|
}
|
|
1463
1463
|
get maxVideoBitRate() {
|
|
1464
1464
|
return m(Rr, this);
|
|
1465
1465
|
}
|
|
1466
1466
|
set maxVideoBitRate(e) {
|
|
1467
|
-
h(Rr, this, e), e !== void 0 && m(
|
|
1467
|
+
h(Rr, this, e), e !== void 0 && m(N, this) && p(F, this, Xr).call(this, e);
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
1470
1470
|
function Yr() {
|
|
@@ -1472,10 +1472,10 @@ function Yr() {
|
|
|
1472
1472
|
return t(function* () {
|
|
1473
1473
|
let { default: t } = yield import("./Ddby8xU_.js");
|
|
1474
1474
|
if (h(Fr, e, t), !t.isSupported()) {
|
|
1475
|
-
m(
|
|
1475
|
+
m(P, e).warn("HLS not supported");
|
|
1476
1476
|
return;
|
|
1477
1477
|
}
|
|
1478
|
-
h(
|
|
1478
|
+
h(N, e, new t({
|
|
1479
1479
|
capLevelToPlayerSize: !0,
|
|
1480
1480
|
enableWorker: !0,
|
|
1481
1481
|
backBufferLength: 30,
|
|
@@ -1494,64 +1494,64 @@ function Yr() {
|
|
|
1494
1494
|
startFragPrefetch: !0,
|
|
1495
1495
|
testBandwidth: !1,
|
|
1496
1496
|
debug: !1
|
|
1497
|
-
})), m(
|
|
1498
|
-
m(
|
|
1499
|
-
}), m(
|
|
1497
|
+
})), m(N, e).attachMedia(m(j, e)), m(N, e).on(t.Events.MEDIA_ATTACHED, () => m(P, e).debug("[HLS] media attached")), m(N, e).on(t.Events.MANIFEST_PARSED, () => m(P, e).debug("[HLS] manifest parsed")), m(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1498
|
+
m(P, e).error("[HLS] error:", n), n.fatal && p(F, e, Zr).call(e, n);
|
|
1499
|
+
}), m(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1500
1500
|
var t;
|
|
1501
|
-
!m(Rr, e) || ((t = m(
|
|
1502
|
-
}), m(
|
|
1501
|
+
!m(Rr, e) || ((t = m(N, e)) == null ? void 0 : t.levels.length) === 0 || p(F, e, Xr).call(e, m(Rr, e));
|
|
1502
|
+
}), m(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1503
1503
|
var t, n;
|
|
1504
|
-
m(
|
|
1504
|
+
m(P, e).debug("Level switched:", (t = m(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = m(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1505
1505
|
});
|
|
1506
1506
|
})();
|
|
1507
1507
|
}
|
|
1508
1508
|
function Xr(e) {
|
|
1509
|
-
if (!m(
|
|
1510
|
-
m(
|
|
1509
|
+
if (!m(N, this)) {
|
|
1510
|
+
m(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1511
1511
|
return;
|
|
1512
1512
|
}
|
|
1513
|
-
let t = m(
|
|
1513
|
+
let t = m(N, this).levels.map((e, t) => ({
|
|
1514
1514
|
i: t,
|
|
1515
1515
|
bitrate: e.bitrate
|
|
1516
1516
|
})).filter((t) => e >= t.bitrate * .8).map((e) => e.i).pop();
|
|
1517
1517
|
if (t === void 0) {
|
|
1518
1518
|
var n;
|
|
1519
|
-
t = 0, m(
|
|
1519
|
+
t = 0, m(P, this).debug("No level fits under bitrate cap: " + e + ", defaulting to lowest level: " + ((n = m(N, this).levels[0]) == null ? void 0 : n.bitrate));
|
|
1520
1520
|
}
|
|
1521
|
-
let r = m(
|
|
1522
|
-
m(
|
|
1521
|
+
let r = m(N, this).currentLevel;
|
|
1522
|
+
m(N, this).autoLevelCapping = t, r !== t && (m(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), m(N, this).currentLevel = t);
|
|
1523
1523
|
}
|
|
1524
1524
|
function Zr(e) {
|
|
1525
1525
|
if (!m(Fr, this)) {
|
|
1526
|
-
m(
|
|
1526
|
+
m(P, this).error("Hls class not available for error handling");
|
|
1527
1527
|
return;
|
|
1528
1528
|
}
|
|
1529
1529
|
let t = m(Fr, this);
|
|
1530
1530
|
switch (e.type) {
|
|
1531
1531
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1532
1532
|
var n;
|
|
1533
|
-
m(
|
|
1533
|
+
m(P, this).warn("[HLS] network error -> startLoad"), (n = m(N, this)) == null || n.startLoad();
|
|
1534
1534
|
break;
|
|
1535
1535
|
case t.ErrorTypes.MEDIA_ERROR:
|
|
1536
1536
|
var r;
|
|
1537
|
-
m(
|
|
1537
|
+
m(P, this).warn("[HLS] media error -> recoverMediaError"), (r = m(N, this)) == null || r.recoverMediaError();
|
|
1538
1538
|
break;
|
|
1539
1539
|
default:
|
|
1540
|
-
m(
|
|
1540
|
+
m(P, this).error("[HLS] fatal -> destroy"), p(F, this, Qr).call(this);
|
|
1541
1541
|
break;
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
function Qr() {
|
|
1545
|
-
m(
|
|
1545
|
+
m(N, this) && (m(N, this).destroy(), h(N, this, void 0));
|
|
1546
1546
|
}
|
|
1547
1547
|
function $r(e) {
|
|
1548
1548
|
if (!Number.isFinite(e)) {
|
|
1549
1549
|
h(Vr, this, null);
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
|
-
let t = p(
|
|
1552
|
+
let t = p(F, this, ii).call(this, m(j, this), e);
|
|
1553
1553
|
h(Vr, this, t > .1 ? t : null), m(Lr, this) && cancelAnimationFrame(m(Lr, this)), h(Lr, this, requestAnimationFrame(() => {
|
|
1554
|
-
m(
|
|
1554
|
+
m(j, this).currentTime = t;
|
|
1555
1555
|
}));
|
|
1556
1556
|
}
|
|
1557
1557
|
function ei(e) {
|
|
@@ -1560,48 +1560,48 @@ function ei(e) {
|
|
|
1560
1560
|
var t;
|
|
1561
1561
|
let { time: r, playWhenReady: i = !0 } = e || {}, a = h(Hr, n, (t = m(Hr, n), ++t));
|
|
1562
1562
|
if (!m(Ir, n)) {
|
|
1563
|
-
m(
|
|
1563
|
+
m(P, n).warn("No timeshift URL");
|
|
1564
1564
|
return;
|
|
1565
1565
|
}
|
|
1566
|
-
if (!m(
|
|
1567
|
-
h(zr, n, !1), h(Br, n, !1), m(
|
|
1566
|
+
if (!m(N, n) && (yield p(F, n, Yr).call(n), !p(F, n, ci).call(n, a))) return;
|
|
1567
|
+
h(zr, n, !1), h(Br, n, !1), m(N, n) && (!m(N, n).url || m(N, n).url !== m(Ir, n)) && (m(P, n).debug("Loading timeshift URL", m(Ir, n)), m(N, n).loadSource(m(Ir, n)));
|
|
1568
1568
|
let o = n.muted;
|
|
1569
|
-
m(
|
|
1569
|
+
m(j, n).muted = !0, yield p(F, n, ti).call(n), p(F, n, ci).call(n, a) && (p(F, n, $r).call(n, r), !(i && (yield n.play(), !p(F, n, ci).call(n, a))) && p(F, n, ni).call(n, o, a));
|
|
1570
1570
|
})();
|
|
1571
1571
|
}
|
|
1572
1572
|
function ti() {
|
|
1573
|
-
return m(
|
|
1574
|
-
m(
|
|
1573
|
+
return m(j, this).duration && !Number.isNaN(m(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1574
|
+
m(P, this).debug("Waiting for duration...");
|
|
1575
1575
|
let t = () => {
|
|
1576
|
-
m(
|
|
1576
|
+
m(P, this).debug("Duration loaded:", m(j, this).duration), m(j, this).removeEventListener("loadedmetadata", t), clearTimeout(n), e();
|
|
1577
1577
|
}, n = setTimeout(() => {
|
|
1578
|
-
m(
|
|
1578
|
+
m(P, this).debug("Duration timeout, proceeding anyway"), m(j, this).removeEventListener("loadedmetadata", t), e();
|
|
1579
1579
|
}, 2e4);
|
|
1580
|
-
m(
|
|
1580
|
+
m(j, this).addEventListener("loadedmetadata", t);
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
1583
1583
|
function ni(e, t) {
|
|
1584
|
-
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(
|
|
1585
|
-
m(zr, this) || m(Br, this) || !p(
|
|
1584
|
+
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => m(j, this).readyState >= n && m(j, this).videoWidth > 0 && m(j, this).videoHeight > 0, i = () => {
|
|
1585
|
+
m(zr, this) || m(Br, this) || !p(F, this, ci).call(this, t) || (h(Br, this, !0), m(P, this).debug("Revealing timeshift video"), m(M, this).classList.add("active"), m(M, this).style.opacity = "1", m(M, this).style.pointerEvents = "auto", m(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || p(F, this, ri).call(this, t));
|
|
1586
1586
|
}, a = () => {
|
|
1587
|
-
m(zr, this) || m(Br, this) || !p(
|
|
1587
|
+
m(zr, this) || m(Br, this) || !p(F, this, ci).call(this, t) || r() && (s(), i());
|
|
1588
1588
|
}, o = !1, s = () => {
|
|
1589
|
-
o || (o = !0, m(
|
|
1589
|
+
o || (o = !0, m(j, this).removeEventListener("canplay", a), m(j, this).removeEventListener("canplaythrough", a), m(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1590
1590
|
};
|
|
1591
1591
|
if (r()) {
|
|
1592
1592
|
i();
|
|
1593
1593
|
return;
|
|
1594
1594
|
}
|
|
1595
|
-
m(
|
|
1595
|
+
m(j, this).addEventListener("canplay", a), m(j, this).addEventListener("canplaythrough", a), m(j, this).addEventListener("loadeddata", a);
|
|
1596
1596
|
let c = setTimeout(() => {
|
|
1597
|
-
m(
|
|
1597
|
+
m(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1598
1598
|
}, 2e3);
|
|
1599
1599
|
}
|
|
1600
1600
|
function ri(e) {
|
|
1601
1601
|
let t = () => {
|
|
1602
|
-
p(
|
|
1602
|
+
p(F, this, ci).call(this, e) && (m(j, this).muted = !1);
|
|
1603
1603
|
};
|
|
1604
|
-
"requestVideoFrameCallback" in m(
|
|
1604
|
+
"requestVideoFrameCallback" in m(j, this) ? m(j, this).requestVideoFrameCallback(() => {
|
|
1605
1605
|
setTimeout(() => {
|
|
1606
1606
|
t();
|
|
1607
1607
|
}, 100);
|
|
@@ -1613,21 +1613,21 @@ function ii(e, t) {
|
|
|
1613
1613
|
let n = e.seekable;
|
|
1614
1614
|
if (!n || n.length === 0) return t;
|
|
1615
1615
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1616
|
-
return m(
|
|
1616
|
+
return m(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1617
1617
|
}
|
|
1618
1618
|
function ai() {
|
|
1619
|
-
for (let e of li._) m(
|
|
1620
|
-
for (let e of ui._) m(
|
|
1621
|
-
m(
|
|
1619
|
+
for (let e of li._) m(j, this).addEventListener(e, m(Wr, this));
|
|
1620
|
+
for (let e of ui._) m(j, this).addEventListener(e, m(Gr, this));
|
|
1621
|
+
m(j, this).addEventListener("timeupdate", m(Kr, this)), m(j, this).addEventListener("progress", m(qr, this));
|
|
1622
1622
|
}
|
|
1623
1623
|
function oi() {
|
|
1624
|
-
for (let e of li._) m(
|
|
1625
|
-
for (let e of ui._) m(
|
|
1626
|
-
m(
|
|
1624
|
+
for (let e of li._) m(j, this).removeEventListener(e, m(Wr, this));
|
|
1625
|
+
for (let e of ui._) m(j, this).removeEventListener(e, m(Gr, this));
|
|
1626
|
+
m(j, this).removeEventListener("timeupdate", m(Kr, this)), m(j, this).removeEventListener("progress", m(qr, this));
|
|
1627
1627
|
}
|
|
1628
1628
|
function si(e) {
|
|
1629
|
-
let t = e && (m(
|
|
1630
|
-
m(
|
|
1629
|
+
let t = e && (m(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || m(j, this).seeking || m(j, this).paused && !this.userPaused);
|
|
1630
|
+
m(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1631
1631
|
bubbles: !0,
|
|
1632
1632
|
composed: !0
|
|
1633
1633
|
}));
|
|
@@ -1928,70 +1928,70 @@ var _i = [
|
|
|
1928
1928
|
" ",
|
|
1929
1929
|
"f",
|
|
1930
1930
|
"m"
|
|
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(),
|
|
1931
|
+
], vi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), Bi = /* @__PURE__ */ new WeakMap(), Vi = /* @__PURE__ */ new WeakMap(), Hi = /* @__PURE__ */ new WeakMap(), Ui = /* @__PURE__ */ new WeakMap(), Wi = /* @__PURE__ */ new WeakMap(), Gi = /* @__PURE__ */ new WeakMap(), Ki = /* @__PURE__ */ new WeakMap(), qi = /* @__PURE__ */ new WeakMap(), Ji = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), Xi = /* @__PURE__ */ new WeakMap(), Zi = /* @__PURE__ */ new WeakMap(), Qi = /* @__PURE__ */ new WeakMap(), $i = /* @__PURE__ */ new WeakMap(), ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), ga = /* @__PURE__ */ new WeakMap(), _a = /* @__PURE__ */ new WeakMap(), va = class extends HTMLElement {
|
|
1932
1932
|
constructor() {
|
|
1933
1933
|
var t;
|
|
1934
|
-
super(), g(this,
|
|
1934
|
+
super(), g(this, H), f(this, vi, /* @__PURE__ */ new Map()), f(this, yi, 2e3), f(this, bi, null), f(this, xi, new yr({ onChange: (e) => p(H, this, U).call(this, _.DURATION, e.toString()) })), f(this, Si, null), f(this, Ci, void 0), f(this, I, void 0), f(this, L, void 0), f(this, wi, void 0), f(this, R, void 0), f(this, Ti, ao._), f(this, Ei, void 0), f(this, Di, void 0), f(this, Oi, void 0), f(this, ki, void 0), f(this, z, void 0), f(this, Ai, void 0), f(this, ji, void 0), f(this, Mi, void 0), f(this, B, void 0), f(this, Ni, void 0), f(this, Pi, void 0), f(this, Fi, void 0), f(this, V, void 0), f(this, Ii, null), f(this, Li, !1), f(this, Ri, null), f(this, zi, void 0), f(this, Bi, (e) => {
|
|
1935
1935
|
let t = e.filter((e) => {
|
|
1936
1936
|
var t;
|
|
1937
1937
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1938
1938
|
});
|
|
1939
|
-
p(
|
|
1939
|
+
p(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1940
1940
|
}), f(this, Vi, (e) => {
|
|
1941
|
-
p(
|
|
1941
|
+
p(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1942
1942
|
}), f(this, Hi, (e) => {
|
|
1943
1943
|
switch (e) {
|
|
1944
1944
|
case "playing":
|
|
1945
|
-
p(
|
|
1945
|
+
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
1946
1946
|
break;
|
|
1947
1947
|
case "paused":
|
|
1948
|
-
p(
|
|
1948
|
+
p(H, this, U).call(this, _.PAUSED, ""), p(H, this, W).call(this, _.BUFFERING);
|
|
1949
1949
|
break;
|
|
1950
1950
|
case "buffering":
|
|
1951
|
-
p(
|
|
1951
|
+
p(H, this, W).call(this, _.PAUSED), p(H, this, U).call(this, _.BUFFERING, "");
|
|
1952
1952
|
break;
|
|
1953
1953
|
default: break;
|
|
1954
1954
|
}
|
|
1955
1955
|
}), f(this, Ui, (e) => {
|
|
1956
|
-
p(
|
|
1956
|
+
p(H, this, U).call(this, _.VOLUME, e.volume.toString()), e.isMuted ? p(H, this, U).call(this, _.MUTED, "") : p(H, this, W).call(this, _.MUTED);
|
|
1957
1957
|
}), f(this, Wi, ({ channelId: e }) => {
|
|
1958
1958
|
var t;
|
|
1959
|
-
this.setAttribute(_.CHANNEL_ID, e), ((t = m(
|
|
1959
|
+
this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1960
1960
|
}), f(this, Gi, ({ channelId: e }) => {
|
|
1961
1961
|
var t;
|
|
1962
|
-
m(Ei, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = m(
|
|
1962
|
+
m(Ei, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = m(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && p(H, this, W).call(this, _.BUFFERING);
|
|
1963
1963
|
}), f(this, Ki, (e) => {
|
|
1964
|
-
h(ma, this, Date.now()), p(
|
|
1964
|
+
h(ma, this, Date.now()), p(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1965
1965
|
}), f(this, qi, (e) => {
|
|
1966
1966
|
var t;
|
|
1967
|
-
p(
|
|
1967
|
+
p(H, this, U).call(this, _.LANGUAGES, JSON.stringify(e)), (t = m(I, this)) != null && t.language && p(H, this, U).call(this, _.LANGUAGE, m(I, this).language);
|
|
1968
1968
|
}), f(this, Ji, (e) => {
|
|
1969
1969
|
var t;
|
|
1970
|
-
if (p(
|
|
1970
|
+
if (p(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = m(I, this)) != null && t.textTrack) {
|
|
1971
1971
|
var n, r;
|
|
1972
|
-
p(
|
|
1972
|
+
p(H, this, U).call(this, _.TEXT_TRACK, (n = (r = m(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1973
1973
|
}
|
|
1974
1974
|
}), f(this, Yi, (e) => {
|
|
1975
|
-
e != null && e.forVideo ? (p(
|
|
1975
|
+
e != null && e.forVideo ? (p(H, this, U).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (p(H, this, U).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), p(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
1976
1976
|
}), f(this, Xi, (e) => {
|
|
1977
|
-
e || p(
|
|
1977
|
+
e || p(H, this, W).call(this, _.BUFFERING), m(xi, this).setLive(e);
|
|
1978
1978
|
}), f(this, Zi, (e) => {
|
|
1979
1979
|
var t, n;
|
|
1980
1980
|
let { urls: r, duration: i } = e;
|
|
1981
|
-
if (!r[0] || !m(
|
|
1981
|
+
if (!r[0] || !m(R, this)) return;
|
|
1982
1982
|
let a = new URL(r[0]);
|
|
1983
1983
|
a.searchParams.set("channelId", (t = m(Ei, this)) == null ? "" : t);
|
|
1984
1984
|
let o = this.getAttribute("authentication-token");
|
|
1985
1985
|
o && a.searchParams.set("authToken", o);
|
|
1986
1986
|
let s = Tr(i);
|
|
1987
1987
|
if (Number.isNaN(s)) {
|
|
1988
|
-
m(
|
|
1988
|
+
m(V, this).error(`Invalid duration format: ${i}`);
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
1991
1991
|
let c = Math.floor(Date.now() / 1e3), l = (/* @__PURE__ */ new Date((c - s) * 1e3)).toISOString();
|
|
1992
1992
|
a.searchParams.set("from", l);
|
|
1993
1993
|
let u = a.toString();
|
|
1994
|
-
m(
|
|
1994
|
+
m(R, this).setTimeshiftUrl(u), m(xi, this).start({
|
|
1995
1995
|
multivariantUrl: u,
|
|
1996
1996
|
params: {
|
|
1997
1997
|
channelId: (n = m(Ei, this)) == null ? "" : n,
|
|
@@ -2001,31 +2001,31 @@ var _i = [
|
|
|
2001
2001
|
windowCapSeconds: s
|
|
2002
2002
|
});
|
|
2003
2003
|
}), f(this, Qi, () => {
|
|
2004
|
-
p(
|
|
2004
|
+
p(H, this, W).call(this, _.PAUSED), p(H, this, W).call(this, _.BUFFERING);
|
|
2005
2005
|
}), f(this, $i, () => {
|
|
2006
|
-
p(
|
|
2006
|
+
p(H, this, U).call(this, _.PAUSED, ""), p(H, this, W).call(this, _.BUFFERING);
|
|
2007
2007
|
}), f(this, ea, () => {
|
|
2008
|
-
m(da, this).call(this), p(
|
|
2008
|
+
m(da, this).call(this), p(H, this, W).call(this, _.BUFFERING);
|
|
2009
2009
|
}), f(this, ta, () => {
|
|
2010
|
-
m(
|
|
2010
|
+
m(R, this) && m(xi, this).applyLoadedDuration(m(R, this).duration);
|
|
2011
2011
|
}), f(this, na, () => {
|
|
2012
2012
|
var e, t;
|
|
2013
|
-
if (!m(
|
|
2014
|
-
let n = m(
|
|
2015
|
-
n !== void 0 && p(
|
|
2013
|
+
if (!m(R, this) || m(R, this).seeking || (e = (t = m(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
2014
|
+
let n = m(R, this).currentTime;
|
|
2015
|
+
n !== void 0 && p(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
2016
2016
|
}), f(this, ra, () => {
|
|
2017
|
-
m(
|
|
2017
|
+
m(R, this) && (p(H, this, U).call(this, _.VOLUME, m(R, this).volume.toString()), m(R, this).muted ? p(H, this, U).call(this, _.MUTED, "") : p(H, this, W).call(this, _.MUTED));
|
|
2018
2018
|
}), f(this, ia, () => {
|
|
2019
|
-
p(
|
|
2019
|
+
p(H, this, U).call(this, _.BUFFERING, "");
|
|
2020
2020
|
}), f(this, aa, () => {
|
|
2021
|
-
p(
|
|
2021
|
+
p(H, this, W).call(this, _.BUFFERING);
|
|
2022
2022
|
}), f(this, oa, () => {
|
|
2023
2023
|
if (m(Li, this)) {
|
|
2024
|
-
if (m(
|
|
2024
|
+
if (m(L, this) !== m(R, this)) {
|
|
2025
2025
|
h(Li, this, !1);
|
|
2026
2026
|
return;
|
|
2027
2027
|
}
|
|
2028
|
-
h(Li, this, !1), p(
|
|
2028
|
+
h(Li, this, !1), p(H, this, Ya).call(this);
|
|
2029
2029
|
}
|
|
2030
2030
|
}), f(this, sa, 0), e(this, "handleEvent", (e) => {
|
|
2031
2031
|
switch (e.type) {
|
|
@@ -2033,114 +2033,114 @@ var _i = [
|
|
|
2033
2033
|
h(sa, this, e.timeStamp);
|
|
2034
2034
|
break;
|
|
2035
2035
|
case "pointermove":
|
|
2036
|
-
p(
|
|
2036
|
+
p(H, this, Ra).call(this, e);
|
|
2037
2037
|
break;
|
|
2038
2038
|
case "pointerup":
|
|
2039
|
-
p(
|
|
2039
|
+
p(H, this, za).call(this, e);
|
|
2040
2040
|
break;
|
|
2041
2041
|
case "mouseleave":
|
|
2042
|
-
p(
|
|
2042
|
+
p(H, this, qa).call(this);
|
|
2043
2043
|
break;
|
|
2044
2044
|
case "dblclick":
|
|
2045
|
-
p(
|
|
2045
|
+
p(H, this, Va).call(this, e);
|
|
2046
2046
|
break;
|
|
2047
2047
|
case "mousemove":
|
|
2048
|
-
p(
|
|
2048
|
+
p(H, this, Ha).call(this, e);
|
|
2049
2049
|
break;
|
|
2050
2050
|
case "keydown":
|
|
2051
2051
|
m(ua, this).call(this, e);
|
|
2052
2052
|
break;
|
|
2053
2053
|
case "keyup":
|
|
2054
|
-
p(
|
|
2054
|
+
p(H, this, qa).call(this), m(la, this).call(this, e);
|
|
2055
2055
|
break;
|
|
2056
2056
|
}
|
|
2057
2057
|
}), f(this, ca, (e) => {
|
|
2058
|
-
if (m(
|
|
2059
|
-
case
|
|
2058
|
+
if (m(I, this) && (m(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
2059
|
+
case v.PLAY:
|
|
2060
2060
|
this.removeAttribute(_.PAUSED);
|
|
2061
2061
|
break;
|
|
2062
|
-
case
|
|
2062
|
+
case v.PAUSE:
|
|
2063
2063
|
this.setAttribute(_.PAUSED, "");
|
|
2064
2064
|
break;
|
|
2065
|
-
case
|
|
2065
|
+
case v.MUTE:
|
|
2066
2066
|
this.setAttribute(_.MUTED, "");
|
|
2067
2067
|
break;
|
|
2068
|
-
case
|
|
2068
|
+
case v.UNMUTE:
|
|
2069
2069
|
this.removeAttribute(_.MUTED);
|
|
2070
2070
|
break;
|
|
2071
|
-
case
|
|
2071
|
+
case v.LOCK_UI:
|
|
2072
2072
|
this.setAttribute(_.UI_LOCKED, "");
|
|
2073
2073
|
break;
|
|
2074
|
-
case
|
|
2074
|
+
case v.UNLOCK_UI:
|
|
2075
2075
|
this.removeAttribute(_.UI_LOCKED);
|
|
2076
2076
|
break;
|
|
2077
|
-
case
|
|
2077
|
+
case v.ENTER_FULLSCREEN:
|
|
2078
2078
|
this.setAttribute(_.FULLSCREEN, "");
|
|
2079
2079
|
break;
|
|
2080
|
-
case
|
|
2080
|
+
case v.EXIT_FULLSCREEN:
|
|
2081
2081
|
this.removeAttribute(_.FULLSCREEN);
|
|
2082
2082
|
break;
|
|
2083
|
-
case
|
|
2083
|
+
case v.SET_RENDITION:
|
|
2084
2084
|
{
|
|
2085
2085
|
let t = e.detail;
|
|
2086
|
-
t.audio && (m(
|
|
2086
|
+
t.audio && (m(I, this).maxAudioBitRate = t.audio.bitRate), t.video && (m(I, this).maxVideoBitRate = t.video.bitRate, m(I, this).maxSize = t.video, this.setAttribute(_.MAX_VIDEO_BITRATE, String(t.video.bitRate)));
|
|
2087
2087
|
}
|
|
2088
2088
|
break;
|
|
2089
|
-
case
|
|
2089
|
+
case v.SET_ABR_MODE:
|
|
2090
2090
|
{
|
|
2091
2091
|
let t = e.detail;
|
|
2092
|
-
t ? (m(
|
|
2092
|
+
t ? (m(I, this).abrEnabled = !0, this.setAttribute(_.ABR_ENABLED, "")) : (m(I, this).abrEnabled = !1, this.removeAttribute(_.ABR_ENABLED)), p(H, this, U).call(this, _.ABR_ENABLED, String(t));
|
|
2093
2093
|
}
|
|
2094
2094
|
break;
|
|
2095
|
-
case
|
|
2095
|
+
case v.SET_SIZE_BASED_RESOLUTION_CAP_MODE:
|
|
2096
2096
|
{
|
|
2097
2097
|
let t = e.detail;
|
|
2098
2098
|
this.setAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
2099
2099
|
}
|
|
2100
2100
|
break;
|
|
2101
|
-
case
|
|
2102
|
-
m(Ii, this) === null && p(
|
|
2101
|
+
case v.CHANNEL_GRID_OPENED:
|
|
2102
|
+
m(Ii, this) === null && p(H, this, Wa).call(this);
|
|
2103
2103
|
break;
|
|
2104
|
-
case
|
|
2104
|
+
case v.CHANNEL_GRID_CLOSED:
|
|
2105
2105
|
m(Ii, this) !== null && (clearTimeout(m(Ii, this)), h(Ii, this, null));
|
|
2106
2106
|
break;
|
|
2107
|
-
case
|
|
2107
|
+
case v.ENTER_PIP:
|
|
2108
2108
|
this.setAttribute(_.IS_PIP, "");
|
|
2109
2109
|
break;
|
|
2110
|
-
case
|
|
2110
|
+
case v.EXIT_PIP:
|
|
2111
2111
|
this.removeAttribute(_.IS_PIP);
|
|
2112
2112
|
break;
|
|
2113
|
-
case
|
|
2113
|
+
case v.REQUEST_AIRPLAY:
|
|
2114
2114
|
var t;
|
|
2115
2115
|
(t = m(Mi, this)) == null || t.showPlaybackTargetPicker();
|
|
2116
2116
|
break;
|
|
2117
|
-
case
|
|
2118
|
-
|
|
2117
|
+
case v.SET_LANGUAGE:
|
|
2118
|
+
y(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
2119
2119
|
break;
|
|
2120
|
-
case
|
|
2121
|
-
|
|
2120
|
+
case v.SET_TEXT_TRACK:
|
|
2121
|
+
y(e.detail) ? this.setAttribute(_.TEXT_TRACK, e.detail) : this.removeAttribute(_.TEXT_TRACK);
|
|
2122
2122
|
break;
|
|
2123
|
-
case
|
|
2124
|
-
m(
|
|
2123
|
+
case v.REQUEST_USER_INPUT:
|
|
2124
|
+
m(I, this).play(), m(I, this).muted = !1;
|
|
2125
2125
|
break;
|
|
2126
|
-
case
|
|
2126
|
+
case v.SET_VOLUME:
|
|
2127
2127
|
{
|
|
2128
2128
|
let t = e.detail;
|
|
2129
|
-
m(
|
|
2129
|
+
m(I, this).muted && t > 0 ? (m(I, this).muted = !1, m(R, this) && (m(R, this).muted = !1)) : t === 0 && (m(I, this).muted = !0, m(R, this) && (m(R, this).muted = !0)), this.setAttribute(_.VOLUME, t.toString());
|
|
2130
2130
|
}
|
|
2131
2131
|
break;
|
|
2132
|
-
case
|
|
2132
|
+
case v.SEEK:
|
|
2133
2133
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
2134
2134
|
break;
|
|
2135
|
-
case
|
|
2135
|
+
case v.GO_LIVE:
|
|
2136
2136
|
m(da, this).call(this);
|
|
2137
2137
|
break;
|
|
2138
|
-
case
|
|
2138
|
+
case v.TOGGLE_DEBUG_PANEL:
|
|
2139
2139
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
2140
2140
|
break;
|
|
2141
|
-
case
|
|
2141
|
+
case v.SET_TARGET_BUFFER_TIME:
|
|
2142
2142
|
{
|
|
2143
|
-
let t = Math.max(50, Math.min(
|
|
2143
|
+
let t = Math.max(50, Math.min(Ce, e.detail));
|
|
2144
2144
|
this.setAttribute("target-buffer-time", String(t));
|
|
2145
2145
|
}
|
|
2146
2146
|
break;
|
|
@@ -2151,7 +2151,7 @@ var _i = [
|
|
|
2151
2151
|
this.removeEventListener("keyup", this);
|
|
2152
2152
|
return;
|
|
2153
2153
|
}
|
|
2154
|
-
p(
|
|
2154
|
+
p(H, this, Ua).call(this, e);
|
|
2155
2155
|
}), f(this, ua, (e) => {
|
|
2156
2156
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2157
2157
|
t || n || !_i.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
@@ -2159,26 +2159,26 @@ var _i = [
|
|
|
2159
2159
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2160
2160
|
}), f(this, fa, (e) => {
|
|
2161
2161
|
var t;
|
|
2162
|
-
m(
|
|
2162
|
+
m(R, this) || p(H, this, Ca).call(this), m(L, this) !== m(R, this) && (e && p(H, this, Xa).call(this), h(L, this, m(R, this)), p(H, this, xa).call(this), p(H, this, Sa).call(this), p(H, this, Da).call(this), (t = m(I, this)) == null || t.pause(), h(Li, this, e));
|
|
2163
2163
|
}), f(this, pa, (e) => {
|
|
2164
2164
|
var t, n, r, i;
|
|
2165
|
-
e && p(
|
|
2166
|
-
p(
|
|
2165
|
+
e && p(H, this, Xa).call(this), (t = m(R, this)) == null || t.hide(), h(L, this, m(wi, this)), p(H, this, Da).call(this), this.hasAttribute(_.PAUSED) ? (n = m(L, this)) == null || n.pause() : (r = m(L, this)) == null || r.play(), p(H, this, Ta).call(this), p(H, this, ba).call(this), (i = m(R, this)) == null || i.pause(), e && (h(Li, this, !1), setTimeout(() => {
|
|
2166
|
+
p(H, this, Ya).call(this);
|
|
2167
2167
|
}, 100));
|
|
2168
2168
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2169
2169
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2170
2170
|
if (e !== !1) {
|
|
2171
2171
|
var n;
|
|
2172
|
-
m(fa, this).call(this, t), (n = m(
|
|
2172
|
+
m(fa, this).call(this, t), (n = m(R, this)) == null || n.seek({
|
|
2173
2173
|
time: parseFloat(e),
|
|
2174
2174
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2175
2175
|
});
|
|
2176
2176
|
return;
|
|
2177
2177
|
}
|
|
2178
|
-
m(
|
|
2178
|
+
m(L, this) !== m(wi, this) && m(pa, this).call(this, t);
|
|
2179
2179
|
}), f(this, ma, null), f(this, ha, () => {
|
|
2180
2180
|
var e;
|
|
2181
|
-
let t = (e = m(
|
|
2181
|
+
let t = (e = m(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2182
2182
|
if (!(t != null && t.video)) return;
|
|
2183
2183
|
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2184
2184
|
n && n.catch(() => {});
|
|
@@ -2187,32 +2187,32 @@ var _i = [
|
|
|
2187
2187
|
}), f(this, _a, null);
|
|
2188
2188
|
let r = this.attachShadow({ mode: "open" });
|
|
2189
2189
|
r.appendChild(gi.content.cloneNode(!0));
|
|
2190
|
-
let i =
|
|
2191
|
-
h(
|
|
2190
|
+
let i = ge(this.getAttribute("log-level"));
|
|
2191
|
+
h(V, this, re.get().createContext("VindralController")), m(V, this).setLevel(i), h(Ci, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), h(zi, this, new Kn(r));
|
|
2192
2192
|
}
|
|
2193
2193
|
connectedCallback() {
|
|
2194
2194
|
var e = this;
|
|
2195
2195
|
return t(function* () {
|
|
2196
|
-
|
|
2197
|
-
for (let t of Object.values(
|
|
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(
|
|
2196
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield p(H, e, ya).call(e));
|
|
2197
|
+
for (let t of Object.values(v)) e.addEventListener(t, m(ca, e));
|
|
2198
|
+
window.PointerEvent ? (e.addEventListener("pointerdown", e), e.addEventListener("pointermove", e), e.addEventListener("pointerup", e)) : e.addEventListener("mousemove", e), e.addEventListener("mouseleave", e), e.addEventListener("keydown", e), e.addEventListener("resize", e), e.addEventListener("dblclick", e), e.connectListener(e), p(H, e, Ia).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2199
2199
|
})();
|
|
2200
2200
|
}
|
|
2201
2201
|
disconnectedCallback() {
|
|
2202
2202
|
var e, t, n, r, i;
|
|
2203
|
-
p(
|
|
2204
|
-
for (let e of Object.values(
|
|
2205
|
-
p(
|
|
2203
|
+
p(H, this, La).call(this), p(H, this, ro).call(this), m(zi, this).unload(), (e = m(I, this)) == null || e.unload(), (t = m(z, this)) == null || t.unload(), (n = m(Ai, this)) == null || n.unload(), (r = m(ji, this)) == null || r.unload(), (i = m(B, this)) == null || i.unload(), p(H, this, wa).call(this);
|
|
2204
|
+
for (let e of Object.values(v)) this.removeEventListener(e, m(ca, this));
|
|
2205
|
+
p(H, this, xa).call(this), m(bi, this) && (clearTimeout(m(bi, this)), h(bi, this, null)), m(xi, this).stop(), this.disconnectListener(this);
|
|
2206
2206
|
}
|
|
2207
2207
|
attributeChangedCallback(e, t, n) {
|
|
2208
2208
|
if (t !== n) {
|
|
2209
|
-
switch (m(
|
|
2209
|
+
switch (m(V, this).debug("Attribute changed", {
|
|
2210
2210
|
name: e,
|
|
2211
2211
|
oldValue: t,
|
|
2212
2212
|
newValue: n
|
|
2213
2213
|
}), e) {
|
|
2214
2214
|
case "channel-id":
|
|
2215
|
-
h(Ei, this, n), m(
|
|
2215
|
+
h(Ei, this, n), m(I, this) && n && (m(I, this).channelId = n, m(I, this).play(), p(H, this, U).call(this, _.BUFFERING, ""), p(H, this, U).call(this, _.CHANNEL_ID, n), p(H, this, U).call(this, _.POSTER_SRC, m(I, this).getThumbnailUrl()));
|
|
2216
2216
|
break;
|
|
2217
2217
|
case "channel-group-id":
|
|
2218
2218
|
h(Di, this, n);
|
|
@@ -2221,96 +2221,96 @@ var _i = [
|
|
|
2221
2221
|
n && h(Ti, this, n);
|
|
2222
2222
|
break;
|
|
2223
2223
|
case "paused":
|
|
2224
|
-
if (
|
|
2224
|
+
if (y(n)) {
|
|
2225
2225
|
var r;
|
|
2226
|
-
(r = m(
|
|
2226
|
+
(r = m(L, this)) == null || r.pause(), p(H, this, U).call(this, _.PAUSED, "");
|
|
2227
2227
|
} else {
|
|
2228
2228
|
var i;
|
|
2229
|
-
p(
|
|
2229
|
+
p(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO), p(H, this, W).call(this, _.PAUSED), (i = m(L, this)) == null || i.play();
|
|
2230
2230
|
}
|
|
2231
2231
|
break;
|
|
2232
2232
|
case "target-buffer-time":
|
|
2233
2233
|
if (n) {
|
|
2234
2234
|
let e = parseInt(n, 10);
|
|
2235
|
-
Number.isNaN(e) || (m(
|
|
2235
|
+
Number.isNaN(e) || (m(I, this) && (m(I, this).targetBufferTime = e), p(H, this, U).call(this, _.TARGET_BUFFER_TIME, String(e)));
|
|
2236
2236
|
}
|
|
2237
2237
|
break;
|
|
2238
2238
|
case "min-buffer-time":
|
|
2239
|
-
if (m(
|
|
2240
|
-
let e =
|
|
2241
|
-
e !== void 0 && m(
|
|
2239
|
+
if (m(I, this) && y(n)) {
|
|
2240
|
+
let e = ve(n);
|
|
2241
|
+
e !== void 0 && m(I, this).updateBufferTimeConfig({ minBufferTime: e });
|
|
2242
2242
|
}
|
|
2243
2243
|
break;
|
|
2244
2244
|
case "max-buffer-time":
|
|
2245
|
-
if (m(
|
|
2246
|
-
let e =
|
|
2247
|
-
e !== void 0 && m(
|
|
2245
|
+
if (m(I, this) && y(n)) {
|
|
2246
|
+
let e = ve(n);
|
|
2247
|
+
e !== void 0 && m(I, this).updateBufferTimeConfig({ maxBufferTime: e });
|
|
2248
2248
|
}
|
|
2249
2249
|
break;
|
|
2250
2250
|
case _.DEBUG_PANEL_OPEN:
|
|
2251
|
-
|
|
2251
|
+
y(n) ? p(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : p(H, this, W).call(this, _.DEBUG_PANEL_OPEN), p(H, this, to).call(this);
|
|
2252
2252
|
break;
|
|
2253
2253
|
case "user-interacting":
|
|
2254
|
-
|
|
2254
|
+
y(n) ? p(H, this, U).call(this, _.USER_INTERACTING, "") : p(H, this, W).call(this, _.USER_INTERACTING);
|
|
2255
2255
|
break;
|
|
2256
2256
|
case "muted":
|
|
2257
|
-
if (m(
|
|
2257
|
+
if (m(I, this)) if (y(n)) {
|
|
2258
2258
|
var a;
|
|
2259
|
-
if (m(
|
|
2259
|
+
if (m(I, this).muted = !0, m(R, this) && (m(R, this).muted = !0), p(H, this, U).call(this, _.MUTED, ""), (a = m(B, this)) != null && a.isMediaElementSource) {
|
|
2260
2260
|
var o;
|
|
2261
|
-
(o = m(
|
|
2261
|
+
(o = m(B, this)) == null || o.stop(), p(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2262
2262
|
left: null,
|
|
2263
2263
|
right: null
|
|
2264
2264
|
}));
|
|
2265
2265
|
}
|
|
2266
2266
|
} else {
|
|
2267
2267
|
var s;
|
|
2268
|
-
m(
|
|
2268
|
+
m(I, this).muted = !1, m(R, this) && (m(R, this).muted = !1), p(H, this, W).call(this, _.MUTED), p(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO), m(I, this).volume === 0 && (m(I, this).volume = .3), (s = m(B, this)) == null || s.start();
|
|
2269
2269
|
}
|
|
2270
2270
|
break;
|
|
2271
2271
|
case "ui-locked":
|
|
2272
|
-
|
|
2272
|
+
y(n) ? p(H, this, Ka).call(this) : p(H, this, qa).call(this);
|
|
2273
2273
|
break;
|
|
2274
2274
|
case "is-fullscreen":
|
|
2275
|
-
|
|
2275
|
+
y(n) ? p(H, this, Za).call(this) : p(H, this, Qa).call(this);
|
|
2276
2276
|
break;
|
|
2277
2277
|
case "abr-enabled":
|
|
2278
2278
|
{
|
|
2279
|
-
let e =
|
|
2280
|
-
m(
|
|
2279
|
+
let e = x(n == null ? null : n, !1);
|
|
2280
|
+
m(I, this) && (m(I, this).abrEnabled = e, e && (m(I, this).sizeBasedResolutionCapEnabled = x(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0))), e ? p(H, this, U).call(this, _.ABR_ENABLED, "") : p(H, this, W).call(this, _.ABR_ENABLED);
|
|
2281
2281
|
}
|
|
2282
2282
|
break;
|
|
2283
2283
|
case "size-based-resolution-cap-enabled":
|
|
2284
2284
|
{
|
|
2285
|
-
let e =
|
|
2286
|
-
m(
|
|
2285
|
+
let e = x(n == null ? null : n, !0);
|
|
2286
|
+
m(I, this) && (m(I, this).sizeBasedResolutionCapEnabled = e), p(H, this, U).call(this, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, e ? "true" : "false");
|
|
2287
2287
|
}
|
|
2288
2288
|
break;
|
|
2289
2289
|
case "max-video-bit-rate":
|
|
2290
|
-
h(Oi, this, n),
|
|
2290
|
+
h(Oi, this, n), y(n) ? p(H, this, U).call(this, _.MAX_VIDEO_BITRATE, n) : p(H, this, W).call(this, _.MAX_VIDEO_BITRATE), m(R, this) && (m(R, this).maxVideoBitRate = n ? ve(n) : void 0);
|
|
2291
2291
|
break;
|
|
2292
2292
|
case "max-initial-bit-rate":
|
|
2293
|
-
h(ki, this, n),
|
|
2293
|
+
h(ki, this, n), y(n) ? p(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : p(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2294
2294
|
break;
|
|
2295
2295
|
case "is-pip":
|
|
2296
|
-
|
|
2296
|
+
y(n) ? p(H, this, Ya).call(this) : p(H, this, Xa).call(this);
|
|
2297
2297
|
break;
|
|
2298
2298
|
case "is-airplaying":
|
|
2299
|
-
if (
|
|
2299
|
+
if (y(n)) {
|
|
2300
2300
|
var c, l;
|
|
2301
|
-
(c = m(
|
|
2301
|
+
(c = m(I, this)) != null && c.mediaElement && (m(I, this).mediaElement.style.display = "hidden"), (l = m(I, this)) == null || l.pause();
|
|
2302
2302
|
} else {
|
|
2303
2303
|
var u;
|
|
2304
|
-
(u = m(
|
|
2304
|
+
(u = m(I, this)) != null && u.mediaElement && (m(I, this).mediaElement.style.display = "block");
|
|
2305
2305
|
}
|
|
2306
2306
|
break;
|
|
2307
2307
|
case "is-casting":
|
|
2308
|
-
if (
|
|
2308
|
+
if (y(n)) {
|
|
2309
2309
|
var ee, d;
|
|
2310
|
-
(ee = m(Ai, this)) != null && ee.isFullscreen() && p(
|
|
2310
|
+
(ee = m(Ai, this)) != null && ee.isFullscreen() && p(H, this, Qa).call(this), (d = m(I, this)) == null || d.pause();
|
|
2311
2311
|
} else if (!document.hidden) {
|
|
2312
2312
|
var te;
|
|
2313
|
-
(te = m(
|
|
2313
|
+
(te = m(I, this)) == null || te.play();
|
|
2314
2314
|
}
|
|
2315
2315
|
break;
|
|
2316
2316
|
case "cast-receiver-id":
|
|
@@ -2320,48 +2320,48 @@ var _i = [
|
|
|
2320
2320
|
h(Fi, this, n);
|
|
2321
2321
|
break;
|
|
2322
2322
|
case "language":
|
|
2323
|
-
m(
|
|
2323
|
+
m(I, this) && (m(I, this).language = n, y(n) ? p(H, this, U).call(this, _.LANGUAGE, n) : p(H, this, W).call(this, _.LANGUAGE));
|
|
2324
2324
|
break;
|
|
2325
2325
|
case "text-track":
|
|
2326
|
-
m(
|
|
2326
|
+
m(I, this) && (m(I, this).textTrack = n, y(n) ? p(H, this, U).call(this, _.TEXT_TRACK, n) : p(H, this, W).call(this, _.TEXT_TRACK));
|
|
2327
2327
|
break;
|
|
2328
2328
|
case "log-level":
|
|
2329
|
-
|
|
2329
|
+
y(n) && m(V, this).setLevel(ge(n));
|
|
2330
2330
|
break;
|
|
2331
2331
|
case "authentication-token":
|
|
2332
|
-
if (
|
|
2332
|
+
if (y(n)) {
|
|
2333
2333
|
var ne, re;
|
|
2334
|
-
(ne = m(
|
|
2335
|
-
} else p(
|
|
2334
|
+
(ne = m(I, this)) == null || ne.updateAuthenticationToken(n), (re = m(Mi, this)) == null || re.updateAuthenticationToken(n), p(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2335
|
+
} else p(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2336
2336
|
break;
|
|
2337
2337
|
case "volume":
|
|
2338
|
-
if (
|
|
2338
|
+
if (y(n)) {
|
|
2339
2339
|
let e = parseFloat(n);
|
|
2340
|
-
m(
|
|
2340
|
+
m(R, this) && (m(R, this).volume = e), m(I, this) && (m(I, this).volume = e);
|
|
2341
2341
|
}
|
|
2342
2342
|
break;
|
|
2343
2343
|
case "timeshift-position":
|
|
2344
|
-
|
|
2344
|
+
y(n) ? p(H, this, U).call(this, _.TIMESHIFT_POSITION, n) : p(H, this, W).call(this, _.TIMESHIFT_POSITION);
|
|
2345
2345
|
break;
|
|
2346
2346
|
case "timeline-markers":
|
|
2347
|
-
|
|
2347
|
+
y(n) ? p(H, this, U).call(this, _.TIMELINE_MARKERS, n) : p(H, this, W).call(this, _.TIMELINE_MARKERS);
|
|
2348
2348
|
break;
|
|
2349
2349
|
case "drm-headers":
|
|
2350
|
-
if (
|
|
2351
|
-
let e =
|
|
2350
|
+
if (y(n)) {
|
|
2351
|
+
let e = ye(n);
|
|
2352
2352
|
if (e) {
|
|
2353
2353
|
var ie;
|
|
2354
|
-
(ie = m(
|
|
2355
|
-
} else m(
|
|
2354
|
+
(ie = m(I, this)) == null || ie.drm.setHeaders(e);
|
|
2355
|
+
} else m(V, this).warn("Invalid DRM headers format:", n);
|
|
2356
2356
|
}
|
|
2357
2357
|
break;
|
|
2358
2358
|
case "drm-queryparams":
|
|
2359
|
-
if (
|
|
2360
|
-
let e =
|
|
2359
|
+
if (y(n)) {
|
|
2360
|
+
let e = ye(n);
|
|
2361
2361
|
if (e) {
|
|
2362
2362
|
var ae;
|
|
2363
|
-
(ae = m(
|
|
2364
|
-
} else m(
|
|
2363
|
+
(ae = m(I, this)) == null || ae.drm.setQueryParams(e);
|
|
2364
|
+
} else m(V, this).warn("Invalid DRM query parameters format:", n);
|
|
2365
2365
|
}
|
|
2366
2366
|
break;
|
|
2367
2367
|
}
|
|
@@ -2369,7 +2369,7 @@ var _i = [
|
|
|
2369
2369
|
_.USER_INTERACTING,
|
|
2370
2370
|
_.PAUSED,
|
|
2371
2371
|
_.HIDE_UI_ON_PAUSE
|
|
2372
|
-
].includes(e) && p(
|
|
2372
|
+
].includes(e) && p(H, this, Ja).call(this);
|
|
2373
2373
|
}
|
|
2374
2374
|
}
|
|
2375
2375
|
connectListener(e) {
|
|
@@ -2378,11 +2378,11 @@ var _i = [
|
|
|
2378
2378
|
switch (n ? n.push(e) : m(vi, this).set(t, [e]), t) {
|
|
2379
2379
|
case _.PAUSED:
|
|
2380
2380
|
var r;
|
|
2381
|
-
(((r = m(
|
|
2381
|
+
(((r = m(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
2382
2382
|
break;
|
|
2383
2383
|
case _.MUTED:
|
|
2384
2384
|
var i;
|
|
2385
|
-
((i = m(
|
|
2385
|
+
((i = m(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2386
2386
|
break;
|
|
2387
2387
|
case _.MAX_VIDEO_BITRATE:
|
|
2388
2388
|
m(Oi, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, m(Oi, this));
|
|
@@ -2390,7 +2390,7 @@ var _i = [
|
|
|
2390
2390
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2391
2391
|
{
|
|
2392
2392
|
var a, o;
|
|
2393
|
-
let t = (a = (o = m(
|
|
2393
|
+
let t = (a = (o = m(I, this)) == null ? void 0 : o.sizeBasedResolutionCapEnabled) == null ? x(this.getAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED), !0) : a;
|
|
2394
2394
|
e.setAttribute(_.SIZE_BASED_RESOLUTION_CAP_ENABLED, t ? "true" : "false");
|
|
2395
2395
|
}
|
|
2396
2396
|
break;
|
|
@@ -2407,7 +2407,7 @@ var _i = [
|
|
|
2407
2407
|
}
|
|
2408
2408
|
case _.TIMELINE_MARKERS: {
|
|
2409
2409
|
let t = this.getAttribute(_.TIMELINE_MARKERS);
|
|
2410
|
-
|
|
2410
|
+
y(t) && e.setAttribute(_.TIMELINE_MARKERS, t);
|
|
2411
2411
|
break;
|
|
2412
2412
|
}
|
|
2413
2413
|
case _.DEBUG_PANEL_OPEN:
|
|
@@ -2420,15 +2420,15 @@ var _i = [
|
|
|
2420
2420
|
}
|
|
2421
2421
|
case _.PLAYBACK_LATENCY: {
|
|
2422
2422
|
var s;
|
|
2423
|
-
let t = (s = m(
|
|
2423
|
+
let t = (s = m(I, this)) == null ? void 0 : s.playbackLatency;
|
|
2424
2424
|
typeof t == "number" && e.setAttribute(_.PLAYBACK_LATENCY, String(t));
|
|
2425
2425
|
break;
|
|
2426
2426
|
}
|
|
2427
2427
|
case _.CONNECTION_STATE:
|
|
2428
|
-
m(
|
|
2428
|
+
m(I, this) && e.setAttribute(_.CONNECTION_STATE, m(I, this).connectionState);
|
|
2429
2429
|
break;
|
|
2430
2430
|
case _.ABR_ENABLED:
|
|
2431
|
-
m(
|
|
2431
|
+
m(I, this) ? e.setAttribute(_.ABR_ENABLED, String(m(I, this).abrEnabled)) : y(this.getAttribute(_.ABR_ENABLED)) ? e.setAttribute(_.ABR_ENABLED, this.getAttribute(_.ABR_ENABLED) || "") : e.removeAttribute(_.ABR_ENABLED);
|
|
2432
2432
|
break;
|
|
2433
2433
|
}
|
|
2434
2434
|
});
|
|
@@ -2440,10 +2440,10 @@ var _i = [
|
|
|
2440
2440
|
});
|
|
2441
2441
|
}
|
|
2442
2442
|
get instance() {
|
|
2443
|
-
return m(
|
|
2443
|
+
return m(I, this);
|
|
2444
2444
|
}
|
|
2445
2445
|
get fullscreen() {
|
|
2446
|
-
return p(
|
|
2446
|
+
return p(H, this, Aa).call(this);
|
|
2447
2447
|
}
|
|
2448
2448
|
get airPlay() {
|
|
2449
2449
|
return m(Mi, this);
|
|
@@ -2456,7 +2456,7 @@ var _i = [
|
|
|
2456
2456
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2457
2457
|
}
|
|
2458
2458
|
connect() {
|
|
2459
|
-
p(
|
|
2459
|
+
p(H, this, ya).call(this);
|
|
2460
2460
|
}
|
|
2461
2461
|
};
|
|
2462
2462
|
function ya() {
|
|
@@ -2464,21 +2464,21 @@ function ya() {
|
|
|
2464
2464
|
return t(function* () {
|
|
2465
2465
|
var t, n;
|
|
2466
2466
|
if (!m(Ei, e)) return;
|
|
2467
|
-
let r = m(
|
|
2468
|
-
m(xi, e).stop(), yield (t = m(
|
|
2469
|
-
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o =
|
|
2470
|
-
headers:
|
|
2471
|
-
queryParams:
|
|
2467
|
+
let r = m(L, e) === m(wi, e);
|
|
2468
|
+
m(xi, e).stop(), yield (t = m(I, e)) == null ? void 0 : t.unload(), r && h(L, e, void 0);
|
|
2469
|
+
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = ve(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = _e(e.getAttribute(_.MEDIA)), l = e.getAttribute(_.TEXT_TRACK) || void 0, u = e.getAttribute("edge-url") || void 0, ee = e.getAttribute("authentication-token") || void 0, d = ve(e.getAttribute("max-video-bit-rate")), te = ve(e.getAttribute("max-initial-bit-rate")), ne = we(e.getAttribute("max-size")), re = ve(e.getAttribute("min-buffer-time")), ie = ve(e.getAttribute("max-buffer-time")), oe = x(e.getAttribute("burst-enabled")), se = x(e.getAttribute("mse-enabled")), ce = x(e.getAttribute("mse-opus-enabled")), le = x(e.getAttribute("ios-background-play-enabled")), f = x(e.getAttribute("ios-wake-lock-enabled")), g = x(e.getAttribute("stream-to-media-element-enabled")), ue = x(e.getAttribute("ios-media-element-enabled")), de = x(e.getAttribute("abr-enabled"), !0), fe = x(e.getAttribute("size-based-resolution-cap-enabled")), pe = x(e.getAttribute("telemetry-enabled")), me = be(e.getAttribute("video-codecs")), v = Se(e.getAttribute("poster")), b = he(e.getAttribute("advanced")), S = ge(e.getAttribute("log-level")), Ce = {
|
|
2470
|
+
headers: ye(e.getAttribute("drm-headers")),
|
|
2471
|
+
queryParams: ye(e.getAttribute("drm-queryparams")),
|
|
2472
2472
|
widevine: {
|
|
2473
|
-
videoRobustness:
|
|
2474
|
-
audioRobustness:
|
|
2473
|
+
videoRobustness: xe(e.getAttribute("drm-widevine-video-robustness")),
|
|
2474
|
+
audioRobustness: xe(e.getAttribute("drm-widevine-audio-robustness"))
|
|
2475
2475
|
},
|
|
2476
2476
|
playready: {
|
|
2477
|
-
videoRobustness:
|
|
2478
|
-
audioRobustness:
|
|
2477
|
+
videoRobustness: xe(e.getAttribute("drm-playready-video-robustness")),
|
|
2478
|
+
audioRobustness: xe(e.getAttribute("drm-playready-audio-robustness"))
|
|
2479
2479
|
}
|
|
2480
|
-
},
|
|
2481
|
-
h(
|
|
2480
|
+
}, Te = je(e.getAttribute("webcodecs-hardware-acceleration")), Ee = Ae(e.getAttribute("decoders")), De = x(e.getAttribute("offscreen-canvas-enabled")), Oe = x(e.getAttribute("webtransport-enabled")), ke = ve(e.getAttribute("reconnect-retries")), Me = ke === void 0 ? void 0 : (e) => e.reconnectRetries < ke, Ne = e.getAttribute("language") || void 0;
|
|
2481
|
+
h(I, e, new ae({
|
|
2482
2482
|
url: m(Ti, e),
|
|
2483
2483
|
channelId: m(Ei, e),
|
|
2484
2484
|
channelGroupId: m(Di, e),
|
|
@@ -2503,98 +2503,98 @@ function ya() {
|
|
|
2503
2503
|
sizeBasedResolutionCapEnabled: fe,
|
|
2504
2504
|
telemetryEnabled: pe,
|
|
2505
2505
|
videoCodecs: me,
|
|
2506
|
-
poster:
|
|
2506
|
+
poster: v,
|
|
2507
2507
|
textTrack: l,
|
|
2508
2508
|
advanced: b,
|
|
2509
|
-
logLevel:
|
|
2509
|
+
logLevel: S,
|
|
2510
2510
|
language: Ne,
|
|
2511
|
-
drm:
|
|
2511
|
+
drm: Ce,
|
|
2512
2512
|
webtransportEnabled: Oe,
|
|
2513
|
-
webcodecsHardwareAcceleration:
|
|
2513
|
+
webcodecsHardwareAcceleration: Te,
|
|
2514
2514
|
decoders: Ee,
|
|
2515
2515
|
offscreenCanvasEnabled: De,
|
|
2516
|
-
reconnectHandler:
|
|
2517
|
-
})), h(wi, e, new di(m(
|
|
2518
|
-
let Pe =
|
|
2519
|
-
Pe && p(
|
|
2516
|
+
reconnectHandler: Me
|
|
2517
|
+
})), h(wi, e, new di(m(I, e))), m(L, e) || h(L, e, m(wi, e)), p(H, e, ba).call(e), h(Si, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), m(Si, e) && (m(I, e).attach(m(Si, e)), m(zi, e).observe(m(Si, e))), e.setAttribute(_.MEDIA, m(I, e).media), m(I, e).muted && p(H, e, U).call(e, _.MUTED, ""), m(I, e).abrEnabled ? p(H, e, U).call(e, _.ABR_ENABLED, "") : p(H, e, W).call(e, _.ABR_ENABLED), p(H, e, U).call(e, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, m(I, e).sizeBasedResolutionCapEnabled ? "true" : "false"), p(H, e, U).call(e, _.VOLUME, m(I, e).volume.toString()), y(v) || p(H, e, U).call(e, _.POSTER_SRC, m(I, e).getThumbnailUrl());
|
|
2518
|
+
let Pe = x(e.getAttribute(_.AIRPLAY_ENABLED), !1), C = x(e.getAttribute(_.CAST_ENABLED), !0), Fe = x(e.getAttribute(_.FULLSCREEN_ENABLED), !0), Ie = x(e.getAttribute(_.PIP_ENABLED), !0), Le = x(e.getAttribute(_.VU_METER_ENABLED), !1), Re = x(e.getAttribute(_.TIMESHIFT_ENABLED), !1);
|
|
2519
|
+
Pe && p(H, e, Pa).call(e, m(I, e)), C && p(H, e, ja).call(e, m(I, e)), Fe && p(H, e, Oa).call(e, m(I, e)), Ie && p(H, e, Ea).call(e, m(I, e)), i || m(I, e).play(), Le && p(H, e, Fa).call(e, m(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2520
2520
|
bubbles: !0,
|
|
2521
2521
|
composed: !0,
|
|
2522
|
-
detail: m(
|
|
2523
|
-
})), Re && (p(
|
|
2522
|
+
detail: m(I, e)
|
|
2523
|
+
})), Re && (p(H, e, Ca).call(e), Fe && p(H, e, ka).call(e));
|
|
2524
2524
|
})();
|
|
2525
2525
|
}
|
|
2526
2526
|
function ba() {
|
|
2527
|
-
m(
|
|
2527
|
+
m(I, this) && (m(I, this).on("rendition levels", m(Bi, this)), m(I, this).on("rendition level", m(Vi, this)), m(I, this).on("playback state", m(Hi, this)), m(I, this).on("volume state", m(Ui, this)), m(I, this).on("channel switch failed", m(Wi, this)), m(I, this).on("channel switch", m(Gi, this)), m(I, this).on("channels", m(Ki, this)), m(I, this).on("languages", m(qi, this)), m(I, this).on("text tracks", m(Ji, this)), m(I, this).on("needs user input", m(Yi, this)), m(I, this).on("is live", m(Xi, this)), m(I, this).on("timeshift info", m(Zi, this)));
|
|
2528
2528
|
}
|
|
2529
2529
|
function xa() {
|
|
2530
|
-
m(
|
|
2530
|
+
m(I, this) && (m(I, this).off("playback state", m(Hi, this)), m(I, this).off("volume state", m(Ui, this)), m(I, this).off("channel switch failed", m(Wi, this)), m(I, this).off("channel switch", m(Gi, this)), m(I, this).off("channels", m(Ki, this)), m(I, this).off("languages", m(qi, this)), m(I, this).off("text tracks", m(Ji, this)), m(I, this).off("needs user input", m(Yi, this)), m(I, this).off("is live", m(Xi, this)), m(I, this).off("timeshift info", m(Zi, this)));
|
|
2531
2531
|
}
|
|
2532
2532
|
function Sa() {
|
|
2533
|
-
m(
|
|
2533
|
+
m(R, this) && (m(R, this).addEventListener("playing", m(Qi, this)), m(R, this).addEventListener("pause", m($i, this)), m(R, this).addEventListener("ended", m(ea, this)), m(R, this).addEventListener("timeupdate", m(na, this)), m(R, this).addEventListener("volumechange", m(ra, this)), m(R, this).addEventListener("hlsbuffering", m(ia, this)), m(R, this).addEventListener("hlsnotbuffering", m(aa, this)), m(R, this).addEventListener("timeshiftready", m(oa, this)));
|
|
2534
2534
|
}
|
|
2535
2535
|
function Ca() {
|
|
2536
2536
|
var e, t, n, r;
|
|
2537
|
-
let i =
|
|
2538
|
-
p(
|
|
2537
|
+
let i = ve(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = m(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = x(this.getAttribute(_.MUTED), (n = (r = m(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2538
|
+
p(H, this, wa).call(this), h(R, this, new Jr(m(Ci, this), {
|
|
2539
2539
|
volume: a,
|
|
2540
2540
|
muted: o,
|
|
2541
2541
|
maxVideoBitRate: m(Oi, this) ? parseInt(m(Oi, this), 10) : void 0
|
|
2542
|
-
})), m(
|
|
2542
|
+
})), m(R, this).addEventListener("durationchange", m(ta, this));
|
|
2543
2543
|
}
|
|
2544
2544
|
function wa() {
|
|
2545
|
-
m(
|
|
2545
|
+
m(R, this) && (p(H, this, Ta).call(this), m(R, this).removeEventListener("durationchange", m(ta, this)), m(R, this).cleanup(), m(L, this) === m(R, this) && h(L, this, void 0), h(R, this, void 0));
|
|
2546
2546
|
}
|
|
2547
2547
|
function Ta() {
|
|
2548
|
-
m(
|
|
2548
|
+
m(R, this) && (m(R, this).removeEventListener("playing", m(Qi, this)), m(R, this).removeEventListener("pause", m($i, this)), m(R, this).removeEventListener("ended", m(ea, this)), m(R, this).removeEventListener("timeupdate", m(na, this)), m(R, this).removeEventListener("volumechange", m(ra, this)), m(R, this).removeEventListener("hlsbuffering", m(ia, this)), m(R, this).removeEventListener("hlsnotbuffering", m(aa, this)), m(R, this).removeEventListener("timeshiftready", m(oa, this)));
|
|
2549
2549
|
}
|
|
2550
2550
|
function Ea(e) {
|
|
2551
|
-
e.mediaElement instanceof HTMLVideoElement && (h(
|
|
2552
|
-
e ? p(
|
|
2551
|
+
e.mediaElement instanceof HTMLVideoElement && (h(z, this, new rr(e.mediaElement)), m(z, this).isSupported() && (m(V, this).debug("PIP is supported"), p(H, this, U).call(this, _.PIP_AVAILABLE, "")), m(z, this).on("on picture in picture change", (e) => {
|
|
2552
|
+
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP);
|
|
2553
2553
|
}));
|
|
2554
2554
|
}
|
|
2555
2555
|
function Da() {
|
|
2556
2556
|
var e;
|
|
2557
|
-
if (!m(
|
|
2557
|
+
if (!m(z, this)) return;
|
|
2558
2558
|
let t = null;
|
|
2559
|
-
m(
|
|
2560
|
-
e ? p(
|
|
2559
|
+
m(L, this) === m(R, this) && m(R, this) ? t = m(R, this).videoElement : ((e = m(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = m(I, this).mediaElement), t && t !== m(z, this).videoElement && (m(V, this).debug("Updating PIP target to", m(L, this) === m(R, this) ? "HLS" : "Vindral"), m(z, this).unload(), h(z, this, new rr(t)), m(z, this).on("on picture in picture change", (e) => {
|
|
2560
|
+
e ? p(H, this, U).call(this, _.IS_PIP, "") : p(H, this, W).call(this, _.IS_PIP);
|
|
2561
2561
|
}));
|
|
2562
2562
|
}
|
|
2563
2563
|
function Oa(e) {
|
|
2564
2564
|
let t = !qn.isFullscreenApiSupported(this) && qn.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2565
2565
|
h(Ai, this, new qn(t)), m(Ai, this).on("on fullscreen change", (e) => {
|
|
2566
|
-
e ? p(
|
|
2566
|
+
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2567
2567
|
});
|
|
2568
2568
|
}
|
|
2569
2569
|
function ka() {
|
|
2570
2570
|
var e;
|
|
2571
|
-
m(
|
|
2572
|
-
e ? p(
|
|
2571
|
+
m(R, this) && (h(ji, this, !qn.isFullscreenApiSupported(this) && qn.isFullscreenApiSupported((e = m(R, this)) == null ? void 0 : e.videoElement) ? new qn(m(R, this).videoElement) : new qn(this)), m(ji, this).on("on fullscreen change", (e) => {
|
|
2572
|
+
e ? p(H, this, U).call(this, _.FULLSCREEN, "") : p(H, this, W).call(this, _.FULLSCREEN);
|
|
2573
2573
|
}));
|
|
2574
2574
|
}
|
|
2575
2575
|
function Aa() {
|
|
2576
2576
|
return this.hasAttribute(_.TIMESHIFT_POSITION) ? m(ji, this) : m(Ai, this);
|
|
2577
2577
|
}
|
|
2578
2578
|
function ja(e) {
|
|
2579
|
-
h(Ni, this, new
|
|
2579
|
+
h(Ni, this, new De({
|
|
2580
2580
|
background: m(Fi, this),
|
|
2581
2581
|
receiverApplicationId: m(Pi, this),
|
|
2582
2582
|
options: e.getCastOptions()
|
|
2583
2583
|
})), m(Ni, this).init().then(() => {
|
|
2584
2584
|
var e, t, n;
|
|
2585
|
-
p(
|
|
2585
|
+
p(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = m(Ni, this)) == null || e.on("connected", p(H, this, Ma).bind(this)), (t = m(Ni, this)) == null || t.on("resumed", p(H, this, Ma).bind(this)), (n = m(Ni, this)) == null || n.on("disconnected", p(H, this, Na).bind(this));
|
|
2586
2586
|
}).catch((e) => {
|
|
2587
|
-
m(
|
|
2587
|
+
m(V, this).warn("Failed to initialize CastSender", e);
|
|
2588
2588
|
});
|
|
2589
2589
|
}
|
|
2590
2590
|
function Ma() {
|
|
2591
2591
|
var e, t;
|
|
2592
|
-
p(
|
|
2592
|
+
p(H, this, U).call(this, _.IS_CASTING, "");
|
|
2593
2593
|
let n = (e = (t = m(Ni, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2594
|
-
p(
|
|
2594
|
+
p(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2595
2595
|
}
|
|
2596
2596
|
function Na() {
|
|
2597
|
-
p(
|
|
2597
|
+
p(H, this, W).call(this, _.IS_CASTING), p(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2598
2598
|
}
|
|
2599
2599
|
function Pa(e) {
|
|
2600
2600
|
var t;
|
|
@@ -2606,29 +2606,29 @@ function Pa(e) {
|
|
|
2606
2606
|
authenticationToken: n.authenticationToken,
|
|
2607
2607
|
container: this
|
|
2608
2608
|
})), m(Mi, this).once("available", () => {
|
|
2609
|
-
p(
|
|
2609
|
+
p(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2610
2610
|
}), m(Mi, this).on("connected", () => {
|
|
2611
|
-
p(
|
|
2611
|
+
p(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2612
2612
|
}), m(Mi, this).on("disconnected", () => {
|
|
2613
|
-
p(
|
|
2613
|
+
p(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2614
2614
|
});
|
|
2615
2615
|
}
|
|
2616
2616
|
function Fa(e) {
|
|
2617
2617
|
var t;
|
|
2618
|
-
if ((t = m(
|
|
2619
|
-
if (e.audioNode) h(
|
|
2620
|
-
else if (e.mediaElement instanceof HTMLMediaElement) h(
|
|
2618
|
+
if ((t = m(B, this)) == null || t.unload(), !se()) {
|
|
2619
|
+
if (e.audioNode) h(B, this, new Pr(e.audioNode));
|
|
2620
|
+
else if (e.mediaElement instanceof HTMLMediaElement) h(B, this, new Pr(e.mediaElement));
|
|
2621
2621
|
else return;
|
|
2622
|
-
m(
|
|
2623
|
-
p(
|
|
2624
|
-
}), p(
|
|
2622
|
+
m(B, this).on("on decibel change", (e) => {
|
|
2623
|
+
p(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
2624
|
+
}), p(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify({
|
|
2625
2625
|
left: null,
|
|
2626
2626
|
right: null
|
|
2627
|
-
})), (!m(
|
|
2627
|
+
})), (!m(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && m(B, this).start();
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
2630
|
function Ia() {
|
|
2631
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./
|
|
2631
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./C2-H3s2r.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), m(I, this));
|
|
2632
2632
|
window._vindralDebug = e, h(Ri, this, e);
|
|
2633
2633
|
}
|
|
2634
2634
|
function La() {
|
|
@@ -2636,23 +2636,23 @@ function La() {
|
|
|
2636
2636
|
m(Ri, this) && e._vindralDebug === m(Ri, this) && delete e._vindralDebug, h(Ri, this, null);
|
|
2637
2637
|
}
|
|
2638
2638
|
function Ra(e) {
|
|
2639
|
-
e.pointerType !== "mouse" && e.timeStamp - m(sa, this) < 250 || (p(
|
|
2639
|
+
e.pointerType !== "mouse" && e.timeStamp - m(sa, this) < 250 || (p(H, this, Ka).call(this), m(bi, this) && clearTimeout(m(bi, this)), e.target instanceof HTMLElement && ([this, m(Si, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && p(H, this, qa).call(this));
|
|
2640
2640
|
}
|
|
2641
2641
|
function za(e) {
|
|
2642
2642
|
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2643
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(Si, this)].includes(e.target) && t ? p(
|
|
2643
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, m(Si, this)].includes(e.target) && t ? p(H, this, Ga).call(this) : p(H, this, qa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && p(H, this, qa).call(this);
|
|
2644
2644
|
}
|
|
2645
2645
|
function Ba(e) {
|
|
2646
2646
|
switch (e) {
|
|
2647
|
-
case "dblclick-fullscreen": return
|
|
2647
|
+
case "dblclick-fullscreen": return x(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2648
2648
|
default: return !0;
|
|
2649
2649
|
}
|
|
2650
2650
|
}
|
|
2651
2651
|
function Va(e) {
|
|
2652
|
-
p(
|
|
2652
|
+
p(H, this, Ba).call(this, "dblclick-fullscreen") && (!m(Ai, this) || e.target instanceof S || e.target instanceof ze || e.target instanceof hi || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2653
2653
|
}
|
|
2654
2654
|
function Ha(e) {
|
|
2655
|
-
this.hasAttribute(_.USER_INTERACTING) || p(
|
|
2655
|
+
this.hasAttribute(_.USER_INTERACTING) || p(H, this, qa).call(this);
|
|
2656
2656
|
}
|
|
2657
2657
|
function Ua(e) {
|
|
2658
2658
|
var t;
|
|
@@ -2678,15 +2678,15 @@ function Ua(e) {
|
|
|
2678
2678
|
function Wa() {
|
|
2679
2679
|
var e = this;
|
|
2680
2680
|
return t(function* () {
|
|
2681
|
-
if (!m(
|
|
2681
|
+
if (!m(I, e) || !m(Di, e)) return;
|
|
2682
2682
|
let t = Date.now();
|
|
2683
|
-
if (m(ma, e) && t - m(ma, e) < 1e4) m(
|
|
2683
|
+
if (m(ma, e) && t - m(ma, e) < 1e4) m(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2684
2684
|
else {
|
|
2685
2685
|
h(ma, e, t);
|
|
2686
|
-
let n = yield m(
|
|
2687
|
-
p(
|
|
2686
|
+
let n = yield m(I, e).getApiClient().getChannels(m(Di, e));
|
|
2687
|
+
p(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2688
2688
|
}
|
|
2689
|
-
h(Ii, e, window.setTimeout(() => void p(
|
|
2689
|
+
h(Ii, e, window.setTimeout(() => void p(H, e, Wa).call(e), 1e4));
|
|
2690
2690
|
})();
|
|
2691
2691
|
}
|
|
2692
2692
|
function Ga() {
|
|
@@ -2706,86 +2706,86 @@ function Ka() {
|
|
|
2706
2706
|
});
|
|
2707
2707
|
}
|
|
2708
2708
|
function qa() {
|
|
2709
|
-
p(
|
|
2710
|
-
p(
|
|
2709
|
+
p(H, this, Ka).call(this), m(bi, this) && clearTimeout(m(bi, this)), m(yi, this) && h(bi, this, self.setTimeout(() => {
|
|
2710
|
+
p(H, this, Ga).call(this);
|
|
2711
2711
|
}, m(yi, this)));
|
|
2712
2712
|
}
|
|
2713
2713
|
function Ja() {
|
|
2714
2714
|
var e;
|
|
2715
2715
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2716
|
-
(e = m(
|
|
2716
|
+
(e = m(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2717
2717
|
}
|
|
2718
2718
|
function Ya() {
|
|
2719
2719
|
var e;
|
|
2720
|
-
p(
|
|
2721
|
-
m(
|
|
2720
|
+
p(H, this, Da).call(this), p(H, this, $a).call(this), (e = m(z, this)) == null || e.request().catch((e) => {
|
|
2721
|
+
m(V, this).warn("Failed to enter picture in picture:", e);
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
2724
|
function Xa() {
|
|
2725
2725
|
var e;
|
|
2726
|
-
(e = m(
|
|
2727
|
-
m(
|
|
2726
|
+
(e = m(z, this)) == null || e.exit().catch((e) => {
|
|
2727
|
+
m(V, this).warn("Failed to exit picture in picture:", e);
|
|
2728
2728
|
});
|
|
2729
2729
|
}
|
|
2730
2730
|
function Za() {
|
|
2731
|
-
let e = p(
|
|
2731
|
+
let e = p(H, this, Aa).call(this);
|
|
2732
2732
|
if (!e) {
|
|
2733
|
-
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(
|
|
2733
|
+
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2734
2734
|
return;
|
|
2735
2735
|
}
|
|
2736
|
-
e != null && e.isFullscreenApiSupported() ? (p(
|
|
2736
|
+
e != null && e.isFullscreenApiSupported() ? (p(H, this, $a).call(this), e == null || e.request().then(() => {
|
|
2737
2737
|
m(ha, this).call(this);
|
|
2738
2738
|
}).catch((e) => {
|
|
2739
|
-
m(
|
|
2740
|
-
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(
|
|
2739
|
+
m(V, this).warn("Failed to enter fullscreen:", e);
|
|
2740
|
+
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), p(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2741
2741
|
}
|
|
2742
2742
|
function Qa() {
|
|
2743
|
-
let e = p(
|
|
2743
|
+
let e = p(H, this, Aa).call(this);
|
|
2744
2744
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2745
2745
|
m(ga, this).call(this);
|
|
2746
2746
|
}).catch((e) => {
|
|
2747
|
-
m(
|
|
2748
|
-
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), p(
|
|
2747
|
+
m(V, this).warn("Failed to exit fullscreen:", e);
|
|
2748
|
+
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), p(H, this, W).call(this, _.FULLSCREEN));
|
|
2749
2749
|
}
|
|
2750
2750
|
function $a() {
|
|
2751
|
-
m(
|
|
2751
|
+
m(I, this) && m(I, this).emitter.emit("ios-hack: reset size");
|
|
2752
2752
|
}
|
|
2753
2753
|
function eo() {
|
|
2754
2754
|
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2755
2755
|
}
|
|
2756
2756
|
function to() {
|
|
2757
|
-
p(
|
|
2757
|
+
p(H, this, eo).call(this) ? p(H, this, no).call(this) : p(H, this, ro).call(this);
|
|
2758
2758
|
}
|
|
2759
2759
|
function no() {
|
|
2760
|
-
m(_a, this) === null && (p(
|
|
2760
|
+
m(_a, this) === null && (p(H, this, io).call(this), h(_a, this, window.setInterval(() => p(H, this, io).call(this), 1e3)));
|
|
2761
2761
|
}
|
|
2762
2762
|
function ro() {
|
|
2763
|
-
m(_a, this) && (clearInterval(m(_a, this)), h(_a, this, null)), this.removeAttribute(_.DRIFT), p(
|
|
2763
|
+
m(_a, this) && (clearInterval(m(_a, this)), h(_a, this, null)), this.removeAttribute(_.DRIFT), p(H, this, W).call(this, _.DRIFT), p(H, this, W).call(this, _.PLAYBACK_LATENCY), p(H, this, W).call(this, _.CONNECTION_STATE);
|
|
2764
2764
|
}
|
|
2765
2765
|
function io() {
|
|
2766
|
-
if (!m(
|
|
2766
|
+
if (!m(I, this)) return;
|
|
2767
2767
|
try {
|
|
2768
|
-
let e = m(
|
|
2768
|
+
let e = m(I, this).getStatistics().drift;
|
|
2769
2769
|
if (typeof e == "number") {
|
|
2770
2770
|
let t = Math.round(e * 10) / 10;
|
|
2771
|
-
p(
|
|
2771
|
+
p(H, this, U).call(this, _.DRIFT, String(t));
|
|
2772
2772
|
}
|
|
2773
2773
|
} catch (e) {}
|
|
2774
|
-
let e = m(
|
|
2775
|
-
typeof e == "number" && p(
|
|
2776
|
-
let t = m(
|
|
2777
|
-
typeof t == "number" ? p(
|
|
2774
|
+
let e = m(I, this).targetBufferTime;
|
|
2775
|
+
typeof e == "number" && p(H, this, U).call(this, _.TARGET_BUFFER_TIME, String(e));
|
|
2776
|
+
let t = m(I, this).playbackLatency;
|
|
2777
|
+
typeof t == "number" ? p(H, this, U).call(this, _.PLAYBACK_LATENCY, String(t)) : p(H, this, W).call(this, _.PLAYBACK_LATENCY), p(H, this, U).call(this, _.CONNECTION_STATE, m(I, this).connectionState);
|
|
2778
2778
|
}
|
|
2779
|
-
function
|
|
2779
|
+
function U(e, t) {
|
|
2780
2780
|
var n;
|
|
2781
2781
|
(n = m(vi, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2782
2782
|
}
|
|
2783
|
-
function
|
|
2783
|
+
function W(e) {
|
|
2784
2784
|
var t;
|
|
2785
2785
|
(t = m(vi, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2786
2786
|
}
|
|
2787
2787
|
e(va, "observedAttributes", [
|
|
2788
|
-
...
|
|
2788
|
+
...me,
|
|
2789
2789
|
"url",
|
|
2790
2790
|
"edge-url",
|
|
2791
2791
|
"target-buffer-time",
|
|
@@ -2824,10 +2824,8 @@ e(va, "observedAttributes", [
|
|
|
2824
2824
|
"auto-instance-enabled",
|
|
2825
2825
|
"language"
|
|
2826
2826
|
]);
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
var ao, oo = document.createElement("template");
|
|
2830
|
-
oo.innerHTML = `
|
|
2827
|
+
var ao = { _: "https://lb.cdn.vindral.com" }, oo, so = document.createElement("template");
|
|
2828
|
+
so.innerHTML = `
|
|
2831
2829
|
<style>
|
|
2832
2830
|
:host {
|
|
2833
2831
|
display: var(--fullscreen-button-display);
|
|
@@ -2851,10 +2849,10 @@ oo.innerHTML = `
|
|
|
2851
2849
|
</slot>
|
|
2852
2850
|
</slot>
|
|
2853
2851
|
`;
|
|
2854
|
-
var
|
|
2852
|
+
var co = class extends S {
|
|
2855
2853
|
constructor() {
|
|
2856
2854
|
var e;
|
|
2857
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2855
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(so.content.cloneNode(!0));
|
|
2858
2856
|
}
|
|
2859
2857
|
connectedCallback() {
|
|
2860
2858
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2872,55 +2870,55 @@ var so = class extends b {
|
|
|
2872
2870
|
return this.hasAttribute(_.FULLSCREEN);
|
|
2873
2871
|
}
|
|
2874
2872
|
handleClick(e) {
|
|
2875
|
-
let t = this.isFullscreen ?
|
|
2873
|
+
let t = this.isFullscreen ? v.EXIT_FULLSCREEN : v.ENTER_FULLSCREEN;
|
|
2876
2874
|
this.dispatchEvent(new CustomEvent(t, {
|
|
2877
2875
|
bubbles: !0,
|
|
2878
2876
|
composed: !0
|
|
2879
2877
|
}));
|
|
2880
2878
|
}
|
|
2881
2879
|
};
|
|
2882
|
-
|
|
2880
|
+
oo = co, e(co, "observedAttributes", [...b(oo, "observedAttributes", oo), _.FULLSCREEN]);
|
|
2883
2881
|
//#endregion
|
|
2884
2882
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2885
|
-
var
|
|
2886
|
-
|
|
2883
|
+
var lo, uo = "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M4 5h7\" /><path d=\"M9 3v2c0 4.418 -2.239 8 -5 8\" /><path d=\"M5 9c0 2.144 2.952 3.908 6.7 4\" /><path d=\"M12 20l4 -9l4 9\" /><path d=\"M19.1 18h-6.2\" /></svg>\n", fo = document.createElement("template");
|
|
2884
|
+
fo.innerHTML = `
|
|
2887
2885
|
<style>
|
|
2888
2886
|
:host(:not([hidden])) {
|
|
2889
2887
|
display: var(--language-menu-display);
|
|
2890
2888
|
}
|
|
2891
2889
|
</style>
|
|
2892
2890
|
|
|
2893
|
-
<slot name="button">${
|
|
2891
|
+
<slot name="button">${uo}</slot>
|
|
2894
2892
|
<slot name="listbox" hidden>
|
|
2895
2893
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2896
2894
|
</slot>
|
|
2897
2895
|
`;
|
|
2898
|
-
var
|
|
2896
|
+
var po = /* @__PURE__ */ new WeakSet(), mo = class extends ze {
|
|
2899
2897
|
constructor() {
|
|
2900
2898
|
var e, t, n, r;
|
|
2901
|
-
super(), g(this,
|
|
2899
|
+
super(), g(this, po), (e = this.shadowRoot) == null || e.appendChild(fo.content.cloneNode(!0)), this.button = (t = this.shadowRoot) == null ? void 0 : t.querySelector("slot[name=button]"), this.listbox = (n = this.shadowRoot) == null ? void 0 : n.querySelector("[part=listbox]"), this.listboxSlot = (r = this.shadowRoot) == null ? void 0 : r.querySelector("slot[name=listbox]");
|
|
2902
2900
|
}
|
|
2903
2901
|
connectedCallback() {
|
|
2904
|
-
super.connectedCallback(), p(
|
|
2902
|
+
super.connectedCallback(), p(po, this, ho).call(this), this.setAttribute("aria-label", "Languages");
|
|
2905
2903
|
}
|
|
2906
2904
|
attributeChangedCallback(e, t, n) {
|
|
2907
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(
|
|
2905
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && p(po, this, ho).call(this);
|
|
2908
2906
|
}
|
|
2909
2907
|
};
|
|
2910
|
-
|
|
2911
|
-
function
|
|
2908
|
+
lo = mo;
|
|
2909
|
+
function ho() {
|
|
2912
2910
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
2913
2911
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2914
2912
|
}
|
|
2915
|
-
e(
|
|
2916
|
-
...
|
|
2913
|
+
e(mo, "observedAttributes", [
|
|
2914
|
+
...b(lo, "observedAttributes", lo),
|
|
2917
2915
|
_.LANGUAGES,
|
|
2918
2916
|
_.TEXT_TRACKS
|
|
2919
2917
|
]);
|
|
2920
2918
|
//#endregion
|
|
2921
2919
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2922
|
-
var
|
|
2923
|
-
|
|
2920
|
+
var go = document.createElement("template");
|
|
2921
|
+
go.innerHTML = `
|
|
2924
2922
|
<style>
|
|
2925
2923
|
:host {
|
|
2926
2924
|
font: inherit;
|
|
@@ -3034,21 +3032,21 @@ ho.innerHTML = `
|
|
|
3034
3032
|
<div class="menu"></div>
|
|
3035
3033
|
</div>
|
|
3036
3034
|
`;
|
|
3037
|
-
var
|
|
3035
|
+
var _o = /* @__PURE__ */ new WeakMap(), vo = /* @__PURE__ */ new WeakMap(), yo = /* @__PURE__ */ new WeakMap(), bo = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), wo = /* @__PURE__ */ new WeakMap(), To = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), ko = class extends HTMLElement {
|
|
3038
3036
|
constructor() {
|
|
3039
|
-
super(), g(this,
|
|
3037
|
+
super(), g(this, G), f(this, _o, []), f(this, vo, []), f(this, yo, void 0), f(this, bo, void 0), f(this, xo, []), f(this, So, []), f(this, Co, null), f(this, wo, null), f(this, To, null), f(this, Eo, null), f(this, Do, null), f(this, Oo, null), e(this, "handleEvent", (e) => {
|
|
3040
3038
|
switch (e.type) {
|
|
3041
3039
|
case "keydown":
|
|
3042
|
-
p(
|
|
3040
|
+
p(G, this, Ro).call(this, e);
|
|
3043
3041
|
break;
|
|
3044
3042
|
}
|
|
3045
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3043
|
+
}), this.attachShadow({ mode: "open" }).appendChild(go.content.cloneNode(!0));
|
|
3046
3044
|
}
|
|
3047
3045
|
connectedCallback() {
|
|
3048
3046
|
let e = this.getRootNode();
|
|
3049
3047
|
if (e instanceof ShadowRoot) {
|
|
3050
3048
|
var t, n, r;
|
|
3051
|
-
h(
|
|
3049
|
+
h(To, this, e.host.closest("vindral-controller")), (t = m(To, this)) == null || t.connectListener(this), h(Co, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), h(wo, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), p(G, this, Ao).call(this), p(G, this, jo).call(this), h(Eo, this, e.host), this.addEventListener("keydown", this);
|
|
3052
3050
|
}
|
|
3053
3051
|
}
|
|
3054
3052
|
disconnectedCallback() {
|
|
@@ -3058,16 +3056,16 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3058
3056
|
t !== n && (e === _.LANGUAGES && n && (this.languages = JSON.parse(n)), e === _.TEXT_TRACKS && n && (this.textTracks = JSON.parse(n)), e === _.LANGUAGE && (this.language = n), e === _.TEXT_TRACK && (this.textTrack = n));
|
|
3059
3057
|
}
|
|
3060
3058
|
set languages(e) {
|
|
3061
|
-
h(
|
|
3059
|
+
h(_o, this, e), p(G, this, No).call(this), p(G, this, Fo).call(this);
|
|
3062
3060
|
}
|
|
3063
3061
|
set textTracks(e) {
|
|
3064
|
-
h(
|
|
3062
|
+
h(vo, this, e), p(G, this, Mo).call(this), p(G, this, Io).call(this);
|
|
3065
3063
|
}
|
|
3066
3064
|
set language(e) {
|
|
3067
|
-
h(
|
|
3065
|
+
h(yo, this, e), p(G, this, Fo).call(this);
|
|
3068
3066
|
}
|
|
3069
3067
|
set textTrack(e) {
|
|
3070
|
-
h(
|
|
3068
|
+
h(bo, this, e), p(G, this, Io).call(this);
|
|
3071
3069
|
}
|
|
3072
3070
|
get keysUsed() {
|
|
3073
3071
|
return [
|
|
@@ -3084,10 +3082,10 @@ var go = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), vo =
|
|
|
3084
3082
|
];
|
|
3085
3083
|
}
|
|
3086
3084
|
focus() {
|
|
3087
|
-
m(
|
|
3085
|
+
m(Do, this) ? m(Do, this).focus() : m(Oo, this) && m(Oo, this).focus();
|
|
3088
3086
|
}
|
|
3089
3087
|
};
|
|
3090
|
-
function
|
|
3088
|
+
function Ao() {
|
|
3091
3089
|
new IntersectionObserver((e) => {
|
|
3092
3090
|
e.forEach((e) => {
|
|
3093
3091
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3096,96 +3094,96 @@ function ko() {
|
|
|
3096
3094
|
} else this.style.height = "auto";
|
|
3097
3095
|
});
|
|
3098
3096
|
}, {
|
|
3099
|
-
root: m(
|
|
3097
|
+
root: m(To, this),
|
|
3100
3098
|
threshold: 0
|
|
3101
3099
|
}).observe(this);
|
|
3102
3100
|
}
|
|
3103
|
-
function Ao() {
|
|
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));
|
|
3105
|
-
}
|
|
3106
3101
|
function jo() {
|
|
3107
|
-
m(Co, this).
|
|
3108
|
-
|
|
3109
|
-
|
|
3102
|
+
m(Co, this) && (p(G, this, No).call(this), p(G, this, Fo).call(this)), m(wo, this) && (p(G, this, Mo).call(this), p(G, this, Io).call(this));
|
|
3103
|
+
}
|
|
3104
|
+
function Mo() {
|
|
3105
|
+
m(wo, this).innerHTML = "", h(So, this, []);
|
|
3106
|
+
let e = p(G, this, Po).call(this, "Off", "textTrack", void 0);
|
|
3107
|
+
m(wo, this).appendChild(e), m(So, this).push({
|
|
3110
3108
|
element: e,
|
|
3111
3109
|
value: void 0
|
|
3112
|
-
}), m(
|
|
3113
|
-
let t = p(
|
|
3114
|
-
m(
|
|
3110
|
+
}), m(vo, this).forEach((e) => {
|
|
3111
|
+
let t = p(G, this, Po).call(this, e, "textTrack", e);
|
|
3112
|
+
m(wo, this).appendChild(t), m(So, this).push({
|
|
3115
3113
|
element: t,
|
|
3116
3114
|
value: e
|
|
3117
3115
|
});
|
|
3118
|
-
}), p(
|
|
3116
|
+
}), p(G, this, Io).call(this);
|
|
3119
3117
|
}
|
|
3120
|
-
function
|
|
3121
|
-
m(
|
|
3122
|
-
let t = p(
|
|
3123
|
-
m(
|
|
3118
|
+
function No() {
|
|
3119
|
+
m(Co, this).innerHTML = "", h(xo, this, []), m(_o, this).forEach((e) => {
|
|
3120
|
+
let t = p(G, this, Po).call(this, e, "language", e);
|
|
3121
|
+
m(Co, this).appendChild(t), m(xo, this).push({
|
|
3124
3122
|
element: t,
|
|
3125
3123
|
value: e
|
|
3126
3124
|
});
|
|
3127
|
-
}), p(
|
|
3125
|
+
}), p(G, this, Fo).call(this);
|
|
3128
3126
|
}
|
|
3129
|
-
function
|
|
3127
|
+
function Po(e, t, n) {
|
|
3130
3128
|
let r = document.createElement("div");
|
|
3131
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(
|
|
3132
|
-
}
|
|
3133
|
-
function Po() {
|
|
3134
|
-
m(Eo, this) && (m(Eo, this).removeAttribute("aria-selected"), m(Eo, this).tabIndex = -1);
|
|
3135
|
-
let e = m(bo, this).find((e) => e.value === m(vo, this));
|
|
3136
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Eo, this, e.element));
|
|
3129
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => p(G, this, Lo).call(this, n, t)), r;
|
|
3137
3130
|
}
|
|
3138
3131
|
function Fo() {
|
|
3139
3132
|
m(Do, this) && (m(Do, this).removeAttribute("aria-selected"), m(Do, this).tabIndex = -1);
|
|
3140
3133
|
let e = m(xo, this).find((e) => e.value === m(yo, this));
|
|
3141
|
-
|
|
3134
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Do, this, e.element));
|
|
3135
|
+
}
|
|
3136
|
+
function Io() {
|
|
3137
|
+
m(Oo, this) && (m(Oo, this).removeAttribute("aria-selected"), m(Oo, this).tabIndex = -1);
|
|
3138
|
+
let e = m(So, this).find((e) => e.value === m(bo, this));
|
|
3139
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Oo, this, e.element);
|
|
3142
3140
|
else {
|
|
3143
|
-
let e = m(
|
|
3144
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(
|
|
3141
|
+
let e = m(So, this).find((e) => e.value === void 0);
|
|
3142
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, h(Oo, this, e.element));
|
|
3145
3143
|
}
|
|
3146
3144
|
}
|
|
3147
|
-
function
|
|
3145
|
+
function Lo(e, t) {
|
|
3148
3146
|
this.dispatchEvent(new Event("change", {
|
|
3149
3147
|
bubbles: !0,
|
|
3150
3148
|
composed: !0
|
|
3151
3149
|
}));
|
|
3152
|
-
let n = t === "language" ?
|
|
3150
|
+
let n = t === "language" ? v.SET_LANGUAGE : v.SET_TEXT_TRACK;
|
|
3153
3151
|
this.dispatchEvent(new CustomEvent(n, {
|
|
3154
3152
|
bubbles: !0,
|
|
3155
3153
|
composed: !0,
|
|
3156
3154
|
detail: e
|
|
3157
3155
|
}));
|
|
3158
3156
|
}
|
|
3159
|
-
function
|
|
3157
|
+
function Ro(e) {
|
|
3160
3158
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3161
3159
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3162
3160
|
var a;
|
|
3163
|
-
(a = m(
|
|
3161
|
+
(a = m(Eo, this)) == null || a.hide();
|
|
3164
3162
|
} else if (t === "Enter" || t === " ") {
|
|
3165
3163
|
var o;
|
|
3166
|
-
(o = p(
|
|
3167
|
-
} else p(
|
|
3164
|
+
(o = p(G, this, Vo).call(this)) == null || (o = o.element) == null || o.click();
|
|
3165
|
+
} else p(G, this, zo).call(this, e);
|
|
3168
3166
|
}
|
|
3169
|
-
function
|
|
3167
|
+
function zo(e) {
|
|
3170
3168
|
var t;
|
|
3171
|
-
let { key: n } = e, r = [...m(
|
|
3169
|
+
let { key: n } = e, r = [...m(xo, this), ...m(So, this)], i = (t = p(G, this, Vo).call(this)) == null ? r[0] : t;
|
|
3172
3170
|
if (!i) return;
|
|
3173
3171
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3174
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(
|
|
3172
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = p(G, this, Bo).call(this, a, "left") : n === "ArrowRight" ? o = p(G, this, Bo).call(this, a, "right") : e.key === "Home" ? o = 0 : e.key === "End" && (o = r.length - 1), o < 0 && (o = r.length - 1), o > r.length - 1 && (o = 0);
|
|
3175
3173
|
let s = r[o];
|
|
3176
|
-
s && (p(
|
|
3174
|
+
s && (p(G, this, Ho).call(this, s.value), s.element.focus());
|
|
3177
3175
|
}
|
|
3178
|
-
function
|
|
3179
|
-
let n = m(
|
|
3176
|
+
function Bo(e, t) {
|
|
3177
|
+
let n = m(xo, this).length, r = m(So, this).length;
|
|
3180
3178
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3181
3179
|
}
|
|
3182
|
-
function
|
|
3183
|
-
return [...m(
|
|
3180
|
+
function Vo() {
|
|
3181
|
+
return [...m(xo, this), ...m(So, this)].find((e) => e.element.tabIndex === 0);
|
|
3184
3182
|
}
|
|
3185
|
-
function
|
|
3186
|
-
for (let t of [...m(
|
|
3183
|
+
function Ho(e) {
|
|
3184
|
+
for (let t of [...m(xo, this), ...m(So, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3187
3185
|
}
|
|
3188
|
-
e(
|
|
3186
|
+
e(ko, "observedAttributes", [
|
|
3189
3187
|
_.LANGUAGES,
|
|
3190
3188
|
_.TEXT_TRACKS,
|
|
3191
3189
|
_.LANGUAGE,
|
|
@@ -3193,12 +3191,12 @@ e(Oo, "observedAttributes", [
|
|
|
3193
3191
|
]);
|
|
3194
3192
|
//#endregion
|
|
3195
3193
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3196
|
-
var
|
|
3197
|
-
|
|
3198
|
-
var
|
|
3194
|
+
var Uo, Wo = document.createElement("template");
|
|
3195
|
+
Wo.innerHTML = "\n <style>\n :host {\n display: var(--live-button-display, flex);\n color: var(--vindral-fg-strong, #eee);\n border: 1px solid transparent !important;\n font-size: 12px;\n font-weight: bold;\n cursor: pointer;\n transition: all 0.2s;\n min-width: 50px !important;\n text-align: center;\n align-items: center;\n justify-content: center;\n }\n\n .live-text {\n display: inline-block;\n vertical-align: middle;\n margin-left: 4px;\n }\n\n slot[name=\"icon\"] svg {\n width: 5px;\n height: 5px;\n flex-shrink: 0;\n }\n\n .live-dot {\n fill: var(--vindral-fg-subtle, #b4b4b4);\n transition: fill 0.2s;\n transform-origin: center;\n }\n\n /* Red pulsing dot when live */\n :host(:not([timeshift-position])) .live-dot {\n fill: #ff0000;\n animation: pulse-dot 2s ease-in-out infinite alternate;\n }\n\n @keyframes pulse-dot {\n 0% {\n opacity: 0.8;\n transform: scale(0.9);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n }\n\n :host([disabled]) {\n cursor: default;\n opacity: 1;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n\n <slot name=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"5\" height=\"5\" viewBox=\"0 0 5 5\" fill=\"currentColor\">\n <circle cx=\"2.5\" cy=\"2.5\" r=\"2.5\" class=\"live-dot\"/>\n </svg>\n</slot>\n <span class=\"live-text\">LIVE</span>\n";
|
|
3196
|
+
var Go = class extends S {
|
|
3199
3197
|
constructor() {
|
|
3200
3198
|
var e;
|
|
3201
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3199
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Wo.content.cloneNode(!0));
|
|
3202
3200
|
}
|
|
3203
3201
|
connectedCallback() {
|
|
3204
3202
|
super.connectedCallback(), this.updateState();
|
|
@@ -3223,21 +3221,21 @@ var Wo = class extends b {
|
|
|
3223
3221
|
e ? this.removeAttribute(_.TIMESHIFT_POSITION) : this.setAttribute(_.TIMESHIFT_POSITION, "");
|
|
3224
3222
|
}
|
|
3225
3223
|
handleClick(e) {
|
|
3226
|
-
this.isLive || this.dispatchEvent(new CustomEvent(
|
|
3224
|
+
this.isLive || this.dispatchEvent(new CustomEvent(v.GO_LIVE, {
|
|
3227
3225
|
bubbles: !0,
|
|
3228
3226
|
composed: !0
|
|
3229
3227
|
}));
|
|
3230
3228
|
}
|
|
3231
3229
|
};
|
|
3232
|
-
|
|
3233
|
-
...
|
|
3230
|
+
Uo = Go, e(Go, "observedAttributes", [
|
|
3231
|
+
...b(Uo, "observedAttributes", Uo),
|
|
3234
3232
|
_.TIMESHIFT_POSITION,
|
|
3235
3233
|
_.DURATION
|
|
3236
3234
|
]);
|
|
3237
3235
|
//#endregion
|
|
3238
3236
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3239
|
-
var
|
|
3240
|
-
|
|
3237
|
+
var Ko, qo = document.createElement("template");
|
|
3238
|
+
qo.innerHTML = `
|
|
3241
3239
|
<style>
|
|
3242
3240
|
:host {
|
|
3243
3241
|
display: var(--mute-button-display);
|
|
@@ -3265,10 +3263,10 @@ Ko.innerHTML = `
|
|
|
3265
3263
|
</slot>
|
|
3266
3264
|
</slot>
|
|
3267
3265
|
`;
|
|
3268
|
-
var
|
|
3266
|
+
var Jo = class extends S {
|
|
3269
3267
|
constructor() {
|
|
3270
3268
|
var e;
|
|
3271
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3269
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(qo.content.cloneNode(!0));
|
|
3272
3270
|
}
|
|
3273
3271
|
connectedCallback() {
|
|
3274
3272
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3286,18 +3284,18 @@ var qo = class extends b {
|
|
|
3286
3284
|
return this.hasAttribute(_.MUTED);
|
|
3287
3285
|
}
|
|
3288
3286
|
handleClick(e) {
|
|
3289
|
-
let t = this.muted ?
|
|
3287
|
+
let t = this.muted ? v.UNMUTE : v.MUTE;
|
|
3290
3288
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3291
3289
|
bubbles: !0,
|
|
3292
3290
|
composed: !0
|
|
3293
3291
|
}));
|
|
3294
3292
|
}
|
|
3295
3293
|
};
|
|
3296
|
-
|
|
3294
|
+
Ko = Jo, e(Jo, "observedAttributes", [...b(Ko, "observedAttributes", Ko), _.MUTED]);
|
|
3297
3295
|
//#endregion
|
|
3298
3296
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3299
|
-
var
|
|
3300
|
-
|
|
3297
|
+
var Yo, Xo = document.createElement("template");
|
|
3298
|
+
Xo.innerHTML = `
|
|
3301
3299
|
<style>
|
|
3302
3300
|
:host {
|
|
3303
3301
|
display: var(--pip-button-display);
|
|
@@ -3311,10 +3309,10 @@ Yo.innerHTML = `
|
|
|
3311
3309
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19 4a3 3 0 0 1 3 3v4a1 1 0 0 1 -2 0v-4a1 1 0 0 0 -1 -1h-14a1 1 0 0 0 -1 1v10a1 1 0 0 0 1 1h6a1 1 0 0 1 0 2h-6a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3z" /><path d="M20 13a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-5a2 2 0 0 1 -2 -2v-3a2 2 0 0 1 2 -2z" /></svg>
|
|
3312
3310
|
</slot>
|
|
3313
3311
|
`;
|
|
3314
|
-
var
|
|
3312
|
+
var Zo = class extends S {
|
|
3315
3313
|
constructor() {
|
|
3316
3314
|
var e;
|
|
3317
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3315
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Xo.content.cloneNode(!0));
|
|
3318
3316
|
}
|
|
3319
3317
|
connectedCallback() {
|
|
3320
3318
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture");
|
|
@@ -3332,22 +3330,22 @@ var Xo = class extends b {
|
|
|
3332
3330
|
return this.hasAttribute(_.IS_PIP);
|
|
3333
3331
|
}
|
|
3334
3332
|
handleClick(e) {
|
|
3335
|
-
let t = this.isPictureInPictureActive ?
|
|
3333
|
+
let t = this.isPictureInPictureActive ? v.EXIT_PIP : v.ENTER_PIP;
|
|
3336
3334
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3337
3335
|
bubbles: !0,
|
|
3338
3336
|
composed: !0
|
|
3339
3337
|
}));
|
|
3340
3338
|
}
|
|
3341
3339
|
};
|
|
3342
|
-
|
|
3343
|
-
...
|
|
3340
|
+
Yo = Zo, e(Zo, "observedAttributes", [
|
|
3341
|
+
...b(Yo, "observedAttributes", Yo),
|
|
3344
3342
|
_.IS_PIP,
|
|
3345
3343
|
_.PIP_AVAILABLE
|
|
3346
3344
|
]);
|
|
3347
3345
|
//#endregion
|
|
3348
3346
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3349
|
-
var
|
|
3350
|
-
|
|
3347
|
+
var Qo, $o = document.createElement("template");
|
|
3348
|
+
$o.innerHTML = `
|
|
3351
3349
|
<style>
|
|
3352
3350
|
:host {
|
|
3353
3351
|
display: var(--play-button-display);
|
|
@@ -3371,10 +3369,10 @@ Qo.innerHTML = `
|
|
|
3371
3369
|
</slot>
|
|
3372
3370
|
</slot>
|
|
3373
3371
|
`;
|
|
3374
|
-
var
|
|
3372
|
+
var es = class extends S {
|
|
3375
3373
|
constructor() {
|
|
3376
3374
|
var e;
|
|
3377
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3375
|
+
super(), (e = this.shadowRoot) == null || e.appendChild($o.content.cloneNode(!0));
|
|
3378
3376
|
}
|
|
3379
3377
|
connectedCallback() {
|
|
3380
3378
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3392,71 +3390,71 @@ var $o = class extends b {
|
|
|
3392
3390
|
return this.hasAttribute(_.PAUSED);
|
|
3393
3391
|
}
|
|
3394
3392
|
handleClick(e) {
|
|
3395
|
-
let t = this.paused ?
|
|
3393
|
+
let t = this.paused ? v.PLAY : v.PAUSE;
|
|
3396
3394
|
this.dispatchEvent(new CustomEvent(t, {
|
|
3397
3395
|
bubbles: !0,
|
|
3398
3396
|
composed: !0
|
|
3399
3397
|
}));
|
|
3400
3398
|
}
|
|
3401
3399
|
};
|
|
3402
|
-
|
|
3400
|
+
Qo = es, e(es, "observedAttributes", [...b(Qo, "observedAttributes", Qo), _.PAUSED]);
|
|
3403
3401
|
//#endregion
|
|
3404
3402
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3405
|
-
var
|
|
3403
|
+
var K = {
|
|
3406
3404
|
TITLE: "title",
|
|
3407
3405
|
OFFLINE: "offline",
|
|
3408
3406
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3409
3407
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3410
3408
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3411
|
-
},
|
|
3409
|
+
}, ts = Object.values(K), ns = /* @__PURE__ */ new WeakMap(), rs = /* @__PURE__ */ new WeakMap(), is = /* @__PURE__ */ new WeakMap(), as = /* @__PURE__ */ new WeakMap(), os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakSet(), us = class extends pe {
|
|
3412
3410
|
constructor(e) {
|
|
3413
|
-
super(), g(this,
|
|
3411
|
+
super(), g(this, ls), f(this, ns, void 0), f(this, rs, void 0), f(this, is, !1), f(this, as, !1), f(this, os, !0), f(this, ss, null), f(this, cs, null), h(rs, this, e), h(ns, this, new fe({
|
|
3414
3412
|
publicEndpoint: e.url,
|
|
3415
3413
|
tokenFactory: () => e.authenticationToken
|
|
3416
3414
|
}));
|
|
3417
3415
|
}
|
|
3418
3416
|
start(e = 5e3) {
|
|
3419
|
-
m(
|
|
3420
|
-
!m(
|
|
3417
|
+
m(cs, this) && clearInterval(m(cs, this)), h(is, this, !1), h(as, this, !1), p(ls, this, ms).call(this), p(ls, this, ds).call(this), h(cs, this, window.setInterval(() => {
|
|
3418
|
+
!m(as, this) && !m(rs, this).infiniteReconnect && !m(ss, this) && m(os, this) && h(ss, this, window.setTimeout(() => p(ls, this, fs).call(this), 300 * 1e3)), !m(as, this) && m(os, this) && p(ls, this, ds).call(this);
|
|
3421
3419
|
}, e));
|
|
3422
3420
|
}
|
|
3423
3421
|
stop() {
|
|
3424
|
-
p(
|
|
3422
|
+
p(ls, this, ps).call(this), m(cs, this) && (window.clearInterval(m(cs, this)), h(cs, this, null));
|
|
3425
3423
|
}
|
|
3426
3424
|
};
|
|
3427
|
-
function
|
|
3425
|
+
function ds() {
|
|
3428
3426
|
var e = this;
|
|
3429
3427
|
return t(function* () {
|
|
3430
|
-
if (m(
|
|
3431
|
-
h(
|
|
3428
|
+
if (m(is, e)) return;
|
|
3429
|
+
h(is, e, !0);
|
|
3432
3430
|
let t = "Stream is offline", n = "Please stand by";
|
|
3433
3431
|
try {
|
|
3434
|
-
let t = yield m(
|
|
3432
|
+
let t = yield m(ns, e).getChannel(m(rs, e).channelId);
|
|
3435
3433
|
if (t.isLive) {
|
|
3436
|
-
h(
|
|
3434
|
+
h(as, e, !0), p(ls, e, ms).call(e), e.emit("live", t), h(is, e, !1);
|
|
3437
3435
|
return;
|
|
3438
3436
|
}
|
|
3439
3437
|
} catch (e) {
|
|
3440
3438
|
de(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3441
3439
|
}
|
|
3442
|
-
m(
|
|
3440
|
+
m(os, e) && e.emit("error", {
|
|
3443
3441
|
title: t,
|
|
3444
3442
|
message: n
|
|
3445
|
-
}), h(
|
|
3443
|
+
}), h(is, e, !1);
|
|
3446
3444
|
})();
|
|
3447
3445
|
}
|
|
3448
|
-
function ds() {
|
|
3449
|
-
this.stop(), h(as, this, !1), this.emit("timeout");
|
|
3450
|
-
}
|
|
3451
3446
|
function fs() {
|
|
3452
|
-
|
|
3447
|
+
this.stop(), h(os, this, !1), this.emit("timeout");
|
|
3453
3448
|
}
|
|
3454
3449
|
function ps() {
|
|
3455
|
-
|
|
3450
|
+
m(ss, this) && (window.clearTimeout(m(ss, this)), h(ss, this, null));
|
|
3451
|
+
}
|
|
3452
|
+
function ms() {
|
|
3453
|
+
p(ls, this, ps).call(this), h(os, this, !0);
|
|
3456
3454
|
}
|
|
3457
3455
|
//#endregion
|
|
3458
3456
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3459
|
-
var
|
|
3457
|
+
var hs = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune\//i, gs = navigator.userAgent.toLowerCase(), _s = hs.test(gs), vs = (e) => va.observedAttributes.includes(e), ys = `
|
|
3460
3458
|
<style>
|
|
3461
3459
|
:host {
|
|
3462
3460
|
container-type: inline-size;
|
|
@@ -3466,7 +3464,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3466
3464
|
display: flex;
|
|
3467
3465
|
justify-content: center;
|
|
3468
3466
|
|
|
3469
|
-
--vindral-volume-range-display: ${
|
|
3467
|
+
--vindral-volume-range-display: ${_s ? "none" : "flex"};
|
|
3470
3468
|
--vindral-airplay-button-display: none;
|
|
3471
3469
|
--vindral-play-overlay-display: none;
|
|
3472
3470
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3502,7 +3500,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3502
3500
|
// needs to be higher than bottom bar/UI
|
|
3503
3501
|
}
|
|
3504
3502
|
|
|
3505
|
-
:host([${
|
|
3503
|
+
:host([${K.OFFLINE}]) {
|
|
3506
3504
|
aspect-ratio: 16 / 9;
|
|
3507
3505
|
vindral-controller {
|
|
3508
3506
|
--vindral-ui-display: none;
|
|
@@ -3547,10 +3545,10 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3547
3545
|
--vindral-subtitle-offset: -48px;
|
|
3548
3546
|
}
|
|
3549
3547
|
</style>
|
|
3550
|
-
`,
|
|
3548
|
+
`, bs = (e) => {
|
|
3551
3549
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3552
3550
|
return `
|
|
3553
|
-
${
|
|
3551
|
+
${ys}
|
|
3554
3552
|
|
|
3555
3553
|
<vindral-controller>
|
|
3556
3554
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3588,8 +3586,8 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3588
3586
|
</vindral-center-overlay>
|
|
3589
3587
|
</vindral-controller>
|
|
3590
3588
|
`;
|
|
3591
|
-
},
|
|
3592
|
-
${
|
|
3589
|
+
}, xs = `
|
|
3590
|
+
${ys}
|
|
3593
3591
|
|
|
3594
3592
|
<style>
|
|
3595
3593
|
#control-bar {
|
|
@@ -3613,14 +3611,14 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3613
3611
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3614
3612
|
</vindral-center-overlay>
|
|
3615
3613
|
</vindral-controller>
|
|
3616
|
-
`,
|
|
3614
|
+
`, Ss = document.createElement("template"), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), ws = /* @__PURE__ */ new WeakMap(), Ts = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), As = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Ns = class extends HTMLElement {
|
|
3617
3615
|
constructor() {
|
|
3618
|
-
super(), g(this, Y), f(this,
|
|
3616
|
+
super(), g(this, Y), f(this, q, void 0), f(this, J, void 0), f(this, Cs, void 0), f(this, ws, void 0), f(this, Ts, void 0), f(this, Es, void 0), f(this, Ds, /* @__PURE__ */ new Set()), f(this, Os, () => {
|
|
3619
3617
|
Array.from(this.attributes).forEach((e) => {
|
|
3620
3618
|
m(ks, this).call(this, e.name, e.value);
|
|
3621
3619
|
});
|
|
3622
3620
|
}), f(this, ks, (e, t) => {
|
|
3623
|
-
|
|
3621
|
+
vs(e) && (y(t) ? m(J, this).setAttribute(e, t) : m(J, this).removeAttribute(e));
|
|
3624
3622
|
}), f(this, As, () => {
|
|
3625
3623
|
Array.from(this.children).forEach((e) => {
|
|
3626
3624
|
m(Ds, this).add(e);
|
|
@@ -3628,7 +3626,7 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3628
3626
|
}), f(this, js, () => {
|
|
3629
3627
|
let e = m(J, this).instance;
|
|
3630
3628
|
e && (e.on("is live", (e) => {
|
|
3631
|
-
e ? (this.removeAttribute(
|
|
3629
|
+
e ? (this.removeAttribute(K.OFFLINE), p(Y, this, zs).call(this)) : (this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, "Stream is offline", "Please stand by"));
|
|
3632
3630
|
}), e.on("channels", (e) => {
|
|
3633
3631
|
let t = m(J, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3634
3632
|
n && p(Y, this, Ls).call(this, n);
|
|
@@ -3640,24 +3638,24 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3640
3638
|
p(Y, this, Rs).call(this, "Stream is offline", "Please stand by");
|
|
3641
3639
|
return;
|
|
3642
3640
|
}
|
|
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(
|
|
3641
|
+
e.isFatal() && (e.code() === "access_forbidden" ? p(Y, this, Rs).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? p(Y, this, Rs).call(this, "Stream is offline", "Please stand by") : p(Y, this, Rs).call(this, "An error occurred", e.message), m(ws, this).removeAttribute("hidden"), this.setAttribute(K.OFFLINE, ""), m(J, this).dispatchEvent(new CustomEvent(v.EXIT_FULLSCREEN)), m(J, this).dispatchEvent(new CustomEvent(v.EXIT_PIP)));
|
|
3644
3642
|
}));
|
|
3645
3643
|
}), f(this, Ms, () => {
|
|
3646
3644
|
m(J, this).connect(), m(ws, this).setAttribute("hidden", ""), p(Y, this, zs).call(this), m(J, this).focus();
|
|
3647
|
-
}), h(
|
|
3645
|
+
}), h(q, this, this.attachShadow({ mode: "open" })), p(Y, this, Fs).call(this), h(J, this, m(q, this).querySelector("vindral-controller")), h(Cs, this, m(q, this).querySelector("#vindral-message")), h(ws, this, m(q, this).querySelector("#play-overlay")), h(Ts, this, m(q, this).querySelector("#center-overlay"));
|
|
3648
3646
|
}
|
|
3649
3647
|
connectedCallback() {
|
|
3650
|
-
this.setAttribute(
|
|
3648
|
+
this.setAttribute(K.OFFLINE, ""), m(J, this).addEventListener("vindral-instance-ready", m(js, this)), p(Y, this, Is).call(this);
|
|
3651
3649
|
}
|
|
3652
3650
|
disconnectedCallback() {
|
|
3653
3651
|
var e;
|
|
3654
3652
|
m(J, this).removeEventListener("vindral-instance-ready", m(js, this)), m(ws, this).removeEventListener("click", m(Ms, this)), (e = m(Es, this)) == null || e.stop();
|
|
3655
3653
|
}
|
|
3656
3654
|
attributeChangedCallback(e, t, n) {
|
|
3657
|
-
if (t !== n) if (e === _.MEDIA || e ===
|
|
3658
|
-
else if (e ===
|
|
3659
|
-
let e = m(
|
|
3660
|
-
e && (e.disabled =
|
|
3655
|
+
if (t !== n) if (e === _.MEDIA || e === K.ADVANCED_RENDITION_MENU_ENABLED) p(Y, this, Fs).call(this);
|
|
3656
|
+
else if (e === K.REFRESH_POSTER_ENABLED) {
|
|
3657
|
+
let e = m(q, this).querySelector("vindral-poster-overlay");
|
|
3658
|
+
e && (e.disabled = x(this.getAttribute(K.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3661
3659
|
} else m(ks, this).call(this, e, n);
|
|
3662
3660
|
}
|
|
3663
3661
|
get instance() {
|
|
@@ -3674,26 +3672,26 @@ var ms = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3674
3672
|
}
|
|
3675
3673
|
};
|
|
3676
3674
|
function Ps() {
|
|
3677
|
-
let e = _e(this.getAttribute(_.MEDIA)), t =
|
|
3678
|
-
return e === "audio" ?
|
|
3675
|
+
let e = _e(this.getAttribute(_.MEDIA)), t = x(this.getAttribute(K.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3676
|
+
return e === "audio" ? xs : bs(t);
|
|
3679
3677
|
}
|
|
3680
3678
|
function Fs() {
|
|
3681
|
-
let e = m(
|
|
3682
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)),
|
|
3683
|
-
let r =
|
|
3679
|
+
let e = m(q, this).hasChildNodes(), t = e ? m(J, this) : void 0, n = e ? m(ws, this) : void 0;
|
|
3680
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", m(js, this)), this.isConnected && n && m(Es, this) && n.removeEventListener("click", m(Ms, this)), Ss.innerHTML = p(Y, this, Ps).call(this);
|
|
3681
|
+
let r = Ss.content.cloneNode(!0);
|
|
3684
3682
|
h(J, this, r.querySelector("vindral-controller")), h(Cs, this, r.querySelector("#vindral-message")), h(ws, this, r.querySelector("#play-overlay")), h(Ts, this, r.querySelector("#center-overlay")), m(As, this).call(this), m(Ds, this).forEach((e) => {
|
|
3685
3683
|
m(J, this).appendChild(e);
|
|
3686
|
-
}), m(Os, this).call(this), m(
|
|
3684
|
+
}), m(Os, this).call(this), m(q, this).innerHTML = "", m(q, this).appendChild(r), this.isConnected && (m(J, this).addEventListener("vindral-instance-ready", m(js, this)), m(Es, this) && m(ws, this).addEventListener("click", m(Ms, this)));
|
|
3687
3685
|
}
|
|
3688
3686
|
function Is() {
|
|
3689
3687
|
var e;
|
|
3690
|
-
if (
|
|
3691
|
-
let t = this.getAttribute("url")
|
|
3692
|
-
if (!n) {
|
|
3693
|
-
this.setAttribute(
|
|
3688
|
+
if (x(this.getAttribute(K.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3689
|
+
let t = this.getAttribute("url"), n = this.getAttribute("channel-id"), r = (e = this.getAttribute("authentication-token")) == null ? void 0 : e, i = this.hasAttribute("infinite-reconnect");
|
|
3690
|
+
if (!t || !n) {
|
|
3691
|
+
this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3694
3692
|
return;
|
|
3695
3693
|
}
|
|
3696
|
-
h(Es, this, new
|
|
3694
|
+
h(Es, this, new us({
|
|
3697
3695
|
url: t,
|
|
3698
3696
|
channelId: n,
|
|
3699
3697
|
authenticationToken: r,
|
|
@@ -3703,11 +3701,11 @@ function Is() {
|
|
|
3703
3701
|
}), m(Es, this).on("timeout", () => {
|
|
3704
3702
|
p(Y, this, zs).call(this), m(ws, this).removeAttribute("hidden");
|
|
3705
3703
|
}), m(Es, this).on("error", (e) => {
|
|
3706
|
-
this.setAttribute(
|
|
3704
|
+
this.setAttribute(K.OFFLINE, ""), p(Y, this, Rs).call(this, e.title, e.message);
|
|
3707
3705
|
}), m(ws, this).addEventListener("click", m(Ms, this)), this.hasAttribute("paused") && m(Es, this).start();
|
|
3708
3706
|
}
|
|
3709
3707
|
function Ls(e) {
|
|
3710
|
-
let t =
|
|
3708
|
+
let t = Se(this.getAttribute("title"), !1);
|
|
3711
3709
|
if (!t) return;
|
|
3712
3710
|
let n = this.getAttribute("poster"), r = typeof t == "string" ? t : e.name, i;
|
|
3713
3711
|
if (typeof n == "string") i = n;
|
|
@@ -3715,7 +3713,7 @@ function Ls(e) {
|
|
|
3715
3713
|
var a, o;
|
|
3716
3714
|
i = (a = (o = this.instance) == null ? void 0 : o.getThumbnailUrl()) == null ? e.thumbnailUrls.length ? e.thumbnailUrls[0] : void 0 : a;
|
|
3717
3715
|
}
|
|
3718
|
-
|
|
3716
|
+
Oe({
|
|
3719
3717
|
title: r,
|
|
3720
3718
|
poster: i
|
|
3721
3719
|
});
|
|
@@ -3728,7 +3726,7 @@ function Rs(e, t) {
|
|
|
3728
3726
|
function zs() {
|
|
3729
3727
|
m(Cs, this).setAttribute("hidden", ""), m(Ts, this).removeAttribute("backdrop");
|
|
3730
3728
|
}
|
|
3731
|
-
e(Ns, "observedAttributes", [...va.observedAttributes, ...
|
|
3729
|
+
e(Ns, "observedAttributes", [...va.observedAttributes, ...ts]);
|
|
3732
3730
|
//#endregion
|
|
3733
3731
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3734
3732
|
var Bs = document.createElement("template");
|
|
@@ -3833,7 +3831,7 @@ ec.innerHTML = `
|
|
|
3833
3831
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3834
3832
|
</slot>
|
|
3835
3833
|
`;
|
|
3836
|
-
var tc = /* @__PURE__ */ new WeakSet(), nc = class extends
|
|
3834
|
+
var tc = /* @__PURE__ */ new WeakSet(), nc = class extends ze {
|
|
3837
3835
|
constructor() {
|
|
3838
3836
|
var e, t, n, r;
|
|
3839
3837
|
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]");
|
|
@@ -3850,7 +3848,7 @@ function rc() {
|
|
|
3850
3848
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3851
3849
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3852
3850
|
}
|
|
3853
|
-
e(nc, "observedAttributes", [...
|
|
3851
|
+
e(nc, "observedAttributes", [...b(Qs, "observedAttributes", Qs), _.RENDITION_LEVELS]);
|
|
3854
3852
|
//#endregion
|
|
3855
3853
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3856
3854
|
var ic = document.createElement("template");
|
|
@@ -3926,9 +3924,9 @@ function pc() {
|
|
|
3926
3924
|
let u = document.createElement("div");
|
|
3927
3925
|
u.setAttribute("role", "menuitem"), u.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), u.classList.add("menu-item"), u.tabIndex = -1;
|
|
3928
3926
|
let ee = p(X, this, mc).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3929
|
-
u.textContent = e.video ?
|
|
3927
|
+
u.textContent = e.video ? Ee(e.video) : "";
|
|
3930
3928
|
let d = document.createElement("span");
|
|
3931
|
-
d.classList.add("menu-item-subtitle"), d.textContent = `${
|
|
3929
|
+
d.classList.add("menu-item-subtitle"), d.textContent = `${Te(((i = (a = e.video) == null ? void 0 : a.bitRate) == null ? 0 : i) + ((o = (s = e.audio) == null ? void 0 : s.bitRate) == null ? 0 : o))}, ${ee}p`, u.appendChild(d), u.addEventListener("click", () => p(X, this, gc).call(this, e)), m(cc, this).push({
|
|
3932
3930
|
el: u,
|
|
3933
3931
|
id: (c = (l = e.video) == null ? void 0 : l.id) == null ? -1 : c
|
|
3934
3932
|
}), t.appendChild(u);
|
|
@@ -3958,7 +3956,7 @@ function gc(e) {
|
|
|
3958
3956
|
this.dispatchEvent(new Event("change", {
|
|
3959
3957
|
bubbles: !0,
|
|
3960
3958
|
composed: !0
|
|
3961
|
-
})), this.dispatchEvent(new CustomEvent(
|
|
3959
|
+
})), this.dispatchEvent(new CustomEvent(v.SET_RENDITION, {
|
|
3962
3960
|
bubbles: !0,
|
|
3963
3961
|
composed: !0,
|
|
3964
3962
|
detail: e
|
|
@@ -4189,13 +4187,13 @@ function Hc(e = !1) {
|
|
|
4189
4187
|
this.open = !1, e && this.removeAttribute("snap-touch"), h(wc, this, !1), p(Z, this, Wc).call(this);
|
|
4190
4188
|
}
|
|
4191
4189
|
function Uc() {
|
|
4192
|
-
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(
|
|
4190
|
+
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(v.LOCK_UI, {
|
|
4193
4191
|
bubbles: !0,
|
|
4194
4192
|
composed: !0
|
|
4195
4193
|
})));
|
|
4196
4194
|
}
|
|
4197
4195
|
function Wc() {
|
|
4198
|
-
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(
|
|
4196
|
+
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(v.UNLOCK_UI, {
|
|
4199
4197
|
bubbles: !0,
|
|
4200
4198
|
composed: !0
|
|
4201
4199
|
})));
|
|
@@ -4408,7 +4406,7 @@ function Tl(e) {
|
|
|
4408
4406
|
}));
|
|
4409
4407
|
}
|
|
4410
4408
|
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(
|
|
4409
|
+
return m(nl, this) || p($, this, Dl).call(this) || e < .999 ? !1 : (h(nl, this, !0), h(rl, this, !1), this.dispatchEvent(new CustomEvent(v.GO_LIVE, {
|
|
4412
4410
|
bubbles: !0,
|
|
4413
4411
|
composed: !0
|
|
4414
4412
|
})), !0);
|
|
@@ -4492,7 +4490,7 @@ kl.innerHTML = `
|
|
|
4492
4490
|
var Al = /* @__PURE__ */ new WeakMap(), jl = /* @__PURE__ */ new WeakMap(), Ml = /* @__PURE__ */ new WeakMap(), Nl = /* @__PURE__ */ new WeakMap(), Pl = class extends HTMLElement {
|
|
4493
4491
|
constructor() {
|
|
4494
4492
|
super(), f(this, Al, null), f(this, jl, () => {
|
|
4495
|
-
this.dispatchEvent(new CustomEvent(
|
|
4493
|
+
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4496
4494
|
bubbles: !0,
|
|
4497
4495
|
composed: !0
|
|
4498
4496
|
}));
|
|
@@ -4502,7 +4500,7 @@ var Al = /* @__PURE__ */ new WeakMap(), jl = /* @__PURE__ */ new WeakMap(), Ml =
|
|
|
4502
4500
|
this.removeEventListener("keyup", m(Ml, this));
|
|
4503
4501
|
return;
|
|
4504
4502
|
}
|
|
4505
|
-
this.dispatchEvent(new CustomEvent(
|
|
4503
|
+
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4506
4504
|
bubbles: !0,
|
|
4507
4505
|
composed: !0
|
|
4508
4506
|
}));
|
|
@@ -4595,7 +4593,7 @@ var Hl = /* @__PURE__ */ new WeakMap(), Ul = class extends HTMLElement {
|
|
|
4595
4593
|
(e = m(Hl, this)) == null || e.disconnectListener(this);
|
|
4596
4594
|
}
|
|
4597
4595
|
attributeChangedCallback(e, t, n) {
|
|
4598
|
-
t !== n && e === "hidden" && !
|
|
4596
|
+
t !== n && e === "hidden" && !y(n) && this.focus();
|
|
4599
4597
|
}
|
|
4600
4598
|
};
|
|
4601
4599
|
e(Ul, "observedAttributes", ["hidden"]);
|
|
@@ -4608,7 +4606,7 @@ var Kl = (e) => `${Math.round(e * 100)}%`, ql = /* @__PURE__ */ new WeakMap(), J
|
|
|
4608
4606
|
var e;
|
|
4609
4607
|
super(), f(this, ql, () => {
|
|
4610
4608
|
let e = this.range.valueAsNumber;
|
|
4611
|
-
this.dispatchEvent(new CustomEvent(
|
|
4609
|
+
this.dispatchEvent(new CustomEvent(v.SET_VOLUME, {
|
|
4612
4610
|
bubbles: !0,
|
|
4613
4611
|
composed: !0,
|
|
4614
4612
|
detail: e
|
|
@@ -4633,14 +4631,14 @@ var Kl = (e) => `${Math.round(e * 100)}%`, ql = /* @__PURE__ */ new WeakMap(), J
|
|
|
4633
4631
|
}
|
|
4634
4632
|
};
|
|
4635
4633
|
Wl = Jl, e(Jl, "observedAttributes", [
|
|
4636
|
-
...
|
|
4634
|
+
...b(Wl, "observedAttributes", Wl),
|
|
4637
4635
|
_.MUTED,
|
|
4638
4636
|
_.VOLUME
|
|
4639
4637
|
]);
|
|
4640
4638
|
//#endregion
|
|
4641
4639
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4642
4640
|
function Yl() {
|
|
4643
|
-
customElements.define("vindral-controller", va), customElements.define("vindral-control-bar", Ln), customElements.define("vindral-advanced-rendition-menu",
|
|
4641
|
+
customElements.define("vindral-controller", va), customElements.define("vindral-control-bar", Ln), customElements.define("vindral-advanced-rendition-menu", Ke), customElements.define("vindral-advanced-rendition-menu-list", at), customElements.define("vindral-play-button", es), customElements.define("vindral-mute-button", Jo), customElements.define("vindral-buffering-overlay", Mt), customElements.define("vindral-scroll-overlay", Ac), customElements.define("vindral-play-overlay", Ul), customElements.define("vindral-user-input-play-overlay", Pl), customElements.define("vindral-fullscreen-button", co), customElements.define("vindral-rendition-levels-menu", nc), customElements.define("vindral-rendition-levels-menu-list", dc), customElements.define("vindral-channel-grid-button", An), customElements.define("vindral-channel-grid", nn), customElements.define("vindral-channel-grid-item", Kt), customElements.define("vindral-pip-button", Zo), customElements.define("vindral-airplay-button", Tt), customElements.define("vindral-cast-button", It), customElements.define("vindral-cast-overlay", Ht), customElements.define("vindral-buffering-icon", kt), customElements.define("vindral-language-menu", mo), customElements.define("vindral-language-menu-list", ko), customElements.define("vindral-center-overlay", Il), customElements.define("vindral-message", Bl), customElements.define("vindral-volume-range", Jl), customElements.define("vindral-poster-overlay", Js), customElements.define("vindral-player", Ns), customElements.define("vindral-seek-bar", ul), customElements.define("vindral-live-button", Go);
|
|
4644
4642
|
}
|
|
4645
4643
|
//#endregion
|
|
4646
4644
|
export { Yl as t };
|