@vindral/web-sdk 4.3.3-14-g20c10535d → 4.3.3-16-g7e48bafd
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/{Dxvqyzi7.js → BUCZQhtm.js} +930 -903
- package/Bskov1am.js +166 -0
- package/{DcUVXbwc.js → M1wI3HjI.js} +139 -130
- package/core.js +1 -1
- package/legacy.es.js +2387 -2380
- package/legacy.umd.js +22 -22
- package/package.json +1 -1
- package/player.js +2 -2
- package/vindral-player-component.js +2 -2
- package/CLJilV9Y.js +0 -166
|
@@ -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 ee, l, m as te, n as u, o as ne, p as re, r as ie, s as ae, t as oe, u as se, v as ce } from "./
|
|
3
|
-
import { M as
|
|
2
|
+
import { _ as n, a as r, c as i, d as a, f as o, g as s, h as c, i as ee, l, m as te, n as u, o as ne, p as re, r as ie, s as ae, t as oe, u as se, v as ce, y as le } from "./M1wI3HjI.js";
|
|
3
|
+
import { M as ue } from "./C01DcfYu.js";
|
|
4
4
|
import { a as d, i as f, n as p, r as m, t as h } from "./B7hT-BKr.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { t as
|
|
5
|
+
import { c as de, n as fe, t as pe } from "./DeYmk5AL.js";
|
|
6
|
+
import { t as me } from "./FYiEDBC4.js";
|
|
7
|
+
import { _ as he, a as ge, c as _e, d as ve, f as g, 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(), h(this,
|
|
32
|
+
super(), h(this, Re), d(this, Ne, void 0), d(this, Pe, void 0), d(this, C, void 0), d(this, Fe, null), d(this, Ie, (e) => {
|
|
33
33
|
e.composedPath().includes(this) || this.hide();
|
|
34
|
-
}), d(this,
|
|
34
|
+
}), d(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 = p(
|
|
42
|
+
(t = p(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
|
-
m(
|
|
47
|
+
m(Fe, this, a.querySelector("vindral-controller")), (e = p(Fe, this)) == null || e.connectListener(this);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
set button(e) {
|
|
52
|
-
m(
|
|
52
|
+
m(Ne, this, e);
|
|
53
53
|
}
|
|
54
54
|
set listbox(e) {
|
|
55
|
-
m(
|
|
55
|
+
m(Pe, this, e);
|
|
56
56
|
}
|
|
57
57
|
set listboxSlot(e) {
|
|
58
58
|
m(C, this, e);
|
|
59
59
|
}
|
|
60
60
|
enable() {
|
|
61
|
-
super.enable(), this.addEventListener("change", p(
|
|
61
|
+
super.enable(), this.addEventListener("change", p(Le, this)), document.addEventListener("click", p(Ie, this));
|
|
62
62
|
}
|
|
63
63
|
hide() {
|
|
64
64
|
var e, t;
|
|
65
|
-
!p(C, this) || (e = p(C, this)) != null && e.hidden || (p(C, this).hidden = !0, (t = p(
|
|
65
|
+
!p(C, this) || (e = p(C, this)) != null && e.hidden || (p(C, this).hidden = !0, (t = p(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
|
-
p(C, this) && !e.composedPath().includes(p(C, this)) && f(
|
|
71
|
+
p(C, this) && !e.composedPath().includes(p(C, this)) && f(Re, this, Be).call(this);
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
|
-
function
|
|
74
|
+
function Be() {
|
|
75
75
|
var e;
|
|
76
|
-
(e = p(C, this)) != null && e.hidden ? f(
|
|
76
|
+
(e = p(C, this)) != null && e.hidden ? f(Re, this, Ve).call(this) : this.hide();
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ve() {
|
|
79
79
|
var e, t, n;
|
|
80
|
-
(e = p(C, this)) != null && e.hidden && (p(C, this).hidden = !1, (t = p(
|
|
80
|
+
(e = p(C, this)) != null && e.hidden && (p(C, this).hidden = !1, (t = p(Ne, this)) == null || t.setAttribute("aria-expanded", "true"), (n = p(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(), h(this,
|
|
103
|
+
super(), h(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(), f(
|
|
106
|
+
super.connectedCallback(), f(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 && f(
|
|
109
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && f(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(), w = /* @__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(), T = /* @__PURE__ */ new WeakSet(), it = class extends HTMLElement {
|
|
123
123
|
constructor() {
|
|
124
|
-
super(), h(this,
|
|
124
|
+
super(), h(this, T), d(this, Ye, []), d(this, Xe, 2 ** 53 - 1), d(this, w, !1), d(this, Ze, !0), d(this, Qe, null), d(this, $e, null), d(this, et, []), d(this, tt, null), d(this, nt, null), d(this, rt, null), e(this, "handleEvent", (e) => {
|
|
125
125
|
switch (e.type) {
|
|
126
126
|
case "keydown":
|
|
127
|
-
f(
|
|
127
|
+
f(T, this, gt).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
|
-
m(tt, this, e.host.closest("vindral-controller")), (t = p(tt, this)) == null || t.connectListener(this), f(
|
|
136
|
+
m(tt, this, e.host.closest("vindral-controller")), (t = p(tt, this)) == null || t.connectListener(this), f(T, this, ut).call(this), f(T, this, at).call(this), f(T, this, ot).call(this), f(T, this, dt).call(this), m(nt, this, e.host), this.addEventListener("keydown", this);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
disconnectedCallback() {
|
|
@@ -141,13 +141,13 @@ var Je = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), Xe =
|
|
|
141
141
|
(e = p(tt, this)) == null || e.disconnectListener(this), (t = p(rt, this)) == null || t.disconnect(), m(rt, 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 && (m(
|
|
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 && (m(w, this, x(n, !1)), f(T, this, ct).call(this), f(T, this, pt).call(this)), e === _.RENDITION_LEVEL && n && (m(Qe, this, JSON.parse(n)), f(T, this, pt).call(this)), e === _.SIZE_BASED_RESOLUTION_CAP_ENABLED && (m(Ze, this, x(n, !0)), f(T, this, lt).call(this)));
|
|
145
145
|
}
|
|
146
146
|
set list(e) {
|
|
147
|
-
m(
|
|
147
|
+
m(Ye, this, e), f(T, this, dt).call(this);
|
|
148
148
|
}
|
|
149
149
|
set maxVideoBitrate(e) {
|
|
150
|
-
m(
|
|
150
|
+
m(Xe, this, e), f(T, this, pt).call(this);
|
|
151
151
|
}
|
|
152
152
|
get keysUsed() {
|
|
153
153
|
return [
|
|
@@ -170,55 +170,55 @@ function at() {
|
|
|
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
|
-
m(
|
|
173
|
+
m(w, this, !0), f(T, this, ct).call(this), f(T, this, pt).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 = f(
|
|
179
|
+
let e = f(T, this, st).call(this);
|
|
180
180
|
e && this.dispatchEvent(new CustomEvent(v.SET_RENDITION, {
|
|
181
181
|
bubbles: !0,
|
|
182
182
|
composed: !0,
|
|
183
183
|
detail: e
|
|
184
|
-
})), m(
|
|
184
|
+
})), m(w, this, !1), f(T, this, ct).call(this), f(T, this, pt).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
|
-
}), f(
|
|
189
|
+
}), f(T, this, ct).call(this);
|
|
190
190
|
}
|
|
191
191
|
function ot() {
|
|
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 = !p(Ze, this);
|
|
196
|
-
m(Ze, this, e), f(
|
|
196
|
+
m(Ze, this, e), f(T, this, lt).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
|
-
}), f(
|
|
201
|
+
}), f(T, this, lt).call(this);
|
|
202
202
|
}
|
|
203
203
|
function st() {
|
|
204
|
-
let e = [...p(
|
|
204
|
+
let e = [...p(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 <= p(
|
|
210
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= p(Xe, this);
|
|
211
211
|
}) || e[e.length - 1] || null;
|
|
212
212
|
}
|
|
213
213
|
function ct() {
|
|
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(p(
|
|
216
|
+
r && i && (r.setAttribute("data-active", String(p(w, this))), i.setAttribute("data-active", String(!p(w, this)))), a && (a.textContent = p(w, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), f(T, this, lt).call(this);
|
|
217
217
|
}
|
|
218
218
|
function lt() {
|
|
219
219
|
var e;
|
|
220
220
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#size-cap-toggle");
|
|
221
|
-
t && (t.textContent = p(Ze, this) ? "On" : "Off", t.setAttribute("aria-pressed", String(p(Ze, this))), t.setAttribute("data-active", String(p(Ze, this))), t.disabled = !p(
|
|
221
|
+
t && (t.textContent = p(Ze, this) ? "On" : "Off", t.setAttribute("aria-pressed", String(p(Ze, this))), t.setAttribute("data-active", String(p(Ze, this))), t.disabled = !p(w, this), t.title = p(w, this) ? "Toggle size-based resolution cap" : "Only available in Auto (ABR) mode");
|
|
222
222
|
}
|
|
223
223
|
function ut() {
|
|
224
224
|
var e;
|
|
@@ -240,7 +240,7 @@ function ut() {
|
|
|
240
240
|
function dt() {
|
|
241
241
|
var e;
|
|
242
242
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
243
|
-
t && (m(et, this, []), t.innerHTML = "", p(
|
|
243
|
+
t && (m(et, this, []), t.innerHTML = "", p(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,38 +250,38 @@ function dt() {
|
|
|
250
250
|
let ne = document.createElement("div");
|
|
251
251
|
ne.className = "menu-item-info";
|
|
252
252
|
let re = document.createElement("span");
|
|
253
|
-
re.className = "menu-item-title", re.textContent = e.video ?
|
|
253
|
+
re.className = "menu-item-title", re.textContent = e.video ? Ee(e.video) : "";
|
|
254
254
|
let ie = document.createElement("span");
|
|
255
255
|
ie.classList.add("menu-item-subtitle");
|
|
256
|
-
let ae = f(
|
|
257
|
-
ie.textContent = `${
|
|
256
|
+
let ae = f(T, this, ft).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
257
|
+
ie.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))}, ${ae}fps`, ne.appendChild(re), ne.appendChild(ie), u.appendChild(ne);
|
|
258
258
|
let oe = document.createElement("span");
|
|
259
|
-
oe.className = "current-label", oe.textContent = "Current", u.appendChild(oe), u.addEventListener("click", () => f(
|
|
259
|
+
oe.className = "current-label", oe.textContent = "Current", u.appendChild(oe), u.addEventListener("click", () => f(T, this, ht).call(this, e)), p(et, this).push({
|
|
260
260
|
el: u,
|
|
261
261
|
id: (c = (ee = e.video) == null ? void 0 : ee.id) == null ? -1 : c,
|
|
262
262
|
bitrate: (l = (te = e.video) == null ? void 0 : te.bitRate) == null ? 0 : l
|
|
263
263
|
}), t.appendChild(u);
|
|
264
|
-
}), f(
|
|
264
|
+
}), f(T, this, pt).call(this));
|
|
265
265
|
}
|
|
266
266
|
function ft(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 pt() {
|
|
270
270
|
var e;
|
|
271
|
-
let t = (e = p(Qe, this)) == null || (e = e.video) == null ? void 0 : e.id, n = f(
|
|
271
|
+
let t = (e = p(Qe, this)) == null || (e = e.video) == null ? void 0 : e.id, n = f(T, this, mt).call(this), r = n == null ? void 0 : n.id;
|
|
272
272
|
m($e, this, null), p(et, 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, m($e, this, e.el)) : (e.el.removeAttribute("aria-selected"), e.el.tabIndex = -1), p(
|
|
277
|
-
let t = i > p(
|
|
276
|
+
if (e.el.setAttribute("data-selected", String(a)), a ? (e.el.setAttribute("aria-selected", "true"), e.el.tabIndex = 0, m($e, this, e.el)) : (e.el.removeAttribute("aria-selected"), e.el.tabIndex = -1), p(w, this)) {
|
|
277
|
+
let t = i > p(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 mt() {
|
|
283
283
|
let e = [...p(et, this)].sort((e, t) => t.bitrate - e.bitrate);
|
|
284
|
-
return e.find((e) => e.bitrate <= p(
|
|
284
|
+
return e.find((e) => e.bitrate <= p(Xe, this)) || e[e.length - 1];
|
|
285
285
|
}
|
|
286
286
|
function ht(e) {
|
|
287
287
|
this.dispatchEvent(new Event("change", {
|
|
@@ -300,17 +300,17 @@ function gt(e) {
|
|
|
300
300
|
(a = p(nt, this)) == null || a.hide();
|
|
301
301
|
} else if (t === "Enter" || t === " ") {
|
|
302
302
|
var o;
|
|
303
|
-
(o = f(
|
|
304
|
-
} else f(
|
|
303
|
+
(o = f(T, this, vt).call(this)) == null || (o = o.el) == null || o.click();
|
|
304
|
+
} else f(T, this, _t).call(this, e);
|
|
305
305
|
}
|
|
306
306
|
function _t(e) {
|
|
307
307
|
var t;
|
|
308
|
-
let { key: n } = e, r = p(et, this), i = (t = f(
|
|
308
|
+
let { key: n } = e, r = p(et, this), i = (t = f(T, this, vt).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 && (f(
|
|
313
|
+
s && (f(T, this, yt).call(this, s.id), s.el.focus());
|
|
314
314
|
}
|
|
315
315
|
function vt() {
|
|
316
316
|
return p(et, this).find((e) => e.el.tabIndex === 0);
|
|
@@ -701,33 +701,33 @@ e(Gt, "observedAttributes", [
|
|
|
701
701
|
//#region ../../libs/player-next/src/components/ChannelGrid.ts
|
|
702
702
|
var Kt = document.createElement("template");
|
|
703
703
|
Kt.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 qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(),
|
|
704
|
+
var qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakSet(), tn = class extends HTMLElement {
|
|
705
705
|
constructor() {
|
|
706
|
-
super(), h(this,
|
|
706
|
+
super(), h(this, O), d(this, qt, null), d(this, Jt, null), d(this, Yt, []), d(this, E, []), d(this, D, void 0), d(this, Xt, void 0), d(this, Zt, void 0), d(this, Qt, void 0), d(this, $t, void 0), d(this, en, void 0), e(this, "handleEvent", (e) => {
|
|
707
707
|
switch (e.type) {
|
|
708
708
|
case "keydown":
|
|
709
|
-
f(
|
|
709
|
+
f(O, this, hn).call(this, e);
|
|
710
710
|
break;
|
|
711
711
|
}
|
|
712
712
|
}), this.attachShadow({ mode: "open" }).appendChild(Kt.content.cloneNode(!0));
|
|
713
713
|
}
|
|
714
714
|
connectedCallback() {
|
|
715
715
|
var e, t, n;
|
|
716
|
-
m(Jt, this, this.closest("vindral-controller")), (e = p(Jt, this)) == null || e.connectListener(this), f(
|
|
717
|
-
f(
|
|
716
|
+
m(Jt, this, this.closest("vindral-controller")), (e = p(Jt, this)) == null || e.connectListener(this), f(O, this, nn).call(this), (t = p(qt, this)) == null || t.observe((n = this.shadowRoot) == null ? void 0 : n.querySelector(".wrapper")), f(O, this, ln).call(this), m(Zt, this, window.setInterval(() => {
|
|
717
|
+
f(O, this, pn).call(this);
|
|
718
718
|
}, 1e4));
|
|
719
719
|
}
|
|
720
720
|
disconnectedCallback() {
|
|
721
721
|
var e, t;
|
|
722
|
-
clearInterval(p(Zt, this)), f(
|
|
722
|
+
clearInterval(p(Zt, this)), f(O, this, xn).call(this), this.removeEventListener("keydown", this), (e = p(qt, this)) == null || e.disconnect(), (t = p(Jt, 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
|
-
f(
|
|
727
|
+
f(O, this, fn).call(this, n);
|
|
728
728
|
break;
|
|
729
729
|
case _.CHANNELS:
|
|
730
|
-
m(Yt, this, JSON.parse(n)), f(
|
|
730
|
+
m(Yt, this, JSON.parse(n)), f(O, this, ln).call(this);
|
|
731
731
|
break;
|
|
732
732
|
case "authentication-token":
|
|
733
733
|
m(Xt, this, n);
|
|
@@ -751,37 +751,37 @@ var qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt =
|
|
|
751
751
|
focus() {
|
|
752
752
|
var e;
|
|
753
753
|
let t = Ht();
|
|
754
|
-
t && t !== this && !this.contains(t) && m(Qt, this, t), (e = p(
|
|
754
|
+
t && t !== this && !this.contains(t) && m(Qt, this, t), (e = p(D, this)) == null || e.focus();
|
|
755
755
|
}
|
|
756
756
|
};
|
|
757
757
|
function nn() {
|
|
758
758
|
m(qt, this, new IntersectionObserver((e) => {
|
|
759
759
|
e.forEach((e) => {
|
|
760
760
|
let { target: t, isIntersecting: n } = e;
|
|
761
|
-
t instanceof Gt ? f(
|
|
761
|
+
t instanceof Gt ? f(O, this, cn).call(this, t, n) : f(O, this, rn).call(this, n);
|
|
762
762
|
});
|
|
763
763
|
}, { root: p(Jt, this) }));
|
|
764
764
|
}
|
|
765
765
|
function rn(e) {
|
|
766
|
-
e ? f(
|
|
766
|
+
e ? f(O, this, an).call(this) : f(O, this, on).call(this);
|
|
767
767
|
}
|
|
768
768
|
function an() {
|
|
769
769
|
this.dispatchEvent(new CustomEvent(v.CHANNEL_GRID_OPENED, {
|
|
770
770
|
bubbles: !0,
|
|
771
771
|
composed: !0
|
|
772
|
-
})), f(
|
|
772
|
+
})), f(O, this, sn).call(this), this.addEventListener("keydown", this), p(D, this) && (p(D, this).tabIndex = 0);
|
|
773
773
|
}
|
|
774
774
|
function on() {
|
|
775
|
-
f(
|
|
775
|
+
f(O, this, xn).call(this), p(D, this) && (p(D, this).tabIndex = -1), this.dispatchEvent(new CustomEvent(v.CHANNEL_GRID_CLOSED, {
|
|
776
776
|
bubbles: !0,
|
|
777
777
|
composed: !0
|
|
778
|
-
})), f(
|
|
778
|
+
})), f(O, this, vn).call(this), this.removeEventListener("keydown", this);
|
|
779
779
|
}
|
|
780
780
|
function sn() {
|
|
781
781
|
var e;
|
|
782
|
-
f(
|
|
782
|
+
f(O, this, xn).call(this), m(en, this, () => {
|
|
783
783
|
clearTimeout(p($t, this)), m($t, this, window.setTimeout(() => {
|
|
784
|
-
f(
|
|
784
|
+
f(O, this, bn).call(this) && this.focus(), f(O, this, xn).call(this);
|
|
785
785
|
}, 100));
|
|
786
786
|
}), (e = this.parentElement) == null || e.addEventListener("scroll", p(en, this));
|
|
787
787
|
}
|
|
@@ -790,19 +790,19 @@ function cn(e, t) {
|
|
|
790
790
|
}
|
|
791
791
|
function ln() {
|
|
792
792
|
var e;
|
|
793
|
-
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), n = new Map(p(
|
|
794
|
-
m(
|
|
793
|
+
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot[name=grid]"), n = new Map(p(E, this).map((e) => [e.id, e])), r = this.getAttribute("channel-id");
|
|
794
|
+
m(E, this, p(Yt, this).map((e) => {
|
|
795
795
|
var i;
|
|
796
796
|
let a = n.get(e.channelId);
|
|
797
|
-
if (a) return f(
|
|
798
|
-
let o = f(
|
|
797
|
+
if (a) return f(O, this, un).call(this, a.element, e), a;
|
|
798
|
+
let o = f(O, this, dn).call(this, e, r);
|
|
799
799
|
return (i = p(qt, this)) == null || i.observe(o.element), t.contains(o.element) || t.appendChild(o.element), o;
|
|
800
800
|
})), n.forEach((e, t) => {
|
|
801
801
|
if (!p(Yt, this).some((e) => e.channelId === t)) {
|
|
802
802
|
var n;
|
|
803
803
|
(n = p(qt, this)) == null || n.unobserve(e.element), e.element.remove();
|
|
804
804
|
}
|
|
805
|
-
}), p(
|
|
805
|
+
}), p(E, this).sort((e, t) => e.element.hasAttribute("offline") && !t.element.hasAttribute("offline") ? 1 : -1).forEach((e) => {
|
|
806
806
|
t.contains(e.element) || t.appendChild(e.element);
|
|
807
807
|
});
|
|
808
808
|
}
|
|
@@ -811,67 +811,67 @@ function un(e, t) {
|
|
|
811
811
|
}
|
|
812
812
|
function dn(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), p(Xt, this) && n.setAttribute("authentication-token", p(Xt, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), m(
|
|
814
|
+
return n.setAttribute("url", e.thumbnailUrls[0] || ""), n.setAttribute("title", e.name), p(Xt, this) && n.setAttribute("authentication-token", p(Xt, this)), e.isLive || n.setAttribute("offline", ""), e.channelId === t && (n.setAttribute("aria-selected", "true"), m(D, this, n)), n.tabIndex = -1, n.onclick = () => f(O, this, mn).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 fn(e) {
|
|
821
|
-
p(
|
|
822
|
-
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, m(
|
|
821
|
+
p(E, this).forEach((t) => {
|
|
822
|
+
t.id === e ? (t.element.setAttribute("aria-selected", "true"), t.element.tabIndex = 0, m(D, this, t.element)) : (t.element.tabIndex = -1, t.element.setAttribute("aria-selected", "false"));
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
825
|
function pn() {
|
|
826
|
-
this.hasAttribute("hidden") || p(
|
|
826
|
+
this.hasAttribute("hidden") || p(E, this).forEach((e) => e.element.updateThumbnail());
|
|
827
827
|
}
|
|
828
828
|
function mn(e) {
|
|
829
829
|
var t;
|
|
830
|
-
f(
|
|
830
|
+
f(O, this, Sn).call(this), (t = p(Jt, this)) == null || t.setAttribute("channel-id", e.channelId);
|
|
831
831
|
}
|
|
832
832
|
function hn(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") f(
|
|
834
|
+
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") f(O, this, Sn).call(this);
|
|
835
835
|
else if (t === "Enter" || t === " ") {
|
|
836
836
|
var a;
|
|
837
|
-
(a = p(
|
|
838
|
-
} else f(
|
|
837
|
+
(a = p(D, this)) == null || a.click();
|
|
838
|
+
} else f(O, this, gn).call(this, e);
|
|
839
839
|
}
|
|
840
840
|
function gn(e) {
|
|
841
|
-
if (!p(
|
|
842
|
-
let { key: t } = e, n = p(
|
|
841
|
+
if (!p(D, this)) return;
|
|
842
|
+
let { key: t } = e, n = p(E, this).findIndex((e) => e.element === p(D, this)), r = p(D, this).getBoundingClientRect();
|
|
843
843
|
switch (t) {
|
|
844
844
|
case "ArrowUp":
|
|
845
|
-
if (n = f(
|
|
846
|
-
f(
|
|
845
|
+
if (n = f(O, this, _n).call(this, r, -1, 0), n < 0) {
|
|
846
|
+
f(O, this, Sn).call(this);
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
849
|
break;
|
|
850
850
|
case "ArrowDown":
|
|
851
|
-
n = f(
|
|
851
|
+
n = f(O, this, _n).call(this, r, 1, 0);
|
|
852
852
|
break;
|
|
853
853
|
case "ArrowLeft":
|
|
854
|
-
n = f(
|
|
854
|
+
n = f(O, this, _n).call(this, r, 0, -1);
|
|
855
855
|
break;
|
|
856
856
|
case "ArrowRight":
|
|
857
|
-
n = f(
|
|
857
|
+
n = f(O, this, _n).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 = p(
|
|
863
|
+
n = p(E, this).length - 1;
|
|
864
864
|
break;
|
|
865
865
|
}
|
|
866
|
-
if (n >= 0 && n < p(
|
|
867
|
-
let e = p(
|
|
866
|
+
if (n >= 0 && n < p(E, this).length) {
|
|
867
|
+
let e = p(E, this)[n];
|
|
868
868
|
if (!e) return;
|
|
869
|
-
p(
|
|
869
|
+
p(D, this).setAttribute("aria-selected", "false"), p(D, this).tabIndex = -1, m(D, this, e.element), p(D, this).setAttribute("aria-selected", "true"), p(D, this).tabIndex = 0, p(D, this).focus();
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
function _n(e, t, n) {
|
|
873
873
|
let r = -1, i = Infinity;
|
|
874
|
-
return p(
|
|
874
|
+
return p(E, this).filter((e) => e.element.getBoundingClientRect().width > 0).forEach((a, o) => {
|
|
875
875
|
let s = a.element.getBoundingClientRect(), c = t === 0 || t < 0 && s.top < e.top || t > 0 && s.top > e.top, ee = n === 0 || n < 0 && s.left < e.left || n > 0 && s.left > e.left;
|
|
876
876
|
if (c && ee) {
|
|
877
877
|
let t = Math.sqrt((s.top - e.top) ** 2 + (s.left - e.left) ** 2);
|
|
@@ -892,7 +892,7 @@ function yn(e) {
|
|
|
892
892
|
}
|
|
893
893
|
function bn() {
|
|
894
894
|
let e = this.parentElement;
|
|
895
|
-
return e ? f(
|
|
895
|
+
return e ? f(O, this, yn).call(this, e) ? e.hasAttribute("open") : !this.hasAttribute("hidden") : !1;
|
|
896
896
|
}
|
|
897
897
|
function xn() {
|
|
898
898
|
if (p($t, this) && (clearTimeout(p($t, this)), m($t, this, void 0)), p(en, this)) {
|
|
@@ -902,7 +902,7 @@ function xn() {
|
|
|
902
902
|
}
|
|
903
903
|
function Sn() {
|
|
904
904
|
let e = this.parentElement;
|
|
905
|
-
if (f(
|
|
905
|
+
if (f(O, this, yn).call(this, e)) {
|
|
906
906
|
e.open = !1;
|
|
907
907
|
return;
|
|
908
908
|
}
|
|
@@ -933,70 +933,70 @@ Tn.innerHTML = `
|
|
|
933
933
|
</style>
|
|
934
934
|
<slot name="button">${wn}</slot>
|
|
935
935
|
`;
|
|
936
|
-
var En = /* @__PURE__ */ new WeakMap(),
|
|
936
|
+
var En = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakSet(), kn = class extends S {
|
|
937
937
|
constructor() {
|
|
938
938
|
var e, t;
|
|
939
|
-
super(), h(this, A), d(this, En, void 0), d(this,
|
|
940
|
-
e.composedPath().includes(this) || f(A, this,
|
|
939
|
+
super(), h(this, A), d(this, En, void 0), d(this, k, void 0), d(this, Dn, void 0), d(this, On, (e) => {
|
|
940
|
+
e.composedPath().includes(this) || f(A, this, Mn).call(this);
|
|
941
941
|
}), (e = this.shadowRoot) == null || e.appendChild(Tn.content.cloneNode(!0)), m(En, 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(), f(A, this,
|
|
944
|
+
super.connectedCallback(), this.setAttribute("aria-haspopup", "listbox"), this.enable(), f(A, this, Nn).call(this);
|
|
945
945
|
let e = this.getRootNode();
|
|
946
946
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
947
947
|
var t;
|
|
948
|
-
m(
|
|
948
|
+
m(k, this, e.querySelector("vindral-channel-grid")), ((t = p(k, this).parentElement) == null ? void 0 : t.localName) === "vindral-scroll-overlay" && (p(k, this).hidden = !1, p(k, this).style.position = "relative", m(Dn, this, p(k, this).parentElement));
|
|
949
949
|
}
|
|
950
|
-
f(A, this,
|
|
950
|
+
f(A, this, Pn).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) && f(A, this,
|
|
954
|
+
super.attributeChangedCallback(e, t, n), (e === _.CHANNEL_GROUP_ID || e === _.CHANNELS) && f(A, this, Nn).call(this);
|
|
955
955
|
}
|
|
956
956
|
enable() {
|
|
957
|
-
super.enable(), document.addEventListener("click", p(
|
|
957
|
+
super.enable(), document.addEventListener("click", p(On, this));
|
|
958
958
|
}
|
|
959
959
|
handleClick(e) {
|
|
960
|
-
f(A, this,
|
|
960
|
+
f(A, this, An).call(this);
|
|
961
961
|
}
|
|
962
962
|
get isOpen() {
|
|
963
963
|
var e;
|
|
964
|
-
return p(
|
|
964
|
+
return p(Dn, this) ? p(Dn, this).hasAttribute("open") : !((e = p(k, this)) != null && e.hidden);
|
|
965
965
|
}
|
|
966
966
|
};
|
|
967
|
-
Cn =
|
|
968
|
-
function
|
|
969
|
-
if (p(
|
|
967
|
+
Cn = kn;
|
|
968
|
+
function An() {
|
|
969
|
+
if (p(Dn, this)) p(Dn, this).hasAttribute("open") ? f(A, this, Mn).call(this) : f(A, this, jn).call(this);
|
|
970
970
|
else {
|
|
971
971
|
var e;
|
|
972
|
-
(e = p(
|
|
972
|
+
(e = p(k, this)) != null && e.hidden ? f(A, this, jn).call(this) : f(A, this, Mn).call(this);
|
|
973
973
|
}
|
|
974
|
-
f(A, this,
|
|
974
|
+
f(A, this, Pn).call(this);
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
if (p(
|
|
976
|
+
function jn() {
|
|
977
|
+
if (p(Dn, this)) p(Dn, this).setAttribute("open", "");
|
|
978
978
|
else {
|
|
979
979
|
var e;
|
|
980
|
-
if (!((e = p(
|
|
981
|
-
p(
|
|
980
|
+
if (!((e = p(k, this)) != null && e.hidden)) return;
|
|
981
|
+
p(k, this).hidden = !1, p(k, this).focus();
|
|
982
982
|
}
|
|
983
983
|
p(En, this).setAttribute("aria-expanded", "true");
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
if (p(
|
|
985
|
+
function Mn() {
|
|
986
|
+
if (p(Dn, this)) p(Dn, this).open = !1;
|
|
987
987
|
else {
|
|
988
|
-
if (!p(
|
|
989
|
-
p(
|
|
988
|
+
if (!p(k, this) || p(k, this).hidden) return;
|
|
989
|
+
p(k, this).hidden = !0;
|
|
990
990
|
}
|
|
991
991
|
p(En, this).setAttribute("aria-expanded", "false");
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Nn() {
|
|
994
994
|
this.getAttribute(_.CHANNEL_GROUP_ID) ? this.removeAttribute("hidden") : this.setAttribute("hidden", ""), this.hasAttribute(_.CHANNELS) ? this.removeAttribute("disabled") : this.setAttribute("disabled", "");
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Pn() {
|
|
997
997
|
this.setAttribute("aria-label", this.isOpen ? "Exit grid" : "Enter grid");
|
|
998
998
|
}
|
|
999
|
-
e(
|
|
999
|
+
e(kn, "observedAttributes", [
|
|
1000
1000
|
...b(Cn, "observedAttributes", Cn),
|
|
1001
1001
|
_.CHANNEL_GROUP_ID,
|
|
1002
1002
|
_.CHANNELS,
|
|
@@ -1004,19 +1004,19 @@ e(On, "observedAttributes", [
|
|
|
1004
1004
|
]);
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region ../../libs/player-next/src/components/ControlBar.ts
|
|
1007
|
-
var
|
|
1008
|
-
|
|
1009
|
-
var
|
|
1007
|
+
var Fn = document.createElement("template");
|
|
1008
|
+
Fn.innerHTML = "\n <style>\n :host {\n display: flex;\n width: 100%;\n align-items: center;\n }\n\n slot {\n display: flex;\n flex-grow: 1;\n align-items: center;\n }\n\n :host([content-center]) slot {\n justify-content: center;\n }\n\n slot[name=\"right\"] {\n justify-content: flex-end;\n }\n </style>\n\n <slot name=\"bar\">\n <slot></slot>\n <slot name=\"right\"></slot>\n </slot>\n";
|
|
1009
|
+
var In = class extends HTMLElement {
|
|
1010
1010
|
constructor() {
|
|
1011
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
1011
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(Fn.content.cloneNode(!0));
|
|
1012
1012
|
}
|
|
1013
1013
|
connectedCallback() {}
|
|
1014
1014
|
disconnectedCallback() {}
|
|
1015
1015
|
};
|
|
1016
|
-
e(
|
|
1016
|
+
e(In, "observedAttributes", []);
|
|
1017
1017
|
//#endregion
|
|
1018
1018
|
//#region ../../libs/airplay-sender/src/AirPlaySender.ts
|
|
1019
|
-
var
|
|
1019
|
+
var Ln = class extends me {
|
|
1020
1020
|
constructor(t) {
|
|
1021
1021
|
super(), e(this, "config", void 0), e(this, "hlsUrl", void 0), e(this, "element", void 0), e(this, "connectingTimeout", void 0), e(this, "castingAvailable", !1), e(this, "updateAuthenticationToken", (e) => {
|
|
1022
1022
|
this.config.authenticationToken = e, this.hlsUrl = this.getHlsUrl(), this.castingAvailable && (this.element.src = this.hlsUrl);
|
|
@@ -1035,7 +1035,7 @@ var In = class extends pe {
|
|
|
1035
1035
|
default: break;
|
|
1036
1036
|
}
|
|
1037
1037
|
}), e(this, "onAirPlayPlaybackChanged", () => {
|
|
1038
|
-
window.clearTimeout(this.connectingTimeout), this.element.webkitCurrentPlaybackTargetIsWireless ? (this.emit("connected"), this.element.style.display = "block", this.element.paused && this.element.play().catch(
|
|
1038
|
+
window.clearTimeout(this.connectingTimeout), this.element.webkitCurrentPlaybackTargetIsWireless ? (this.emit("connected"), this.element.style.display = "block", this.element.paused && this.element.play().catch(ue)) : (this.emit("disconnected"), this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl, this.element.style.display = "none");
|
|
1039
1039
|
}), this.config = t, this.hlsUrl = this.getHlsUrl(), this.element = document.createElement("video"), this.element.style.position = "absolute", this.element.style.top = "0", this.element.style.bottom = "0", this.element.style.left = "0", this.element.style.right = "0", this.element.style.width = "100%", this.element.style.height = "100%", this.element.style.zIndex = "1001", this.element.style.display = "none", this.element.id = "vindral-airplay-element", this.element.slot = "overlay", this.element.playsInline = !0, this.element.controls = !0, this.element.preload = "metadata", this.element.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailable), this.element.addEventListener("webkitcurrentplaybacktargetiswirelesschanged", this.onAirPlayPlaybackChanged), this.config.container.appendChild(this.element);
|
|
1040
1040
|
}
|
|
1041
1041
|
get casting() {
|
|
@@ -1043,7 +1043,7 @@ var In = class extends pe {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
set channelId(e) {}
|
|
1045
1045
|
showPlaybackTargetPicker() {
|
|
1046
|
-
"webkitShowPlaybackTargetPicker" in this.element && this.castingAvailable && (this.element.paused && (this.element.play().catch(
|
|
1046
|
+
"webkitShowPlaybackTargetPicker" in this.element && this.castingAvailable && (this.element.paused && (this.element.play().catch(ue), this.connectingTimeout = window.setTimeout(() => {
|
|
1047
1047
|
this.casting || (this.element.pause(), this.element.src = "", this.element.src = this.hlsUrl);
|
|
1048
1048
|
}, 3e4)), this.element.webkitShowPlaybackTargetPicker());
|
|
1049
1049
|
}
|
|
@@ -1063,78 +1063,103 @@ var In = class extends pe {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
})();
|
|
1065
1065
|
}
|
|
1066
|
-
},
|
|
1066
|
+
}, Rn = 28;
|
|
1067
|
+
function zn(e) {
|
|
1068
|
+
let t = e.styleSheets[0];
|
|
1069
|
+
if (!t) return null;
|
|
1070
|
+
try {
|
|
1071
|
+
for (let e of Array.from(t.cssRules)) if (e instanceof CSSStyleRule && e.selectorText.includes("::cue")) return e;
|
|
1072
|
+
} catch (e) {}
|
|
1073
|
+
return null;
|
|
1074
|
+
}
|
|
1075
|
+
var Bn = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Wn = class {
|
|
1076
|
+
constructor(t) {
|
|
1077
|
+
d(this, Bn, void 0), d(this, Vn, null), d(this, Hn, null), e(this, "observe", (e) => {
|
|
1078
|
+
!window.ResizeObserver || p(Vn, this) || (m(Vn, this, new ResizeObserver(() => p(Un, this).call(this, e))), p(Vn, this).observe(e));
|
|
1079
|
+
}), e(this, "unload", () => {
|
|
1080
|
+
var e;
|
|
1081
|
+
(e = p(Vn, this)) == null || e.disconnect(), m(Vn, this, null);
|
|
1082
|
+
}), d(this, Un, (e) => {
|
|
1083
|
+
let t = p(Bn, this);
|
|
1084
|
+
if (!t) return;
|
|
1085
|
+
let { clientWidth: n, clientHeight: r } = e;
|
|
1086
|
+
if (n <= 0 || r <= 0) return;
|
|
1087
|
+
let i = u(n, r, { max: Rn });
|
|
1088
|
+
i !== p(Hn, this) && (m(Hn, this, i), t.style.fontSize = i);
|
|
1089
|
+
}), m(Bn, this, zn(t));
|
|
1090
|
+
}
|
|
1091
|
+
}, Gn = class n extends me {
|
|
1067
1092
|
constructor(r) {
|
|
1068
|
-
var
|
|
1069
|
-
super(),
|
|
1093
|
+
var i;
|
|
1094
|
+
super(), i = this, e(this, "container", void 0), e(this, "unload", () => {
|
|
1070
1095
|
document.removeEventListener("webkitfullscreenchange", this.onChange), document.removeEventListener("mozfullscreenchange", this.onChange), document.removeEventListener("fullscreenchange", this.onChange), this.container.removeEventListener("webkitendfullscreen", this.onChange);
|
|
1071
1096
|
}), e(this, "request", t(function* () {
|
|
1072
1097
|
try {
|
|
1073
|
-
yield
|
|
1098
|
+
yield i.requestFn();
|
|
1074
1099
|
} catch (e) {
|
|
1075
|
-
throw
|
|
1100
|
+
throw i.onChange(), e;
|
|
1076
1101
|
}
|
|
1077
1102
|
})), e(this, "exit", t(function* () {
|
|
1078
1103
|
try {
|
|
1079
|
-
yield
|
|
1104
|
+
yield i.exitFn();
|
|
1080
1105
|
} catch (e) {
|
|
1081
|
-
throw
|
|
1106
|
+
throw i.onChange(), e;
|
|
1082
1107
|
}
|
|
1083
|
-
})), e(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), e(this, "isFullscreen", () =>
|
|
1108
|
+
})), e(this, "onChange", () => this.emit("on fullscreen change", this.isFullscreen())), e(this, "isFullscreen", () => l()), e(this, "isSupported", () => n.isFullscreenApiSupported(this.container) || !this.isInIframe()), e(this, "isFullscreenApiSupported", () => n.isFullscreenApiSupported(this.container)), e(this, "isInIframe", () => window.location !== window.parent.location), this.container = r, document.addEventListener("webkitfullscreenchange", this.onChange), document.addEventListener("mozfullscreenchange", this.onChange), document.addEventListener("fullscreenchange", this.onChange), this.container.addEventListener("webkitendfullscreen", this.onChange);
|
|
1084
1109
|
}
|
|
1085
1110
|
get requestFn() {
|
|
1086
1111
|
var e;
|
|
1087
|
-
return (e =
|
|
1112
|
+
return (e = ne(this.container)) == null ? (() => Promise.resolve()) : e;
|
|
1088
1113
|
}
|
|
1089
1114
|
get exitFn() {
|
|
1090
1115
|
if (n.isFullscreenApiSupported(this.container) && this.isFullscreen()) {
|
|
1091
1116
|
var e;
|
|
1092
|
-
return (e =
|
|
1117
|
+
return (e = ee(this.container)) == null ? (() => Promise.resolve()) : e;
|
|
1093
1118
|
}
|
|
1094
1119
|
return () => Promise.resolve();
|
|
1095
1120
|
}
|
|
1096
1121
|
};
|
|
1097
|
-
e(
|
|
1122
|
+
e(Gn, "isFullscreenApiSupported", (e) => se(e));
|
|
1098
1123
|
//#endregion
|
|
1099
1124
|
//#region ../../libs/player-next/src/PictureInPicture.ts
|
|
1100
|
-
var
|
|
1125
|
+
var Kn = /* @__PURE__ */ new WeakMap(), qn = /* @__PURE__ */ new WeakMap(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = /* @__PURE__ */ new WeakMap(), Zn = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), tr = class extends me {
|
|
1101
1126
|
constructor(n) {
|
|
1102
|
-
var
|
|
1103
|
-
super(),
|
|
1104
|
-
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange),
|
|
1127
|
+
var o;
|
|
1128
|
+
super(), o = this, e(this, "unload", () => {
|
|
1129
|
+
this.element.removeEventListener("enterpictureinpicture", this.onChange), this.element.removeEventListener("leavepictureinpicture", this.onChange), re(this.element, !1);
|
|
1105
1130
|
}), e(this, "request", t(function* () {
|
|
1106
1131
|
try {
|
|
1107
|
-
return yield p(
|
|
1132
|
+
return yield p(Kn, o).call(o);
|
|
1108
1133
|
} catch (e) {
|
|
1109
|
-
throw
|
|
1134
|
+
throw o.onChange(), e;
|
|
1110
1135
|
}
|
|
1111
1136
|
})), e(this, "exit", t(function* () {
|
|
1112
1137
|
try {
|
|
1113
|
-
return yield p(
|
|
1138
|
+
return yield p(qn, o).call(o);
|
|
1114
1139
|
} catch (e) {
|
|
1115
|
-
throw
|
|
1140
|
+
throw o.onChange(), e;
|
|
1116
1141
|
}
|
|
1117
1142
|
})), e(this, "onChange", () => {
|
|
1118
1143
|
this.emit("on picture in picture change", this.isPictureInPictureActive());
|
|
1119
|
-
}), e(this, "isPictureInPictureActive", () => p(
|
|
1120
|
-
let e =
|
|
1144
|
+
}), e(this, "isPictureInPictureActive", () => p(Qn, this).call(this) || p(Zn, this).call(this)), e(this, "isSupported", () => p(er, this).call(this) || p(Xn, this).call(this)), d(this, Kn, () => p(Xn, this).call(this) ? p(Jn, this).call(this) : p(er, this).call(this) ? p($n, this).call(this, "picture-in-picture") : Promise.resolve()), d(this, qn, () => this.isPictureInPictureActive() ? p(Xn, this).call(this) ? p(Yn, this).call(this) : p(er, this).call(this) ? p($n, this).call(this, "inline") : Promise.resolve() : Promise.resolve()), d(this, Jn, t(function* () {
|
|
1145
|
+
let e = ae(o.element);
|
|
1121
1146
|
e && (yield e());
|
|
1122
|
-
})), d(this,
|
|
1123
|
-
let e =
|
|
1147
|
+
})), d(this, Yn, t(function* () {
|
|
1148
|
+
let e = r();
|
|
1124
1149
|
e && (yield e());
|
|
1125
|
-
})), d(this,
|
|
1150
|
+
})), d(this, Xn, () => c(this.element)), d(this, Zn, () => a()), d(this, Qn, () => i(this.element) === "picture-in-picture"), d(this, $n, (e) => (s(this.element) && te(this.element, e), Promise.resolve())), d(this, er, () => s(this.element)), this.element = n, this.element.addEventListener("enterpictureinpicture", this.onChange), this.element.addEventListener("leavepictureinpicture", this.onChange), re(this.element, !0);
|
|
1126
1151
|
}
|
|
1127
1152
|
get videoElement() {
|
|
1128
1153
|
return this.element;
|
|
1129
1154
|
}
|
|
1130
|
-
},
|
|
1155
|
+
}, nr = (e) => {
|
|
1131
1156
|
var t;
|
|
1132
1157
|
let n = "observedAttributes" in e.constructor ? e.constructor.observedAttributes : void 0;
|
|
1133
|
-
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) =>
|
|
1158
|
+
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) => he.includes(e)) : [];
|
|
1134
1159
|
};
|
|
1135
1160
|
//#endregion
|
|
1136
1161
|
//#region ../../libs/player-next/src/utils/humanReadableTimeToSeconds.ts
|
|
1137
|
-
function
|
|
1162
|
+
function rr(e) {
|
|
1138
1163
|
if (typeof e != "string") return NaN;
|
|
1139
1164
|
let t = [...e.matchAll(/(\d+(?:\.\d+)?)([hms])/gi)];
|
|
1140
1165
|
return t.length === 0 ? NaN : t.reduce((e, t) => {
|
|
@@ -1150,37 +1175,37 @@ function Yn(e) {
|
|
|
1150
1175
|
}
|
|
1151
1176
|
//#endregion
|
|
1152
1177
|
//#region ../../libs/player-next/src/utils/timelineMarkers.ts
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1155
|
-
},
|
|
1178
|
+
var ir = ie.get().createContext("TimelineMarkers"), ar = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2})?(\.\d+)?$/, or = (e) => {
|
|
1179
|
+
ir.warn(`Timeline marker time "${e}" has no timezone and is interpreted in the viewer's local timezone, so it can land at a different position for viewers in other timezones. Provide an ISO 8601 time with an offset (e.g. "${e}Z") or epoch milliseconds.`);
|
|
1180
|
+
}, sr = (e) => {
|
|
1156
1181
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1157
1182
|
if (typeof e == "string") {
|
|
1158
1183
|
let t = Date.parse(e);
|
|
1159
|
-
return Number.isNaN(t) ? null : (
|
|
1184
|
+
return Number.isNaN(t) ? null : (ar.test(e) && or(e), t);
|
|
1160
1185
|
}
|
|
1161
1186
|
if (e instanceof Date) {
|
|
1162
1187
|
let t = e.getTime();
|
|
1163
1188
|
return Number.isNaN(t) ? null : t;
|
|
1164
1189
|
}
|
|
1165
1190
|
return null;
|
|
1166
|
-
},
|
|
1191
|
+
}, cr = (e) => {
|
|
1167
1192
|
if (typeof e != "object" || !e) return null;
|
|
1168
|
-
let { time: t, label: n, type: r } = e, i =
|
|
1193
|
+
let { time: t, label: n, type: r } = e, i = sr(t);
|
|
1169
1194
|
if (i === null || typeof n != "string" || n.length === 0) return null;
|
|
1170
1195
|
let a = {
|
|
1171
1196
|
time: i,
|
|
1172
1197
|
label: n
|
|
1173
1198
|
};
|
|
1174
1199
|
return typeof r == "string" && r.length > 0 && (a.type = r), a;
|
|
1175
|
-
},
|
|
1200
|
+
}, lr = (e) => {
|
|
1176
1201
|
if (!Array.isArray(e)) return [];
|
|
1177
|
-
let t = e.map(
|
|
1178
|
-
return n > 0 &&
|
|
1179
|
-
},
|
|
1202
|
+
let t = e.map(cr).filter((e) => e !== null), n = e.length - t.length;
|
|
1203
|
+
return n > 0 && ir.warn(`Dropped ${n} invalid timeline marker(s). Each marker needs a non-empty "label" and a valid "time" (epoch milliseconds, a Date, or an ISO 8601 string).`), t;
|
|
1204
|
+
}, ur = (e) => e ? lr(de(e)) : [], dr = (e, t, n) => {
|
|
1180
1205
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
1181
1206
|
let r = 1 - (t - e) / (n * 1e3);
|
|
1182
1207
|
return r < 0 || r > 1 ? null : r;
|
|
1183
|
-
},
|
|
1208
|
+
}, fr = class extends me {
|
|
1184
1209
|
constructor(t) {
|
|
1185
1210
|
if (super(), e(this, "audioContext", void 0), e(this, "audioNode", void 0), e(this, "bufferLength", void 0), e(this, "animationFrameId", null), e(this, "canUseFloatTimeDomainData", void 0), e(this, "byteSampleBuffer", null), e(this, "floatSampleBuffer", null), e(this, "leftAnalyser", void 0), e(this, "rightAnalyser", void 0), e(this, "mediaElementSource", null), e(this, "update", () => {
|
|
1186
1211
|
let e = this.getDecibel(this.leftAnalyser, this.floatSampleBuffer || this.byteSampleBuffer), t = this.getDecibel(this.rightAnalyser, this.floatSampleBuffer || this.byteSampleBuffer);
|
|
@@ -1232,18 +1257,18 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1232
1257
|
get isMediaElementSource() {
|
|
1233
1258
|
return this.source instanceof HTMLMediaElement;
|
|
1234
1259
|
}
|
|
1235
|
-
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(),
|
|
1260
|
+
}, j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), pr = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), _r = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), yr = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakMap(), xr = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Sr = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Er = class {
|
|
1236
1261
|
constructor(t, n) {
|
|
1237
|
-
h(this, F), d(this, j, void 0), d(this, M, void 0), d(this, N, void 0), d(this,
|
|
1238
|
-
p(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !p(j, this).paused && f(F, this,
|
|
1239
|
-
}), d(this,
|
|
1240
|
-
p(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && f(F, this,
|
|
1241
|
-
}), m(M, this, t), m(
|
|
1262
|
+
h(this, F), d(this, j, void 0), d(this, M, void 0), d(this, N, void 0), d(this, pr, void 0), d(this, mr, void 0), e(this, "userPaused", !0), d(this, hr, void 0), d(this, gr, void 0), d(this, _r, !1), d(this, vr, !1), d(this, yr, null), d(this, br, 0), d(this, xr, !1), d(this, P, ie.get().createContext("HlsPlayer")), d(this, Sr, () => f(F, this, zr).call(this, !0)), d(this, Cr, () => f(F, this, zr).call(this, !1)), d(this, wr, () => {
|
|
1263
|
+
p(j, this).readyState >= HTMLMediaElement.HAVE_CURRENT_DATA && !p(j, this).paused && f(F, this, zr).call(this, !1);
|
|
1264
|
+
}), d(this, Tr, () => {
|
|
1265
|
+
p(j, this).readyState >= HTMLMediaElement.HAVE_FUTURE_DATA && f(F, this, zr).call(this, !1);
|
|
1266
|
+
}), m(M, this, t), m(gr, this, n == null ? void 0 : n.maxVideoBitRate), p(M, this).style.position = "absolute", p(M, this).style.top = "0", p(M, this).style.left = "0", p(M, this).style.width = "100%", p(M, this).style.height = "100%", p(M, this).style.opacity = "0", p(M, this).style.pointerEvents = "none", p(M, this).style.transition = "opacity 0.12s linear";
|
|
1242
1267
|
let r = document.createElement("video");
|
|
1243
|
-
m(j, this, r), t.appendChild(p(j, this)), p(j, this).style.width = "100%", p(j, this).style.height = "100%", p(j, this).setAttribute("playsinline", ""), p(j, this).setAttribute("webkit-playsinline", ""), p(j, this).setAttribute("preload", "metadata"), f(F, this,
|
|
1268
|
+
m(j, this, r), t.appendChild(p(j, this)), p(j, this).style.width = "100%", p(j, this).style.height = "100%", p(j, this).setAttribute("playsinline", ""), p(j, this).setAttribute("webkit-playsinline", ""), p(j, this).setAttribute("preload", "metadata"), f(F, this, Lr).call(this), m(xr, this, p(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);
|
|
1244
1269
|
}
|
|
1245
1270
|
hide() {
|
|
1246
|
-
m(
|
|
1271
|
+
m(_r, this, !0), m(vr, this, !1), p(M, this).classList.remove("active"), p(M, this).style.opacity = "0", p(M, this).style.pointerEvents = "none", m(yr, this, null);
|
|
1247
1272
|
}
|
|
1248
1273
|
play() {
|
|
1249
1274
|
var e = this;
|
|
@@ -1259,17 +1284,17 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1259
1284
|
var n = this;
|
|
1260
1285
|
return t(function* () {
|
|
1261
1286
|
if (p(P, n).debug("HlsPlayer seek to", e.time), !Number.isFinite(e.time)) {
|
|
1262
|
-
m(
|
|
1287
|
+
m(yr, n, null);
|
|
1263
1288
|
return;
|
|
1264
1289
|
}
|
|
1265
|
-
if (m(
|
|
1266
|
-
else return f(F, n,
|
|
1290
|
+
if (m(yr, n, e.time > .1 ? e.time : null), n.isActive() && p(N, n)) f(F, n, jr).call(n, e.time);
|
|
1291
|
+
else return f(F, n, Mr).call(n, e);
|
|
1267
1292
|
})();
|
|
1268
1293
|
}
|
|
1269
1294
|
shouldIgnoreTimeupdate() {
|
|
1270
|
-
if (p(
|
|
1295
|
+
if (p(yr, this) == null) return !1;
|
|
1271
1296
|
let e = p(j, this).currentTime;
|
|
1272
|
-
return !Number.isFinite(e) || e <= .1 ? !0 : (m(
|
|
1297
|
+
return !Number.isFinite(e) || e <= .1 ? !0 : (m(yr, this, null), !1);
|
|
1273
1298
|
}
|
|
1274
1299
|
isPipSupported() {
|
|
1275
1300
|
return "pictureInPictureEnabled" in document && !p(j, this).disablePictureInPicture;
|
|
@@ -1284,7 +1309,7 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1284
1309
|
return p(M, this).style.opacity === "1" || p(M, this).classList.contains("active");
|
|
1285
1310
|
}
|
|
1286
1311
|
cleanup() {
|
|
1287
|
-
f(F, this,
|
|
1312
|
+
f(F, this, Rr).call(this), f(F, this, Ar).call(this), p(hr, this) && (cancelAnimationFrame(p(hr, this)), m(hr, this, void 0)), m(yr, this, null), p(j, this).remove();
|
|
1288
1313
|
}
|
|
1289
1314
|
addEventListener(e, t) {
|
|
1290
1315
|
p(j, this).addEventListener(e, t);
|
|
@@ -1296,7 +1321,7 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1296
1321
|
return p(j, this).dispatchEvent(e);
|
|
1297
1322
|
}
|
|
1298
1323
|
setTimeshiftUrl(e) {
|
|
1299
|
-
p(
|
|
1324
|
+
p(mr, this) !== e && (p(P, this).debug("HLSPlayer Setting timeshift URL to", e), m(mr, this, e));
|
|
1300
1325
|
}
|
|
1301
1326
|
get videoElement() {
|
|
1302
1327
|
return p(j, this);
|
|
@@ -1314,10 +1339,10 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1314
1339
|
return p(j, this).volume;
|
|
1315
1340
|
}
|
|
1316
1341
|
set muted(e) {
|
|
1317
|
-
m(
|
|
1342
|
+
m(xr, this, e), p(j, this).muted = e;
|
|
1318
1343
|
}
|
|
1319
1344
|
get muted() {
|
|
1320
|
-
return p(
|
|
1345
|
+
return p(xr, this);
|
|
1321
1346
|
}
|
|
1322
1347
|
set currentTime(e) {
|
|
1323
1348
|
p(j, this).currentTime = e;
|
|
@@ -1332,17 +1357,17 @@ var Xn = u.get().createContext("TimelineMarkers"), Zn = /^\d{4}-\d{2}-\d{2}[T ]\
|
|
|
1332
1357
|
return p(j, this).duration;
|
|
1333
1358
|
}
|
|
1334
1359
|
get maxVideoBitRate() {
|
|
1335
|
-
return p(
|
|
1360
|
+
return p(gr, this);
|
|
1336
1361
|
}
|
|
1337
1362
|
set maxVideoBitRate(e) {
|
|
1338
|
-
m(
|
|
1363
|
+
m(gr, this, e), e !== void 0 && p(N, this) && f(F, this, Or).call(this, e);
|
|
1339
1364
|
}
|
|
1340
1365
|
};
|
|
1341
|
-
function
|
|
1366
|
+
function Dr() {
|
|
1342
1367
|
var e = this;
|
|
1343
1368
|
return t(function* () {
|
|
1344
1369
|
let { default: t } = yield import("./Ddby8xU_.js");
|
|
1345
|
-
if (m(
|
|
1370
|
+
if (m(pr, e, t), !t.isSupported()) {
|
|
1346
1371
|
p(P, e).warn("HLS not supported");
|
|
1347
1372
|
return;
|
|
1348
1373
|
}
|
|
@@ -1366,17 +1391,17 @@ function yr() {
|
|
|
1366
1391
|
testBandwidth: !1,
|
|
1367
1392
|
debug: !1
|
|
1368
1393
|
})), p(N, e).attachMedia(p(j, e)), p(N, e).on(t.Events.MEDIA_ATTACHED, () => p(P, e).debug("[HLS] media attached")), p(N, e).on(t.Events.MANIFEST_PARSED, () => p(P, e).debug("[HLS] manifest parsed")), p(N, e).on(t.Events.ERROR, (t, n) => {
|
|
1369
|
-
p(P, e).error("[HLS] error:", n), n.fatal && f(F, e,
|
|
1394
|
+
p(P, e).error("[HLS] error:", n), n.fatal && f(F, e, kr).call(e, n);
|
|
1370
1395
|
}), p(N, e).on(t.Events.MANIFEST_PARSED, () => {
|
|
1371
1396
|
var t;
|
|
1372
|
-
!p(
|
|
1397
|
+
!p(gr, e) || ((t = p(N, e)) == null ? void 0 : t.levels.length) === 0 || f(F, e, Or).call(e, p(gr, e));
|
|
1373
1398
|
}), p(N, e).on(t.Events.LEVEL_SWITCHED, () => {
|
|
1374
1399
|
var t, n;
|
|
1375
1400
|
p(P, e).debug("Level switched:", (t = p(N, e)) == null ? void 0 : t.currentLevel, "max:", e.maxVideoBitRate, "autoLevelCapping:", (n = p(N, e)) == null ? void 0 : n.autoLevelCapping);
|
|
1376
1401
|
});
|
|
1377
1402
|
})();
|
|
1378
1403
|
}
|
|
1379
|
-
function
|
|
1404
|
+
function Or(e) {
|
|
1380
1405
|
if (!p(N, this)) {
|
|
1381
1406
|
p(P, this).warn("HLS not initialized, cannot set bitrate cap");
|
|
1382
1407
|
return;
|
|
@@ -1392,12 +1417,12 @@ function br(e) {
|
|
|
1392
1417
|
let r = p(N, this).currentLevel;
|
|
1393
1418
|
p(N, this).autoLevelCapping = t, r !== t && (p(P, this).debug(`Current level ${r} exceeds cap ${t}, forcing immediate switch`), p(N, this).currentLevel = t);
|
|
1394
1419
|
}
|
|
1395
|
-
function
|
|
1396
|
-
if (!p(
|
|
1420
|
+
function kr(e) {
|
|
1421
|
+
if (!p(pr, this)) {
|
|
1397
1422
|
p(P, this).error("Hls class not available for error handling");
|
|
1398
1423
|
return;
|
|
1399
1424
|
}
|
|
1400
|
-
let t = p(
|
|
1425
|
+
let t = p(pr, this);
|
|
1401
1426
|
switch (e.type) {
|
|
1402
1427
|
case t.ErrorTypes.NETWORK_ERROR:
|
|
1403
1428
|
var n;
|
|
@@ -1408,39 +1433,39 @@ function xr(e) {
|
|
|
1408
1433
|
p(P, this).warn("[HLS] media error -> recoverMediaError"), (r = p(N, this)) == null || r.recoverMediaError();
|
|
1409
1434
|
break;
|
|
1410
1435
|
default:
|
|
1411
|
-
p(P, this).error("[HLS] fatal -> destroy"), f(F, this,
|
|
1436
|
+
p(P, this).error("[HLS] fatal -> destroy"), f(F, this, Ar).call(this);
|
|
1412
1437
|
break;
|
|
1413
1438
|
}
|
|
1414
1439
|
}
|
|
1415
|
-
function
|
|
1440
|
+
function Ar() {
|
|
1416
1441
|
p(N, this) && (p(N, this).destroy(), m(N, this, void 0));
|
|
1417
1442
|
}
|
|
1418
|
-
function
|
|
1443
|
+
function jr(e) {
|
|
1419
1444
|
if (!Number.isFinite(e)) {
|
|
1420
|
-
m(
|
|
1445
|
+
m(yr, this, null);
|
|
1421
1446
|
return;
|
|
1422
1447
|
}
|
|
1423
|
-
let t = f(F, this,
|
|
1424
|
-
m(
|
|
1448
|
+
let t = f(F, this, Ir).call(this, p(j, this), e);
|
|
1449
|
+
m(yr, this, t > .1 ? t : null), p(hr, this) && cancelAnimationFrame(p(hr, this)), m(hr, this, requestAnimationFrame(() => {
|
|
1425
1450
|
p(j, this).currentTime = t;
|
|
1426
1451
|
}));
|
|
1427
1452
|
}
|
|
1428
|
-
function
|
|
1453
|
+
function Mr(e) {
|
|
1429
1454
|
var n = this;
|
|
1430
1455
|
return t(function* () {
|
|
1431
1456
|
var t;
|
|
1432
|
-
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(
|
|
1433
|
-
if (!p(
|
|
1457
|
+
let { time: r, playWhenReady: i = !0 } = e || {}, a = m(br, n, (t = p(br, n), ++t));
|
|
1458
|
+
if (!p(mr, n)) {
|
|
1434
1459
|
p(P, n).warn("No timeshift URL");
|
|
1435
1460
|
return;
|
|
1436
1461
|
}
|
|
1437
|
-
if (!p(N, n) && (yield f(F, n,
|
|
1438
|
-
m(
|
|
1462
|
+
if (!p(N, n) && (yield f(F, n, Dr).call(n), !f(F, n, Br).call(n, a))) return;
|
|
1463
|
+
m(_r, n, !1), m(vr, n, !1), p(N, n) && (!p(N, n).url || p(N, n).url !== p(mr, n)) && (p(P, n).debug("Loading timeshift URL", p(mr, n)), p(N, n).loadSource(p(mr, n)));
|
|
1439
1464
|
let o = n.muted;
|
|
1440
|
-
p(j, n).muted = !0, yield f(F, n,
|
|
1465
|
+
p(j, n).muted = !0, yield f(F, n, Nr).call(n), f(F, n, Br).call(n, a) && (f(F, n, jr).call(n, r), !(i && (yield n.play(), !f(F, n, Br).call(n, a))) && f(F, n, Pr).call(n, o, a));
|
|
1441
1466
|
})();
|
|
1442
1467
|
}
|
|
1443
|
-
function
|
|
1468
|
+
function Nr() {
|
|
1444
1469
|
return p(j, this).duration && !Number.isNaN(p(j, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1445
1470
|
p(P, this).debug("Waiting for duration...");
|
|
1446
1471
|
let t = () => {
|
|
@@ -1451,11 +1476,11 @@ function Tr() {
|
|
|
1451
1476
|
p(j, this).addEventListener("loadedmetadata", t);
|
|
1452
1477
|
});
|
|
1453
1478
|
}
|
|
1454
|
-
function
|
|
1479
|
+
function Pr(e, t) {
|
|
1455
1480
|
let n = HTMLMediaElement.HAVE_CURRENT_DATA, r = () => p(j, this).readyState >= n && p(j, this).videoWidth > 0 && p(j, this).videoHeight > 0, i = () => {
|
|
1456
|
-
p(
|
|
1481
|
+
p(_r, this) || p(vr, this) || !f(F, this, Br).call(this, t) || (m(vr, this, !0), p(P, this).debug("Revealing timeshift video"), p(M, this).classList.add("active"), p(M, this).style.opacity = "1", p(M, this).style.pointerEvents = "auto", p(j, this).dispatchEvent(new CustomEvent("timeshiftready", { detail: { activationId: t } })), e || f(F, this, Fr).call(this, t));
|
|
1457
1482
|
}, a = () => {
|
|
1458
|
-
p(
|
|
1483
|
+
p(_r, this) || p(vr, this) || !f(F, this, Br).call(this, t) || r() && (s(), i());
|
|
1459
1484
|
}, o = !1, s = () => {
|
|
1460
1485
|
o || (o = !0, p(j, this).removeEventListener("canplay", a), p(j, this).removeEventListener("canplaythrough", a), p(j, this).removeEventListener("loadeddata", a), clearTimeout(c));
|
|
1461
1486
|
};
|
|
@@ -1468,9 +1493,9 @@ function Er(e, t) {
|
|
|
1468
1493
|
p(P, this).debug("Timeout reached, forcing reveal"), s(), i();
|
|
1469
1494
|
}, 2e3);
|
|
1470
1495
|
}
|
|
1471
|
-
function
|
|
1496
|
+
function Fr(e) {
|
|
1472
1497
|
let t = () => {
|
|
1473
|
-
f(F, this,
|
|
1498
|
+
f(F, this, Br).call(this, e) && (p(j, this).muted = !1);
|
|
1474
1499
|
};
|
|
1475
1500
|
"requestVideoFrameCallback" in p(j, this) ? p(j, this).requestVideoFrameCallback(() => {
|
|
1476
1501
|
setTimeout(() => {
|
|
@@ -1480,43 +1505,43 @@ function Dr(e) {
|
|
|
1480
1505
|
t();
|
|
1481
1506
|
}, 120);
|
|
1482
1507
|
}
|
|
1483
|
-
function
|
|
1508
|
+
function Ir(e, t) {
|
|
1484
1509
|
let n = e.seekable;
|
|
1485
1510
|
if (!n || n.length === 0) return t;
|
|
1486
1511
|
let r = n.start(0), i = n.end(n.length - 1);
|
|
1487
1512
|
return p(P, this).debug("Clamped seekable:", Math.max(r, Math.min(t, i))), Math.max(r, Math.min(t, i));
|
|
1488
1513
|
}
|
|
1489
|
-
function
|
|
1490
|
-
for (let e of
|
|
1491
|
-
for (let e of
|
|
1492
|
-
p(j, this).addEventListener("timeupdate", p(
|
|
1514
|
+
function Lr() {
|
|
1515
|
+
for (let e of Vr._) p(j, this).addEventListener(e, p(Sr, this));
|
|
1516
|
+
for (let e of Hr._) p(j, this).addEventListener(e, p(Cr, this));
|
|
1517
|
+
p(j, this).addEventListener("timeupdate", p(wr, this)), p(j, this).addEventListener("progress", p(Tr, this));
|
|
1493
1518
|
}
|
|
1494
|
-
function
|
|
1495
|
-
for (let e of
|
|
1496
|
-
for (let e of
|
|
1497
|
-
p(j, this).removeEventListener("timeupdate", p(
|
|
1519
|
+
function Rr() {
|
|
1520
|
+
for (let e of Vr._) p(j, this).removeEventListener(e, p(Sr, this));
|
|
1521
|
+
for (let e of Hr._) p(j, this).removeEventListener(e, p(Cr, this));
|
|
1522
|
+
p(j, this).removeEventListener("timeupdate", p(wr, this)), p(j, this).removeEventListener("progress", p(Tr, this));
|
|
1498
1523
|
}
|
|
1499
|
-
function
|
|
1524
|
+
function zr(e) {
|
|
1500
1525
|
let t = e && (p(j, this).readyState < HTMLMediaElement.HAVE_FUTURE_DATA || p(j, this).seeking || p(j, this).paused && !this.userPaused);
|
|
1501
1526
|
p(j, this).dispatchEvent(new CustomEvent(t ? "hlsbuffering" : "hlsnotbuffering", {
|
|
1502
1527
|
bubbles: !0,
|
|
1503
1528
|
composed: !0
|
|
1504
1529
|
}));
|
|
1505
1530
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return p(
|
|
1531
|
+
function Br(e) {
|
|
1532
|
+
return p(br, this) === e;
|
|
1508
1533
|
}
|
|
1509
|
-
var
|
|
1534
|
+
var Vr = { _: [
|
|
1510
1535
|
"waiting",
|
|
1511
1536
|
"seeking",
|
|
1512
1537
|
"stalled",
|
|
1513
1538
|
"loadstart"
|
|
1514
|
-
] },
|
|
1539
|
+
] }, Hr = { _: [
|
|
1515
1540
|
"canplay",
|
|
1516
1541
|
"canplaythrough",
|
|
1517
1542
|
"seeked",
|
|
1518
1543
|
"loadeddata"
|
|
1519
|
-
] },
|
|
1544
|
+
] }, Ur = class {
|
|
1520
1545
|
constructor(e) {
|
|
1521
1546
|
this.vindral = e;
|
|
1522
1547
|
}
|
|
@@ -1536,19 +1561,19 @@ var Nr = { _: [
|
|
|
1536
1561
|
pause() {
|
|
1537
1562
|
this.vindral.pause();
|
|
1538
1563
|
}
|
|
1539
|
-
},
|
|
1540
|
-
|
|
1541
|
-
var
|
|
1564
|
+
}, Wr = document.createElement("template");
|
|
1565
|
+
Wr.innerHTML = "\n <style>\n :host {\n --value: 0;\n --range-thickness: var(--vindral-range-thickness, 4px);\n --range-hover-thickness: var(--vindral-range-hover-thickness, var(--range-thickness));\n --range-thumb-size: var(--vindral-range-thumb-size, 12px);\n --range-thumb-hover-size: var(--vindral-range-thumb-hover-size, var(--range-thumb-size));\n --range-fill-color: var(--vindral-range-fill-color, var(--fg-strong));\n --range-thumb-color: var(--vindral-range-thumb-color, var(--fg-strong));\n --_focus-box-shadow: none;\n height: calc(var(--button-icon-size) + 2 * var(--button-padding));\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 !important;\n margin: 0;\n position: relative;\n cursor: pointer;\n touch-action: none;\n box-shadow: var(--_focus-visible-box-shadow, none);\n outline: 0;\n background: transparent;\n }\n\n :host > * {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range {\n -webkit-appearance: none;\n appearance: none;\n\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n\n background-color: #00000000;\n outline: none;\n z-index: 1;\n cursor: pointer;\n }\n\n #range-track {\n position: absolute;\n top: calc(50% - calc(var(--range-thickness) / 2));\n left: 1px;\n width: calc(100% - 2px);\n height: var(--range-thickness);\n background-color: rgb(255 255 255 / 0.2);\n overflow: hidden;\n cursor: pointer;\n transition-property: height, top;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range-track {\n height: var(--range-hover-thickness);\n top: calc(50% - calc(var(--range-hover-thickness) / 2));\n }\n }\n\n #range-track::before {\n position: absolute;\n content: \"\";\n left: calc(-100%);\n top: 0;\n width: calc(100%);\n height: 100%;\n background: var(--range-fill-color);\n transition: background-color 300ms ease-out;\n transform-origin: 100% 0%;\n transform: translateX(calc(var(--value) * 100%)) scaleX(1.2);\n }\n\n #range::-webkit-slider-runnable-track {\n background: transparent;\n }\n\n #range::-moz-range-track {\n background: transparent;\n }\n\n #range::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n #range::-moz-range-thumb {\n -moz-appearance: none;\n appearance: none;\n width: var(--range-thumb-size);\n height: var(--range-thumb-size);\n border-radius: 50%;\n background: var(--range-thumb-color);\n cursor: pointer;\n z-index: 1;\n border: none;\n transition-property: width, height;\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n transition-duration: 0.1s;\n }\n\n :host:has(#range:focus-visible) {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) #range::-webkit-slider-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n\n :host(:hover) #range::-moz-range-thumb {\n width: var(--range-thumb-hover-size);\n height: var(--range-thumb-hover-size);\n }\n }\n </style>\n\n <input type=\"range\" id=\"range\" min=\"0\" max=\"1\" step=\"any\" value=\"0\" />\n <div id=\"range-track\"></div>\n";
|
|
1566
|
+
var Gr = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), qr = class extends HTMLElement {
|
|
1542
1567
|
constructor() {
|
|
1543
|
-
super(), d(this,
|
|
1568
|
+
super(), d(this, Gr, null), d(this, Kr, void 0), e(this, "range", void 0), m(Kr, this, this.attachShadow({ mode: "open" })), p(Kr, this).appendChild(Wr.content.cloneNode(!0)), this.range = p(Kr, this).getElementById("range");
|
|
1544
1569
|
}
|
|
1545
1570
|
connectedCallback() {
|
|
1546
1571
|
var e;
|
|
1547
|
-
m(
|
|
1572
|
+
m(Gr, this, this.closest("vindral-controller")), (e = p(Gr, this)) == null || e.connectListener(this), this.hasAttribute("disabled") || this.enable();
|
|
1548
1573
|
}
|
|
1549
1574
|
disconnectedCallback() {
|
|
1550
1575
|
var e;
|
|
1551
|
-
(e = p(
|
|
1576
|
+
(e = p(Gr, this)) == null || e.disconnectListener(this);
|
|
1552
1577
|
}
|
|
1553
1578
|
attributeChangedCallback(e, t, n) {
|
|
1554
1579
|
t !== n && (e === "disabled" && n ? this.disable() : this.enable(), this.updateBar());
|
|
@@ -1574,11 +1599,11 @@ var Lr = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), zr =
|
|
|
1574
1599
|
];
|
|
1575
1600
|
}
|
|
1576
1601
|
};
|
|
1577
|
-
e(
|
|
1602
|
+
e(qr, "observedAttributes", ["disabled"]);
|
|
1578
1603
|
//#endregion
|
|
1579
1604
|
//#region ../../libs/player-next/src/components/Controller.ts
|
|
1580
|
-
var
|
|
1581
|
-
|
|
1605
|
+
var Jr = document.createElement("template");
|
|
1606
|
+
Jr.innerHTML = `
|
|
1582
1607
|
<style>
|
|
1583
1608
|
:host {
|
|
1584
1609
|
--fg-strong: var(--vindral-fg-strong, #eeeeee);
|
|
@@ -1780,7 +1805,7 @@ Br.innerHTML = `
|
|
|
1780
1805
|
<slot id="overlay-interactive" name="overlay-interactive"></slot>
|
|
1781
1806
|
</div>
|
|
1782
1807
|
`;
|
|
1783
|
-
var
|
|
1808
|
+
var Yr = [
|
|
1784
1809
|
"ArrowDown",
|
|
1785
1810
|
"ArrowLeft",
|
|
1786
1811
|
"ArrowRight",
|
|
@@ -1789,18 +1814,18 @@ var Vr = [
|
|
|
1789
1814
|
" ",
|
|
1790
1815
|
"f",
|
|
1791
1816
|
"m"
|
|
1792
|
-
],
|
|
1817
|
+
], Xr = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), ei = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), ti = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), ni = /* @__PURE__ */ new WeakMap(), ri = /* @__PURE__ */ new WeakMap(), ii = /* @__PURE__ */ new WeakMap(), ai = /* @__PURE__ */ new WeakMap(), oi = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), si = /* @__PURE__ */ new WeakMap(), ci = /* @__PURE__ */ new WeakMap(), li = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), ui = /* @__PURE__ */ new WeakMap(), di = /* @__PURE__ */ new WeakMap(), fi = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), pi = /* @__PURE__ */ new WeakMap(), mi = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap(), gi = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakSet(), _i = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ci = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), Ti = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Di = /* @__PURE__ */ new WeakMap(), Oi = /* @__PURE__ */ new WeakMap(), ki = /* @__PURE__ */ new WeakMap(), Ai = /* @__PURE__ */ new WeakMap(), ji = /* @__PURE__ */ new WeakMap(), Mi = /* @__PURE__ */ new WeakMap(), Ni = /* @__PURE__ */ new WeakMap(), Pi = /* @__PURE__ */ new WeakMap(), Fi = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), Li = /* @__PURE__ */ new WeakMap(), Ri = /* @__PURE__ */ new WeakMap(), zi = /* @__PURE__ */ new WeakMap(), 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 = class extends HTMLElement {
|
|
1793
1818
|
constructor() {
|
|
1794
1819
|
var t;
|
|
1795
|
-
super(), h(this, H), d(this,
|
|
1820
|
+
super(), h(this, H), d(this, Xr, /* @__PURE__ */ new Map()), d(this, Zr, 2e3), d(this, Qr, null), d(this, $r, null), d(this, ei, void 0), d(this, I, void 0), d(this, L, void 0), d(this, ti, void 0), d(this, R, void 0), d(this, ni, Ia._), d(this, ri, void 0), d(this, ii, void 0), d(this, ai, void 0), d(this, oi, void 0), d(this, z, void 0), d(this, si, void 0), d(this, ci, void 0), d(this, li, void 0), d(this, B, void 0), d(this, ui, void 0), d(this, di, void 0), d(this, fi, void 0), d(this, V, void 0), d(this, pi, null), d(this, mi, !1), d(this, hi, null), d(this, gi, void 0), d(this, _i, (e) => {
|
|
1796
1821
|
let t = e.filter((e) => {
|
|
1797
1822
|
var t;
|
|
1798
1823
|
return (t = e.video) == null ? void 0 : t.width;
|
|
1799
1824
|
});
|
|
1800
1825
|
f(H, this, U).call(this, _.RENDITION_LEVELS, JSON.stringify(t));
|
|
1801
|
-
}), d(this,
|
|
1826
|
+
}), d(this, vi, (e) => {
|
|
1802
1827
|
f(H, this, U).call(this, _.RENDITION_LEVEL, JSON.stringify(e));
|
|
1803
|
-
}), d(this,
|
|
1828
|
+
}), d(this, yi, (e) => {
|
|
1804
1829
|
switch (e) {
|
|
1805
1830
|
case "playing":
|
|
1806
1831
|
f(H, this, W).call(this, _.PAUSED), f(H, this, W).call(this, _.BUFFERING);
|
|
@@ -1813,101 +1838,101 @@ var Vr = [
|
|
|
1813
1838
|
break;
|
|
1814
1839
|
default: break;
|
|
1815
1840
|
}
|
|
1816
|
-
}), d(this,
|
|
1841
|
+
}), d(this, bi, (e) => {
|
|
1817
1842
|
f(H, this, U).call(this, _.VOLUME, e.volume.toString()), e.isMuted ? f(H, this, U).call(this, _.MUTED, "") : f(H, this, W).call(this, _.MUTED);
|
|
1818
|
-
}), d(this,
|
|
1843
|
+
}), d(this, xi, ({ channelId: e }) => {
|
|
1819
1844
|
var t;
|
|
1820
1845
|
this.setAttribute(_.CHANNEL_ID, e), ((t = p(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && f(H, this, W).call(this, _.BUFFERING);
|
|
1821
|
-
}), d(this,
|
|
1846
|
+
}), d(this, Si, ({ channelId: e }) => {
|
|
1822
1847
|
var t;
|
|
1823
|
-
p(
|
|
1824
|
-
}), d(this,
|
|
1825
|
-
m(
|
|
1826
|
-
}), d(this,
|
|
1848
|
+
p(ri, this) !== e && this.setAttribute(_.CHANNEL_ID, e), ((t = p(I, this)) == null ? void 0 : t.playbackState) !== "buffering" && f(H, this, W).call(this, _.BUFFERING);
|
|
1849
|
+
}), d(this, Ci, (e) => {
|
|
1850
|
+
m(Gi, this, Date.now()), f(H, this, U).call(this, _.CHANNELS, JSON.stringify(e));
|
|
1851
|
+
}), d(this, wi, (e) => {
|
|
1827
1852
|
var t;
|
|
1828
1853
|
f(H, this, U).call(this, _.LANGUAGES, JSON.stringify(e)), (t = p(I, this)) != null && t.language && f(H, this, U).call(this, _.LANGUAGE, p(I, this).language);
|
|
1829
|
-
}), d(this,
|
|
1854
|
+
}), d(this, Ti, (e) => {
|
|
1830
1855
|
var t;
|
|
1831
1856
|
if (f(H, this, U).call(this, _.TEXT_TRACKS, JSON.stringify(e)), (t = p(I, this)) != null && t.textTrack) {
|
|
1832
1857
|
var n, r;
|
|
1833
1858
|
f(H, this, U).call(this, _.TEXT_TRACK, (n = (r = p(I, this)) == null ? void 0 : r.textTrack) == null ? "" : n);
|
|
1834
1859
|
}
|
|
1835
|
-
}), d(this,
|
|
1860
|
+
}), d(this, Ei, (e) => {
|
|
1836
1861
|
e != null && e.forVideo ? (f(H, this, U).call(this, _.NEEDS_USER_INPUT_VIDEO, ""), f(H, this, W).call(this, _.NEEDS_USER_INPUT_AUDIO)) : e != null && e.forAudio && (f(H, this, U).call(this, _.NEEDS_USER_INPUT_AUDIO, ""), f(H, this, W).call(this, _.NEEDS_USER_INPUT_VIDEO));
|
|
1837
|
-
}), d(this,
|
|
1862
|
+
}), d(this, Di, (e) => {
|
|
1838
1863
|
e || f(H, this, W).call(this, _.BUFFERING);
|
|
1839
|
-
}), d(this,
|
|
1864
|
+
}), d(this, Oi, (e) => {
|
|
1840
1865
|
var t;
|
|
1841
1866
|
let { urls: n, duration: r } = e;
|
|
1842
1867
|
if (!n[0] || !p(R, this)) return;
|
|
1843
1868
|
let i = new URL(n[0]);
|
|
1844
|
-
i.searchParams.set("channelId", (t = p(
|
|
1869
|
+
i.searchParams.set("channelId", (t = p(ri, this)) == null ? "" : t);
|
|
1845
1870
|
let a = this.getAttribute("authentication-token");
|
|
1846
1871
|
a && i.searchParams.set("authToken", a);
|
|
1847
|
-
let o =
|
|
1872
|
+
let o = rr(r);
|
|
1848
1873
|
if (Number.isNaN(o)) {
|
|
1849
1874
|
p(V, this).error(`Invalid duration format: ${r}`);
|
|
1850
1875
|
return;
|
|
1851
1876
|
}
|
|
1852
1877
|
let s = Math.floor(Date.now() / 1e3), c = (/* @__PURE__ */ new Date((s - o) * 1e3)).toISOString();
|
|
1853
1878
|
i.searchParams.set("from", c), p(R, this).setTimeshiftUrl(i.toString()), f(H, this, U).call(this, _.DURATION, o.toString());
|
|
1854
|
-
}), d(this,
|
|
1879
|
+
}), d(this, ki, () => {
|
|
1855
1880
|
f(H, this, W).call(this, _.PAUSED), f(H, this, W).call(this, _.BUFFERING);
|
|
1856
|
-
}), d(this,
|
|
1881
|
+
}), d(this, Ai, () => {
|
|
1857
1882
|
f(H, this, U).call(this, _.PAUSED, ""), f(H, this, W).call(this, _.BUFFERING);
|
|
1858
|
-
}), d(this,
|
|
1859
|
-
p(
|
|
1860
|
-
}), d(this,
|
|
1883
|
+
}), d(this, ji, () => {
|
|
1884
|
+
p(Hi, this).call(this), f(H, this, W).call(this, _.BUFFERING);
|
|
1885
|
+
}), d(this, Mi, () => {
|
|
1861
1886
|
if (!p(R, this)) return;
|
|
1862
1887
|
let e = p(R, this).duration;
|
|
1863
1888
|
f(H, this, U).call(this, _.DURATION, Number.isNaN(e) ? "0" : e.toString());
|
|
1864
|
-
}), d(this,
|
|
1889
|
+
}), d(this, Ni, () => {
|
|
1865
1890
|
var e, t;
|
|
1866
1891
|
if (!p(R, this) || p(R, this).seeking || (e = (t = p(R, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
1867
1892
|
let n = p(R, this).currentTime;
|
|
1868
1893
|
n !== void 0 && f(H, this, U).call(this, _.TIMESHIFT_POSITION, n.toString());
|
|
1869
|
-
}), d(this,
|
|
1894
|
+
}), d(this, Pi, () => {
|
|
1870
1895
|
p(R, this) && (f(H, this, U).call(this, _.VOLUME, p(R, this).volume.toString()), p(R, this).muted ? f(H, this, U).call(this, _.MUTED, "") : f(H, this, W).call(this, _.MUTED));
|
|
1871
|
-
}), d(this,
|
|
1896
|
+
}), d(this, Fi, () => {
|
|
1872
1897
|
f(H, this, U).call(this, _.BUFFERING, "");
|
|
1873
|
-
}), d(this,
|
|
1898
|
+
}), d(this, Ii, () => {
|
|
1874
1899
|
f(H, this, W).call(this, _.BUFFERING);
|
|
1875
|
-
}), d(this,
|
|
1876
|
-
if (p(
|
|
1900
|
+
}), d(this, Li, () => {
|
|
1901
|
+
if (p(mi, this)) {
|
|
1877
1902
|
if (p(L, this) !== p(R, this)) {
|
|
1878
|
-
m(
|
|
1903
|
+
m(mi, this, !1);
|
|
1879
1904
|
return;
|
|
1880
1905
|
}
|
|
1881
|
-
m(
|
|
1906
|
+
m(mi, this, !1), f(H, this, Ea).call(this);
|
|
1882
1907
|
}
|
|
1883
|
-
}), d(this,
|
|
1908
|
+
}), d(this, Ri, 0), e(this, "handleEvent", (e) => {
|
|
1884
1909
|
switch (e.type) {
|
|
1885
1910
|
case "pointerdown":
|
|
1886
|
-
m(
|
|
1911
|
+
m(Ri, this, e.timeStamp);
|
|
1887
1912
|
break;
|
|
1888
1913
|
case "pointermove":
|
|
1889
|
-
f(H, this,
|
|
1914
|
+
f(H, this, ha).call(this, e);
|
|
1890
1915
|
break;
|
|
1891
1916
|
case "pointerup":
|
|
1892
|
-
f(H, this,
|
|
1917
|
+
f(H, this, ga).call(this, e);
|
|
1893
1918
|
break;
|
|
1894
1919
|
case "mouseleave":
|
|
1895
|
-
f(H, this,
|
|
1920
|
+
f(H, this, wa).call(this);
|
|
1896
1921
|
break;
|
|
1897
1922
|
case "dblclick":
|
|
1898
|
-
f(H, this,
|
|
1923
|
+
f(H, this, va).call(this, e);
|
|
1899
1924
|
break;
|
|
1900
1925
|
case "mousemove":
|
|
1901
|
-
f(H, this,
|
|
1926
|
+
f(H, this, ya).call(this, e);
|
|
1902
1927
|
break;
|
|
1903
1928
|
case "keydown":
|
|
1904
|
-
p(
|
|
1929
|
+
p(Vi, this).call(this, e);
|
|
1905
1930
|
break;
|
|
1906
1931
|
case "keyup":
|
|
1907
|
-
f(H, this,
|
|
1932
|
+
f(H, this, wa).call(this), p(Bi, this).call(this, e);
|
|
1908
1933
|
break;
|
|
1909
1934
|
}
|
|
1910
|
-
}), d(this,
|
|
1935
|
+
}), d(this, zi, (e) => {
|
|
1911
1936
|
if (p(I, this) && (p(V, this).debug("Vindral event", { type: e.type }), e instanceof CustomEvent)) switch (e.type) {
|
|
1912
1937
|
case v.PLAY:
|
|
1913
1938
|
this.removeAttribute(_.PAUSED);
|
|
@@ -1952,10 +1977,10 @@ var Vr = [
|
|
|
1952
1977
|
}
|
|
1953
1978
|
break;
|
|
1954
1979
|
case v.CHANNEL_GRID_OPENED:
|
|
1955
|
-
p(
|
|
1980
|
+
p(pi, this) === null && f(H, this, xa).call(this);
|
|
1956
1981
|
break;
|
|
1957
1982
|
case v.CHANNEL_GRID_CLOSED:
|
|
1958
|
-
p(
|
|
1983
|
+
p(pi, this) !== null && (clearTimeout(p(pi, this)), m(pi, this, null));
|
|
1959
1984
|
break;
|
|
1960
1985
|
case v.ENTER_PIP:
|
|
1961
1986
|
this.setAttribute(_.IS_PIP, "");
|
|
@@ -1965,7 +1990,7 @@ var Vr = [
|
|
|
1965
1990
|
break;
|
|
1966
1991
|
case v.REQUEST_AIRPLAY:
|
|
1967
1992
|
var t;
|
|
1968
|
-
(t = p(
|
|
1993
|
+
(t = p(li, this)) == null || t.showPlaybackTargetPicker();
|
|
1969
1994
|
break;
|
|
1970
1995
|
case v.SET_LANGUAGE:
|
|
1971
1996
|
y(e.detail) ? this.setAttribute(_.LANGUAGE, e.detail) : this.removeAttribute(_.LANGUAGE);
|
|
@@ -1986,74 +2011,76 @@ var Vr = [
|
|
|
1986
2011
|
this.handleTimeShiftUpdate(String(e.detail));
|
|
1987
2012
|
break;
|
|
1988
2013
|
case v.GO_LIVE:
|
|
1989
|
-
p(
|
|
2014
|
+
p(Hi, this).call(this);
|
|
1990
2015
|
break;
|
|
1991
2016
|
case v.TOGGLE_DEBUG_PANEL:
|
|
1992
2017
|
this.hasAttribute(_.DEBUG_PANEL_OPEN) ? this.removeAttribute(_.DEBUG_PANEL_OPEN) : this.setAttribute(_.DEBUG_PANEL_OPEN, "");
|
|
1993
2018
|
break;
|
|
1994
2019
|
case v.SET_TARGET_BUFFER_TIME:
|
|
1995
2020
|
{
|
|
1996
|
-
let t = Math.max(50, Math.min(
|
|
2021
|
+
let t = Math.max(50, Math.min(Ce, e.detail));
|
|
1997
2022
|
this.setAttribute("target-buffer-time", String(t));
|
|
1998
2023
|
}
|
|
1999
2024
|
break;
|
|
2000
2025
|
}
|
|
2001
|
-
}), d(this,
|
|
2026
|
+
}), d(this, Bi, (e) => {
|
|
2002
2027
|
let { key: t } = e;
|
|
2003
|
-
if (!
|
|
2028
|
+
if (!Yr.includes(t)) {
|
|
2004
2029
|
this.removeEventListener("keyup", this);
|
|
2005
2030
|
return;
|
|
2006
2031
|
}
|
|
2007
|
-
f(H, this,
|
|
2008
|
-
}), d(this,
|
|
2032
|
+
f(H, this, ba).call(this, e);
|
|
2033
|
+
}), d(this, Vi, (e) => {
|
|
2009
2034
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
2010
|
-
t || n || !
|
|
2011
|
-
}), d(this,
|
|
2035
|
+
t || n || !Yr.includes(r) || this.addEventListener("keyup", this, { once: !0 });
|
|
2036
|
+
}), d(this, Hi, () => {
|
|
2012
2037
|
this.removeAttribute(_.TIMESHIFT_POSITION), this.handleTimeShiftUpdate(!1);
|
|
2013
|
-
}), d(this,
|
|
2038
|
+
}), d(this, Ui, (e) => {
|
|
2014
2039
|
var t;
|
|
2015
|
-
p(R, this) || f(H, this,
|
|
2016
|
-
}), d(this,
|
|
2040
|
+
p(R, this) || f(H, this, ea).call(this), p(L, this) !== p(R, this) && (e && f(H, this, Da).call(this), m(L, this, p(R, this)), f(H, this, Qi).call(this), f(H, this, $i).call(this), f(H, this, ia).call(this), (t = p(I, this)) == null || t.pause(), m(mi, this, e));
|
|
2041
|
+
}), d(this, Wi, (e) => {
|
|
2017
2042
|
var t, n, r, i;
|
|
2018
|
-
e && f(H, this,
|
|
2019
|
-
f(H, this,
|
|
2043
|
+
e && f(H, this, Da).call(this), (t = p(R, this)) == null || t.hide(), m(L, this, p(ti, this)), f(H, this, ia).call(this), this.hasAttribute(_.PAUSED) ? (n = p(L, this)) == null || n.pause() : (r = p(L, this)) == null || r.play(), f(H, this, na).call(this), f(H, this, Zi).call(this), (i = p(R, this)) == null || i.pause(), e && (m(mi, this, !1), setTimeout(() => {
|
|
2044
|
+
f(H, this, Ea).call(this);
|
|
2020
2045
|
}, 100));
|
|
2021
2046
|
}), e(this, "handleTimeShiftUpdate", (e) => {
|
|
2022
2047
|
let t = this.hasAttribute(_.IS_PIP);
|
|
2023
2048
|
if (e !== !1) {
|
|
2024
2049
|
var n;
|
|
2025
|
-
p(
|
|
2050
|
+
p(Ui, this).call(this, t), (n = p(R, this)) == null || n.seek({
|
|
2026
2051
|
time: parseFloat(e),
|
|
2027
2052
|
playWhenReady: !this.hasAttribute(_.PAUSED)
|
|
2028
2053
|
});
|
|
2029
2054
|
return;
|
|
2030
2055
|
}
|
|
2031
|
-
p(L, this) !== p(
|
|
2032
|
-
}), d(this,
|
|
2056
|
+
p(L, this) !== p(ti, this) && p(Wi, this).call(this, t);
|
|
2057
|
+
}), d(this, Gi, null), d(this, Ki, () => {
|
|
2033
2058
|
var e;
|
|
2034
2059
|
let t = (e = p(I, this)) == null ? void 0 : e.currentRenditionLevel;
|
|
2035
2060
|
if (!(t != null && t.video)) return;
|
|
2036
|
-
let n =
|
|
2061
|
+
let n = o(t.video.width > t.video.height ? "landscape-primary" : "portrait-primary");
|
|
2037
2062
|
n && n.catch(() => {});
|
|
2038
|
-
}), d(this,
|
|
2039
|
-
|
|
2040
|
-
}), d(this,
|
|
2041
|
-
let
|
|
2042
|
-
|
|
2063
|
+
}), d(this, qi, () => {
|
|
2064
|
+
n();
|
|
2065
|
+
}), d(this, Ji, null);
|
|
2066
|
+
let r = this.attachShadow({ mode: "open" });
|
|
2067
|
+
r.appendChild(Jr.content.cloneNode(!0));
|
|
2068
|
+
let i = _e(this.getAttribute("log-level"));
|
|
2069
|
+
m(V, this, ie.get().createContext("VindralController")), p(V, this).setLevel(i), m(ei, this, (t = this.shadowRoot) == null ? void 0 : t.querySelector("#time-shift-video")), m(gi, this, new Wn(r));
|
|
2043
2070
|
}
|
|
2044
2071
|
connectedCallback() {
|
|
2045
2072
|
var e = this;
|
|
2046
2073
|
return t(function* () {
|
|
2047
|
-
x(e.getAttribute("auto-instance-enabled"), !0) && (yield f(H, e,
|
|
2048
|
-
for (let t of Object.values(v)) e.addEventListener(t, p(
|
|
2049
|
-
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), f(H, e,
|
|
2074
|
+
x(e.getAttribute("auto-instance-enabled"), !0) && (yield f(H, e, Xi).call(e));
|
|
2075
|
+
for (let t of Object.values(v)) e.addEventListener(t, p(zi, e));
|
|
2076
|
+
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), f(H, e, pa).call(e), e.tabIndex = 0, e.focus({ preventScroll: !0 });
|
|
2050
2077
|
})();
|
|
2051
2078
|
}
|
|
2052
2079
|
disconnectedCallback() {
|
|
2053
2080
|
var e, t, n, r, i;
|
|
2054
|
-
f(H, this,
|
|
2055
|
-
for (let e of Object.values(v)) this.removeEventListener(e, p(
|
|
2056
|
-
f(H, this,
|
|
2081
|
+
f(H, this, ma).call(this), f(H, this, Pa).call(this), p(gi, this).unload(), (e = p(I, this)) == null || e.unload(), (t = p(z, this)) == null || t.unload(), (n = p(si, this)) == null || n.unload(), (r = p(ci, this)) == null || r.unload(), (i = p(B, this)) == null || i.unload(), f(H, this, ta).call(this);
|
|
2082
|
+
for (let e of Object.values(v)) this.removeEventListener(e, p(zi, this));
|
|
2083
|
+
f(H, this, Qi).call(this), p(Qr, this) && (clearTimeout(p(Qr, this)), m(Qr, this, null)), this.disconnectListener(this);
|
|
2057
2084
|
}
|
|
2058
2085
|
attributeChangedCallback(e, t, n) {
|
|
2059
2086
|
if (t !== n) {
|
|
@@ -2063,13 +2090,13 @@ var Vr = [
|
|
|
2063
2090
|
newValue: n
|
|
2064
2091
|
}), e) {
|
|
2065
2092
|
case "channel-id":
|
|
2066
|
-
m(
|
|
2093
|
+
m(ri, this, n), p(I, this) && n && (p(I, this).channelId = n, p(I, this).play(), f(H, this, U).call(this, _.BUFFERING, ""), f(H, this, U).call(this, _.CHANNEL_ID, n), f(H, this, U).call(this, _.POSTER_SRC, p(I, this).getThumbnailUrl()));
|
|
2067
2094
|
break;
|
|
2068
2095
|
case "channel-group-id":
|
|
2069
|
-
m(
|
|
2096
|
+
m(ii, this, n);
|
|
2070
2097
|
break;
|
|
2071
2098
|
case "url":
|
|
2072
|
-
n && m(
|
|
2099
|
+
n && m(ni, this, n);
|
|
2073
2100
|
break;
|
|
2074
2101
|
case "paused":
|
|
2075
2102
|
if (y(n)) {
|
|
@@ -2099,7 +2126,7 @@ var Vr = [
|
|
|
2099
2126
|
}
|
|
2100
2127
|
break;
|
|
2101
2128
|
case _.DEBUG_PANEL_OPEN:
|
|
2102
|
-
y(n) ? f(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : f(H, this, W).call(this, _.DEBUG_PANEL_OPEN), f(H, this,
|
|
2129
|
+
y(n) ? f(H, this, U).call(this, _.DEBUG_PANEL_OPEN, "") : f(H, this, W).call(this, _.DEBUG_PANEL_OPEN), f(H, this, Ma).call(this);
|
|
2103
2130
|
break;
|
|
2104
2131
|
case "user-interacting":
|
|
2105
2132
|
y(n) ? f(H, this, U).call(this, _.USER_INTERACTING, "") : f(H, this, W).call(this, _.USER_INTERACTING);
|
|
@@ -2120,10 +2147,10 @@ var Vr = [
|
|
|
2120
2147
|
}
|
|
2121
2148
|
break;
|
|
2122
2149
|
case "ui-locked":
|
|
2123
|
-
y(n) ? f(H, this,
|
|
2150
|
+
y(n) ? f(H, this, Ca).call(this) : f(H, this, wa).call(this);
|
|
2124
2151
|
break;
|
|
2125
2152
|
case "is-fullscreen":
|
|
2126
|
-
y(n) ? f(H, this,
|
|
2153
|
+
y(n) ? f(H, this, Oa).call(this) : f(H, this, ka).call(this);
|
|
2127
2154
|
break;
|
|
2128
2155
|
case "abr-enabled":
|
|
2129
2156
|
{
|
|
@@ -2138,13 +2165,13 @@ var Vr = [
|
|
|
2138
2165
|
}
|
|
2139
2166
|
break;
|
|
2140
2167
|
case "max-video-bit-rate":
|
|
2141
|
-
m(
|
|
2168
|
+
m(ai, this, n), y(n) ? f(H, this, U).call(this, _.MAX_VIDEO_BITRATE, n) : f(H, this, W).call(this, _.MAX_VIDEO_BITRATE), p(R, this) && (p(R, this).maxVideoBitRate = n ? g(n) : void 0);
|
|
2142
2169
|
break;
|
|
2143
2170
|
case "max-initial-bit-rate":
|
|
2144
|
-
m(
|
|
2171
|
+
m(oi, this, n), y(n) ? f(H, this, U).call(this, _.MAX_INITIAL_BITRATE, n) : f(H, this, W).call(this, _.MAX_INITIAL_BITRATE);
|
|
2145
2172
|
break;
|
|
2146
2173
|
case "is-pip":
|
|
2147
|
-
y(n) ? f(H, this,
|
|
2174
|
+
y(n) ? f(H, this, Ea).call(this) : f(H, this, Da).call(this);
|
|
2148
2175
|
break;
|
|
2149
2176
|
case "is-airplaying":
|
|
2150
2177
|
if (y(n)) {
|
|
@@ -2158,17 +2185,17 @@ var Vr = [
|
|
|
2158
2185
|
case "is-casting":
|
|
2159
2186
|
if (y(n)) {
|
|
2160
2187
|
var te, u;
|
|
2161
|
-
(te = p(
|
|
2188
|
+
(te = p(si, this)) != null && te.isFullscreen() && f(H, this, ka).call(this), (u = p(I, this)) == null || u.pause();
|
|
2162
2189
|
} else if (!document.hidden) {
|
|
2163
2190
|
var ne;
|
|
2164
2191
|
(ne = p(I, this)) == null || ne.play();
|
|
2165
2192
|
}
|
|
2166
2193
|
break;
|
|
2167
2194
|
case "cast-receiver-id":
|
|
2168
|
-
m(
|
|
2195
|
+
m(di, this, n);
|
|
2169
2196
|
break;
|
|
2170
2197
|
case "cast-background":
|
|
2171
|
-
m(
|
|
2198
|
+
m(fi, this, n);
|
|
2172
2199
|
break;
|
|
2173
2200
|
case "language":
|
|
2174
2201
|
p(I, this) && (p(I, this).language = n, y(n) ? f(H, this, U).call(this, _.LANGUAGE, n) : f(H, this, W).call(this, _.LANGUAGE));
|
|
@@ -2177,12 +2204,12 @@ var Vr = [
|
|
|
2177
2204
|
p(I, this) && (p(I, this).textTrack = n, y(n) ? f(H, this, U).call(this, _.TEXT_TRACK, n) : f(H, this, W).call(this, _.TEXT_TRACK));
|
|
2178
2205
|
break;
|
|
2179
2206
|
case "log-level":
|
|
2180
|
-
y(n) && p(V, this).setLevel(
|
|
2207
|
+
y(n) && p(V, this).setLevel(_e(n));
|
|
2181
2208
|
break;
|
|
2182
2209
|
case "authentication-token":
|
|
2183
2210
|
if (y(n)) {
|
|
2184
2211
|
var re, ie;
|
|
2185
|
-
(re = p(I, this)) == null || re.updateAuthenticationToken(n), (ie = p(
|
|
2212
|
+
(re = p(I, this)) == null || re.updateAuthenticationToken(n), (ie = p(li, this)) == null || ie.updateAuthenticationToken(n), f(H, this, U).call(this, _.AUTHENTICATION_TOKEN, n);
|
|
2186
2213
|
} else f(H, this, W).call(this, _.AUTHENTICATION_TOKEN);
|
|
2187
2214
|
break;
|
|
2188
2215
|
case "volume":
|
|
@@ -2199,7 +2226,7 @@ var Vr = [
|
|
|
2199
2226
|
break;
|
|
2200
2227
|
case "drm-headers":
|
|
2201
2228
|
if (y(n)) {
|
|
2202
|
-
let e =
|
|
2229
|
+
let e = ye(n);
|
|
2203
2230
|
if (e) {
|
|
2204
2231
|
var ae;
|
|
2205
2232
|
(ae = p(I, this)) == null || ae.drm.setHeaders(e);
|
|
@@ -2208,7 +2235,7 @@ var Vr = [
|
|
|
2208
2235
|
break;
|
|
2209
2236
|
case "drm-queryparams":
|
|
2210
2237
|
if (y(n)) {
|
|
2211
|
-
let e =
|
|
2238
|
+
let e = ye(n);
|
|
2212
2239
|
if (e) {
|
|
2213
2240
|
var oe;
|
|
2214
2241
|
(oe = p(I, this)) == null || oe.drm.setQueryParams(e);
|
|
@@ -2220,13 +2247,13 @@ var Vr = [
|
|
|
2220
2247
|
_.USER_INTERACTING,
|
|
2221
2248
|
_.PAUSED,
|
|
2222
2249
|
_.HIDE_UI_ON_PAUSE
|
|
2223
|
-
].includes(e) && f(H, this,
|
|
2250
|
+
].includes(e) && f(H, this, Ta).call(this);
|
|
2224
2251
|
}
|
|
2225
2252
|
}
|
|
2226
2253
|
connectListener(e) {
|
|
2227
|
-
|
|
2228
|
-
let n = p(
|
|
2229
|
-
switch (n ? n.push(e) : p(
|
|
2254
|
+
nr(e).forEach((t) => {
|
|
2255
|
+
let n = p(Xr, this).get(t);
|
|
2256
|
+
switch (n ? n.push(e) : p(Xr, this).set(t, [e]), t) {
|
|
2230
2257
|
case _.PAUSED:
|
|
2231
2258
|
var r;
|
|
2232
2259
|
(((r = p(I, this)) == null ? void 0 : r.playbackState) === "paused" || this.hasAttribute(_.PAUSED)) && e.setAttribute(_.PAUSED, "");
|
|
@@ -2236,7 +2263,7 @@ var Vr = [
|
|
|
2236
2263
|
((i = p(I, this)) != null && i.muted || this.hasAttribute(_.MUTED)) && e.setAttribute(_.MUTED, "");
|
|
2237
2264
|
break;
|
|
2238
2265
|
case _.MAX_VIDEO_BITRATE:
|
|
2239
|
-
p(
|
|
2266
|
+
p(ai, this) && e.setAttribute(_.MAX_VIDEO_BITRATE, p(ai, this));
|
|
2240
2267
|
break;
|
|
2241
2268
|
case _.SIZE_BASED_RESOLUTION_CAP_ENABLED:
|
|
2242
2269
|
{
|
|
@@ -2246,10 +2273,10 @@ var Vr = [
|
|
|
2246
2273
|
}
|
|
2247
2274
|
break;
|
|
2248
2275
|
case _.CHANNEL_ID:
|
|
2249
|
-
p(
|
|
2276
|
+
p(ri, this) && e.setAttribute(_.CHANNEL_ID, p(ri, this));
|
|
2250
2277
|
break;
|
|
2251
2278
|
case _.CHANNEL_GROUP_ID:
|
|
2252
|
-
p(
|
|
2279
|
+
p(ii, this) && e.setAttribute(_.CHANNEL_GROUP_ID, p(ii, this));
|
|
2253
2280
|
break;
|
|
2254
2281
|
case _.AUTHENTICATION_TOKEN: {
|
|
2255
2282
|
let t = this.getAttribute("authentication-token");
|
|
@@ -2285,54 +2312,54 @@ var Vr = [
|
|
|
2285
2312
|
});
|
|
2286
2313
|
}
|
|
2287
2314
|
disconnectListener(e) {
|
|
2288
|
-
|
|
2289
|
-
let n = p(
|
|
2290
|
-
n && p(
|
|
2315
|
+
nr(e).forEach((t) => {
|
|
2316
|
+
let n = p(Xr, this).get(t);
|
|
2317
|
+
n && p(Xr, this).set(t, n.filter((t) => t !== e));
|
|
2291
2318
|
});
|
|
2292
2319
|
}
|
|
2293
2320
|
get instance() {
|
|
2294
2321
|
return p(I, this);
|
|
2295
2322
|
}
|
|
2296
2323
|
get fullscreen() {
|
|
2297
|
-
return f(H, this,
|
|
2324
|
+
return f(H, this, sa).call(this);
|
|
2298
2325
|
}
|
|
2299
2326
|
get airPlay() {
|
|
2300
|
-
return p(
|
|
2327
|
+
return p(li, this);
|
|
2301
2328
|
}
|
|
2302
2329
|
get timelineMarkers() {
|
|
2303
|
-
return
|
|
2330
|
+
return ur(this.getAttribute(_.TIMELINE_MARKERS));
|
|
2304
2331
|
}
|
|
2305
2332
|
set timelineMarkers(e) {
|
|
2306
|
-
let t =
|
|
2333
|
+
let t = lr(e);
|
|
2307
2334
|
t.length === 0 ? this.removeAttribute(_.TIMELINE_MARKERS) : this.setAttribute(_.TIMELINE_MARKERS, JSON.stringify(t));
|
|
2308
2335
|
}
|
|
2309
2336
|
connect() {
|
|
2310
|
-
f(H, this,
|
|
2337
|
+
f(H, this, Xi).call(this);
|
|
2311
2338
|
}
|
|
2312
2339
|
};
|
|
2313
|
-
function
|
|
2340
|
+
function Xi() {
|
|
2314
2341
|
var e = this;
|
|
2315
2342
|
return t(function* () {
|
|
2316
2343
|
var t, n;
|
|
2317
|
-
if (!p(
|
|
2318
|
-
let r = p(L, e) === p(
|
|
2344
|
+
if (!p(ri, e)) return;
|
|
2345
|
+
let r = p(L, e) === p(ti, e);
|
|
2319
2346
|
yield (t = p(I, e)) == null ? void 0 : t.unload(), r && m(L, e, void 0);
|
|
2320
|
-
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = g(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c =
|
|
2321
|
-
headers:
|
|
2322
|
-
queryParams:
|
|
2347
|
+
let i = e.hasAttribute(_.PAUSED), a = e.hasAttribute(_.MUTED), o = g(e.getAttribute(_.VOLUME)), s = typeof o == "number" ? Math.max(0, Math.min(1, o)) : o, c = ve(e.getAttribute(_.MEDIA)), ee = e.getAttribute(_.TEXT_TRACK) || void 0, l = e.getAttribute("edge-url") || void 0, te = e.getAttribute("authentication-token") || void 0, u = g(e.getAttribute("max-video-bit-rate")), ne = g(e.getAttribute("max-initial-bit-rate")), re = we(e.getAttribute("max-size")), ie = g(e.getAttribute("min-buffer-time")), ae = g(e.getAttribute("max-buffer-time")), se = x(e.getAttribute("burst-enabled")), ce = x(e.getAttribute("mse-enabled")), le = x(e.getAttribute("mse-opus-enabled")), ue = x(e.getAttribute("ios-background-play-enabled")), d = x(e.getAttribute("ios-wake-lock-enabled")), h = x(e.getAttribute("stream-to-media-element-enabled")), de = x(e.getAttribute("ios-media-element-enabled")), fe = x(e.getAttribute("abr-enabled"), !0), pe = x(e.getAttribute("size-based-resolution-cap-enabled")), me = x(e.getAttribute("telemetry-enabled")), he = be(e.getAttribute("video-codecs")), v = Se(e.getAttribute("poster")), b = ge(e.getAttribute("advanced")), S = _e(e.getAttribute("log-level")), Ce = {
|
|
2348
|
+
headers: ye(e.getAttribute("drm-headers")),
|
|
2349
|
+
queryParams: ye(e.getAttribute("drm-queryparams")),
|
|
2323
2350
|
widevine: {
|
|
2324
|
-
videoRobustness:
|
|
2325
|
-
audioRobustness:
|
|
2351
|
+
videoRobustness: xe(e.getAttribute("drm-widevine-video-robustness")),
|
|
2352
|
+
audioRobustness: xe(e.getAttribute("drm-widevine-audio-robustness"))
|
|
2326
2353
|
},
|
|
2327
2354
|
playready: {
|
|
2328
|
-
videoRobustness:
|
|
2329
|
-
audioRobustness:
|
|
2355
|
+
videoRobustness: xe(e.getAttribute("drm-playready-video-robustness")),
|
|
2356
|
+
audioRobustness: xe(e.getAttribute("drm-playready-audio-robustness"))
|
|
2330
2357
|
}
|
|
2331
|
-
}, Te =
|
|
2358
|
+
}, 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 = g(e.getAttribute("reconnect-retries")), Me = ke === void 0 ? void 0 : (e) => e.reconnectRetries < ke, Ne = e.getAttribute("language") || void 0;
|
|
2332
2359
|
m(I, e, new oe({
|
|
2333
|
-
url: p(
|
|
2334
|
-
channelId: p(
|
|
2335
|
-
channelGroupId: p(
|
|
2360
|
+
url: p(ni, e),
|
|
2361
|
+
channelId: p(ri, e),
|
|
2362
|
+
channelGroupId: p(ii, e),
|
|
2336
2363
|
edgeUrl: l,
|
|
2337
2364
|
authenticationToken: te,
|
|
2338
2365
|
muted: a,
|
|
@@ -2346,129 +2373,129 @@ function Vi() {
|
|
|
2346
2373
|
burstEnabled: se,
|
|
2347
2374
|
mseEnabled: ce,
|
|
2348
2375
|
mseOpusEnabled: le,
|
|
2349
|
-
iosBackgroundPlayEnabled:
|
|
2350
|
-
iosWakeLockEnabled:
|
|
2351
|
-
streamToMediaElementEnabled:
|
|
2376
|
+
iosBackgroundPlayEnabled: ue,
|
|
2377
|
+
iosWakeLockEnabled: d,
|
|
2378
|
+
streamToMediaElementEnabled: h,
|
|
2352
2379
|
iosMediaElementEnabled: de,
|
|
2353
2380
|
abrEnabled: fe,
|
|
2354
2381
|
sizeBasedResolutionCapEnabled: pe,
|
|
2355
2382
|
telemetryEnabled: me,
|
|
2356
|
-
videoCodecs:
|
|
2357
|
-
poster:
|
|
2383
|
+
videoCodecs: he,
|
|
2384
|
+
poster: v,
|
|
2358
2385
|
textTrack: ee,
|
|
2359
|
-
advanced:
|
|
2360
|
-
logLevel:
|
|
2386
|
+
advanced: b,
|
|
2387
|
+
logLevel: S,
|
|
2361
2388
|
language: Ne,
|
|
2362
|
-
drm:
|
|
2389
|
+
drm: Ce,
|
|
2363
2390
|
webtransportEnabled: Oe,
|
|
2364
2391
|
webcodecsHardwareAcceleration: Te,
|
|
2365
2392
|
decoders: Ee,
|
|
2366
2393
|
offscreenCanvasEnabled: De,
|
|
2367
2394
|
reconnectHandler: Me
|
|
2368
|
-
})), m(
|
|
2369
|
-
let
|
|
2370
|
-
|
|
2395
|
+
})), m(ti, e, new Ur(p(I, e))), p(L, e) || m(L, e, p(ti, e)), f(H, e, Zi).call(e), m($r, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), p($r, e) && (p(I, e).attach(p($r, e)), p(gi, e).observe(p($r, e))), e.setAttribute(_.MEDIA, p(I, e).media), p(I, e).muted && f(H, e, U).call(e, _.MUTED, ""), p(I, e).abrEnabled ? f(H, e, U).call(e, _.ABR_ENABLED, "") : f(H, e, W).call(e, _.ABR_ENABLED), f(H, e, U).call(e, _.SIZE_BASED_RESOLUTION_CAP_ENABLED, p(I, e).sizeBasedResolutionCapEnabled ? "true" : "false"), f(H, e, U).call(e, _.VOLUME, p(I, e).volume.toString()), y(v) || f(H, e, U).call(e, _.POSTER_SRC, p(I, e).getThumbnailUrl());
|
|
2396
|
+
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);
|
|
2397
|
+
Pe && f(H, e, da).call(e, p(I, e)), C && f(H, e, ca).call(e, p(I, e)), Fe && f(H, e, aa).call(e, p(I, e)), Ie && f(H, e, ra).call(e, p(I, e)), i || p(I, e).play(), Le && f(H, e, fa).call(e, p(I, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2371
2398
|
bubbles: !0,
|
|
2372
2399
|
composed: !0,
|
|
2373
2400
|
detail: p(I, e)
|
|
2374
|
-
})), Re && (f(H, e,
|
|
2401
|
+
})), Re && (f(H, e, ea).call(e), Fe && f(H, e, oa).call(e));
|
|
2375
2402
|
})();
|
|
2376
2403
|
}
|
|
2377
|
-
function
|
|
2378
|
-
p(I, this) && (p(I, this).on("rendition levels", p(
|
|
2404
|
+
function Zi() {
|
|
2405
|
+
p(I, this) && (p(I, this).on("rendition levels", p(_i, this)), p(I, this).on("rendition level", p(vi, this)), p(I, this).on("playback state", p(yi, this)), p(I, this).on("volume state", p(bi, this)), p(I, this).on("channel switch failed", p(xi, this)), p(I, this).on("channel switch", p(Si, this)), p(I, this).on("channels", p(Ci, this)), p(I, this).on("languages", p(wi, this)), p(I, this).on("text tracks", p(Ti, this)), p(I, this).on("needs user input", p(Ei, this)), p(I, this).on("is live", p(Di, this)), p(I, this).on("timeshift info", p(Oi, this)));
|
|
2379
2406
|
}
|
|
2380
|
-
function
|
|
2381
|
-
p(I, this) && (p(I, this).off("playback state", p(
|
|
2407
|
+
function Qi() {
|
|
2408
|
+
p(I, this) && (p(I, this).off("playback state", p(yi, this)), p(I, this).off("volume state", p(bi, this)), p(I, this).off("channel switch failed", p(xi, this)), p(I, this).off("channel switch", p(Si, this)), p(I, this).off("channels", p(Ci, this)), p(I, this).off("languages", p(wi, this)), p(I, this).off("text tracks", p(Ti, this)), p(I, this).off("needs user input", p(Ei, this)), p(I, this).off("is live", p(Di, this)), p(I, this).off("timeshift info", p(Oi, this)));
|
|
2382
2409
|
}
|
|
2383
|
-
function
|
|
2384
|
-
p(R, this) && (p(R, this).addEventListener("playing", p(
|
|
2410
|
+
function $i() {
|
|
2411
|
+
p(R, this) && (p(R, this).addEventListener("playing", p(ki, this)), p(R, this).addEventListener("pause", p(Ai, this)), p(R, this).addEventListener("ended", p(ji, this)), p(R, this).addEventListener("timeupdate", p(Ni, this)), p(R, this).addEventListener("volumechange", p(Pi, this)), p(R, this).addEventListener("hlsbuffering", p(Fi, this)), p(R, this).addEventListener("hlsnotbuffering", p(Ii, this)), p(R, this).addEventListener("timeshiftready", p(Li, this)));
|
|
2385
2412
|
}
|
|
2386
|
-
function
|
|
2413
|
+
function ea() {
|
|
2387
2414
|
var e, t, n, r;
|
|
2388
2415
|
let i = g(this.getAttribute(_.VOLUME)), a = i === void 0 ? (e = (t = p(L, this)) == null ? void 0 : t.volume) == null ? 1 : e : Math.max(0, Math.min(1, i)), o = x(this.getAttribute(_.MUTED), (n = (r = p(L, this)) == null ? void 0 : r.muted) == null ? !1 : n);
|
|
2389
|
-
f(H, this,
|
|
2416
|
+
f(H, this, ta).call(this), m(R, this, new Er(p(ei, this), {
|
|
2390
2417
|
volume: a,
|
|
2391
2418
|
muted: o,
|
|
2392
|
-
maxVideoBitRate: p(
|
|
2393
|
-
})), p(R, this).addEventListener("durationchange", p(
|
|
2419
|
+
maxVideoBitRate: p(ai, this) ? parseInt(p(ai, this), 10) : void 0
|
|
2420
|
+
})), p(R, this).addEventListener("durationchange", p(Mi, this));
|
|
2394
2421
|
}
|
|
2395
|
-
function
|
|
2396
|
-
p(R, this) && (f(H, this,
|
|
2422
|
+
function ta() {
|
|
2423
|
+
p(R, this) && (f(H, this, na).call(this), p(R, this).removeEventListener("durationchange", p(Mi, this)), p(R, this).cleanup(), p(L, this) === p(R, this) && m(L, this, void 0), m(R, this, void 0));
|
|
2397
2424
|
}
|
|
2398
|
-
function
|
|
2399
|
-
p(R, this) && (p(R, this).removeEventListener("playing", p(
|
|
2425
|
+
function na() {
|
|
2426
|
+
p(R, this) && (p(R, this).removeEventListener("playing", p(ki, this)), p(R, this).removeEventListener("pause", p(Ai, this)), p(R, this).removeEventListener("ended", p(ji, this)), p(R, this).removeEventListener("timeupdate", p(Ni, this)), p(R, this).removeEventListener("volumechange", p(Pi, this)), p(R, this).removeEventListener("hlsbuffering", p(Fi, this)), p(R, this).removeEventListener("hlsnotbuffering", p(Ii, this)), p(R, this).removeEventListener("timeshiftready", p(Li, this)));
|
|
2400
2427
|
}
|
|
2401
|
-
function
|
|
2402
|
-
e.mediaElement instanceof HTMLVideoElement && (m(z, this, new
|
|
2428
|
+
function ra(e) {
|
|
2429
|
+
e.mediaElement instanceof HTMLVideoElement && (m(z, this, new tr(e.mediaElement)), p(z, this).isSupported() && (p(V, this).debug("PIP is supported"), f(H, this, U).call(this, _.PIP_AVAILABLE, "")), p(z, this).on("on picture in picture change", (e) => {
|
|
2403
2430
|
e ? f(H, this, U).call(this, _.IS_PIP, "") : f(H, this, W).call(this, _.IS_PIP);
|
|
2404
2431
|
}));
|
|
2405
2432
|
}
|
|
2406
|
-
function
|
|
2433
|
+
function ia() {
|
|
2407
2434
|
var e;
|
|
2408
2435
|
if (!p(z, this)) return;
|
|
2409
2436
|
let t = null;
|
|
2410
|
-
p(L, this) === p(R, this) && p(R, this) ? t = p(R, this).videoElement : ((e = p(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = p(I, this).mediaElement), t && t !== p(z, this).videoElement && (p(V, this).debug("Updating PIP target to", p(L, this) === p(R, this) ? "HLS" : "Vindral"), p(z, this).unload(), m(z, this, new
|
|
2437
|
+
p(L, this) === p(R, this) && p(R, this) ? t = p(R, this).videoElement : ((e = p(I, this)) == null ? void 0 : e.mediaElement) instanceof HTMLVideoElement && (t = p(I, this).mediaElement), t && t !== p(z, this).videoElement && (p(V, this).debug("Updating PIP target to", p(L, this) === p(R, this) ? "HLS" : "Vindral"), p(z, this).unload(), m(z, this, new tr(t)), p(z, this).on("on picture in picture change", (e) => {
|
|
2411
2438
|
e ? f(H, this, U).call(this, _.IS_PIP, "") : f(H, this, W).call(this, _.IS_PIP);
|
|
2412
2439
|
}));
|
|
2413
2440
|
}
|
|
2414
|
-
function
|
|
2415
|
-
let t = !
|
|
2416
|
-
m(
|
|
2441
|
+
function aa(e) {
|
|
2442
|
+
let t = !Gn.isFullscreenApiSupported(this) && Gn.isFullscreenApiSupported(e.mediaElement) ? e.mediaElement : this;
|
|
2443
|
+
m(si, this, new Gn(t)), p(si, this).on("on fullscreen change", (e) => {
|
|
2417
2444
|
e ? f(H, this, U).call(this, _.FULLSCREEN, "") : f(H, this, W).call(this, _.FULLSCREEN);
|
|
2418
2445
|
});
|
|
2419
2446
|
}
|
|
2420
|
-
function
|
|
2447
|
+
function oa() {
|
|
2421
2448
|
var e;
|
|
2422
|
-
p(R, this) && (m(
|
|
2449
|
+
p(R, this) && (m(ci, this, !Gn.isFullscreenApiSupported(this) && Gn.isFullscreenApiSupported((e = p(R, this)) == null ? void 0 : e.videoElement) ? new Gn(p(R, this).videoElement) : new Gn(this)), p(ci, this).on("on fullscreen change", (e) => {
|
|
2423
2450
|
e ? f(H, this, U).call(this, _.FULLSCREEN, "") : f(H, this, W).call(this, _.FULLSCREEN);
|
|
2424
2451
|
}));
|
|
2425
2452
|
}
|
|
2426
|
-
function
|
|
2427
|
-
return this.hasAttribute(_.TIMESHIFT_POSITION) ? p(
|
|
2453
|
+
function sa() {
|
|
2454
|
+
return this.hasAttribute(_.TIMESHIFT_POSITION) ? p(ci, this) : p(si, this);
|
|
2428
2455
|
}
|
|
2429
|
-
function
|
|
2430
|
-
m(
|
|
2431
|
-
background: p(
|
|
2432
|
-
receiverApplicationId: p(
|
|
2456
|
+
function ca(e) {
|
|
2457
|
+
m(ui, this, new De({
|
|
2458
|
+
background: p(fi, this),
|
|
2459
|
+
receiverApplicationId: p(di, this),
|
|
2433
2460
|
options: e.getCastOptions()
|
|
2434
|
-
})), p(
|
|
2461
|
+
})), p(ui, this).init().then(() => {
|
|
2435
2462
|
var e, t, n;
|
|
2436
|
-
f(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = p(
|
|
2463
|
+
f(H, this, U).call(this, _.CAST_AVAILABLE, ""), (e = p(ui, this)) == null || e.on("connected", f(H, this, la).bind(this)), (t = p(ui, this)) == null || t.on("resumed", f(H, this, la).bind(this)), (n = p(ui, this)) == null || n.on("disconnected", f(H, this, ua).bind(this));
|
|
2437
2464
|
}).catch((e) => {
|
|
2438
2465
|
p(V, this).warn("Failed to initialize CastSender", e);
|
|
2439
2466
|
});
|
|
2440
2467
|
}
|
|
2441
|
-
function
|
|
2468
|
+
function la() {
|
|
2442
2469
|
var e, t;
|
|
2443
2470
|
f(H, this, U).call(this, _.IS_CASTING, "");
|
|
2444
|
-
let n = (e = (t = p(
|
|
2471
|
+
let n = (e = (t = p(ui, this)) == null ? void 0 : t.getReceiverName()) == null ? "device" : e;
|
|
2445
2472
|
f(H, this, U).call(this, _.CAST_RECEIVER_NAME, n);
|
|
2446
2473
|
}
|
|
2447
|
-
function
|
|
2474
|
+
function ua() {
|
|
2448
2475
|
f(H, this, W).call(this, _.IS_CASTING), f(H, this, W).call(this, _.CAST_RECEIVER_NAME);
|
|
2449
2476
|
}
|
|
2450
|
-
function
|
|
2477
|
+
function da(e) {
|
|
2451
2478
|
var t;
|
|
2452
|
-
(t = p(
|
|
2479
|
+
(t = p(li, this)) == null || t.unload();
|
|
2453
2480
|
let n = e.getCastOptions();
|
|
2454
|
-
m(
|
|
2481
|
+
m(li, this, new Ln({
|
|
2455
2482
|
url: n.url,
|
|
2456
2483
|
channelId: n.channelId,
|
|
2457
2484
|
authenticationToken: n.authenticationToken,
|
|
2458
2485
|
container: this
|
|
2459
|
-
})), p(
|
|
2486
|
+
})), p(li, this).once("available", () => {
|
|
2460
2487
|
f(H, this, U).call(this, _.AIRPLAY_AVAILABLE, "");
|
|
2461
|
-
}), p(
|
|
2488
|
+
}), p(li, this).on("connected", () => {
|
|
2462
2489
|
f(H, this, U).call(this, _.IS_AIRPLAYING, "");
|
|
2463
|
-
}), p(
|
|
2490
|
+
}), p(li, this).on("disconnected", () => {
|
|
2464
2491
|
f(H, this, W).call(this, _.IS_AIRPLAYING);
|
|
2465
2492
|
});
|
|
2466
2493
|
}
|
|
2467
|
-
function
|
|
2494
|
+
function fa(e) {
|
|
2468
2495
|
var t;
|
|
2469
|
-
if ((t = p(B, this)) == null || t.unload(), !
|
|
2470
|
-
if (e.audioNode) m(B, this, new
|
|
2471
|
-
else if (e.mediaElement instanceof HTMLMediaElement) m(B, this, new
|
|
2496
|
+
if ((t = p(B, this)) == null || t.unload(), !ce()) {
|
|
2497
|
+
if (e.audioNode) m(B, this, new fr(e.audioNode));
|
|
2498
|
+
else if (e.mediaElement instanceof HTMLMediaElement) m(B, this, new fr(e.mediaElement));
|
|
2472
2499
|
else return;
|
|
2473
2500
|
p(B, this).on("on decibel change", (e) => {
|
|
2474
2501
|
f(H, this, U).call(this, _.VOLUME_LEVEL, JSON.stringify(e));
|
|
@@ -2478,37 +2505,37 @@ function ra(e) {
|
|
|
2478
2505
|
})), (!p(B, this).isMediaElementSource || !this.hasAttribute(_.MUTED)) && p(B, this).start();
|
|
2479
2506
|
}
|
|
2480
2507
|
}
|
|
2481
|
-
function
|
|
2508
|
+
function pa() {
|
|
2482
2509
|
let e = () => (customElements.get("vindral-debug-panel") || import("./C2-H3s2r.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(_.DEBUG_PANEL_OPEN, ""), p(I, this));
|
|
2483
|
-
window._vindralDebug = e, m(
|
|
2510
|
+
window._vindralDebug = e, m(hi, this, e);
|
|
2484
2511
|
}
|
|
2485
|
-
function
|
|
2512
|
+
function ma() {
|
|
2486
2513
|
let e = window;
|
|
2487
|
-
p(
|
|
2514
|
+
p(hi, this) && e._vindralDebug === p(hi, this) && delete e._vindralDebug, m(hi, this, null);
|
|
2488
2515
|
}
|
|
2489
|
-
function
|
|
2490
|
-
e.pointerType !== "mouse" && e.timeStamp - p(
|
|
2516
|
+
function ha(e) {
|
|
2517
|
+
e.pointerType !== "mouse" && e.timeStamp - p(Ri, this) < 250 || (f(H, this, Ca).call(this), p(Qr, this) && clearTimeout(p(Qr, this)), e.target instanceof HTMLElement && ([this, p($r, this)].includes(e.target) || e.target.localName === "vindral-scroll-overlay") && f(H, this, wa).call(this));
|
|
2491
2518
|
}
|
|
2492
|
-
function
|
|
2519
|
+
function ga(e) {
|
|
2493
2520
|
let t = this.hasAttribute(_.USER_INTERACTING);
|
|
2494
|
-
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, p(
|
|
2521
|
+
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, p($r, this)].includes(e.target) && t ? f(H, this, Sa).call(this) : f(H, this, wa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && f(H, this, wa).call(this);
|
|
2495
2522
|
}
|
|
2496
|
-
function
|
|
2523
|
+
function _a(e) {
|
|
2497
2524
|
switch (e) {
|
|
2498
2525
|
case "dblclick-fullscreen": return x(this.getAttribute(_.DOUBLE_CLICK_FULLSCREEN_ENABLED), !0);
|
|
2499
2526
|
default: return !0;
|
|
2500
2527
|
}
|
|
2501
2528
|
}
|
|
2502
|
-
function
|
|
2503
|
-
f(H, this,
|
|
2529
|
+
function va(e) {
|
|
2530
|
+
f(H, this, _a).call(this, "dblclick-fullscreen") && (!p(si, this) || e.target instanceof S || e.target instanceof ze || e.target instanceof qr || (this.hasAttribute(_.FULLSCREEN) ? this.removeAttribute(_.FULLSCREEN) : this.setAttribute(_.FULLSCREEN, "")));
|
|
2504
2531
|
}
|
|
2505
|
-
function
|
|
2506
|
-
this.hasAttribute(_.USER_INTERACTING) || f(H, this,
|
|
2532
|
+
function ya(e) {
|
|
2533
|
+
this.hasAttribute(_.USER_INTERACTING) || f(H, this, wa).call(this);
|
|
2507
2534
|
}
|
|
2508
|
-
function
|
|
2535
|
+
function ba(e) {
|
|
2509
2536
|
var t;
|
|
2510
2537
|
let { metaKey: n, altKey: r, key: i } = e;
|
|
2511
|
-
if (n || r || !
|
|
2538
|
+
if (n || r || !Yr.includes(i)) return;
|
|
2512
2539
|
let a = (t = e.target) == null ? void 0 : t.keysUsed;
|
|
2513
2540
|
if (!(Array.isArray(a) && a.includes(i)) && !e.composedPath().some((e) => {
|
|
2514
2541
|
let t = e == null ? void 0 : e.keysUsed;
|
|
@@ -2526,28 +2553,28 @@ function da(e) {
|
|
|
2526
2553
|
break;
|
|
2527
2554
|
}
|
|
2528
2555
|
}
|
|
2529
|
-
function
|
|
2556
|
+
function xa() {
|
|
2530
2557
|
var e = this;
|
|
2531
2558
|
return t(function* () {
|
|
2532
|
-
if (!p(I, e) || !p(
|
|
2559
|
+
if (!p(I, e) || !p(ii, e)) return;
|
|
2533
2560
|
let t = Date.now();
|
|
2534
|
-
if (p(
|
|
2561
|
+
if (p(Gi, e) && t - p(Gi, e) < 1e4) p(V, e).debug("Skipping channel update, last update was less than 10 seconds ago.");
|
|
2535
2562
|
else {
|
|
2536
|
-
m(
|
|
2537
|
-
let n = yield p(I, e).getApiClient().getChannels(p(
|
|
2563
|
+
m(Gi, e, t);
|
|
2564
|
+
let n = yield p(I, e).getApiClient().getChannels(p(ii, e));
|
|
2538
2565
|
f(H, e, U).call(e, _.CHANNELS, JSON.stringify(n));
|
|
2539
2566
|
}
|
|
2540
|
-
m(
|
|
2567
|
+
m(pi, e, window.setTimeout(() => void f(H, e, xa).call(e), 1e4));
|
|
2541
2568
|
})();
|
|
2542
2569
|
}
|
|
2543
|
-
function
|
|
2570
|
+
function Sa() {
|
|
2544
2571
|
!this.hasAttribute(_.USER_INTERACTING) || this.hasAttribute(_.UI_LOCKED) || (this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2545
2572
|
bubbles: !0,
|
|
2546
2573
|
composed: !0,
|
|
2547
2574
|
detail: { active: !1 }
|
|
2548
2575
|
})), this.removeAttribute(_.USER_INTERACTING));
|
|
2549
2576
|
}
|
|
2550
|
-
function
|
|
2577
|
+
function Ca() {
|
|
2551
2578
|
this.hasAttribute(_.USER_INTERACTING) || requestAnimationFrame(() => {
|
|
2552
2579
|
this.setAttribute(_.USER_INTERACTING, ""), this.dispatchEvent(new CustomEvent("user-interacting", {
|
|
2553
2580
|
bubbles: !0,
|
|
@@ -2556,64 +2583,64 @@ function ma() {
|
|
|
2556
2583
|
}));
|
|
2557
2584
|
});
|
|
2558
2585
|
}
|
|
2559
|
-
function
|
|
2560
|
-
f(H, this,
|
|
2561
|
-
f(H, this,
|
|
2562
|
-
}, p(
|
|
2586
|
+
function wa() {
|
|
2587
|
+
f(H, this, Ca).call(this), p(Qr, this) && clearTimeout(p(Qr, this)), p(Zr, this) && m(Qr, this, self.setTimeout(() => {
|
|
2588
|
+
f(H, this, Sa).call(this);
|
|
2589
|
+
}, p(Zr, this)));
|
|
2563
2590
|
}
|
|
2564
|
-
function
|
|
2591
|
+
function Ta() {
|
|
2565
2592
|
var e;
|
|
2566
2593
|
let t = getComputedStyle(this).getPropertyValue("--vindral-subtitle-offset") || "0px";
|
|
2567
2594
|
(e = p(I, this)) == null || (e = e.mediaElement) == null || e.style.setProperty("--vindral-subtitle-offset", t);
|
|
2568
2595
|
}
|
|
2569
|
-
function
|
|
2596
|
+
function Ea() {
|
|
2570
2597
|
var e;
|
|
2571
|
-
f(H, this,
|
|
2598
|
+
f(H, this, ia).call(this), f(H, this, Aa).call(this), (e = p(z, this)) == null || e.request().catch((e) => {
|
|
2572
2599
|
p(V, this).warn("Failed to enter picture in picture:", e);
|
|
2573
2600
|
});
|
|
2574
2601
|
}
|
|
2575
|
-
function
|
|
2602
|
+
function Da() {
|
|
2576
2603
|
var e;
|
|
2577
2604
|
(e = p(z, this)) == null || e.exit().catch((e) => {
|
|
2578
2605
|
p(V, this).warn("Failed to exit picture in picture:", e);
|
|
2579
2606
|
});
|
|
2580
2607
|
}
|
|
2581
|
-
function
|
|
2582
|
-
let e = f(H, this,
|
|
2608
|
+
function Oa() {
|
|
2609
|
+
let e = f(H, this, sa).call(this);
|
|
2583
2610
|
if (!e) {
|
|
2584
2611
|
console.warn("No fullscreen target available"), this.setAttribute(_.FULLSCREEN_FALLBACK, ""), f(H, this, U).call(this, _.FULLSCREEN, "");
|
|
2585
2612
|
return;
|
|
2586
2613
|
}
|
|
2587
|
-
e != null && e.isFullscreenApiSupported() ? (f(H, this,
|
|
2588
|
-
p(
|
|
2614
|
+
e != null && e.isFullscreenApiSupported() ? (f(H, this, Aa).call(this), e == null || e.request().then(() => {
|
|
2615
|
+
p(Ki, this).call(this);
|
|
2589
2616
|
}).catch((e) => {
|
|
2590
2617
|
p(V, this).warn("Failed to enter fullscreen:", e);
|
|
2591
2618
|
})) : (this.setAttribute(_.FULLSCREEN_FALLBACK, ""), f(H, this, U).call(this, _.FULLSCREEN, ""));
|
|
2592
2619
|
}
|
|
2593
|
-
function
|
|
2594
|
-
let e = f(H, this,
|
|
2620
|
+
function ka() {
|
|
2621
|
+
let e = f(H, this, sa).call(this);
|
|
2595
2622
|
e != null && e.isFullscreenApiSupported() ? e == null || e.exit().then(() => {
|
|
2596
|
-
p(
|
|
2623
|
+
p(qi, this).call(this);
|
|
2597
2624
|
}).catch((e) => {
|
|
2598
2625
|
p(V, this).warn("Failed to exit fullscreen:", e);
|
|
2599
2626
|
}) : (this.removeAttribute(_.FULLSCREEN_FALLBACK), f(H, this, W).call(this, _.FULLSCREEN));
|
|
2600
2627
|
}
|
|
2601
|
-
function
|
|
2628
|
+
function Aa() {
|
|
2602
2629
|
p(I, this) && p(I, this).emitter.emit("ios-hack: reset size");
|
|
2603
2630
|
}
|
|
2604
|
-
function
|
|
2631
|
+
function ja() {
|
|
2605
2632
|
return this.hasAttribute(_.DEBUG_PANEL_OPEN);
|
|
2606
2633
|
}
|
|
2607
|
-
function
|
|
2608
|
-
f(H, this,
|
|
2634
|
+
function Ma() {
|
|
2635
|
+
f(H, this, ja).call(this) ? f(H, this, Na).call(this) : f(H, this, Pa).call(this);
|
|
2609
2636
|
}
|
|
2610
|
-
function
|
|
2611
|
-
p(
|
|
2637
|
+
function Na() {
|
|
2638
|
+
p(Ji, this) === null && (f(H, this, Fa).call(this), m(Ji, this, window.setInterval(() => f(H, this, Fa).call(this), 1e3)));
|
|
2612
2639
|
}
|
|
2613
|
-
function
|
|
2614
|
-
p(
|
|
2640
|
+
function Pa() {
|
|
2641
|
+
p(Ji, this) && (clearInterval(p(Ji, this)), m(Ji, this, null)), this.removeAttribute(_.DRIFT), f(H, this, W).call(this, _.DRIFT), f(H, this, W).call(this, _.PLAYBACK_LATENCY), f(H, this, W).call(this, _.CONNECTION_STATE);
|
|
2615
2642
|
}
|
|
2616
|
-
function
|
|
2643
|
+
function Fa() {
|
|
2617
2644
|
if (!p(I, this)) return;
|
|
2618
2645
|
try {
|
|
2619
2646
|
let e = p(I, this).getStatistics().drift;
|
|
@@ -2629,14 +2656,14 @@ function Ea() {
|
|
|
2629
2656
|
}
|
|
2630
2657
|
function U(e, t) {
|
|
2631
2658
|
var n;
|
|
2632
|
-
(n = p(
|
|
2659
|
+
(n = p(Xr, this).get(e)) == null || n.forEach((n) => n.setAttribute(e, t));
|
|
2633
2660
|
}
|
|
2634
2661
|
function W(e) {
|
|
2635
2662
|
var t;
|
|
2636
|
-
(t = p(
|
|
2663
|
+
(t = p(Xr, this).get(e)) == null || t.forEach((t) => t.removeAttribute(e));
|
|
2637
2664
|
}
|
|
2638
|
-
e(
|
|
2639
|
-
...
|
|
2665
|
+
e(Yi, "observedAttributes", [
|
|
2666
|
+
...he,
|
|
2640
2667
|
"url",
|
|
2641
2668
|
"edge-url",
|
|
2642
2669
|
"target-buffer-time",
|
|
@@ -2675,8 +2702,8 @@ e(Bi, "observedAttributes", [
|
|
|
2675
2702
|
"auto-instance-enabled",
|
|
2676
2703
|
"language"
|
|
2677
2704
|
]);
|
|
2678
|
-
var
|
|
2679
|
-
|
|
2705
|
+
var Ia = { _: "https://lb.cdn.vindral.com" }, La, Ra = document.createElement("template");
|
|
2706
|
+
Ra.innerHTML = `
|
|
2680
2707
|
<style>
|
|
2681
2708
|
:host {
|
|
2682
2709
|
display: var(--fullscreen-button-display);
|
|
@@ -2700,10 +2727,10 @@ ka.innerHTML = `
|
|
|
2700
2727
|
</slot>
|
|
2701
2728
|
</slot>
|
|
2702
2729
|
`;
|
|
2703
|
-
var
|
|
2730
|
+
var za = class extends S {
|
|
2704
2731
|
constructor() {
|
|
2705
2732
|
var e;
|
|
2706
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
2733
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Ra.content.cloneNode(!0));
|
|
2707
2734
|
}
|
|
2708
2735
|
connectedCallback() {
|
|
2709
2736
|
super.connectedCallback(), this.setAttribute("aria-label", this.isFullscreen ? "Exit fullscreen" : "Enter fullscreen");
|
|
@@ -2728,48 +2755,48 @@ var Aa = class extends S {
|
|
|
2728
2755
|
}));
|
|
2729
2756
|
}
|
|
2730
2757
|
};
|
|
2731
|
-
|
|
2758
|
+
La = za, e(za, "observedAttributes", [...b(La, "observedAttributes", La), _.FULLSCREEN]);
|
|
2732
2759
|
//#endregion
|
|
2733
2760
|
//#region ../../libs/player-next/src/components/LanguageMenu.ts
|
|
2734
|
-
var
|
|
2735
|
-
|
|
2761
|
+
var Ba, Va = "\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", Ha = document.createElement("template");
|
|
2762
|
+
Ha.innerHTML = `
|
|
2736
2763
|
<style>
|
|
2737
2764
|
:host(:not([hidden])) {
|
|
2738
2765
|
display: var(--language-menu-display);
|
|
2739
2766
|
}
|
|
2740
2767
|
</style>
|
|
2741
2768
|
|
|
2742
|
-
<slot name="button">${
|
|
2769
|
+
<slot name="button">${Va}</slot>
|
|
2743
2770
|
<slot name="listbox" hidden>
|
|
2744
2771
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2745
2772
|
</slot>
|
|
2746
2773
|
`;
|
|
2747
|
-
var
|
|
2774
|
+
var Ua = /* @__PURE__ */ new WeakSet(), Wa = class extends ze {
|
|
2748
2775
|
constructor() {
|
|
2749
2776
|
var e, t, n, r;
|
|
2750
|
-
super(), h(this,
|
|
2777
|
+
super(), h(this, Ua), (e = this.shadowRoot) == null || e.appendChild(Ha.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]");
|
|
2751
2778
|
}
|
|
2752
2779
|
connectedCallback() {
|
|
2753
|
-
super.connectedCallback(), f(
|
|
2780
|
+
super.connectedCallback(), f(Ua, this, Ga).call(this), this.setAttribute("aria-label", "Languages");
|
|
2754
2781
|
}
|
|
2755
2782
|
attributeChangedCallback(e, t, n) {
|
|
2756
|
-
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && f(
|
|
2783
|
+
super.attributeChangedCallback(e, t, n), (e === _.LANGUAGES || e === _.TEXT_TRACKS) && f(Ua, this, Ga).call(this);
|
|
2757
2784
|
}
|
|
2758
2785
|
};
|
|
2759
|
-
|
|
2760
|
-
function
|
|
2786
|
+
Ba = Wa;
|
|
2787
|
+
function Ga() {
|
|
2761
2788
|
let e = (e) => (e ? JSON.parse(e) : []).length < 2, t = e(this.getAttribute(_.LANGUAGES)), n = e(this.getAttribute(_.TEXT_TRACKS));
|
|
2762
2789
|
t && n ? this.setAttribute("hidden", "") : this.removeAttribute("hidden");
|
|
2763
2790
|
}
|
|
2764
|
-
e(
|
|
2765
|
-
...b(
|
|
2791
|
+
e(Wa, "observedAttributes", [
|
|
2792
|
+
...b(Ba, "observedAttributes", Ba),
|
|
2766
2793
|
_.LANGUAGES,
|
|
2767
2794
|
_.TEXT_TRACKS
|
|
2768
2795
|
]);
|
|
2769
2796
|
//#endregion
|
|
2770
2797
|
//#region ../../libs/player-next/src/components/LanguageMenuList.ts
|
|
2771
|
-
var
|
|
2772
|
-
|
|
2798
|
+
var Ka = document.createElement("template");
|
|
2799
|
+
Ka.innerHTML = `
|
|
2773
2800
|
<style>
|
|
2774
2801
|
:host {
|
|
2775
2802
|
font: inherit;
|
|
@@ -2883,21 +2910,21 @@ La.innerHTML = `
|
|
|
2883
2910
|
<div class="menu"></div>
|
|
2884
2911
|
</div>
|
|
2885
2912
|
`;
|
|
2886
|
-
var
|
|
2913
|
+
var qa = /* @__PURE__ */ new WeakMap(), Ja = /* @__PURE__ */ new WeakMap(), Ya = /* @__PURE__ */ new WeakMap(), Xa = /* @__PURE__ */ new WeakMap(), Za = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Qa = /* @__PURE__ */ new WeakMap(), $a = /* @__PURE__ */ new WeakMap(), eo = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), no = /* @__PURE__ */ new WeakMap(), ro = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), io = class extends HTMLElement {
|
|
2887
2914
|
constructor() {
|
|
2888
|
-
super(), h(this, K), d(this,
|
|
2915
|
+
super(), h(this, K), d(this, qa, []), d(this, Ja, []), d(this, Ya, void 0), d(this, Xa, void 0), d(this, Za, []), d(this, G, []), d(this, Qa, null), d(this, $a, null), d(this, eo, null), d(this, to, null), d(this, no, null), d(this, ro, null), e(this, "handleEvent", (e) => {
|
|
2889
2916
|
switch (e.type) {
|
|
2890
2917
|
case "keydown":
|
|
2891
|
-
f(K, this,
|
|
2918
|
+
f(K, this, mo).call(this, e);
|
|
2892
2919
|
break;
|
|
2893
2920
|
}
|
|
2894
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
2921
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Ka.content.cloneNode(!0));
|
|
2895
2922
|
}
|
|
2896
2923
|
connectedCallback() {
|
|
2897
2924
|
let e = this.getRootNode();
|
|
2898
2925
|
if (e instanceof ShadowRoot) {
|
|
2899
2926
|
var t, n, r;
|
|
2900
|
-
m(
|
|
2927
|
+
m(eo, this, e.host.closest("vindral-controller")), (t = p(eo, this)) == null || t.connectListener(this), m(Qa, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#languages .menu")), m($a, this, (r = this.shadowRoot) == null ? void 0 : r.querySelector("#text-tracks .menu")), f(K, this, ao).call(this), f(K, this, oo).call(this), m(to, this, e.host), this.addEventListener("keydown", this);
|
|
2901
2928
|
}
|
|
2902
2929
|
}
|
|
2903
2930
|
disconnectedCallback() {
|
|
@@ -2907,16 +2934,16 @@ var Ra = /* @__PURE__ */ new WeakMap(), za = /* @__PURE__ */ new WeakMap(), Ba =
|
|
|
2907
2934
|
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));
|
|
2908
2935
|
}
|
|
2909
2936
|
set languages(e) {
|
|
2910
|
-
m(
|
|
2937
|
+
m(qa, this, e), f(K, this, co).call(this), f(K, this, uo).call(this);
|
|
2911
2938
|
}
|
|
2912
2939
|
set textTracks(e) {
|
|
2913
|
-
m(
|
|
2940
|
+
m(Ja, this, e), f(K, this, so).call(this), f(K, this, fo).call(this);
|
|
2914
2941
|
}
|
|
2915
2942
|
set language(e) {
|
|
2916
|
-
m(
|
|
2943
|
+
m(Ya, this, e), f(K, this, uo).call(this);
|
|
2917
2944
|
}
|
|
2918
2945
|
set textTrack(e) {
|
|
2919
|
-
m(
|
|
2946
|
+
m(Xa, this, e), f(K, this, fo).call(this);
|
|
2920
2947
|
}
|
|
2921
2948
|
get keysUsed() {
|
|
2922
2949
|
return [
|
|
@@ -2933,10 +2960,10 @@ var Ra = /* @__PURE__ */ new WeakMap(), za = /* @__PURE__ */ new WeakMap(), Ba =
|
|
|
2933
2960
|
];
|
|
2934
2961
|
}
|
|
2935
2962
|
focus() {
|
|
2936
|
-
p(
|
|
2963
|
+
p(no, this) ? p(no, this).focus() : p(ro, this) && p(ro, this).focus();
|
|
2937
2964
|
}
|
|
2938
2965
|
};
|
|
2939
|
-
function
|
|
2966
|
+
function ao() {
|
|
2940
2967
|
new IntersectionObserver((e) => {
|
|
2941
2968
|
e.forEach((e) => {
|
|
2942
2969
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -2945,55 +2972,55 @@ function Xa() {
|
|
|
2945
2972
|
} else this.style.height = "auto";
|
|
2946
2973
|
});
|
|
2947
2974
|
}, {
|
|
2948
|
-
root: p(
|
|
2975
|
+
root: p(eo, this),
|
|
2949
2976
|
threshold: 0
|
|
2950
2977
|
}).observe(this);
|
|
2951
2978
|
}
|
|
2952
|
-
function
|
|
2953
|
-
p(
|
|
2979
|
+
function oo() {
|
|
2980
|
+
p(Qa, this) && (f(K, this, co).call(this), f(K, this, uo).call(this)), p($a, this) && (f(K, this, so).call(this), f(K, this, fo).call(this));
|
|
2954
2981
|
}
|
|
2955
|
-
function
|
|
2956
|
-
p(
|
|
2957
|
-
let e = f(K, this,
|
|
2958
|
-
p(
|
|
2982
|
+
function so() {
|
|
2983
|
+
p($a, this).innerHTML = "", m(G, this, []);
|
|
2984
|
+
let e = f(K, this, lo).call(this, "Off", "textTrack", void 0);
|
|
2985
|
+
p($a, this).appendChild(e), p(G, this).push({
|
|
2959
2986
|
element: e,
|
|
2960
2987
|
value: void 0
|
|
2961
|
-
}), p(
|
|
2962
|
-
let t = f(K, this,
|
|
2963
|
-
p(
|
|
2988
|
+
}), p(Ja, this).forEach((e) => {
|
|
2989
|
+
let t = f(K, this, lo).call(this, e, "textTrack", e);
|
|
2990
|
+
p($a, this).appendChild(t), p(G, this).push({
|
|
2964
2991
|
element: t,
|
|
2965
2992
|
value: e
|
|
2966
2993
|
});
|
|
2967
|
-
}), f(K, this,
|
|
2994
|
+
}), f(K, this, fo).call(this);
|
|
2968
2995
|
}
|
|
2969
|
-
function
|
|
2970
|
-
p(
|
|
2971
|
-
let t = f(K, this,
|
|
2972
|
-
p(
|
|
2996
|
+
function co() {
|
|
2997
|
+
p(Qa, this).innerHTML = "", m(Za, this, []), p(qa, this).forEach((e) => {
|
|
2998
|
+
let t = f(K, this, lo).call(this, e, "language", e);
|
|
2999
|
+
p(Qa, this).appendChild(t), p(Za, this).push({
|
|
2973
3000
|
element: t,
|
|
2974
3001
|
value: e
|
|
2975
3002
|
});
|
|
2976
|
-
}), f(K, this,
|
|
3003
|
+
}), f(K, this, uo).call(this);
|
|
2977
3004
|
}
|
|
2978
|
-
function
|
|
3005
|
+
function lo(e, t, n) {
|
|
2979
3006
|
let r = document.createElement("div");
|
|
2980
|
-
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => f(K, this,
|
|
3007
|
+
return r.setAttribute("role", "menuitem"), r.textContent = e, r.addEventListener("click", () => f(K, this, po).call(this, n, t)), r;
|
|
2981
3008
|
}
|
|
2982
|
-
function
|
|
2983
|
-
p(
|
|
2984
|
-
let e = p(
|
|
2985
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3009
|
+
function uo() {
|
|
3010
|
+
p(no, this) && (p(no, this).removeAttribute("aria-selected"), p(no, this).tabIndex = -1);
|
|
3011
|
+
let e = p(Za, this).find((e) => e.value === p(Ya, this));
|
|
3012
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(no, this, e.element));
|
|
2986
3013
|
}
|
|
2987
|
-
function
|
|
2988
|
-
p(
|
|
2989
|
-
let e = p(G, this).find((e) => e.value === p(
|
|
2990
|
-
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3014
|
+
function fo() {
|
|
3015
|
+
p(ro, this) && (p(ro, this).removeAttribute("aria-selected"), p(ro, this).tabIndex = -1);
|
|
3016
|
+
let e = p(G, this).find((e) => e.value === p(Xa, this));
|
|
3017
|
+
if (e) e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(ro, this, e.element);
|
|
2991
3018
|
else {
|
|
2992
3019
|
let e = p(G, this).find((e) => e.value === void 0);
|
|
2993
|
-
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(
|
|
3020
|
+
e && (e.element.setAttribute("aria-selected", "true"), e.element.tabIndex = 0, m(ro, this, e.element));
|
|
2994
3021
|
}
|
|
2995
3022
|
}
|
|
2996
|
-
function
|
|
3023
|
+
function po(e, t) {
|
|
2997
3024
|
this.dispatchEvent(new Event("change", {
|
|
2998
3025
|
bubbles: !0,
|
|
2999
3026
|
composed: !0
|
|
@@ -3005,36 +3032,36 @@ function ro(e, t) {
|
|
|
3005
3032
|
detail: e
|
|
3006
3033
|
}));
|
|
3007
3034
|
}
|
|
3008
|
-
function
|
|
3035
|
+
function mo(e) {
|
|
3009
3036
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3010
3037
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3011
3038
|
var a;
|
|
3012
|
-
(a = p(
|
|
3039
|
+
(a = p(to, this)) == null || a.hide();
|
|
3013
3040
|
} else if (t === "Enter" || t === " ") {
|
|
3014
3041
|
var o;
|
|
3015
|
-
(o = f(K, this,
|
|
3016
|
-
} else f(K, this,
|
|
3042
|
+
(o = f(K, this, _o).call(this)) == null || (o = o.element) == null || o.click();
|
|
3043
|
+
} else f(K, this, ho).call(this, e);
|
|
3017
3044
|
}
|
|
3018
|
-
function
|
|
3045
|
+
function ho(e) {
|
|
3019
3046
|
var t;
|
|
3020
|
-
let { key: n } = e, r = [...p(
|
|
3047
|
+
let { key: n } = e, r = [...p(Za, this), ...p(G, this)], i = (t = f(K, this, _o).call(this)) == null ? r[0] : t;
|
|
3021
3048
|
if (!i) return;
|
|
3022
3049
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3023
|
-
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = f(K, this,
|
|
3050
|
+
n === "ArrowDown" ? o++ : n === "ArrowUp" ? o-- : n === "ArrowLeft" ? o = f(K, this, go).call(this, a, "left") : n === "ArrowRight" ? o = f(K, this, go).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);
|
|
3024
3051
|
let s = r[o];
|
|
3025
|
-
s && (f(K, this,
|
|
3052
|
+
s && (f(K, this, vo).call(this, s.value), s.element.focus());
|
|
3026
3053
|
}
|
|
3027
|
-
function
|
|
3028
|
-
let n = p(
|
|
3054
|
+
function go(e, t) {
|
|
3055
|
+
let n = p(Za, this).length, r = p(G, this).length;
|
|
3029
3056
|
return t === "left" ? e < n ? n + r - 1 : e - n - 1 : e >= n ? 0 : e + n;
|
|
3030
3057
|
}
|
|
3031
|
-
function
|
|
3032
|
-
return [...p(
|
|
3058
|
+
function _o() {
|
|
3059
|
+
return [...p(Za, this), ...p(G, this)].find((e) => e.element.tabIndex === 0);
|
|
3033
3060
|
}
|
|
3034
|
-
function
|
|
3035
|
-
for (let t of [...p(
|
|
3061
|
+
function vo(e) {
|
|
3062
|
+
for (let t of [...p(Za, this), ...p(G, this)]) t.element.tabIndex = t.value === e ? 0 : -1;
|
|
3036
3063
|
}
|
|
3037
|
-
e(
|
|
3064
|
+
e(io, "observedAttributes", [
|
|
3038
3065
|
_.LANGUAGES,
|
|
3039
3066
|
_.TEXT_TRACKS,
|
|
3040
3067
|
_.LANGUAGE,
|
|
@@ -3042,12 +3069,12 @@ e(Ya, "observedAttributes", [
|
|
|
3042
3069
|
]);
|
|
3043
3070
|
//#endregion
|
|
3044
3071
|
//#region ../../libs/player-next/src/components/LiveButton.ts
|
|
3045
|
-
var
|
|
3046
|
-
|
|
3047
|
-
var
|
|
3072
|
+
var yo, bo = document.createElement("template");
|
|
3073
|
+
bo.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";
|
|
3074
|
+
var xo = class extends S {
|
|
3048
3075
|
constructor() {
|
|
3049
3076
|
var e;
|
|
3050
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3077
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(bo.content.cloneNode(!0));
|
|
3051
3078
|
}
|
|
3052
3079
|
connectedCallback() {
|
|
3053
3080
|
super.connectedCallback(), this.updateState();
|
|
@@ -3078,15 +3105,15 @@ var fo = class extends S {
|
|
|
3078
3105
|
}));
|
|
3079
3106
|
}
|
|
3080
3107
|
};
|
|
3081
|
-
|
|
3082
|
-
...b(
|
|
3108
|
+
yo = xo, e(xo, "observedAttributes", [
|
|
3109
|
+
...b(yo, "observedAttributes", yo),
|
|
3083
3110
|
_.TIMESHIFT_POSITION,
|
|
3084
3111
|
_.DURATION
|
|
3085
3112
|
]);
|
|
3086
3113
|
//#endregion
|
|
3087
3114
|
//#region ../../libs/player-next/src/components/MuteButton.ts
|
|
3088
|
-
var
|
|
3089
|
-
|
|
3115
|
+
var So, Co = document.createElement("template");
|
|
3116
|
+
Co.innerHTML = `
|
|
3090
3117
|
<style>
|
|
3091
3118
|
:host {
|
|
3092
3119
|
display: var(--mute-button-display);
|
|
@@ -3114,10 +3141,10 @@ mo.innerHTML = `
|
|
|
3114
3141
|
</slot>
|
|
3115
3142
|
</slot>
|
|
3116
3143
|
`;
|
|
3117
|
-
var
|
|
3144
|
+
var wo = class extends S {
|
|
3118
3145
|
constructor() {
|
|
3119
3146
|
var e;
|
|
3120
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3147
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Co.content.cloneNode(!0));
|
|
3121
3148
|
}
|
|
3122
3149
|
connectedCallback() {
|
|
3123
3150
|
super.connectedCallback(), this.setAttribute("aria-label", this.muted ? "UnMute" : "Mute");
|
|
@@ -3142,11 +3169,11 @@ var ho = class extends S {
|
|
|
3142
3169
|
}));
|
|
3143
3170
|
}
|
|
3144
3171
|
};
|
|
3145
|
-
|
|
3172
|
+
So = wo, e(wo, "observedAttributes", [...b(So, "observedAttributes", So), _.MUTED]);
|
|
3146
3173
|
//#endregion
|
|
3147
3174
|
//#region ../../libs/player-next/src/components/PictureInPictureButton.ts
|
|
3148
|
-
var
|
|
3149
|
-
|
|
3175
|
+
var To, Eo = document.createElement("template");
|
|
3176
|
+
Eo.innerHTML = `
|
|
3150
3177
|
<style>
|
|
3151
3178
|
:host {
|
|
3152
3179
|
display: var(--pip-button-display);
|
|
@@ -3160,10 +3187,10 @@ _o.innerHTML = `
|
|
|
3160
3187
|
<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>
|
|
3161
3188
|
</slot>
|
|
3162
3189
|
`;
|
|
3163
|
-
var
|
|
3190
|
+
var Do = class extends S {
|
|
3164
3191
|
constructor() {
|
|
3165
3192
|
var e;
|
|
3166
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3193
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(Eo.content.cloneNode(!0));
|
|
3167
3194
|
}
|
|
3168
3195
|
connectedCallback() {
|
|
3169
3196
|
super.connectedCallback(), this.setAttribute("aria-label", this.isPictureInPictureActive ? "Exit picture in picture" : "Enter picture in picture");
|
|
@@ -3188,15 +3215,15 @@ var vo = class extends S {
|
|
|
3188
3215
|
}));
|
|
3189
3216
|
}
|
|
3190
3217
|
};
|
|
3191
|
-
|
|
3192
|
-
...b(
|
|
3218
|
+
To = Do, e(Do, "observedAttributes", [
|
|
3219
|
+
...b(To, "observedAttributes", To),
|
|
3193
3220
|
_.IS_PIP,
|
|
3194
3221
|
_.PIP_AVAILABLE
|
|
3195
3222
|
]);
|
|
3196
3223
|
//#endregion
|
|
3197
3224
|
//#region ../../libs/player-next/src/components/PlayButton.ts
|
|
3198
|
-
var
|
|
3199
|
-
|
|
3225
|
+
var Oo, ko = document.createElement("template");
|
|
3226
|
+
ko.innerHTML = `
|
|
3200
3227
|
<style>
|
|
3201
3228
|
:host {
|
|
3202
3229
|
display: var(--play-button-display);
|
|
@@ -3220,10 +3247,10 @@ bo.innerHTML = `
|
|
|
3220
3247
|
</slot>
|
|
3221
3248
|
</slot>
|
|
3222
3249
|
`;
|
|
3223
|
-
var
|
|
3250
|
+
var Ao = class extends S {
|
|
3224
3251
|
constructor() {
|
|
3225
3252
|
var e;
|
|
3226
|
-
super(), (e = this.shadowRoot) == null || e.appendChild(
|
|
3253
|
+
super(), (e = this.shadowRoot) == null || e.appendChild(ko.content.cloneNode(!0));
|
|
3227
3254
|
}
|
|
3228
3255
|
connectedCallback() {
|
|
3229
3256
|
super.connectedCallback(), this.setAttribute("aria-label", this.paused ? "Play" : "Pause");
|
|
@@ -3248,7 +3275,7 @@ var xo = class extends S {
|
|
|
3248
3275
|
}));
|
|
3249
3276
|
}
|
|
3250
3277
|
};
|
|
3251
|
-
|
|
3278
|
+
Oo = Ao, e(Ao, "observedAttributes", [...b(Oo, "observedAttributes", Oo), _.PAUSED]);
|
|
3252
3279
|
//#endregion
|
|
3253
3280
|
//#region ../../libs/player-next/src/PlayerAttributes.ts
|
|
3254
3281
|
var q = {
|
|
@@ -3257,55 +3284,55 @@ var q = {
|
|
|
3257
3284
|
ADVANCED_RENDITION_MENU_ENABLED: "advanced-rendition-menu-enabled",
|
|
3258
3285
|
REFRESH_POSTER_ENABLED: "refresh-poster-enabled",
|
|
3259
3286
|
STREAM_POLL_ENABLED: "stream-poll-enabled"
|
|
3260
|
-
},
|
|
3287
|
+
}, jo = Object.values(q), Mo = /* @__PURE__ */ new WeakMap(), No = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Fo = /* @__PURE__ */ new WeakMap(), Io = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakSet(), Bo = class extends me {
|
|
3261
3288
|
constructor(e) {
|
|
3262
|
-
super(), h(this,
|
|
3289
|
+
super(), h(this, zo), d(this, Mo, void 0), d(this, No, void 0), d(this, Po, !1), d(this, Fo, !1), d(this, Io, !0), d(this, Lo, null), d(this, Ro, null), m(No, this, e), m(Mo, this, new pe({
|
|
3263
3290
|
publicEndpoint: e.url,
|
|
3264
3291
|
tokenFactory: () => e.authenticationToken
|
|
3265
3292
|
}));
|
|
3266
3293
|
}
|
|
3267
3294
|
start(e = 5e3) {
|
|
3268
|
-
p(
|
|
3269
|
-
!p(
|
|
3295
|
+
p(Ro, this) && clearInterval(p(Ro, this)), m(Po, this, !1), m(Fo, this, !1), f(zo, this, Wo).call(this), f(zo, this, Vo).call(this), m(Ro, this, window.setInterval(() => {
|
|
3296
|
+
!p(Fo, this) && !p(No, this).infiniteReconnect && !p(Lo, this) && p(Io, this) && m(Lo, this, window.setTimeout(() => f(zo, this, Ho).call(this), 300 * 1e3)), !p(Fo, this) && p(Io, this) && f(zo, this, Vo).call(this);
|
|
3270
3297
|
}, e));
|
|
3271
3298
|
}
|
|
3272
3299
|
stop() {
|
|
3273
|
-
f(
|
|
3300
|
+
f(zo, this, Uo).call(this), p(Ro, this) && (window.clearInterval(p(Ro, this)), m(Ro, this, null));
|
|
3274
3301
|
}
|
|
3275
3302
|
};
|
|
3276
|
-
function
|
|
3303
|
+
function Vo() {
|
|
3277
3304
|
var e = this;
|
|
3278
3305
|
return t(function* () {
|
|
3279
|
-
if (p(
|
|
3280
|
-
m(
|
|
3306
|
+
if (p(Po, e)) return;
|
|
3307
|
+
m(Po, e, !0);
|
|
3281
3308
|
let t = "Stream is offline", n = "Please stand by";
|
|
3282
3309
|
try {
|
|
3283
|
-
let t = yield p(
|
|
3310
|
+
let t = yield p(Mo, e).getChannel(p(No, e).channelId);
|
|
3284
3311
|
if (t.isLive) {
|
|
3285
|
-
m(
|
|
3312
|
+
m(Fo, e, !0), f(zo, e, Wo).call(e), e.emit("live", t), m(Po, e, !1);
|
|
3286
3313
|
return;
|
|
3287
3314
|
}
|
|
3288
3315
|
} catch (e) {
|
|
3289
|
-
|
|
3316
|
+
fe(e) && (e.status === 403 || e.status === 401) && (t = "Forbidden", n = "You do not have permission to view this stream");
|
|
3290
3317
|
}
|
|
3291
|
-
p(
|
|
3318
|
+
p(Io, e) && e.emit("error", {
|
|
3292
3319
|
title: t,
|
|
3293
3320
|
message: n
|
|
3294
|
-
}), m(
|
|
3321
|
+
}), m(Po, e, !1);
|
|
3295
3322
|
})();
|
|
3296
3323
|
}
|
|
3297
|
-
function
|
|
3298
|
-
this.stop(), m(
|
|
3324
|
+
function Ho() {
|
|
3325
|
+
this.stop(), m(Io, this, !1), this.emit("timeout");
|
|
3299
3326
|
}
|
|
3300
|
-
function
|
|
3301
|
-
p(
|
|
3327
|
+
function Uo() {
|
|
3328
|
+
p(Lo, this) && (window.clearTimeout(p(Lo, this)), m(Lo, this, null));
|
|
3302
3329
|
}
|
|
3303
|
-
function
|
|
3304
|
-
f(
|
|
3330
|
+
function Wo() {
|
|
3331
|
+
f(zo, this, Uo).call(this), m(Io, this, !0);
|
|
3305
3332
|
}
|
|
3306
3333
|
//#endregion
|
|
3307
3334
|
//#region ../../libs/player-next/src/utils/browser.ts
|
|
3308
|
-
var
|
|
3335
|
+
var Go = /\/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, Ko = navigator.userAgent.toLowerCase(), qo = Go.test(Ko), Jo = (e) => Yi.observedAttributes.includes(e), Yo = `
|
|
3309
3336
|
<style>
|
|
3310
3337
|
:host {
|
|
3311
3338
|
container-type: inline-size;
|
|
@@ -3315,7 +3342,7 @@ var Io = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3315
3342
|
display: flex;
|
|
3316
3343
|
justify-content: center;
|
|
3317
3344
|
|
|
3318
|
-
--vindral-volume-range-display: ${
|
|
3345
|
+
--vindral-volume-range-display: ${qo ? "none" : "flex"};
|
|
3319
3346
|
--vindral-airplay-button-display: none;
|
|
3320
3347
|
--vindral-play-overlay-display: none;
|
|
3321
3348
|
--vindral-grid-item-offline-display: none;
|
|
@@ -3396,10 +3423,10 @@ var Io = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3396
3423
|
--vindral-subtitle-offset: -48px;
|
|
3397
3424
|
}
|
|
3398
3425
|
</style>
|
|
3399
|
-
`,
|
|
3426
|
+
`, Xo = (e) => {
|
|
3400
3427
|
let t = e ? "vindral-advanced-rendition-menu" : "vindral-rendition-levels-menu";
|
|
3401
3428
|
return `
|
|
3402
|
-
${
|
|
3429
|
+
${Yo}
|
|
3403
3430
|
|
|
3404
3431
|
<vindral-controller>
|
|
3405
3432
|
<vindral-control-bar slot="top-bar">
|
|
@@ -3437,8 +3464,8 @@ var Io = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3437
3464
|
</vindral-center-overlay>
|
|
3438
3465
|
</vindral-controller>
|
|
3439
3466
|
`;
|
|
3440
|
-
},
|
|
3441
|
-
${
|
|
3467
|
+
}, Zo = `
|
|
3468
|
+
${Yo}
|
|
3442
3469
|
|
|
3443
3470
|
<style>
|
|
3444
3471
|
#control-bar {
|
|
@@ -3462,52 +3489,52 @@ var Io = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3462
3489
|
<vindral-play-overlay id="play-overlay" hidden></vindral-play-overlay>
|
|
3463
3490
|
</vindral-center-overlay>
|
|
3464
3491
|
</vindral-controller>
|
|
3465
|
-
`,
|
|
3492
|
+
`, Qo = document.createElement("template"), $o = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), es = /* @__PURE__ */ new WeakMap(), ts = /* @__PURE__ */ new WeakMap(), ns = /* @__PURE__ */ new WeakMap(), rs = /* @__PURE__ */ new WeakMap(), is = /* @__PURE__ */ new WeakMap(), as = /* @__PURE__ */ new WeakMap(), os = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakMap(), us = class extends HTMLElement {
|
|
3466
3493
|
constructor() {
|
|
3467
|
-
super(), h(this, Y), d(this,
|
|
3494
|
+
super(), h(this, Y), d(this, $o, void 0), d(this, J, void 0), d(this, es, void 0), d(this, ts, void 0), d(this, ns, void 0), d(this, rs, void 0), d(this, is, /* @__PURE__ */ new Set()), d(this, as, () => {
|
|
3468
3495
|
Array.from(this.attributes).forEach((e) => {
|
|
3469
|
-
p(
|
|
3496
|
+
p(os, this).call(this, e.name, e.value);
|
|
3470
3497
|
});
|
|
3471
|
-
}), d(this,
|
|
3472
|
-
|
|
3473
|
-
}), d(this,
|
|
3498
|
+
}), d(this, os, (e, t) => {
|
|
3499
|
+
Jo(e) && (y(t) ? p(J, this).setAttribute(e, t) : p(J, this).removeAttribute(e));
|
|
3500
|
+
}), d(this, ss, () => {
|
|
3474
3501
|
Array.from(this.children).forEach((e) => {
|
|
3475
|
-
p(
|
|
3502
|
+
p(is, this).add(e);
|
|
3476
3503
|
});
|
|
3477
|
-
}), d(this,
|
|
3504
|
+
}), d(this, cs, () => {
|
|
3478
3505
|
let e = p(J, this).instance;
|
|
3479
3506
|
e && (e.on("is live", (e) => {
|
|
3480
|
-
e ? (this.removeAttribute(q.OFFLINE), f(Y, this,
|
|
3507
|
+
e ? (this.removeAttribute(q.OFFLINE), f(Y, this, gs).call(this)) : (this.setAttribute(q.OFFLINE, ""), f(Y, this, hs).call(this, "Stream is offline", "Please stand by"));
|
|
3481
3508
|
}), e.on("channels", (e) => {
|
|
3482
3509
|
let t = p(J, this).getAttribute("channel-id"), n = e.find((e) => e.channelId === t);
|
|
3483
|
-
n && f(Y, this,
|
|
3510
|
+
n && f(Y, this, ms).call(this, n);
|
|
3484
3511
|
}), e.on("channel switch", ({ channelId: t }) => {
|
|
3485
3512
|
let n = e.channels.find((e) => e.channelId === t);
|
|
3486
|
-
n && f(Y, this,
|
|
3513
|
+
n && f(Y, this, ms).call(this, n);
|
|
3487
3514
|
}), e.on("error", (e) => {
|
|
3488
3515
|
if (e.code() === "connection_failed") {
|
|
3489
|
-
f(Y, this,
|
|
3516
|
+
f(Y, this, hs).call(this, "Stream is offline", "Please stand by");
|
|
3490
3517
|
return;
|
|
3491
3518
|
}
|
|
3492
|
-
e.isFatal() && (e.code() === "access_forbidden" ? f(Y, this,
|
|
3519
|
+
e.isFatal() && (e.code() === "access_forbidden" ? f(Y, this, hs).call(this, "Forbidden", "You do not have permission to view this stream") : e.code() === "connection_failed_will_not_attempt_again" ? f(Y, this, hs).call(this, "Stream is offline", "Please stand by") : f(Y, this, hs).call(this, "An error occurred", e.message), p(ts, this).removeAttribute("hidden"), this.setAttribute(q.OFFLINE, ""), p(J, this).dispatchEvent(new CustomEvent(v.EXIT_FULLSCREEN)), p(J, this).dispatchEvent(new CustomEvent(v.EXIT_PIP)));
|
|
3493
3520
|
}));
|
|
3494
|
-
}), d(this,
|
|
3495
|
-
p(J, this).connect(), p(
|
|
3496
|
-
}), m(
|
|
3521
|
+
}), d(this, ls, () => {
|
|
3522
|
+
p(J, this).connect(), p(ts, this).setAttribute("hidden", ""), f(Y, this, gs).call(this), p(J, this).focus();
|
|
3523
|
+
}), m($o, this, this.attachShadow({ mode: "open" })), f(Y, this, fs).call(this), m(J, this, p($o, this).querySelector("vindral-controller")), m(es, this, p($o, this).querySelector("#vindral-message")), m(ts, this, p($o, this).querySelector("#play-overlay")), m(ns, this, p($o, this).querySelector("#center-overlay"));
|
|
3497
3524
|
}
|
|
3498
3525
|
connectedCallback() {
|
|
3499
|
-
this.setAttribute(q.OFFLINE, ""), p(J, this).addEventListener("vindral-instance-ready", p(
|
|
3526
|
+
this.setAttribute(q.OFFLINE, ""), p(J, this).addEventListener("vindral-instance-ready", p(cs, this)), f(Y, this, ps).call(this);
|
|
3500
3527
|
}
|
|
3501
3528
|
disconnectedCallback() {
|
|
3502
3529
|
var e;
|
|
3503
|
-
p(J, this).removeEventListener("vindral-instance-ready", p(
|
|
3530
|
+
p(J, this).removeEventListener("vindral-instance-ready", p(cs, this)), p(ts, this).removeEventListener("click", p(ls, this)), (e = p(rs, this)) == null || e.stop();
|
|
3504
3531
|
}
|
|
3505
3532
|
attributeChangedCallback(e, t, n) {
|
|
3506
|
-
if (t !== n) if (e === _.MEDIA || e === q.ADVANCED_RENDITION_MENU_ENABLED) f(Y, this,
|
|
3533
|
+
if (t !== n) if (e === _.MEDIA || e === q.ADVANCED_RENDITION_MENU_ENABLED) f(Y, this, fs).call(this);
|
|
3507
3534
|
else if (e === q.REFRESH_POSTER_ENABLED) {
|
|
3508
|
-
let e = p(
|
|
3535
|
+
let e = p($o, this).querySelector("vindral-poster-overlay");
|
|
3509
3536
|
e && (e.disabled = x(this.getAttribute(q.REFRESH_POSTER_ENABLED), !1) === !1);
|
|
3510
|
-
} else p(
|
|
3537
|
+
} else p(os, this).call(this, e, n);
|
|
3511
3538
|
}
|
|
3512
3539
|
get instance() {
|
|
3513
3540
|
return p(J, this).instance;
|
|
@@ -3522,41 +3549,41 @@ var Io = /\/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Si
|
|
|
3522
3549
|
p(J, this).timelineMarkers = e;
|
|
3523
3550
|
}
|
|
3524
3551
|
};
|
|
3525
|
-
function
|
|
3526
|
-
let e =
|
|
3527
|
-
return e === "audio" ?
|
|
3528
|
-
}
|
|
3529
|
-
function
|
|
3530
|
-
let e = p(
|
|
3531
|
-
this.isConnected && t && t.removeEventListener("vindral-instance-ready", p(
|
|
3532
|
-
let r =
|
|
3533
|
-
m(J, this, r.querySelector("vindral-controller")), m(
|
|
3552
|
+
function ds() {
|
|
3553
|
+
let e = ve(this.getAttribute(_.MEDIA)), t = x(this.getAttribute(q.ADVANCED_RENDITION_MENU_ENABLED), !1);
|
|
3554
|
+
return e === "audio" ? Zo : Xo(t);
|
|
3555
|
+
}
|
|
3556
|
+
function fs() {
|
|
3557
|
+
let e = p($o, this).hasChildNodes(), t = e ? p(J, this) : void 0, n = e ? p(ts, this) : void 0;
|
|
3558
|
+
this.isConnected && t && t.removeEventListener("vindral-instance-ready", p(cs, this)), this.isConnected && n && p(rs, this) && n.removeEventListener("click", p(ls, this)), Qo.innerHTML = f(Y, this, ds).call(this);
|
|
3559
|
+
let r = Qo.content.cloneNode(!0);
|
|
3560
|
+
m(J, this, r.querySelector("vindral-controller")), m(es, this, r.querySelector("#vindral-message")), m(ts, this, r.querySelector("#play-overlay")), m(ns, this, r.querySelector("#center-overlay")), p(ss, this).call(this), p(is, this).forEach((e) => {
|
|
3534
3561
|
p(J, this).appendChild(e);
|
|
3535
|
-
}), p(
|
|
3562
|
+
}), p(as, this).call(this), p($o, this).innerHTML = "", p($o, this).appendChild(r), this.isConnected && (p(J, this).addEventListener("vindral-instance-ready", p(cs, this)), p(rs, this) && p(ts, this).addEventListener("click", p(ls, this)));
|
|
3536
3563
|
}
|
|
3537
|
-
function
|
|
3564
|
+
function ps() {
|
|
3538
3565
|
var e;
|
|
3539
3566
|
if (x(this.getAttribute(q.STREAM_POLL_ENABLED), !0) === !1) return;
|
|
3540
3567
|
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");
|
|
3541
3568
|
if (!t || !n) {
|
|
3542
|
-
this.setAttribute(q.OFFLINE, ""), f(Y, this,
|
|
3569
|
+
this.setAttribute(q.OFFLINE, ""), f(Y, this, hs).call(this, "Invalid options", "Please enter at least a channel id and url to start the stream");
|
|
3543
3570
|
return;
|
|
3544
3571
|
}
|
|
3545
|
-
m(
|
|
3572
|
+
m(rs, this, new Bo({
|
|
3546
3573
|
url: t,
|
|
3547
3574
|
channelId: n,
|
|
3548
3575
|
authenticationToken: r,
|
|
3549
3576
|
infiniteReconnect: i
|
|
3550
|
-
})), p(
|
|
3551
|
-
p(J, this).connect(), this.removeAttribute("offline"), f(Y, this,
|
|
3552
|
-
}), p(
|
|
3553
|
-
f(Y, this,
|
|
3554
|
-
}), p(
|
|
3555
|
-
this.setAttribute(q.OFFLINE, ""), f(Y, this,
|
|
3556
|
-
}), p(
|
|
3557
|
-
}
|
|
3558
|
-
function
|
|
3559
|
-
let t =
|
|
3577
|
+
})), p(rs, this).on("live", (e) => {
|
|
3578
|
+
p(J, this).connect(), this.removeAttribute("offline"), f(Y, this, gs).call(this), f(Y, this, ms).call(this, e);
|
|
3579
|
+
}), p(rs, this).on("timeout", () => {
|
|
3580
|
+
f(Y, this, gs).call(this), p(ts, this).removeAttribute("hidden");
|
|
3581
|
+
}), p(rs, this).on("error", (e) => {
|
|
3582
|
+
this.setAttribute(q.OFFLINE, ""), f(Y, this, hs).call(this, e.title, e.message);
|
|
3583
|
+
}), p(ts, this).addEventListener("click", p(ls, this)), this.hasAttribute("paused") && p(rs, this).start();
|
|
3584
|
+
}
|
|
3585
|
+
function ms(e) {
|
|
3586
|
+
let t = Se(this.getAttribute("title"), !1);
|
|
3560
3587
|
if (!t) return;
|
|
3561
3588
|
let n = this.getAttribute("poster"), r = typeof t == "string" ? t : e.name, i;
|
|
3562
3589
|
if (typeof n == "string") i = n;
|
|
@@ -3564,24 +3591,24 @@ function as(e) {
|
|
|
3564
3591
|
var a, o;
|
|
3565
3592
|
i = (a = (o = this.instance) == null ? void 0 : o.getThumbnailUrl()) == null ? e.thumbnailUrls.length ? e.thumbnailUrls[0] : void 0 : a;
|
|
3566
3593
|
}
|
|
3567
|
-
|
|
3594
|
+
Oe({
|
|
3568
3595
|
title: r,
|
|
3569
3596
|
poster: i
|
|
3570
3597
|
});
|
|
3571
3598
|
}
|
|
3572
|
-
function
|
|
3573
|
-
p(
|
|
3599
|
+
function hs(e, t) {
|
|
3600
|
+
p(es, this).setAttribute("title", e), p(es, this).setAttribute("description", t), p(es, this).removeAttribute("hidden");
|
|
3574
3601
|
let n = this.getAttribute("poster");
|
|
3575
|
-
n ? p(
|
|
3602
|
+
n ? p(ns, this).setAttribute("poster", n) : p(ns, this).removeAttribute("poster"), p(ns, this).setAttribute("backdrop", "");
|
|
3576
3603
|
}
|
|
3577
|
-
function
|
|
3578
|
-
p(
|
|
3604
|
+
function gs() {
|
|
3605
|
+
p(es, this).setAttribute("hidden", ""), p(ns, this).removeAttribute("backdrop");
|
|
3579
3606
|
}
|
|
3580
|
-
e(
|
|
3607
|
+
e(us, "observedAttributes", [...Yi.observedAttributes, ...jo]);
|
|
3581
3608
|
//#endregion
|
|
3582
3609
|
//#region ../../libs/player-next/src/components/PosterOverlay.ts
|
|
3583
|
-
var
|
|
3584
|
-
|
|
3610
|
+
var _s = document.createElement("template");
|
|
3611
|
+
_s.innerHTML = `
|
|
3585
3612
|
<style>
|
|
3586
3613
|
:host {
|
|
3587
3614
|
display: var(--poster-overlay-display);
|
|
@@ -3616,26 +3643,26 @@ cs.innerHTML = `
|
|
|
3616
3643
|
}
|
|
3617
3644
|
</style>
|
|
3618
3645
|
`;
|
|
3619
|
-
var
|
|
3646
|
+
var vs = 6e3, ys = /* @__PURE__ */ new WeakMap(), bs = /* @__PURE__ */ new WeakMap(), xs = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakSet(), ws = /* @__PURE__ */ new WeakMap(), Ts = class extends HTMLElement {
|
|
3620
3647
|
constructor() {
|
|
3621
|
-
super(), h(this,
|
|
3622
|
-
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? f(
|
|
3623
|
-
}), d(this,
|
|
3648
|
+
super(), h(this, Cs), d(this, ys, null), d(this, bs, null), d(this, xs, null), d(this, Ss, () => {
|
|
3649
|
+
!document.hidden && this.hasAttribute("intersecting") && this.paused && !this.disabled ? f(Cs, this, Es).call(this) : f(Cs, this, Ds).call(this);
|
|
3650
|
+
}), d(this, ws, (e) => {
|
|
3624
3651
|
e.forEach((e) => {
|
|
3625
3652
|
e.isIntersecting ? this.setAttribute("intersecting", "") : this.removeAttribute("intersecting");
|
|
3626
3653
|
});
|
|
3627
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3654
|
+
}), this.attachShadow({ mode: "open" }).appendChild(_s.content.cloneNode(!0));
|
|
3628
3655
|
}
|
|
3629
3656
|
connectedCallback() {
|
|
3630
3657
|
var e;
|
|
3631
|
-
m(
|
|
3658
|
+
m(ys, this, this.closest("vindral-controller")), (e = p(ys, this)) == null || e.connectListener(this), document.addEventListener("visibilitychange", p(Ss, this)), m(xs, this, new IntersectionObserver(p(ws, this))), p(xs, this).observe(this);
|
|
3632
3659
|
}
|
|
3633
3660
|
disconnectedCallback() {
|
|
3634
3661
|
var e, t;
|
|
3635
|
-
(e = p(
|
|
3662
|
+
(e = p(ys, this)) == null || e.disconnectListener(this), document.removeEventListener("visibilitychange", p(Ss, this)), (t = p(xs, this)) == null || t.disconnect(), m(xs, this, null), f(Cs, this, Ds).call(this);
|
|
3636
3663
|
}
|
|
3637
3664
|
attributeChangedCallback(e, t, n) {
|
|
3638
|
-
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && f(
|
|
3665
|
+
t !== n && (e === _.POSTER_SRC && this.paused && !this.disabled && f(Cs, this, Os).call(this), (e === _.PAUSED || e === "disabled" || e === "intersecting") && p(Ss, this).call(this));
|
|
3639
3666
|
}
|
|
3640
3667
|
get disabled() {
|
|
3641
3668
|
return this.hasAttribute("disabled");
|
|
@@ -3650,18 +3677,18 @@ var ls = 6e3, us = /* @__PURE__ */ new WeakMap(), ds = /* @__PURE__ */ new WeakM
|
|
|
3650
3677
|
return this.hasAttribute(_.PAUSED);
|
|
3651
3678
|
}
|
|
3652
3679
|
};
|
|
3653
|
-
function
|
|
3654
|
-
p(
|
|
3680
|
+
function Es() {
|
|
3681
|
+
p(bs, this) === null && (f(Cs, this, Ds).call(this), m(bs, this, window.setInterval(() => f(Cs, this, Os).call(this), vs)));
|
|
3655
3682
|
}
|
|
3656
|
-
function
|
|
3657
|
-
p(
|
|
3683
|
+
function Ds() {
|
|
3684
|
+
p(bs, this) !== null && (clearInterval(p(bs, this)), m(bs, this, null)), this.style.backgroundImage = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAQAAACRI2S5AAAAEElEQVR42mNkIAAYRxWAAQAG9gAKqv6+AwAAAABJRU5ErkJggg==')";
|
|
3658
3685
|
}
|
|
3659
|
-
function
|
|
3686
|
+
function Os() {
|
|
3660
3687
|
if (!this.posterSrc) return;
|
|
3661
3688
|
let e = new URL(this.posterSrc), t = new Image();
|
|
3662
3689
|
e.searchParams.set("t", Date.now().toString()), t.src = e.toString(), t.onload = () => this.style.backgroundImage = `url(${e.toString()})`;
|
|
3663
3690
|
}
|
|
3664
|
-
e(
|
|
3691
|
+
e(Ts, "observedAttributes", [
|
|
3665
3692
|
_.POSTER_SRC,
|
|
3666
3693
|
_.PAUSED,
|
|
3667
3694
|
"disabled",
|
|
@@ -3669,70 +3696,70 @@ e(gs, "observedAttributes", [
|
|
|
3669
3696
|
]);
|
|
3670
3697
|
//#endregion
|
|
3671
3698
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenu.ts
|
|
3672
|
-
var
|
|
3673
|
-
|
|
3699
|
+
var ks, As = "\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", js = document.createElement("template");
|
|
3700
|
+
js.innerHTML = `
|
|
3674
3701
|
<style>
|
|
3675
3702
|
:host {
|
|
3676
3703
|
display: var(--rendition-menu-display);
|
|
3677
3704
|
}
|
|
3678
3705
|
</style>
|
|
3679
3706
|
|
|
3680
|
-
<slot name="button">${
|
|
3707
|
+
<slot name="button">${As}</slot>
|
|
3681
3708
|
<slot name="listbox" hidden>
|
|
3682
3709
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3683
3710
|
</slot>
|
|
3684
3711
|
`;
|
|
3685
|
-
var
|
|
3712
|
+
var Ms = /* @__PURE__ */ new WeakSet(), Ns = class extends ze {
|
|
3686
3713
|
constructor() {
|
|
3687
3714
|
var e, t, n, r;
|
|
3688
|
-
super(), h(this,
|
|
3715
|
+
super(), h(this, Ms), (e = this.shadowRoot) == null || e.appendChild(js.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]");
|
|
3689
3716
|
}
|
|
3690
3717
|
connectedCallback() {
|
|
3691
|
-
super.connectedCallback(), f(
|
|
3718
|
+
super.connectedCallback(), f(Ms, this, Ps).call(this), this.setAttribute("aria-label", "Rendition levels");
|
|
3692
3719
|
}
|
|
3693
3720
|
attributeChangedCallback(e, t, n) {
|
|
3694
|
-
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && f(
|
|
3721
|
+
super.attributeChangedCallback(e, t, n), e === _.RENDITION_LEVELS && f(Ms, this, Ps).call(this);
|
|
3695
3722
|
}
|
|
3696
3723
|
};
|
|
3697
|
-
|
|
3698
|
-
function
|
|
3724
|
+
ks = Ns;
|
|
3725
|
+
function Ps() {
|
|
3699
3726
|
let e = this.getAttribute(_.RENDITION_LEVELS);
|
|
3700
3727
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3701
3728
|
}
|
|
3702
|
-
e(
|
|
3729
|
+
e(Ns, "observedAttributes", [...b(ks, "observedAttributes", ks), _.RENDITION_LEVELS]);
|
|
3703
3730
|
//#endregion
|
|
3704
3731
|
//#region ../../libs/player-next/src/components/RenditionLevelsMenuList.ts
|
|
3705
|
-
var
|
|
3706
|
-
|
|
3707
|
-
var
|
|
3732
|
+
var Fs = document.createElement("template");
|
|
3733
|
+
Fs.innerHTML = "\n <style>\n :host {\n font: inherit;\n cursor: default;\n padding: var(--padding-2) !important;\n padding-top: var(--padding-3) !important;\n border-radius: 0.25em;\n position: absolute;\n min-width: 140px !important;\n background: var(--bg-subtle);\n z-index: 1;\n overflow: auto;\n }\n\n :host([list-position=\"top\"]) {\n bottom: calc(100% + 0.5em);\n transform: translate(-50%);\n }\n\n :host([list-position=\"bottom\"]) {\n top: calc(100% + 0.5em);\n }\n\n :host::-webkit-scrollbar {\n width: 5px;\n padding-right: 5px;\n }\n\n :host::-webkit-scrollbar-thumb {\n background-color: var(--fg-extra-subtle);\n border-radius: 10px;\n border: 0;\n }\n\n :host::-webkit-scrollbar-track {\n border-radius: 10px;\n background-color: transparent;\n }\n\n .menu {\n display: grid;\n gap: var(--padding-1);\n }\n\n [role=\"menuitem\"] {\n flex: 1;\n position: relative;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 44px;\n padding: 0 var(--padding-5);\n border-radius: 4px;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n white-space: nowrap;\n text-align: left;\n }\n\n [role=\"menuitem\"]:hover {\n background: var(--bg-component-hover);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"] {\n background: var(--bg-component-active);\n }\n\n [role=\"menuitem\"][aria-selected=\"true\"]::before {\n content: url(\"data:image/svg+xml,%0A%20%20%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2078.369%2078.369%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20d%3D%22M78.049%2019.015%2029.458%2067.606a1.094%201.094%200%200%201-1.548%200L.32%2040.015a1.094%201.094%200%200%201%200-1.547l6.704-6.704a1.095%201.095%200%200%201%201.548%200l20.113%2020.112%2041.113-41.113a1.095%201.095%200%200%201%201.548%200l6.703%206.704a1.094%201.094%200%200%201%200%201.548z%22%2F%3E%3C%2Fsvg%3E%0A\");\n position: absolute;\n left: calc(var(--padding-3) - var(--padding-1));\n top: calc(50% - 8px);\n }\n\n [role=\"menuitem\"]:focus-visible {\n box-shadow: inset 0 0 0 2px var(--fg-strong);\n outline: 0;\n }\n\n .menu-item-subtitle {\n font-size: 11px;\n opacity: 0.6;\n }\n\n .heading {\n text-transform: uppercase;\n margin-bottom: var(--padding-2);\n padding: 0 var(--padding-3);\n font-size: 11px;\n font-weight: bold;\n }\n </style>\n\n <slot>\n <div class=\"heading\">Max quality</div>\n <div class=\"menu\"></div>\n </slot>\n";
|
|
3734
|
+
var Is = /* @__PURE__ */ new WeakMap(), Ls = /* @__PURE__ */ new WeakMap(), Rs = /* @__PURE__ */ new WeakMap(), zs = /* @__PURE__ */ new WeakMap(), Bs = /* @__PURE__ */ new WeakMap(), Vs = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakSet(), Hs = class extends HTMLElement {
|
|
3708
3735
|
constructor() {
|
|
3709
|
-
super(), h(this, X), d(this,
|
|
3736
|
+
super(), h(this, X), d(this, Is, []), d(this, Ls, 2 ** 53 - 1), d(this, Rs, null), d(this, zs, []), d(this, Bs, null), d(this, Vs, null), e(this, "handleEvent", (e) => {
|
|
3710
3737
|
switch (e.type) {
|
|
3711
3738
|
case "keydown":
|
|
3712
|
-
f(X, this,
|
|
3739
|
+
f(X, this, Js).call(this, e);
|
|
3713
3740
|
break;
|
|
3714
3741
|
}
|
|
3715
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3742
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Fs.content.cloneNode(!0));
|
|
3716
3743
|
}
|
|
3717
3744
|
connectedCallback() {
|
|
3718
3745
|
let e = this.getRootNode();
|
|
3719
3746
|
if (e instanceof ShadowRoot) {
|
|
3720
3747
|
var t;
|
|
3721
|
-
m(
|
|
3748
|
+
m(Bs, this, e.host.closest("vindral-controller")), (t = p(Bs, this)) == null || t.connectListener(this), f(X, this, Us).call(this), f(X, this, Ws).call(this), m(Vs, this, e.host), this.addEventListener("keydown", this);
|
|
3722
3749
|
}
|
|
3723
3750
|
}
|
|
3724
3751
|
disconnectedCallback() {
|
|
3725
3752
|
var e;
|
|
3726
|
-
(e = p(
|
|
3753
|
+
(e = p(Bs, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3727
3754
|
}
|
|
3728
3755
|
attributeChangedCallback(e, t, n) {
|
|
3729
3756
|
t !== n && (e === _.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === _.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3730
3757
|
}
|
|
3731
3758
|
set list(e) {
|
|
3732
|
-
m(
|
|
3759
|
+
m(Is, this, e), f(X, this, Ws).call(this);
|
|
3733
3760
|
}
|
|
3734
3761
|
set maxVideoBitrate(e) {
|
|
3735
|
-
m(
|
|
3762
|
+
m(Ls, this, e), f(X, this, Ks).call(this);
|
|
3736
3763
|
}
|
|
3737
3764
|
get keysUsed() {
|
|
3738
3765
|
return [
|
|
@@ -3748,10 +3775,10 @@ var Ds = /* @__PURE__ */ new WeakMap(), Os = /* @__PURE__ */ new WeakMap(), ks =
|
|
|
3748
3775
|
}
|
|
3749
3776
|
focus() {
|
|
3750
3777
|
var e;
|
|
3751
|
-
(e = p(
|
|
3778
|
+
(e = p(Rs, this)) == null || e.focus();
|
|
3752
3779
|
}
|
|
3753
3780
|
};
|
|
3754
|
-
function
|
|
3781
|
+
function Us() {
|
|
3755
3782
|
new IntersectionObserver((e) => {
|
|
3756
3783
|
e.forEach((e) => {
|
|
3757
3784
|
if (e.intersectionRatio !== 1) if (e.intersectionRatio > 0) {
|
|
@@ -3760,50 +3787,50 @@ function Ps() {
|
|
|
3760
3787
|
} else this.style.height = "auto";
|
|
3761
3788
|
});
|
|
3762
3789
|
}, {
|
|
3763
|
-
root: p(
|
|
3790
|
+
root: p(Bs, this),
|
|
3764
3791
|
threshold: 0
|
|
3765
3792
|
}).observe(this);
|
|
3766
3793
|
}
|
|
3767
|
-
function
|
|
3794
|
+
function Ws() {
|
|
3768
3795
|
var e;
|
|
3769
3796
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
3770
|
-
t && (m(
|
|
3797
|
+
t && (m(zs, this, []), t.innerHTML = "", p(Is, this).sort((e, t) => {
|
|
3771
3798
|
var n, r;
|
|
3772
3799
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3773
3800
|
}).forEach((e) => {
|
|
3774
3801
|
var n, r, i, a, o, s, c, ee;
|
|
3775
3802
|
let l = document.createElement("div");
|
|
3776
3803
|
l.setAttribute("role", "menuitem"), l.setAttribute("value", String((n = e.video) == null ? void 0 : n.height)), l.classList.add("menu-item"), l.tabIndex = -1;
|
|
3777
|
-
let te = f(X, this,
|
|
3778
|
-
l.textContent = e.video ?
|
|
3804
|
+
let te = f(X, this, Gs).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
3805
|
+
l.textContent = e.video ? Ee(e.video) : "";
|
|
3779
3806
|
let u = document.createElement("span");
|
|
3780
|
-
u.classList.add("menu-item-subtitle"), u.textContent = `${
|
|
3807
|
+
u.classList.add("menu-item-subtitle"), u.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))}, ${te}p`, l.appendChild(u), l.addEventListener("click", () => f(X, this, qs).call(this, e)), p(zs, this).push({
|
|
3781
3808
|
el: l,
|
|
3782
3809
|
id: (c = (ee = e.video) == null ? void 0 : ee.id) == null ? -1 : c
|
|
3783
3810
|
}), t.appendChild(l);
|
|
3784
|
-
}), f(X, this,
|
|
3811
|
+
}), f(X, this, Ks).call(this));
|
|
3785
3812
|
}
|
|
3786
|
-
function
|
|
3813
|
+
function Gs(e) {
|
|
3787
3814
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
3788
3815
|
}
|
|
3789
|
-
function
|
|
3790
|
-
p(
|
|
3791
|
-
let e = p(
|
|
3816
|
+
function Ks() {
|
|
3817
|
+
p(Rs, this) && (p(Rs, this).removeAttribute("aria-selected"), p(Rs, this).tabIndex = -1);
|
|
3818
|
+
let e = p(Is, this).sort((e, t) => {
|
|
3792
3819
|
var n, r;
|
|
3793
3820
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
3794
|
-
}), t = p(
|
|
3821
|
+
}), t = p(Is, this).filter((e) => {
|
|
3795
3822
|
var t;
|
|
3796
|
-
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= p(
|
|
3823
|
+
return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= p(Ls, this);
|
|
3797
3824
|
})[0] || e[e.length - 1];
|
|
3798
3825
|
if (t) {
|
|
3799
|
-
let e = p(
|
|
3826
|
+
let e = p(zs, this).find((e) => {
|
|
3800
3827
|
var n;
|
|
3801
3828
|
return e.id === ((n = t.video) == null ? void 0 : n.id);
|
|
3802
3829
|
});
|
|
3803
|
-
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(
|
|
3830
|
+
e && (e.el.tabIndex = 0, e.el.setAttribute("aria-selected", "true"), m(Rs, this, e.el));
|
|
3804
3831
|
}
|
|
3805
3832
|
}
|
|
3806
|
-
function
|
|
3833
|
+
function qs(e) {
|
|
3807
3834
|
this.dispatchEvent(new Event("change", {
|
|
3808
3835
|
bubbles: !0,
|
|
3809
3836
|
composed: !0
|
|
@@ -3813,36 +3840,36 @@ function Rs(e) {
|
|
|
3813
3840
|
detail: e
|
|
3814
3841
|
}));
|
|
3815
3842
|
}
|
|
3816
|
-
function
|
|
3843
|
+
function Js(e) {
|
|
3817
3844
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
3818
3845
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
3819
3846
|
var a;
|
|
3820
|
-
(a = p(
|
|
3847
|
+
(a = p(Vs, this)) == null || a.hide();
|
|
3821
3848
|
} else if (t === "Enter" || t === " ") {
|
|
3822
3849
|
var o;
|
|
3823
|
-
(o = f(X, this,
|
|
3824
|
-
} else f(X, this,
|
|
3850
|
+
(o = f(X, this, Xs).call(this)) == null || (o = o.el) == null || o.click();
|
|
3851
|
+
} else f(X, this, Ys).call(this, e);
|
|
3825
3852
|
}
|
|
3826
|
-
function
|
|
3853
|
+
function Ys(e) {
|
|
3827
3854
|
var t;
|
|
3828
|
-
let { key: n } = e, r = p(
|
|
3855
|
+
let { key: n } = e, r = p(zs, this), i = (t = f(X, this, Xs).call(this)) == null ? r[0] : t;
|
|
3829
3856
|
if (!i) return;
|
|
3830
3857
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
3831
3858
|
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);
|
|
3832
3859
|
let s = r[o];
|
|
3833
|
-
s && (f(X, this,
|
|
3860
|
+
s && (f(X, this, Zs).call(this, s.id), s.el.focus());
|
|
3834
3861
|
}
|
|
3835
|
-
function
|
|
3836
|
-
return p(
|
|
3862
|
+
function Xs() {
|
|
3863
|
+
return p(zs, this).find((e) => e.el.tabIndex === 0);
|
|
3837
3864
|
}
|
|
3838
|
-
function
|
|
3839
|
-
for (let t of p(
|
|
3865
|
+
function Zs(e) {
|
|
3866
|
+
for (let t of p(zs, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
3840
3867
|
}
|
|
3841
|
-
e(
|
|
3868
|
+
e(Hs, "observedAttributes", [_.RENDITION_LEVELS, _.MAX_VIDEO_BITRATE]);
|
|
3842
3869
|
//#endregion
|
|
3843
3870
|
//#region ../../libs/player-next/src/components/ScrollOverlay.ts
|
|
3844
|
-
var
|
|
3845
|
-
|
|
3871
|
+
var Qs = document.createElement("template");
|
|
3872
|
+
Qs.innerHTML = `
|
|
3846
3873
|
<style>
|
|
3847
3874
|
:host {
|
|
3848
3875
|
--scroll-overlay-offset: var(--vindral-scroll-overlay-offset, 0px);
|
|
@@ -3910,71 +3937,71 @@ Us.innerHTML = `
|
|
|
3910
3937
|
<div id="scroll-area"></div>
|
|
3911
3938
|
<slot id="content"></slot>
|
|
3912
3939
|
`;
|
|
3913
|
-
var
|
|
3940
|
+
var $s = /* @__PURE__ */ new WeakMap(), ec = /* @__PURE__ */ new WeakMap(), tc = /* @__PURE__ */ new WeakMap(), nc = /* @__PURE__ */ new WeakMap(), rc = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakSet(), oc = /* @__PURE__ */ new WeakMap(), sc = class extends HTMLElement {
|
|
3914
3941
|
constructor() {
|
|
3915
|
-
super(), h(this, Z), d(this,
|
|
3942
|
+
super(), h(this, Z), d(this, $s, null), d(this, ec, null), d(this, tc, !1), d(this, nc, !1), d(this, rc, !1), d(this, ic, () => {
|
|
3916
3943
|
this.open && (this.open = !1);
|
|
3917
|
-
}), d(this,
|
|
3944
|
+
}), d(this, ac, null), e(this, "handleEvent", (e) => {
|
|
3918
3945
|
switch (e.type) {
|
|
3919
3946
|
case "touchstart":
|
|
3920
|
-
f(Z, this,
|
|
3947
|
+
f(Z, this, lc).call(this, e);
|
|
3921
3948
|
break;
|
|
3922
3949
|
case "touchmove":
|
|
3923
|
-
f(Z, this,
|
|
3950
|
+
f(Z, this, uc).call(this, e);
|
|
3924
3951
|
break;
|
|
3925
3952
|
case "touchend":
|
|
3926
|
-
f(Z, this,
|
|
3953
|
+
f(Z, this, dc).call(this, e);
|
|
3927
3954
|
break;
|
|
3928
3955
|
}
|
|
3929
|
-
}), d(this,
|
|
3930
|
-
let e = p(
|
|
3956
|
+
}), d(this, oc, () => {
|
|
3957
|
+
let e = p(rc, this);
|
|
3931
3958
|
if (this.scrollTop === 0) {
|
|
3932
|
-
f(Z, this,
|
|
3959
|
+
f(Z, this, yc).call(this, e);
|
|
3933
3960
|
return;
|
|
3934
3961
|
}
|
|
3935
|
-
if (!e && !f(Z, this,
|
|
3936
|
-
f(Z, this,
|
|
3962
|
+
if (!e && !f(Z, this, fc).call(this)) {
|
|
3963
|
+
f(Z, this, _c).call(this), f(Z, this, yc).call(this);
|
|
3937
3964
|
return;
|
|
3938
3965
|
}
|
|
3939
|
-
!this.visible && this.scrollTop > 0 && !p(
|
|
3940
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
3966
|
+
!this.visible && this.scrollTop > 0 && !p(tc, this) ? f(Z, this, bc).call(this) : !p(tc, this) && f(Z, this, mc).call(this) && (this.open || (this.open = !0), e && !this.hasAttribute("snap-touch") && this.setAttribute("snap-touch", ""));
|
|
3967
|
+
}), this.attachShadow({ mode: "open" }).appendChild(Qs.content.cloneNode(!0));
|
|
3941
3968
|
}
|
|
3942
3969
|
connectedCallback() {
|
|
3943
3970
|
let e = this.getRootNode();
|
|
3944
3971
|
if (e instanceof Document || e instanceof ShadowRoot) {
|
|
3945
3972
|
var t, n, r;
|
|
3946
|
-
m(
|
|
3973
|
+
m($s, this, e.querySelector("vindral-controller")), (t = p($s, this)) == null || t.connectListener(this), m(ec, this, (n = this.shadowRoot) == null ? void 0 : n.querySelector("#scroll-area")), (r = p(ec, this)) == null || r.addEventListener("click", p(ic, this));
|
|
3947
3974
|
let s = this.hasAttribute("touch-enabled");
|
|
3948
|
-
if (m(
|
|
3975
|
+
if (m(rc, this, le() && s), !p(rc, this)) this.setAttribute("snap", "");
|
|
3949
3976
|
else {
|
|
3950
3977
|
var i, a, o;
|
|
3951
|
-
(i = p(
|
|
3978
|
+
(i = p($s, this)) == null || i.addEventListener("touchstart", this, { passive: !0 }), (a = p($s, this)) == null || a.addEventListener("touchmove", this, { passive: !1 }), (o = p($s, this)) == null || o.addEventListener("touchend", this, { passive: !0 });
|
|
3952
3979
|
}
|
|
3953
|
-
this.addEventListener("scroll", p(
|
|
3980
|
+
this.addEventListener("scroll", p(oc, this));
|
|
3954
3981
|
}
|
|
3955
3982
|
}
|
|
3956
3983
|
disconnectedCallback() {
|
|
3957
3984
|
var e, t, n, r, i;
|
|
3958
|
-
(e = p(
|
|
3985
|
+
(e = p(ec, this)) == null || e.removeEventListener("click", p(ic, this)), this.removeEventListener("scroll", p(oc, this)), (t = p($s, this)) == null || t.removeEventListener("touchstart", this), (n = p($s, this)) == null || n.removeEventListener("touchmove", this), (r = p($s, this)) == null || r.removeEventListener("touchend", this), (i = p($s, this)) == null || i.disconnectListener(this);
|
|
3959
3986
|
}
|
|
3960
3987
|
attributeChangedCallback(e, t, n) {
|
|
3961
|
-
if (t !== n && (e === _.USER_INTERACTING && n === null && f(Z, this,
|
|
3988
|
+
if (t !== n && (e === _.USER_INTERACTING && n === null && f(Z, this, pc).call(this) && setTimeout(() => {
|
|
3962
3989
|
this.open = !1;
|
|
3963
3990
|
}, 300), e === "open")) if (n !== null) {
|
|
3964
3991
|
var r;
|
|
3965
|
-
m(
|
|
3966
|
-
top: (r = p(
|
|
3992
|
+
m(tc, this, !1), this.scrollTop > 0 && f(Z, this, bc).call(this), this.scrollTo({
|
|
3993
|
+
top: (r = p(ec, this)) == null ? void 0 : r.clientHeight,
|
|
3967
3994
|
behavior: "smooth"
|
|
3968
3995
|
});
|
|
3969
|
-
} else f(Z, this,
|
|
3996
|
+
} else f(Z, this, vc).call(this);
|
|
3970
3997
|
}
|
|
3971
3998
|
set open(e) {
|
|
3972
3999
|
if (e) {
|
|
3973
4000
|
this.setAttribute("open", "");
|
|
3974
4001
|
return;
|
|
3975
4002
|
}
|
|
3976
|
-
let t = this.hasAttribute("open"), n = this.visible || f(Z, this,
|
|
3977
|
-
t ? this.removeAttribute("open") : n ? f(Z, this,
|
|
4003
|
+
let t = this.hasAttribute("open"), n = this.visible || f(Z, this, pc).call(this);
|
|
4004
|
+
t ? this.removeAttribute("open") : n ? f(Z, this, vc).call(this) : (m(tc, this, !1), this.removeAttribute("snap-touch"));
|
|
3978
4005
|
}
|
|
3979
4006
|
get open() {
|
|
3980
4007
|
return this.hasAttribute("open");
|
|
@@ -3986,125 +4013,125 @@ var Ws = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), Ks =
|
|
|
3986
4013
|
return this.hasAttribute("visible");
|
|
3987
4014
|
}
|
|
3988
4015
|
};
|
|
3989
|
-
function
|
|
3990
|
-
return f(Z, this,
|
|
4016
|
+
function cc() {
|
|
4017
|
+
return f(Z, this, fc).call(this) || f(Z, this, gc).call(this) || f(Z, this, pc).call(this);
|
|
3991
4018
|
}
|
|
3992
|
-
function
|
|
4019
|
+
function lc(e) {
|
|
3993
4020
|
let t = e.touches[0];
|
|
3994
|
-
t && (m(
|
|
4021
|
+
t && (m(nc, this, f(Z, this, cc).call(this)), p(nc, this) && (m(tc, this, !1), m(ac, this, t.clientY)));
|
|
3995
4022
|
}
|
|
3996
|
-
function
|
|
3997
|
-
if (!(!p(
|
|
3998
|
-
let t = e.touches[0].clientY, n = p(
|
|
4023
|
+
function uc(e) {
|
|
4024
|
+
if (!(!p(nc, this) || p(ac, this) === null || this.hasAttribute("snap-touch") && this.open) && (e.preventDefault(), e.touches[0])) {
|
|
4025
|
+
let t = e.touches[0].clientY, n = p(ac, this) - t;
|
|
3999
4026
|
this.scrollTop = Math.max(0, n);
|
|
4000
4027
|
}
|
|
4001
4028
|
}
|
|
4002
|
-
function
|
|
4003
|
-
p(
|
|
4029
|
+
function dc(e) {
|
|
4030
|
+
p(nc, this) && !p(tc, this) && f(Z, this, pc).call(this) && (!this.hasAttribute("snap-touch") || !this.open) && (this.open = !0), m(ac, this, null), m(nc, this, !1);
|
|
4004
4031
|
}
|
|
4005
|
-
function
|
|
4032
|
+
function fc() {
|
|
4006
4033
|
return this.hasAttribute(_.USER_INTERACTING);
|
|
4007
4034
|
}
|
|
4008
|
-
function
|
|
4035
|
+
function pc() {
|
|
4009
4036
|
return this.scrollTop > 0;
|
|
4010
4037
|
}
|
|
4011
|
-
function
|
|
4038
|
+
function mc() {
|
|
4012
4039
|
var e;
|
|
4013
|
-
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = p(
|
|
4040
|
+
return Math.round(this.scrollTop) === this.scrollHeight - this.clientHeight || Math.round(this.scrollTop) === ((e = p(ec, this)) == null ? void 0 : e.clientHeight);
|
|
4014
4041
|
}
|
|
4015
|
-
function
|
|
4042
|
+
function hc() {
|
|
4016
4043
|
var e;
|
|
4017
|
-
let t = (e = p(
|
|
4044
|
+
let t = (e = p(ec, this)) == null ? void 0 : e.clientHeight;
|
|
4018
4045
|
return !t || this.clientHeight <= 0 ? 0 : Math.max(this.clientHeight - t, 0);
|
|
4019
4046
|
}
|
|
4020
|
-
function
|
|
4047
|
+
function gc() {
|
|
4021
4048
|
let e = getComputedStyle(this), t = Number.parseFloat(e.getPropertyValue("--vindral-scroll-overlay-offset"));
|
|
4022
|
-
return Number.isNaN(t) ? f(Z, this,
|
|
4049
|
+
return Number.isNaN(t) ? f(Z, this, hc).call(this) > 0 : t > 0;
|
|
4023
4050
|
}
|
|
4024
|
-
function
|
|
4051
|
+
function _c() {
|
|
4025
4052
|
let e = this.style.scrollBehavior;
|
|
4026
4053
|
this.style.scrollBehavior = "auto", this.scrollTo({
|
|
4027
4054
|
top: 0,
|
|
4028
4055
|
behavior: "auto"
|
|
4029
4056
|
}), this.style.scrollBehavior = e;
|
|
4030
4057
|
}
|
|
4031
|
-
function
|
|
4032
|
-
m(
|
|
4058
|
+
function vc() {
|
|
4059
|
+
m(tc, this, !0), this.removeAttribute("snap-touch"), f(Z, this, xc).call(this), this.scrollTo({
|
|
4033
4060
|
top: 0,
|
|
4034
4061
|
behavior: "smooth"
|
|
4035
4062
|
});
|
|
4036
4063
|
}
|
|
4037
|
-
function
|
|
4038
|
-
this.open = !1, e && this.removeAttribute("snap-touch"), m(
|
|
4064
|
+
function yc(e = !1) {
|
|
4065
|
+
this.open = !1, e && this.removeAttribute("snap-touch"), m(tc, this, !1), f(Z, this, xc).call(this);
|
|
4039
4066
|
}
|
|
4040
|
-
function
|
|
4067
|
+
function bc() {
|
|
4041
4068
|
this.visible || (this.visible = !0, this.dispatchEvent(new CustomEvent(v.LOCK_UI, {
|
|
4042
4069
|
bubbles: !0,
|
|
4043
4070
|
composed: !0
|
|
4044
4071
|
})));
|
|
4045
4072
|
}
|
|
4046
|
-
function
|
|
4073
|
+
function xc() {
|
|
4047
4074
|
this.visible && (this.visible = !1, this.dispatchEvent(new CustomEvent(v.UNLOCK_UI, {
|
|
4048
4075
|
bubbles: !0,
|
|
4049
4076
|
composed: !0
|
|
4050
4077
|
})));
|
|
4051
4078
|
}
|
|
4052
|
-
e(
|
|
4079
|
+
e(sc, "observedAttributes", [
|
|
4053
4080
|
_.USER_INTERACTING,
|
|
4054
4081
|
"open",
|
|
4055
4082
|
"touch-enabled"
|
|
4056
4083
|
]);
|
|
4057
4084
|
//#endregion
|
|
4058
4085
|
//#region ../../libs/player-next/src/components/SeekBar.ts
|
|
4059
|
-
var
|
|
4060
|
-
|
|
4061
|
-
var Q = /* @__PURE__ */ new WeakMap(),
|
|
4086
|
+
var Sc = 1e3, Cc = 8, wc = document.createElement("template");
|
|
4087
|
+
wc.innerHTML = "\n <style>\n :host {\n --buffered: 0;\n --vindral-range-thickness: 3px;\n --vindral-range-hover-thickness: 5px;\n --vindral-range-thumb-size: 10px;\n --vindral-range-thumb-hover-size: 15px;\n --vindral-range-fill-color: linear-gradient(\n 90deg,\n #03a9f4 0%,\n #03a9f4 calc(100% - min(20%, 150px)),\n #b3e5fc 100%\n );\n --vindral-range-thumb-color: #03a9f4;\n display: var(--seek-bar-display);\n position: relative;\n }\n\n :host([data-no-duration]) {\n display: none;\n }\n\n #hover-preview {\n position: absolute;\n background-color: rgba(255, 255, 255, 0.6);\n opacity: 0;\n pointer-events: none;\n z-index: 1;\n }\n\n #time-tooltip {\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%) translateY(-8px);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n white-space: nowrap;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s;\n z-index: 10;\n }\n\n @media (hover: none) {\n #time-tooltip {\n display: none;\n }\n }\n\n #markers {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 2;\n }\n\n .marker {\n position: absolute;\n top: calc(50% - var(--vindral-seek-bar-marker-size, 6px) / 2);\n width: var(--vindral-seek-bar-marker-size, 6px);\n height: var(--vindral-seek-bar-marker-size, 6px);\n border-radius: 50%;\n transform: translateX(-50%);\n background: var(--vindral-seek-bar-marker-color, #ffffff);\n }\n </style>\n\n <div id=\"buffered-track\"></div>\n <div id=\"hover-preview\"></div>\n <div id=\"markers\"></div>\n <div id=\"time-tooltip\"></div>\n";
|
|
4088
|
+
var Q = /* @__PURE__ */ new WeakMap(), Tc = /* @__PURE__ */ new WeakMap(), Ec = /* @__PURE__ */ new WeakMap(), Dc = /* @__PURE__ */ new WeakMap(), Oc = /* @__PURE__ */ new WeakMap(), kc = /* @__PURE__ */ new WeakMap(), Ac = /* @__PURE__ */ new WeakMap(), jc = /* @__PURE__ */ new WeakMap(), Mc = /* @__PURE__ */ new WeakMap(), Nc = /* @__PURE__ */ new WeakMap(), Pc = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), Fc = /* @__PURE__ */ new WeakMap(), Ic = /* @__PURE__ */ new WeakMap(), Lc = /* @__PURE__ */ new WeakMap(), Rc = /* @__PURE__ */ new WeakMap(), zc = /* @__PURE__ */ new WeakMap(), Bc = /* @__PURE__ */ new WeakMap(), Vc = class extends qr {
|
|
4062
4089
|
constructor() {
|
|
4063
4090
|
var e, t, n, r;
|
|
4064
|
-
super(), h(this, $), d(this, Q, void 0), d(this,
|
|
4065
|
-
if (!f($, this,
|
|
4091
|
+
super(), h(this, $), d(this, Q, void 0), d(this, Tc, void 0), d(this, Ec, void 0), d(this, Dc, void 0), d(this, Oc, []), d(this, kc, null), d(this, Ac, !1), d(this, jc, null), d(this, Mc, null), d(this, Nc, !1), d(this, Pc, !1), d(this, Fc, (e) => {
|
|
4092
|
+
if (!f($, this, Wc).call(this) || f($, this, Gc).call(this)) {
|
|
4066
4093
|
e.preventDefault();
|
|
4067
4094
|
return;
|
|
4068
4095
|
}
|
|
4069
|
-
m(
|
|
4096
|
+
m(Ac, this, !0), m(Mc, this, e.pointerId);
|
|
4070
4097
|
try {
|
|
4071
4098
|
this.setPointerCapture(e.pointerId);
|
|
4072
4099
|
} catch (e) {}
|
|
4073
|
-
f($, this,
|
|
4074
|
-
}), d(this,
|
|
4075
|
-
if (!(!f($, this,
|
|
4076
|
-
if (p(
|
|
4077
|
-
e.preventDefault(), f($, this,
|
|
4100
|
+
f($, this, $c).call(this, e);
|
|
4101
|
+
}), d(this, Ic, (e) => {
|
|
4102
|
+
if (!(!f($, this, Wc).call(this) || f($, this, Gc).call(this))) {
|
|
4103
|
+
if (p(jc, this) && (cancelAnimationFrame(p(jc, this)), m(jc, this, null)), p(Ac, this) && e.pointerId === p(Mc, this)) {
|
|
4104
|
+
e.preventDefault(), f($, this, $c).call(this, e);
|
|
4078
4105
|
return;
|
|
4079
4106
|
}
|
|
4080
|
-
m(
|
|
4107
|
+
m(jc, this, requestAnimationFrame(() => {
|
|
4081
4108
|
var t;
|
|
4082
|
-
if (e.pointerType !== "mouse" || p(
|
|
4083
|
-
p(
|
|
4109
|
+
if (e.pointerType !== "mouse" || p(Ac, this) || !this.duration) {
|
|
4110
|
+
p(Ec, this).style.opacity = "0", m(jc, this, null);
|
|
4084
4111
|
return;
|
|
4085
4112
|
}
|
|
4086
|
-
let n = f($, this,
|
|
4087
|
-
if (f($, this,
|
|
4113
|
+
let n = f($, this, Qc).call(this, e.clientX), r = f($, this, Xc).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4114
|
+
if (f($, this, tl).call(this, i, r), i > this.range.valueAsNumber) {
|
|
4088
4115
|
let e = this.range.valueAsNumber * 100, t = (i - this.range.valueAsNumber) * 100;
|
|
4089
|
-
p(
|
|
4090
|
-
} else p(
|
|
4091
|
-
m(
|
|
4116
|
+
p(Ec, this).style.transform = `translateX(${e}%) scaleX(${t / 100})`, p(Ec, this).style.opacity = "1";
|
|
4117
|
+
} else p(Ec, this).style.opacity = "0";
|
|
4118
|
+
m(jc, this, null);
|
|
4092
4119
|
}));
|
|
4093
4120
|
}
|
|
4094
|
-
}), d(this,
|
|
4095
|
-
if (e.pointerId === p(
|
|
4121
|
+
}), d(this, Lc, (e) => {
|
|
4122
|
+
if (e.pointerId === p(Mc, this)) {
|
|
4096
4123
|
try {
|
|
4097
4124
|
this.releasePointerCapture(e.pointerId);
|
|
4098
4125
|
} catch (e) {}
|
|
4099
|
-
m(
|
|
4126
|
+
m(Ac, this, !1), m(Mc, this, null), e.pointerType !== "mouse" && (p(Tc, this).style.opacity = "0"), p(Pc, this) && f($, this, il).call(this) && (m(Nc, this, !1), m(Pc, this, !1));
|
|
4100
4127
|
}
|
|
4101
|
-
}), d(this,
|
|
4102
|
-
this.duration && !f($, this,
|
|
4103
|
-
}), d(this,
|
|
4104
|
-
p(
|
|
4105
|
-
}), d(this,
|
|
4106
|
-
if (f($, this,
|
|
4107
|
-
let t = f($, this,
|
|
4128
|
+
}), d(this, Rc, () => {
|
|
4129
|
+
this.duration && !f($, this, Gc).call(this) && (p(Tc, this).style.opacity = "1");
|
|
4130
|
+
}), d(this, zc, () => {
|
|
4131
|
+
p(Tc, this).style.opacity = "0", p(Ec, this).style.opacity = "0";
|
|
4132
|
+
}), d(this, Bc, (e) => {
|
|
4133
|
+
if (f($, this, Gc).call(this) || !p(Q, this) || p(Q, this) <= 0 || !Number.isFinite(p(Q, this))) return;
|
|
4134
|
+
let t = f($, this, Hc).call(this);
|
|
4108
4135
|
if (t <= 0) return;
|
|
4109
4136
|
let n = this.range.valueAsNumber * t, r = n;
|
|
4110
4137
|
switch (e.preventDefault(), e.key) {
|
|
@@ -4112,46 +4139,46 @@ var Q = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), _c =
|
|
|
4112
4139
|
r = Math.max(0, n - 5);
|
|
4113
4140
|
break;
|
|
4114
4141
|
case "ArrowRight":
|
|
4115
|
-
if (f($, this,
|
|
4142
|
+
if (f($, this, il).call(this)) return;
|
|
4116
4143
|
r = Math.min(t, n + 5);
|
|
4117
4144
|
break;
|
|
4118
4145
|
case "Home":
|
|
4119
4146
|
r = 0;
|
|
4120
4147
|
break;
|
|
4121
4148
|
case "End":
|
|
4122
|
-
if (f($, this,
|
|
4149
|
+
if (f($, this, il).call(this)) return;
|
|
4123
4150
|
r = t;
|
|
4124
4151
|
break;
|
|
4125
4152
|
default: return;
|
|
4126
4153
|
}
|
|
4127
4154
|
let i = Math.min(r / t, 1);
|
|
4128
|
-
f($, this,
|
|
4129
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4155
|
+
f($, this, el).call(this, i);
|
|
4156
|
+
}), (e = this.shadowRoot) == null || e.appendChild(wc.content.cloneNode(!0)), m(Tc, this, (t = this.shadowRoot) == null ? void 0 : t.getElementById("time-tooltip")), m(Ec, this, (n = this.shadowRoot) == null ? void 0 : n.getElementById("hover-preview")), m(Dc, this, (r = this.shadowRoot) == null ? void 0 : r.getElementById("markers")), this.addEventListener("pointerdown", p(Fc, this)), this.addEventListener("pointermove", p(Ic, this)), this.addEventListener("pointerup", p(Lc, this)), this.addEventListener("pointercancel", p(Lc, this)), this.addEventListener("mouseenter", p(Rc, this)), this.addEventListener("mouseleave", p(zc, this));
|
|
4130
4157
|
}
|
|
4131
4158
|
connectedCallback() {
|
|
4132
|
-
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), f($, this,
|
|
4159
|
+
super.connectedCallback(), this.setAttribute("aria-label", "Seek video position"), this.setAttribute("role", "slider"), f($, this, Zc).call(this), this.addEventListener("keydown", p(Bc, this)), f($, this, il).call(this) && (this.range.value = "1", f($, this, Zc).call(this)), f($, this, Kc).call(this), f($, this, Jc).call(this);
|
|
4133
4160
|
}
|
|
4134
4161
|
disconnectedCallback() {
|
|
4135
|
-
super.disconnectedCallback(), f($, this,
|
|
4162
|
+
super.disconnectedCallback(), f($, this, Yc).call(this), this.removeEventListener("pointerdown", p(Fc, this)), this.removeEventListener("pointermove", p(Ic, this)), this.removeEventListener("pointerup", p(Lc, this)), this.removeEventListener("pointercancel", p(Lc, this)), this.removeEventListener("mouseenter", p(Rc, this)), this.removeEventListener("mouseleave", p(zc, this)), this.removeEventListener("keydown", p(Bc, this)), m(Mc, this, null);
|
|
4136
4163
|
}
|
|
4137
4164
|
attributeChangedCallback(e, t, n) {
|
|
4138
4165
|
if (super.attributeChangedCallback(e, t, n), t !== n) switch (e) {
|
|
4139
4166
|
case _.TIMESHIFT_POSITION:
|
|
4140
|
-
if (f($, this,
|
|
4141
|
-
p(
|
|
4167
|
+
if (f($, this, il).call(this)) {
|
|
4168
|
+
p(Ac, this) ? m(Pc, this, !0) : (m(Nc, this, !1), m(Pc, this, !1)), this.range.value = "1", f($, this, Zc).call(this);
|
|
4142
4169
|
return;
|
|
4143
4170
|
}
|
|
4144
4171
|
if (p(Q, this)) {
|
|
4145
|
-
m(
|
|
4172
|
+
m(Pc, this, !1);
|
|
4146
4173
|
let e = Math.max(parseFloat(n) / p(Q, this), 0);
|
|
4147
|
-
this.range.value = e.toString(), f($, this,
|
|
4174
|
+
this.range.value = e.toString(), f($, this, Zc).call(this);
|
|
4148
4175
|
}
|
|
4149
4176
|
break;
|
|
4150
4177
|
case _.DURATION:
|
|
4151
|
-
m(Q, this, parseFloat(n) || 0), f($, this,
|
|
4178
|
+
m(Q, this, parseFloat(n) || 0), f($, this, Zc).call(this), f($, this, Kc).call(this), f($, this, Jc).call(this);
|
|
4152
4179
|
break;
|
|
4153
4180
|
case _.TIMELINE_MARKERS:
|
|
4154
|
-
m(
|
|
4181
|
+
m(Oc, this, ur(n)), f($, this, Kc).call(this), f($, this, Jc).call(this);
|
|
4155
4182
|
break;
|
|
4156
4183
|
}
|
|
4157
4184
|
}
|
|
@@ -4169,54 +4196,54 @@ var Q = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), _c =
|
|
|
4169
4196
|
this.setAttribute(_.DURATION, e.toString());
|
|
4170
4197
|
}
|
|
4171
4198
|
};
|
|
4172
|
-
function
|
|
4199
|
+
function Hc() {
|
|
4173
4200
|
return p(Q, this) ? p(Q, this) : 1;
|
|
4174
4201
|
}
|
|
4175
|
-
function
|
|
4202
|
+
function Uc() {
|
|
4176
4203
|
let e = p(Q, this);
|
|
4177
4204
|
return e !== void 0 && e > 0 && Number.isFinite(e) ? e : void 0;
|
|
4178
4205
|
}
|
|
4179
|
-
function
|
|
4180
|
-
return f($, this,
|
|
4206
|
+
function Wc() {
|
|
4207
|
+
return f($, this, Uc).call(this) !== void 0;
|
|
4181
4208
|
}
|
|
4182
|
-
function
|
|
4183
|
-
return p(
|
|
4209
|
+
function Gc() {
|
|
4210
|
+
return p(Nc, this);
|
|
4184
4211
|
}
|
|
4185
|
-
function
|
|
4212
|
+
function Kc() {
|
|
4186
4213
|
var e;
|
|
4187
|
-
let t = Date.now(), n = (e = p(Q, this)) == null ? 0 : e, r = p(
|
|
4188
|
-
for (let e of p(
|
|
4189
|
-
let a =
|
|
4214
|
+
let t = Date.now(), n = (e = p(Q, this)) == null ? 0 : e, r = p(Dc, this).children, i = 0;
|
|
4215
|
+
for (let e of p(Oc, this)) {
|
|
4216
|
+
let a = dr(e.time, t, n);
|
|
4190
4217
|
if (a === null) continue;
|
|
4191
4218
|
let o = r[i];
|
|
4192
|
-
o || (o = document.createElement("div"), o.className = "marker", p(
|
|
4219
|
+
o || (o = document.createElement("div"), o.className = "marker", p(Dc, this).appendChild(o)), o.style.left = `${a * 100}%`, o.dataset.label = e.label, e.type ? o.dataset.type = e.type : delete o.dataset.type, i++;
|
|
4193
4220
|
}
|
|
4194
|
-
for (; p(
|
|
4221
|
+
for (; p(Dc, this).children.length > i;) {
|
|
4195
4222
|
var a;
|
|
4196
|
-
(a = p(
|
|
4223
|
+
(a = p(Dc, this).lastElementChild) == null || a.remove();
|
|
4197
4224
|
}
|
|
4198
4225
|
}
|
|
4199
|
-
function
|
|
4200
|
-
let e = f($, this,
|
|
4226
|
+
function qc() {
|
|
4227
|
+
let e = f($, this, Uc).call(this);
|
|
4201
4228
|
if (e === void 0) return !1;
|
|
4202
4229
|
let t = Date.now() - e * 1e3;
|
|
4203
|
-
return p(
|
|
4230
|
+
return p(Oc, this).some((e) => e.time >= t);
|
|
4204
4231
|
}
|
|
4205
|
-
function
|
|
4206
|
-
this.isConnected && f($, this,
|
|
4207
|
-
f($, this,
|
|
4208
|
-
},
|
|
4232
|
+
function Jc() {
|
|
4233
|
+
this.isConnected && f($, this, qc).call(this) ? p(kc, this) === null && m(kc, this, window.setInterval(() => {
|
|
4234
|
+
f($, this, Kc).call(this), f($, this, Jc).call(this);
|
|
4235
|
+
}, Sc)) : f($, this, Yc).call(this);
|
|
4209
4236
|
}
|
|
4210
|
-
function
|
|
4211
|
-
p(
|
|
4237
|
+
function Yc() {
|
|
4238
|
+
p(kc, this) !== null && (window.clearInterval(p(kc, this)), m(kc, this, null));
|
|
4212
4239
|
}
|
|
4213
|
-
function
|
|
4214
|
-
if (p(
|
|
4240
|
+
function Xc(e) {
|
|
4241
|
+
if (p(Oc, this).length === 0 || !p(Q, this)) return null;
|
|
4215
4242
|
let t = this.getBoundingClientRect().width;
|
|
4216
4243
|
if (!t) return null;
|
|
4217
|
-
let n =
|
|
4218
|
-
for (let t of p(
|
|
4219
|
-
let a =
|
|
4244
|
+
let n = Cc / t, r = Date.now(), i = null;
|
|
4245
|
+
for (let t of p(Oc, this)) {
|
|
4246
|
+
let a = dr(t.time, r, p(Q, this));
|
|
4220
4247
|
if (a === null) continue;
|
|
4221
4248
|
let o = Math.abs(a - e);
|
|
4222
4249
|
o > n || (!i || o < Math.abs(i.position - e)) && (i = {
|
|
@@ -4226,59 +4253,59 @@ function Vc(e) {
|
|
|
4226
4253
|
}
|
|
4227
4254
|
return i;
|
|
4228
4255
|
}
|
|
4229
|
-
function
|
|
4230
|
-
let e = f($, this,
|
|
4231
|
-
!p(Q, this) || p(Q, this) <= 0 || !Number.isFinite(p(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), p(
|
|
4256
|
+
function Zc() {
|
|
4257
|
+
let e = f($, this, Hc).call(this);
|
|
4258
|
+
!p(Q, this) || p(Q, this) <= 0 || !Number.isFinite(p(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), p(Ac, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${f($, this, al).call(this, this.range.valueAsNumber * e)} of ${f($, this, al).call(this, e)}`), !p(Ac, this) && !f($, this, Gc).call(this) && f($, this, rl).call(this, this.range.valueAsNumber));
|
|
4232
4259
|
}
|
|
4233
|
-
function
|
|
4260
|
+
function Qc(e) {
|
|
4234
4261
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
4235
4262
|
return Math.max(0, Math.min(1, n));
|
|
4236
4263
|
}
|
|
4237
|
-
function
|
|
4264
|
+
function $c(e) {
|
|
4238
4265
|
var t;
|
|
4239
|
-
let n = f($, this,
|
|
4240
|
-
f($, this,
|
|
4266
|
+
let n = f($, this, Qc).call(this, e.clientX), r = f($, this, Xc).call(this, n), i = (t = r == null ? void 0 : r.position) == null ? n : t;
|
|
4267
|
+
f($, this, tl).call(this, i, r), p(Ac, this) || (p(Tc, this).style.opacity = "1"), f($, this, el).call(this, i);
|
|
4241
4268
|
}
|
|
4242
|
-
function
|
|
4243
|
-
if (f($, this,
|
|
4244
|
-
let t = e * f($, this,
|
|
4245
|
-
this.range.value = e.toString(), this.updateBar(), f($, this,
|
|
4269
|
+
function el(e) {
|
|
4270
|
+
if (f($, this, Gc).call(this) || f($, this, rl).call(this, e)) return;
|
|
4271
|
+
let t = e * f($, this, Hc).call(this);
|
|
4272
|
+
this.range.value = e.toString(), this.updateBar(), f($, this, nl).call(this, t);
|
|
4246
4273
|
}
|
|
4247
|
-
function
|
|
4274
|
+
function tl(e, t) {
|
|
4248
4275
|
if (!p(Q, this) || !Number.isFinite(p(Q, this))) return;
|
|
4249
|
-
let n = e * p(Q, this), r = p(Q, this) - n, i = `-${f($, this,
|
|
4250
|
-
p(
|
|
4276
|
+
let n = e * p(Q, this), r = p(Q, this) - n, i = `-${f($, this, al).call(this, r)}`;
|
|
4277
|
+
p(Tc, this).textContent = t ? `${t.marker.label}: ${i}` : i, p(Tc, this).style.left = `${Math.min(Math.max(e * 100, 2), 98)}%`;
|
|
4251
4278
|
}
|
|
4252
|
-
function
|
|
4279
|
+
function nl(e) {
|
|
4253
4280
|
this.dispatchEvent(new CustomEvent("seek", {
|
|
4254
4281
|
bubbles: !0,
|
|
4255
4282
|
composed: !0,
|
|
4256
4283
|
detail: e
|
|
4257
4284
|
}));
|
|
4258
4285
|
}
|
|
4259
|
-
function
|
|
4260
|
-
return p(
|
|
4286
|
+
function rl(e) {
|
|
4287
|
+
return p(Nc, this) || f($, this, il).call(this) || e < .999 ? !1 : (m(Nc, this, !0), m(Pc, this, !1), this.dispatchEvent(new CustomEvent(v.GO_LIVE, {
|
|
4261
4288
|
bubbles: !0,
|
|
4262
4289
|
composed: !0
|
|
4263
4290
|
})), !0);
|
|
4264
4291
|
}
|
|
4265
|
-
function
|
|
4292
|
+
function il() {
|
|
4266
4293
|
return !this.hasAttribute(_.TIMESHIFT_POSITION);
|
|
4267
4294
|
}
|
|
4268
|
-
function
|
|
4295
|
+
function al(e) {
|
|
4269
4296
|
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.floor(e % 60);
|
|
4270
4297
|
return p(Q, this) && p(Q, this) >= 3600 ? `${t}:${n.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}` : `${n}:${r.toString().padStart(2, "0")}`;
|
|
4271
4298
|
}
|
|
4272
|
-
e(
|
|
4273
|
-
...
|
|
4299
|
+
e(Vc, "observedAttributes", [
|
|
4300
|
+
...qr.observedAttributes,
|
|
4274
4301
|
_.TIMESHIFT_POSITION,
|
|
4275
4302
|
_.DURATION,
|
|
4276
4303
|
_.TIMELINE_MARKERS
|
|
4277
4304
|
]);
|
|
4278
4305
|
//#endregion
|
|
4279
4306
|
//#region ../../libs/player-next/src/components/UserInputPlayOverlay.ts
|
|
4280
|
-
var
|
|
4281
|
-
|
|
4307
|
+
var ol = document.createElement("template");
|
|
4308
|
+
ol.innerHTML = `
|
|
4282
4309
|
<style>
|
|
4283
4310
|
:host {
|
|
4284
4311
|
display: var(--play-overlay-display);
|
|
@@ -4338,51 +4365,51 @@ Zc.innerHTML = `
|
|
|
4338
4365
|
</slot>
|
|
4339
4366
|
</slot>
|
|
4340
4367
|
`;
|
|
4341
|
-
var
|
|
4368
|
+
var sl = /* @__PURE__ */ new WeakMap(), cl = /* @__PURE__ */ new WeakMap(), ll = /* @__PURE__ */ new WeakMap(), ul = /* @__PURE__ */ new WeakMap(), dl = class extends HTMLElement {
|
|
4342
4369
|
constructor() {
|
|
4343
|
-
super(), d(this,
|
|
4370
|
+
super(), d(this, sl, null), d(this, cl, () => {
|
|
4344
4371
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4345
4372
|
bubbles: !0,
|
|
4346
4373
|
composed: !0
|
|
4347
4374
|
}));
|
|
4348
|
-
}), d(this,
|
|
4375
|
+
}), d(this, ll, (e) => {
|
|
4349
4376
|
let { key: t } = e;
|
|
4350
4377
|
if (!this.keysUsed.includes(t)) {
|
|
4351
|
-
this.removeEventListener("keyup", p(
|
|
4378
|
+
this.removeEventListener("keyup", p(ll, this));
|
|
4352
4379
|
return;
|
|
4353
4380
|
}
|
|
4354
4381
|
this.dispatchEvent(new CustomEvent(v.REQUEST_USER_INPUT, {
|
|
4355
4382
|
bubbles: !0,
|
|
4356
4383
|
composed: !0
|
|
4357
4384
|
}));
|
|
4358
|
-
}), d(this,
|
|
4385
|
+
}), d(this, ul, (e) => {
|
|
4359
4386
|
let { metaKey: t, altKey: n, key: r } = e;
|
|
4360
4387
|
if (t || n || !this.keysUsed.includes(r)) {
|
|
4361
|
-
this.removeEventListener("keyup", p(
|
|
4388
|
+
this.removeEventListener("keyup", p(ll, this));
|
|
4362
4389
|
return;
|
|
4363
4390
|
}
|
|
4364
|
-
this.addEventListener("keyup", p(
|
|
4365
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
4391
|
+
this.addEventListener("keyup", p(ll, this), { once: !0 });
|
|
4392
|
+
}), this.attachShadow({ mode: "open" }).appendChild(ol.content.cloneNode(!0));
|
|
4366
4393
|
}
|
|
4367
4394
|
get keysUsed() {
|
|
4368
4395
|
return ["Enter", " "];
|
|
4369
4396
|
}
|
|
4370
4397
|
connectedCallback() {
|
|
4371
4398
|
var e;
|
|
4372
|
-
m(
|
|
4399
|
+
m(sl, this, this.closest("vindral-controller")), (e = p(sl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.enable();
|
|
4373
4400
|
}
|
|
4374
4401
|
enable() {
|
|
4375
|
-
this.addEventListener("click", p(
|
|
4402
|
+
this.addEventListener("click", p(cl, this)), this.addEventListener("keydown", p(ul, this)), this.tabIndex = 0;
|
|
4376
4403
|
}
|
|
4377
4404
|
disable() {
|
|
4378
|
-
this.removeEventListener("click", p(
|
|
4405
|
+
this.removeEventListener("click", p(cl, this)), this.removeEventListener("keydown", p(ul, this)), this.removeEventListener("keyup", p(ll, this)), this.tabIndex = -1;
|
|
4379
4406
|
}
|
|
4380
4407
|
disconnectedCallback() {
|
|
4381
4408
|
var e;
|
|
4382
|
-
(e = p(
|
|
4409
|
+
(e = p(sl, this)) == null || e.disconnectListener(this), this.disable();
|
|
4383
4410
|
}
|
|
4384
4411
|
};
|
|
4385
|
-
e(
|
|
4412
|
+
e(dl, "observedAttributes", [
|
|
4386
4413
|
"hidden",
|
|
4387
4414
|
_.NEEDS_USER_INPUT_VIDEO,
|
|
4388
4415
|
_.NEEDS_USER_INPUT_AUDIO,
|
|
@@ -4390,88 +4417,88 @@ e(nl, "observedAttributes", [
|
|
|
4390
4417
|
]);
|
|
4391
4418
|
//#endregion
|
|
4392
4419
|
//#region ../../libs/player-next/src/components/VindralCenterOverlay.ts
|
|
4393
|
-
var
|
|
4394
|
-
|
|
4395
|
-
var
|
|
4420
|
+
var fl = document.createElement("template");
|
|
4421
|
+
fl.innerHTML = "\n <style>\n :host {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 16px;\n pointer-events: none;\n z-index: 1;\n }\n\n :host::before {\n content: \"\";\n position: absolute;\n inset: 0;\n z-index: -1;\n background-color: rgba(0, 0, 0, 0.3);\n background-image: var(--_backdrop-image, none);\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: contain;\n pointer-events: none;\n opacity: 0;\n transition: opacity 100ms;\n }\n\n :host([backdrop]:not([disable-backdrop]))::before {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host::before {\n transition: none;\n }\n }\n </style>\n\n <slot></slot>\n";
|
|
4422
|
+
var pl = class extends HTMLElement {
|
|
4396
4423
|
constructor() {
|
|
4397
|
-
super(), this.attachShadow({ mode: "open" }).appendChild(
|
|
4424
|
+
super(), this.attachShadow({ mode: "open" }).appendChild(fl.content.cloneNode(!0));
|
|
4398
4425
|
}
|
|
4399
4426
|
attributeChangedCallback(e, t, n) {
|
|
4400
4427
|
t !== n && e === "poster" && this.style.setProperty("--_backdrop-image", n ? `url("${n}")` : "none");
|
|
4401
4428
|
}
|
|
4402
4429
|
};
|
|
4403
|
-
e(
|
|
4430
|
+
e(pl, "observedAttributes", [
|
|
4404
4431
|
"backdrop",
|
|
4405
4432
|
"poster",
|
|
4406
4433
|
"disable-backdrop"
|
|
4407
4434
|
]);
|
|
4408
4435
|
//#endregion
|
|
4409
4436
|
//#region ../../libs/player-next/src/components/VindralMessage.ts
|
|
4410
|
-
var
|
|
4411
|
-
|
|
4412
|
-
var
|
|
4437
|
+
var ml = document.createElement("template");
|
|
4438
|
+
ml.innerHTML = "\n <style>\n :host {\n display: flex;\n flex-direction: column;\n align-items: center;\n max-width: 90%;\n color: var(--fg-strong);\n font-size: 20px;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n #title,\n #description {\n text-align: center;\n text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);\n margin: 0;\n }\n\n #title {\n margin-bottom: var(--padding-2);\n }\n\n @container (max-width: 600px) {\n :host {\n font-size: 15px;\n }\n }\n\n @container (max-width: 400px) {\n :host {\n font-size: 12px;\n }\n #title {\n margin-bottom: 0;\n }\n }\n\n @container (max-width: 150px) {\n :host {\n font-size: 10px;\n }\n #title,\n #description {\n font-size: 1.2em;\n margin: 0;\n }\n }\n </style>\n\n <h1 id=\"title\"></h1>\n <p id=\"description\"></p>\n";
|
|
4439
|
+
var hl = /* @__PURE__ */ new WeakMap(), gl = /* @__PURE__ */ new WeakMap(), _l = class extends HTMLElement {
|
|
4413
4440
|
constructor() {
|
|
4414
|
-
super(), d(this,
|
|
4441
|
+
super(), d(this, hl, void 0), d(this, gl, void 0);
|
|
4415
4442
|
let e = this.attachShadow({ mode: "open" });
|
|
4416
|
-
e.appendChild(
|
|
4443
|
+
e.appendChild(ml.content.cloneNode(!0)), m(hl, this, e.querySelector("#title")), m(gl, this, e.querySelector("#description"));
|
|
4417
4444
|
}
|
|
4418
4445
|
connectedCallback() {
|
|
4419
4446
|
this.hasAttribute("role") || (this.setAttribute("role", "alert"), this.setAttribute("aria-atomic", "true"));
|
|
4420
4447
|
}
|
|
4421
4448
|
attributeChangedCallback(e, t, n) {
|
|
4422
|
-
t !== n && (e === "title" ? p(
|
|
4449
|
+
t !== n && (e === "title" ? p(hl, this).textContent = n : e === "description" && (p(gl, this).textContent = n));
|
|
4423
4450
|
}
|
|
4424
4451
|
};
|
|
4425
|
-
e(
|
|
4452
|
+
e(_l, "observedAttributes", [
|
|
4426
4453
|
"title",
|
|
4427
4454
|
"description",
|
|
4428
4455
|
"hidden"
|
|
4429
4456
|
]);
|
|
4430
4457
|
//#endregion
|
|
4431
4458
|
//#region ../../libs/player-next/src/components/VindralPlayOverlay.ts
|
|
4432
|
-
var
|
|
4433
|
-
|
|
4434
|
-
var
|
|
4459
|
+
var vl = document.createElement("template");
|
|
4460
|
+
vl.innerHTML = "\n <style>\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n opacity: 1;\n transition:\n opacity 100ms,\n display 100ms allow-discrete;\n }\n\n :host([hidden]) {\n display: none;\n opacity: 0;\n }\n\n @starting-style {\n :host(:not([hidden])) {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n }\n\n :host(:focus-visible) {\n outline: none;\n outline: 0;\n }\n\n :host(:focus-visible) svg {\n outline: 0;\n }\n\n :host(:where(:focus)) svg {\n box-shadow: none;\n outline: 0;\n }\n\n :host(:active) svg {\n scale: 0.9;\n }\n\n slot#play {\n color: var(--fg-strong);\n pointer-events: auto;\n cursor: pointer;\n }\n\n slot#play > svg {\n width: var(--play-overlay-icon-size);\n height: var(--play-overlay-icon-size);\n }\n </style>\n\n <slot id=\"play\" name=\"icon\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z\" /></svg>\n</slot>\n";
|
|
4461
|
+
var yl = /* @__PURE__ */ new WeakMap(), bl = class extends HTMLElement {
|
|
4435
4462
|
constructor() {
|
|
4436
|
-
super(), d(this,
|
|
4463
|
+
super(), d(this, yl, null), this.attachShadow({ mode: "open" }).appendChild(vl.content.cloneNode(!0));
|
|
4437
4464
|
}
|
|
4438
4465
|
connectedCallback() {
|
|
4439
4466
|
var e;
|
|
4440
|
-
m(
|
|
4467
|
+
m(yl, this, this.closest("vindral-controller")), (e = p(yl, this)) == null || e.connectListener(this), this.setAttribute("aria-label", "Play"), this.setAttribute("role", "button"), this.tabIndex = 0;
|
|
4441
4468
|
}
|
|
4442
4469
|
disconnectedCallback() {
|
|
4443
4470
|
var e;
|
|
4444
|
-
(e = p(
|
|
4471
|
+
(e = p(yl, this)) == null || e.disconnectListener(this);
|
|
4445
4472
|
}
|
|
4446
4473
|
attributeChangedCallback(e, t, n) {
|
|
4447
4474
|
t !== n && e === "hidden" && !y(n) && this.focus();
|
|
4448
4475
|
}
|
|
4449
4476
|
};
|
|
4450
|
-
e(
|
|
4477
|
+
e(bl, "observedAttributes", ["hidden"]);
|
|
4451
4478
|
//#endregion
|
|
4452
4479
|
//#region ../../libs/player-next/src/components/VolumeRange.ts
|
|
4453
|
-
var
|
|
4454
|
-
|
|
4455
|
-
var
|
|
4480
|
+
var xl, Sl = document.createElement("template");
|
|
4481
|
+
Sl.innerHTML = "\n <style>\n :host {\n display: var(--volume-range-display);\n width: 80px;\n }\n\n @media (hover: hover) and (pointer: fine) {\n :host(:hover) {\n background: rgba(255, 255, 255, 0.15);\n }\n }\n\n :host(:active) {\n background: rgba(255, 255, 255, 0.25);\n }\n </style>\n";
|
|
4482
|
+
var Cl = (e) => `${Math.round(e * 100)}%`, wl = /* @__PURE__ */ new WeakMap(), Tl = class extends qr {
|
|
4456
4483
|
constructor() {
|
|
4457
4484
|
var e;
|
|
4458
|
-
super(), d(this,
|
|
4485
|
+
super(), d(this, wl, () => {
|
|
4459
4486
|
let e = this.range.valueAsNumber;
|
|
4460
4487
|
this.dispatchEvent(new CustomEvent(v.SET_VOLUME, {
|
|
4461
4488
|
bubbles: !0,
|
|
4462
4489
|
composed: !0,
|
|
4463
4490
|
detail: e
|
|
4464
4491
|
}));
|
|
4465
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
4492
|
+
}), (e = this.shadowRoot) == null || e.appendChild(Sl.content.cloneNode(!0));
|
|
4466
4493
|
}
|
|
4467
4494
|
connectedCallback() {
|
|
4468
|
-
super.connectedCallback(), this.range.addEventListener("input", p(
|
|
4495
|
+
super.connectedCallback(), this.range.addEventListener("input", p(wl, this)), this.range.setAttribute("aria-label", "volume");
|
|
4469
4496
|
}
|
|
4470
4497
|
disconnectedCallback() {
|
|
4471
|
-
super.disconnectedCallback(), this.range.removeEventListener("input", p(
|
|
4498
|
+
super.disconnectedCallback(), this.range.removeEventListener("input", p(wl, this));
|
|
4472
4499
|
}
|
|
4473
4500
|
attributeChangedCallback(e, t, n) {
|
|
4474
|
-
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext",
|
|
4501
|
+
super.attributeChangedCallback(e, t, n), (e === _.MUTED || e === _.VOLUME) && (this.range.valueAsNumber = this.muted ? 0 : parseFloat(this.volume), this.range.setAttribute("aria-valuetext", Cl(this.range.valueAsNumber)), this.updateBar());
|
|
4475
4502
|
}
|
|
4476
4503
|
get volume() {
|
|
4477
4504
|
var e;
|
|
@@ -4481,15 +4508,15 @@ var ml = (e) => `${Math.round(e * 100)}%`, hl = /* @__PURE__ */ new WeakMap(), g
|
|
|
4481
4508
|
return this.hasAttribute(_.MUTED);
|
|
4482
4509
|
}
|
|
4483
4510
|
};
|
|
4484
|
-
|
|
4485
|
-
...b(
|
|
4511
|
+
xl = Tl, e(Tl, "observedAttributes", [
|
|
4512
|
+
...b(xl, "observedAttributes", xl),
|
|
4486
4513
|
_.MUTED,
|
|
4487
4514
|
_.VOLUME
|
|
4488
4515
|
]);
|
|
4489
4516
|
//#endregion
|
|
4490
4517
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4491
|
-
function
|
|
4492
|
-
customElements.define("vindral-controller",
|
|
4518
|
+
function El() {
|
|
4519
|
+
customElements.define("vindral-controller", Yi), customElements.define("vindral-control-bar", In), customElements.define("vindral-advanced-rendition-menu", Ke), customElements.define("vindral-advanced-rendition-menu-list", it), customElements.define("vindral-play-button", Ao), customElements.define("vindral-mute-button", wo), customElements.define("vindral-buffering-overlay", jt), customElements.define("vindral-scroll-overlay", sc), customElements.define("vindral-play-overlay", bl), customElements.define("vindral-user-input-play-overlay", dl), customElements.define("vindral-fullscreen-button", za), customElements.define("vindral-rendition-levels-menu", Ns), customElements.define("vindral-rendition-levels-menu-list", Hs), customElements.define("vindral-channel-grid-button", kn), customElements.define("vindral-channel-grid", tn), customElements.define("vindral-channel-grid-item", Gt), customElements.define("vindral-pip-button", Do), customElements.define("vindral-airplay-button", wt), customElements.define("vindral-cast-button", Ft), customElements.define("vindral-cast-overlay", Vt), customElements.define("vindral-buffering-icon", Ot), customElements.define("vindral-language-menu", Wa), customElements.define("vindral-language-menu-list", io), customElements.define("vindral-center-overlay", pl), customElements.define("vindral-message", _l), customElements.define("vindral-volume-range", Tl), customElements.define("vindral-poster-overlay", Ts), customElements.define("vindral-player", us), customElements.define("vindral-seek-bar", Vc), customElements.define("vindral-live-button", xo);
|
|
4493
4520
|
}
|
|
4494
4521
|
//#endregion
|
|
4495
|
-
export {
|
|
4522
|
+
export { El as t };
|