@vindral/web-sdk 4.2.0-9-g20d8006e → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{DAUPyLMi.js → ABGzdpO4.js} +1 -1
- package/{BQPePwt2.js → B9WEkxkT.js} +10 -10
- package/{wVqDCoXH.js → CF-41rJe.js} +2 -2
- package/{Bm-cshdP.js → Cug44nXk.js} +14 -11
- package/{BdFcdkj1.js → D5iA4gy8.js} +1 -1
- package/{B5bZayjf.js → DeYmk5AL.js} +2 -0
- package/DrWNJwZx.js +35 -0
- package/DtpcQ7ay.js +166 -0
- package/{Cv0Lr_8z.js → ST3epwLf.js} +175 -175
- package/{qbVRZqFN.js → TRlsfsv0.js} +2281 -1911
- package/api-client.d.ts +3 -3
- package/api-client.js +1 -1
- package/cast-sender.d.ts +7 -7
- package/cast-sender.js +1 -1
- package/core.d.ts +27 -24
- package/core.js +1 -1
- package/legacy.d.ts +36 -33
- package/legacy.es.js +2581 -2184
- package/legacy.umd.js +133 -92
- package/package.json +1 -1
- package/player.d.ts +42 -39
- package/player.js +3 -3
- package/react.d.ts +43 -40
- package/vindral-player-component.js +2 -2
- package/B4Xt-UHG.js +0 -13
- package/D2u3dh0E.js +0 -166
|
@@ -1,11 +1,11 @@
|
|
|
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 "./
|
|
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 "./TRlsfsv0.js";
|
|
3
3
|
import { M as le } 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 { n as ue, t as de } from "./
|
|
5
|
+
import { n as ue, t as de } from "./DeYmk5AL.js";
|
|
6
6
|
import { t as fe } from "./FYiEDBC4.js";
|
|
7
|
-
import { _ as pe, a as me, c as he, d as ge, f as _e, g, h as _, i as v, l as ve, m as ye, n as y, o as b, p as be, r as x, s as xe, t as Se, u as Ce, v as we, y as Te } from "./
|
|
8
|
-
import { t as Ee } from "./
|
|
7
|
+
import { _ as pe, a as me, c as he, d as ge, f as _e, g, h as _, i as v, l as ve, m as ye, n as y, o as b, p as be, r as x, s as xe, t as Se, u as Ce, v as we, y as Te } from "./CF-41rJe.js";
|
|
8
|
+
import { t as Ee } from "./D5iA4gy8.js";
|
|
9
9
|
//#region ../../libs/utils/src/mediaMetadata.ts
|
|
10
10
|
var De = ({ title: e, subTitle: t = "Live stream", poster: n }) => {
|
|
11
11
|
document.title = e, "mediaSession" in navigator && (navigator.mediaSession.metadata = new MediaMetadata({
|
|
@@ -23,194 +23,131 @@ function Ae(e) {
|
|
|
23
23
|
if (e === "no-preference" || e === "prefer-hardware" || e === "prefer-software") return e;
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
|
-
//#region ../../libs/player-next/src/components/AirPlayButton.ts
|
|
27
|
-
var je, Me = document.createElement("template"), Ne = "\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=\"M18 18a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-12a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3\" /><path d=\"M9 20h6l-3 -5z\" /></svg>\n";
|
|
28
|
-
Me.innerHTML = `
|
|
29
|
-
<style>
|
|
30
|
-
:host {
|
|
31
|
-
display: var(--airplay-button-display);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host(:not([${g.AIRPLAY_AVAILABLE}])) {
|
|
35
|
-
display: none !important;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host([${g.IS_AIRPLAYING}]) slot[name="exit"] {
|
|
39
|
-
display: none !important;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:host(:not([${g.IS_AIRPLAYING}])) slot[name="enter"] {
|
|
43
|
-
display: none !important;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
46
|
-
|
|
47
|
-
<slot name="icon">
|
|
48
|
-
<slot name="enter">${Ne}</slot>
|
|
49
|
-
<slot name="exit">${Ne}</slot>
|
|
50
|
-
</slot>
|
|
51
|
-
`;
|
|
52
|
-
var Pe = /* @__PURE__ */ new WeakSet(), Fe = class extends x {
|
|
53
|
-
constructor() {
|
|
54
|
-
var e;
|
|
55
|
-
super(), h(this, Pe), (e = this.shadowRoot) == null || e.appendChild(Me.content.cloneNode(!0));
|
|
56
|
-
}
|
|
57
|
-
connectedCallback() {
|
|
58
|
-
super.connectedCallback(), f(Pe, this, Ie).call(this);
|
|
59
|
-
}
|
|
60
|
-
disconnectedCallback() {
|
|
61
|
-
super.disconnectedCallback();
|
|
62
|
-
}
|
|
63
|
-
attributeChangedCallback(e, t, n) {
|
|
64
|
-
super.attributeChangedCallback(e, t, n), e === g.IS_AIRPLAYING && f(Pe, this, Ie).call(this);
|
|
65
|
-
}
|
|
66
|
-
set isAirPlaying(e) {
|
|
67
|
-
e ? this.setAttribute(g.IS_AIRPLAYING, "") : this.removeAttribute(g.IS_AIRPLAYING);
|
|
68
|
-
}
|
|
69
|
-
get isAirPlaying() {
|
|
70
|
-
return this.hasAttribute(g.IS_AIRPLAYING);
|
|
71
|
-
}
|
|
72
|
-
handleClick(e) {
|
|
73
|
-
this.dispatchEvent(new CustomEvent(_.REQUEST_AIRPLAY, {
|
|
74
|
-
bubbles: !0,
|
|
75
|
-
composed: !0
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
je = Fe;
|
|
80
|
-
function Ie() {
|
|
81
|
-
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
82
|
-
}
|
|
83
|
-
e(Fe, "observedAttributes", [
|
|
84
|
-
...y(je, "observedAttributes", je),
|
|
85
|
-
g.AIRPLAY_AVAILABLE,
|
|
86
|
-
g.IS_AIRPLAYING
|
|
87
|
-
]);
|
|
88
|
-
//#endregion
|
|
89
26
|
//#region ../../libs/player-next/src/components/VindralMenuButton.ts
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
var
|
|
27
|
+
var je = document.createElement("template");
|
|
28
|
+
je.innerHTML = "\n <style>\n :host {\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n";
|
|
29
|
+
var Me = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakSet(), Re = class extends x {
|
|
93
30
|
constructor() {
|
|
94
31
|
var e;
|
|
95
|
-
super(), h(this,
|
|
32
|
+
super(), h(this, Le), d(this, Me, void 0), d(this, Ne, void 0), d(this, S, void 0), d(this, Pe, null), d(this, Fe, (e) => {
|
|
96
33
|
e.composedPath().includes(this) || this.hide();
|
|
97
|
-
}), d(this,
|
|
34
|
+
}), d(this, Ie, () => {
|
|
98
35
|
this.hide();
|
|
99
|
-
}), (e = this.shadowRoot) == null || e.appendChild(
|
|
36
|
+
}), (e = this.shadowRoot) == null || e.appendChild(je.content.cloneNode(!0));
|
|
100
37
|
}
|
|
101
38
|
connectedCallback() {
|
|
102
39
|
var e, t, n, r;
|
|
103
40
|
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-haspopup", "listbox");
|
|
104
41
|
let i = (e = this.getAttribute("list-position")) == null ? "top" : e;
|
|
105
|
-
(t = p(
|
|
42
|
+
(t = p(Ne, this)) == null || t.setAttribute("list-position", i);
|
|
106
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));
|
|
107
44
|
Promise.all(o).then(() => {
|
|
108
45
|
if (a instanceof Document || a instanceof ShadowRoot) {
|
|
109
46
|
var e;
|
|
110
|
-
m(
|
|
47
|
+
m(Pe, this, a.querySelector("vindral-controller")), (e = p(Pe, this)) == null || e.connectListener(this);
|
|
111
48
|
}
|
|
112
49
|
});
|
|
113
50
|
}
|
|
114
51
|
set button(e) {
|
|
115
|
-
m(
|
|
52
|
+
m(Me, this, e);
|
|
116
53
|
}
|
|
117
54
|
set listbox(e) {
|
|
118
|
-
m(
|
|
55
|
+
m(Ne, this, e);
|
|
119
56
|
}
|
|
120
57
|
set listboxSlot(e) {
|
|
121
58
|
m(S, this, e);
|
|
122
59
|
}
|
|
123
60
|
enable() {
|
|
124
|
-
super.enable(), this.addEventListener("change", p(
|
|
61
|
+
super.enable(), this.addEventListener("change", p(Ie, this)), document.addEventListener("click", p(Fe, this));
|
|
125
62
|
}
|
|
126
63
|
hide() {
|
|
127
64
|
var e, t;
|
|
128
|
-
!p(S, this) || (e = p(S, this)) != null && e.hidden || (p(S, this).hidden = !0, (t = p(
|
|
65
|
+
!p(S, this) || (e = p(S, this)) != null && e.hidden || (p(S, this).hidden = !0, (t = p(Me, this)) == null || t.setAttribute("aria-expanded", "false"), this.dispatchEvent(new CustomEvent(_.UNLOCK_UI, {
|
|
129
66
|
bubbles: !0,
|
|
130
67
|
composed: !0
|
|
131
68
|
})), this.focus());
|
|
132
69
|
}
|
|
133
70
|
handleClick(e) {
|
|
134
|
-
p(S, this) && !e.composedPath().includes(p(S, this)) && f(
|
|
71
|
+
p(S, this) && !e.composedPath().includes(p(S, this)) && f(Le, this, ze).call(this);
|
|
135
72
|
}
|
|
136
73
|
};
|
|
137
|
-
function
|
|
74
|
+
function ze() {
|
|
138
75
|
var e;
|
|
139
|
-
(e = p(S, this)) != null && e.hidden ? f(
|
|
76
|
+
(e = p(S, this)) != null && e.hidden ? f(Le, this, Be).call(this) : this.hide();
|
|
140
77
|
}
|
|
141
|
-
function
|
|
78
|
+
function Be() {
|
|
142
79
|
var e, t, n;
|
|
143
|
-
(e = p(S, this)) != null && e.hidden && (p(S, this).hidden = !1, (t = p(
|
|
80
|
+
(e = p(S, this)) != null && e.hidden && (p(S, this).hidden = !1, (t = p(Me, this)) == null || t.setAttribute("aria-expanded", "true"), (n = p(Ne, this)) == null || n.focus(), this.dispatchEvent(new CustomEvent(_.LOCK_UI, {
|
|
144
81
|
bubbles: !0,
|
|
145
82
|
composed: !0
|
|
146
83
|
})));
|
|
147
84
|
}
|
|
148
85
|
//#endregion
|
|
149
86
|
//#region ../../libs/player-next/src/components/AdvancedRenditionMenu.ts
|
|
150
|
-
var
|
|
151
|
-
|
|
87
|
+
var Ve, He = "\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", Ue = document.createElement("template");
|
|
88
|
+
Ue.innerHTML = `
|
|
152
89
|
<style>
|
|
153
90
|
:host {
|
|
154
91
|
display: var(--rendition-menu-display);
|
|
155
92
|
}
|
|
156
93
|
</style>
|
|
157
94
|
|
|
158
|
-
<slot name="button">${
|
|
95
|
+
<slot name="button">${He}</slot>
|
|
159
96
|
<slot name="listbox" hidden>
|
|
160
97
|
<vindral-advanced-rendition-menu-list id="listbox" part="listbox"></vindral-advanced-rendition-menu-list>
|
|
161
98
|
</slot>
|
|
162
99
|
`;
|
|
163
|
-
var
|
|
100
|
+
var We = /* @__PURE__ */ new WeakSet(), Ge = class extends Re {
|
|
164
101
|
constructor() {
|
|
165
102
|
var e, t, n, r;
|
|
166
|
-
super(), h(this,
|
|
103
|
+
super(), h(this, We), (e = this.shadowRoot) == null || e.appendChild(Ue.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]");
|
|
167
104
|
}
|
|
168
105
|
connectedCallback() {
|
|
169
|
-
super.connectedCallback(), f(
|
|
106
|
+
super.connectedCallback(), f(We, this, Ke).call(this), this.setAttribute("aria-label", "Advanced rendition controls");
|
|
170
107
|
}
|
|
171
108
|
attributeChangedCallback(e, t, n) {
|
|
172
|
-
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && f(
|
|
109
|
+
super.attributeChangedCallback(e, t, n), e === g.RENDITION_LEVELS && f(We, this, Ke).call(this);
|
|
173
110
|
}
|
|
174
111
|
};
|
|
175
|
-
|
|
176
|
-
function
|
|
112
|
+
Ve = Ge;
|
|
113
|
+
function Ke() {
|
|
177
114
|
let e = this.getAttribute(g.RENDITION_LEVELS);
|
|
178
115
|
!e || e === "[]" ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
179
116
|
}
|
|
180
|
-
e(
|
|
117
|
+
e(Ge, "observedAttributes", [...y(Ve, "observedAttributes", Ve), g.RENDITION_LEVELS]);
|
|
181
118
|
//#endregion
|
|
182
119
|
//#region ../../libs/player-next/src/components/AdvancedRenditionMenuList.ts
|
|
183
|
-
var
|
|
184
|
-
|
|
185
|
-
var
|
|
120
|
+
var qe = document.createElement("template");
|
|
121
|
+
qe.innerHTML = "\n <style>\n :host {\n font: inherit;\n cursor: default;\n padding: var(--padding-2);\n padding-top: var(--padding-3);\n border-radius: 0.25em;\n position: absolute;\n min-width: 220px;\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: #549ce0;\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: #549ce0;\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: #549ce0;\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 Je = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakSet(), rt = class extends HTMLElement {
|
|
186
123
|
constructor() {
|
|
187
|
-
super(), h(this, w), d(this,
|
|
124
|
+
super(), h(this, w), d(this, Je, []), d(this, Ye, 2 ** 53 - 1), d(this, C, !1), d(this, Xe, !0), d(this, Ze, null), d(this, Qe, null), d(this, $e, []), d(this, et, null), d(this, tt, null), d(this, nt, null), e(this, "handleEvent", (e) => {
|
|
188
125
|
switch (e.type) {
|
|
189
126
|
case "keydown":
|
|
190
|
-
f(w, this,
|
|
127
|
+
f(w, this, ht).call(this, e);
|
|
191
128
|
break;
|
|
192
129
|
}
|
|
193
|
-
}), this.attachShadow({ mode: "open" }).appendChild(
|
|
130
|
+
}), this.attachShadow({ mode: "open" }).appendChild(qe.content.cloneNode(!0));
|
|
194
131
|
}
|
|
195
132
|
connectedCallback() {
|
|
196
133
|
let e = this.getRootNode();
|
|
197
134
|
if (e instanceof ShadowRoot) {
|
|
198
135
|
var t;
|
|
199
|
-
m(
|
|
136
|
+
m(et, this, e.host.closest("vindral-controller")), (t = p(et, this)) == null || t.connectListener(this), f(w, this, lt).call(this), f(w, this, it).call(this), f(w, this, at).call(this), f(w, this, ut).call(this), m(tt, this, e.host), this.addEventListener("keydown", this);
|
|
200
137
|
}
|
|
201
138
|
}
|
|
202
139
|
disconnectedCallback() {
|
|
203
140
|
var e, t;
|
|
204
|
-
(e = p(
|
|
141
|
+
(e = p(et, this)) == null || e.disconnectListener(this), (t = p(nt, this)) == null || t.disconnect(), m(nt, this, null), this.removeEventListener("keydown", this);
|
|
205
142
|
}
|
|
206
143
|
attributeChangedCallback(e, t, n) {
|
|
207
|
-
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1), e === g.ABR_ENABLED && (m(C, this, b(n, !1)), f(w, this,
|
|
144
|
+
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1), e === g.ABR_ENABLED && (m(C, this, b(n, !1)), f(w, this, st).call(this), f(w, this, ft).call(this)), e === g.RENDITION_LEVEL && n && (m(Ze, this, JSON.parse(n)), f(w, this, ft).call(this)), e === g.SIZE_BASED_RESOLUTION_CAP_ENABLED && (m(Xe, this, b(n, !0)), f(w, this, ct).call(this)));
|
|
208
145
|
}
|
|
209
146
|
set list(e) {
|
|
210
|
-
m(
|
|
147
|
+
m(Je, this, e), f(w, this, ut).call(this);
|
|
211
148
|
}
|
|
212
149
|
set maxVideoBitrate(e) {
|
|
213
|
-
m(
|
|
150
|
+
m(Ye, this, e), f(w, this, ft).call(this);
|
|
214
151
|
}
|
|
215
152
|
get keysUsed() {
|
|
216
153
|
return [
|
|
@@ -226,66 +163,66 @@ var et = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), C =
|
|
|
226
163
|
}
|
|
227
164
|
focus() {
|
|
228
165
|
var e;
|
|
229
|
-
(e = p(
|
|
166
|
+
(e = p(Qe, this)) == null || e.focus();
|
|
230
167
|
}
|
|
231
168
|
};
|
|
232
|
-
function
|
|
169
|
+
function it() {
|
|
233
170
|
var e, t;
|
|
234
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\"]");
|
|
235
172
|
n == null || n.addEventListener("click", () => {
|
|
236
|
-
m(C, this, !0), f(w, this,
|
|
173
|
+
m(C, this, !0), f(w, this, st).call(this), f(w, this, ft).call(this), this.dispatchEvent(new CustomEvent(_.SET_ABR_MODE, {
|
|
237
174
|
bubbles: !0,
|
|
238
175
|
composed: !0,
|
|
239
176
|
detail: !0
|
|
240
177
|
}));
|
|
241
178
|
}), r == null || r.addEventListener("click", () => {
|
|
242
|
-
let e = f(w, this,
|
|
179
|
+
let e = f(w, this, ot).call(this);
|
|
243
180
|
e && this.dispatchEvent(new CustomEvent(_.SET_RENDITION, {
|
|
244
181
|
bubbles: !0,
|
|
245
182
|
composed: !0,
|
|
246
183
|
detail: e
|
|
247
|
-
})), m(C, this, !1), f(w, this,
|
|
184
|
+
})), m(C, this, !1), f(w, this, st).call(this), f(w, this, ft).call(this), this.dispatchEvent(new CustomEvent(_.SET_ABR_MODE, {
|
|
248
185
|
bubbles: !0,
|
|
249
186
|
composed: !0,
|
|
250
187
|
detail: !1
|
|
251
188
|
}));
|
|
252
|
-
}), f(w, this,
|
|
189
|
+
}), f(w, this, st).call(this);
|
|
253
190
|
}
|
|
254
|
-
function
|
|
191
|
+
function at() {
|
|
255
192
|
var e;
|
|
256
193
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#size-cap-toggle");
|
|
257
194
|
t == null || t.addEventListener("click", () => {
|
|
258
|
-
let e = !p(
|
|
259
|
-
m(
|
|
195
|
+
let e = !p(Xe, this);
|
|
196
|
+
m(Xe, this, e), f(w, this, ct).call(this), this.dispatchEvent(new CustomEvent(_.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
|
|
260
197
|
bubbles: !0,
|
|
261
198
|
composed: !0,
|
|
262
199
|
detail: e
|
|
263
200
|
}));
|
|
264
|
-
}), f(w, this,
|
|
201
|
+
}), f(w, this, ct).call(this);
|
|
265
202
|
}
|
|
266
|
-
function
|
|
267
|
-
let e = [...p(
|
|
203
|
+
function ot() {
|
|
204
|
+
let e = [...p(Je, this)].sort((e, t) => {
|
|
268
205
|
var n, r;
|
|
269
206
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
270
207
|
});
|
|
271
208
|
return e.find((e) => {
|
|
272
209
|
var t;
|
|
273
|
-
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(Ye, this);
|
|
274
211
|
}) || e[e.length - 1] || null;
|
|
275
212
|
}
|
|
276
|
-
function
|
|
213
|
+
function st() {
|
|
277
214
|
var e, t, n;
|
|
278
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");
|
|
279
|
-
r && i && (r.setAttribute("data-active", String(p(C, this))), i.setAttribute("data-active", String(!p(C, this)))), a && (a.textContent = p(C, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), f(w, this,
|
|
216
|
+
r && i && (r.setAttribute("data-active", String(p(C, this))), i.setAttribute("data-active", String(!p(C, this)))), a && (a.textContent = p(C, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), f(w, this, ct).call(this);
|
|
280
217
|
}
|
|
281
|
-
function
|
|
218
|
+
function ct() {
|
|
282
219
|
var e;
|
|
283
220
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#size-cap-toggle");
|
|
284
|
-
t && (t.textContent = p(
|
|
221
|
+
t && (t.textContent = p(Xe, this) ? "On" : "Off", t.setAttribute("aria-pressed", String(p(Xe, this))), t.setAttribute("data-active", String(p(Xe, this))), t.disabled = !p(C, this), t.title = p(C, this) ? "Toggle size-based resolution cap" : "Only available in Auto (ABR) mode");
|
|
285
222
|
}
|
|
286
|
-
function
|
|
223
|
+
function lt() {
|
|
287
224
|
var e;
|
|
288
|
-
(e = p(
|
|
225
|
+
(e = p(nt, this)) == null || e.disconnect(), m(nt, this, new IntersectionObserver((e) => {
|
|
289
226
|
e.forEach((e) => {
|
|
290
227
|
if (e.intersectionRatio === 1) {
|
|
291
228
|
this.style.height = "auto";
|
|
@@ -296,14 +233,14 @@ function ht() {
|
|
|
296
233
|
} else this.style.height = "auto";
|
|
297
234
|
});
|
|
298
235
|
}, {
|
|
299
|
-
root: p(
|
|
236
|
+
root: p(et, this),
|
|
300
237
|
threshold: 0
|
|
301
|
-
})), p(
|
|
238
|
+
})), p(nt, this).observe(this);
|
|
302
239
|
}
|
|
303
|
-
function
|
|
240
|
+
function ut() {
|
|
304
241
|
var e;
|
|
305
242
|
let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".menu");
|
|
306
|
-
t && (m(
|
|
243
|
+
t && (m($e, this, []), t.innerHTML = "", p(Je, this).sort((e, t) => {
|
|
307
244
|
var n, r;
|
|
308
245
|
return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
|
|
309
246
|
}).forEach((e) => {
|
|
@@ -316,37 +253,37 @@ function gt() {
|
|
|
316
253
|
re.className = "menu-item-title", re.textContent = e.video ? Te(e.video) : "";
|
|
317
254
|
let ie = document.createElement("span");
|
|
318
255
|
ie.classList.add("menu-item-subtitle");
|
|
319
|
-
let ae = f(w, this,
|
|
256
|
+
let ae = f(w, this, dt).call(this, (r = e.video) == null ? void 0 : r.frameRate);
|
|
320
257
|
ie.textContent = `${we(((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);
|
|
321
258
|
let oe = document.createElement("span");
|
|
322
|
-
oe.className = "current-label", oe.textContent = "Current", u.appendChild(oe), u.addEventListener("click", () => f(w, this,
|
|
259
|
+
oe.className = "current-label", oe.textContent = "Current", u.appendChild(oe), u.addEventListener("click", () => f(w, this, mt).call(this, e)), p($e, this).push({
|
|
323
260
|
el: u,
|
|
324
261
|
id: (c = (ee = e.video) == null ? void 0 : ee.id) == null ? -1 : c,
|
|
325
262
|
bitrate: (l = (te = e.video) == null ? void 0 : te.bitRate) == null ? 0 : l
|
|
326
263
|
}), t.appendChild(u);
|
|
327
|
-
}), f(w, this,
|
|
264
|
+
}), f(w, this, ft).call(this));
|
|
328
265
|
}
|
|
329
|
-
function
|
|
266
|
+
function dt(e) {
|
|
330
267
|
return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
|
|
331
268
|
}
|
|
332
|
-
function
|
|
269
|
+
function ft() {
|
|
333
270
|
var e;
|
|
334
|
-
let t = (e = p(
|
|
335
|
-
m(
|
|
271
|
+
let t = (e = p(Ze, this)) == null || (e = e.video) == null ? void 0 : e.id, n = f(w, this, pt).call(this), r = n == null ? void 0 : n.id;
|
|
272
|
+
m(Qe, this, null), p($e, this).forEach((e) => {
|
|
336
273
|
let n = e.id, i = e.bitrate;
|
|
337
274
|
e.el.setAttribute("data-playing", String(n === t));
|
|
338
275
|
let a = n === r;
|
|
339
|
-
if (e.el.setAttribute("data-selected", String(a)), a ? (e.el.setAttribute("aria-selected", "true"), e.el.tabIndex = 0, m(
|
|
340
|
-
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(Qe, this, e.el)) : (e.el.removeAttribute("aria-selected"), e.el.tabIndex = -1), p(C, this)) {
|
|
277
|
+
let t = i > p(Ye, this);
|
|
341
278
|
e.el.setAttribute("data-capped", String(t));
|
|
342
279
|
} else e.el.removeAttribute("data-capped");
|
|
343
280
|
});
|
|
344
281
|
}
|
|
345
|
-
function
|
|
346
|
-
let e = [...p(
|
|
347
|
-
return e.find((e) => e.bitrate <= p(
|
|
282
|
+
function pt() {
|
|
283
|
+
let e = [...p($e, this)].sort((e, t) => t.bitrate - e.bitrate);
|
|
284
|
+
return e.find((e) => e.bitrate <= p(Ye, this)) || e[e.length - 1];
|
|
348
285
|
}
|
|
349
|
-
function
|
|
286
|
+
function mt(e) {
|
|
350
287
|
this.dispatchEvent(new Event("change", {
|
|
351
288
|
bubbles: !0,
|
|
352
289
|
composed: !0
|
|
@@ -356,32 +293,32 @@ function bt(e) {
|
|
|
356
293
|
detail: e
|
|
357
294
|
}));
|
|
358
295
|
}
|
|
359
|
-
function
|
|
296
|
+
function ht(e) {
|
|
360
297
|
let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
|
|
361
298
|
if (!(n || r || i) && this.keysUsed.includes(t)) if (e.preventDefault(), e.stopPropagation(), t === "Tab" || t === "Escape") {
|
|
362
299
|
var a;
|
|
363
|
-
(a = p(
|
|
300
|
+
(a = p(tt, this)) == null || a.hide();
|
|
364
301
|
} else if (t === "Enter" || t === " ") {
|
|
365
302
|
var o;
|
|
366
|
-
(o = f(w, this,
|
|
367
|
-
} else f(w, this,
|
|
303
|
+
(o = f(w, this, _t).call(this)) == null || (o = o.el) == null || o.click();
|
|
304
|
+
} else f(w, this, gt).call(this, e);
|
|
368
305
|
}
|
|
369
|
-
function
|
|
306
|
+
function gt(e) {
|
|
370
307
|
var t;
|
|
371
|
-
let { key: n } = e, r = p(
|
|
308
|
+
let { key: n } = e, r = p($e, this), i = (t = f(w, this, _t).call(this)) == null ? r[0] : t;
|
|
372
309
|
if (!i) return;
|
|
373
310
|
let a = r.indexOf(i), o = Math.max(0, a);
|
|
374
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);
|
|
375
312
|
let s = r[o];
|
|
376
|
-
s && (f(w, this,
|
|
313
|
+
s && (f(w, this, vt).call(this, s.id), s.el.focus());
|
|
377
314
|
}
|
|
378
|
-
function
|
|
379
|
-
return p(
|
|
315
|
+
function _t() {
|
|
316
|
+
return p($e, this).find((e) => e.el.tabIndex === 0);
|
|
380
317
|
}
|
|
381
|
-
function
|
|
382
|
-
for (let t of p(
|
|
318
|
+
function vt(e) {
|
|
319
|
+
for (let t of p($e, this)) t.el.tabIndex = t.id === e ? 0 : -1;
|
|
383
320
|
}
|
|
384
|
-
e(
|
|
321
|
+
e(rt, "observedAttributes", [
|
|
385
322
|
g.RENDITION_LEVELS,
|
|
386
323
|
g.MAX_VIDEO_BITRATE,
|
|
387
324
|
g.ABR_ENABLED,
|
|
@@ -389,6 +326,69 @@ e(lt, "observedAttributes", [
|
|
|
389
326
|
g.SIZE_BASED_RESOLUTION_CAP_ENABLED
|
|
390
327
|
]);
|
|
391
328
|
//#endregion
|
|
329
|
+
//#region ../../libs/player-next/src/components/AirPlayButton.ts
|
|
330
|
+
var yt, bt = document.createElement("template"), xt = "\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=\"M18 18a3 3 0 0 0 3 -3v-8a3 3 0 0 0 -3 -3h-12a3 3 0 0 0 -3 3v8a3 3 0 0 0 3 3\" /><path d=\"M9 20h6l-3 -5z\" /></svg>\n";
|
|
331
|
+
bt.innerHTML = `
|
|
332
|
+
<style>
|
|
333
|
+
:host {
|
|
334
|
+
display: var(--airplay-button-display);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
:host(:not([${g.AIRPLAY_AVAILABLE}])) {
|
|
338
|
+
display: none !important;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
:host([${g.IS_AIRPLAYING}]) slot[name="exit"] {
|
|
342
|
+
display: none !important;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:host(:not([${g.IS_AIRPLAYING}])) slot[name="enter"] {
|
|
346
|
+
display: none !important;
|
|
347
|
+
}
|
|
348
|
+
</style>
|
|
349
|
+
|
|
350
|
+
<slot name="icon">
|
|
351
|
+
<slot name="enter">${xt}</slot>
|
|
352
|
+
<slot name="exit">${xt}</slot>
|
|
353
|
+
</slot>
|
|
354
|
+
`;
|
|
355
|
+
var St = /* @__PURE__ */ new WeakSet(), Ct = class extends x {
|
|
356
|
+
constructor() {
|
|
357
|
+
var e;
|
|
358
|
+
super(), h(this, St), (e = this.shadowRoot) == null || e.appendChild(bt.content.cloneNode(!0));
|
|
359
|
+
}
|
|
360
|
+
connectedCallback() {
|
|
361
|
+
super.connectedCallback(), f(St, this, wt).call(this);
|
|
362
|
+
}
|
|
363
|
+
disconnectedCallback() {
|
|
364
|
+
super.disconnectedCallback();
|
|
365
|
+
}
|
|
366
|
+
attributeChangedCallback(e, t, n) {
|
|
367
|
+
super.attributeChangedCallback(e, t, n), e === g.IS_AIRPLAYING && f(St, this, wt).call(this);
|
|
368
|
+
}
|
|
369
|
+
set isAirPlaying(e) {
|
|
370
|
+
e ? this.setAttribute(g.IS_AIRPLAYING, "") : this.removeAttribute(g.IS_AIRPLAYING);
|
|
371
|
+
}
|
|
372
|
+
get isAirPlaying() {
|
|
373
|
+
return this.hasAttribute(g.IS_AIRPLAYING);
|
|
374
|
+
}
|
|
375
|
+
handleClick(e) {
|
|
376
|
+
this.dispatchEvent(new CustomEvent(_.REQUEST_AIRPLAY, {
|
|
377
|
+
bubbles: !0,
|
|
378
|
+
composed: !0
|
|
379
|
+
}));
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
yt = Ct;
|
|
383
|
+
function wt() {
|
|
384
|
+
this.setAttribute("aria-label", this.isAirPlaying ? "Exit airplay" : "Enter airplay");
|
|
385
|
+
}
|
|
386
|
+
e(Ct, "observedAttributes", [
|
|
387
|
+
...y(yt, "observedAttributes", yt),
|
|
388
|
+
g.AIRPLAY_AVAILABLE,
|
|
389
|
+
g.IS_AIRPLAYING
|
|
390
|
+
]);
|
|
391
|
+
//#endregion
|
|
392
392
|
//#region ../../libs/player-next/src/components/BufferingIcon.ts
|
|
393
393
|
var Tt = document.createElement("template");
|
|
394
394
|
Tt.innerHTML = `
|
|
@@ -1411,7 +1411,7 @@ function gr(e) {
|
|
|
1411
1411
|
})();
|
|
1412
1412
|
}
|
|
1413
1413
|
function _r() {
|
|
1414
|
-
return p(A, this).duration && !isNaN(p(A, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1414
|
+
return p(A, this).duration && !Number.isNaN(p(A, this).duration) ? Promise.resolve() : new Promise((e) => {
|
|
1415
1415
|
p(N, this).debug("Waiting for duration...");
|
|
1416
1416
|
let t = () => {
|
|
1417
1417
|
p(N, this).debug("Duration loaded:", p(A, this).duration), p(A, this).removeEventListener("loadedmetadata", t), clearTimeout(n), e();
|
|
@@ -1507,7 +1507,7 @@ var Tr = { _: [
|
|
|
1507
1507
|
this.vindral.pause();
|
|
1508
1508
|
}
|
|
1509
1509
|
}, Or = document.createElement("template");
|
|
1510
|
-
Or.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
|
|
1510
|
+
Or.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";
|
|
1511
1511
|
var kr = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), jr = class extends HTMLElement {
|
|
1512
1512
|
constructor() {
|
|
1513
1513
|
super(), d(this, kr, null), d(this, Ar, void 0), e(this, "range", void 0), m(Ar, this, this.attachShadow({ mode: "open" })), p(Ar, this).appendChild(Or.content.cloneNode(!0)), this.range = p(Ar, this).getElementById("range");
|
|
@@ -1814,7 +1814,7 @@ var Nr = [
|
|
|
1814
1814
|
let a = this.getAttribute("authentication-token");
|
|
1815
1815
|
a && i.searchParams.set("authToken", a);
|
|
1816
1816
|
let o = Yn(r);
|
|
1817
|
-
if (isNaN(o)) {
|
|
1817
|
+
if (Number.isNaN(o)) {
|
|
1818
1818
|
p(B, this).error(`Invalid duration format: ${r}`);
|
|
1819
1819
|
return;
|
|
1820
1820
|
}
|
|
@@ -1829,12 +1829,12 @@ var Nr = [
|
|
|
1829
1829
|
}), d(this, hi, () => {
|
|
1830
1830
|
if (!p(L, this)) return;
|
|
1831
1831
|
let e = p(L, this).duration;
|
|
1832
|
-
f(V, this, H).call(this, g.DURATION, isNaN(e) ? "0" : e.toString());
|
|
1832
|
+
f(V, this, H).call(this, g.DURATION, Number.isNaN(e) ? "0" : e.toString());
|
|
1833
1833
|
}), d(this, gi, () => {
|
|
1834
1834
|
var e, t;
|
|
1835
1835
|
if (!p(L, this) || p(L, this).seeking || (e = (t = p(L, this)).shouldIgnoreTimeupdate) != null && e.call(t)) return;
|
|
1836
1836
|
let n = p(L, this).currentTime;
|
|
1837
|
-
n
|
|
1837
|
+
n !== void 0 && f(V, this, H).call(this, g.TIMESHIFT_POSITION, n.toString());
|
|
1838
1838
|
}), d(this, _i, () => {
|
|
1839
1839
|
p(L, this) && (f(V, this, H).call(this, g.VOLUME, p(L, this).volume.toString()), p(L, this).muted ? f(V, this, H).call(this, g.MUTED, "") : f(V, this, U).call(this, g.MUTED));
|
|
1840
1840
|
}), d(this, vi, () => {
|
|
@@ -2025,7 +2025,7 @@ var Nr = [
|
|
|
2025
2025
|
f(V, this, Fi).call(this), p(Ir, this) && (clearTimeout(p(Ir, this)), m(Ir, this, null)), this.disconnectListener(this);
|
|
2026
2026
|
}
|
|
2027
2027
|
attributeChangedCallback(e, t, n) {
|
|
2028
|
-
if (t
|
|
2028
|
+
if (t !== n) {
|
|
2029
2029
|
switch (p(B, this).debug("Attribute changed", {
|
|
2030
2030
|
name: e,
|
|
2031
2031
|
oldValue: t,
|
|
@@ -2248,7 +2248,7 @@ var Nr = [
|
|
|
2248
2248
|
disconnectListener(e) {
|
|
2249
2249
|
Jn(e).forEach((t) => {
|
|
2250
2250
|
let n = p(Pr, this).get(t);
|
|
2251
|
-
n && p(Pr, this).set(t, n.filter((t) => t
|
|
2251
|
+
n && p(Pr, this).set(t, n.filter((t) => t !== e));
|
|
2252
2252
|
});
|
|
2253
2253
|
}
|
|
2254
2254
|
get instance() {
|
|
@@ -2282,7 +2282,7 @@ function Ni() {
|
|
|
2282
2282
|
videoRobustness: be(e.getAttribute("drm-playready-video-robustness")),
|
|
2283
2283
|
audioRobustness: be(e.getAttribute("drm-playready-audio-robustness"))
|
|
2284
2284
|
}
|
|
2285
|
-
}, Ee = Ae(e.getAttribute("webcodecs-hardware-acceleration")), De = ke(e.getAttribute("decoders")), Oe = b(e.getAttribute("offscreen-canvas-enabled")), je = b(e.getAttribute("webtransport-enabled")), Me = _e(e.getAttribute("reconnect-retries")), Ne = Me === void 0 ? void 0 : (e) => e.reconnectRetries < Me,
|
|
2285
|
+
}, Ee = Ae(e.getAttribute("webcodecs-hardware-acceleration")), De = ke(e.getAttribute("decoders")), Oe = b(e.getAttribute("offscreen-canvas-enabled")), je = b(e.getAttribute("webtransport-enabled")), Me = _e(e.getAttribute("reconnect-retries")), Ne = Me === void 0 ? void 0 : (e) => e.reconnectRetries < Me, S = e.getAttribute("language") || void 0;
|
|
2286
2286
|
m(F, e, new oe({
|
|
2287
2287
|
url: p(Br, e),
|
|
2288
2288
|
channelId: p(Vr, e),
|
|
@@ -2312,7 +2312,7 @@ function Ni() {
|
|
|
2312
2312
|
textTrack: ee,
|
|
2313
2313
|
advanced: Se,
|
|
2314
2314
|
logLevel: we,
|
|
2315
|
-
language:
|
|
2315
|
+
language: S,
|
|
2316
2316
|
drm: Te,
|
|
2317
2317
|
webtransportEnabled: je,
|
|
2318
2318
|
webcodecsHardwareAcceleration: Ee,
|
|
@@ -2320,12 +2320,12 @@ function Ni() {
|
|
|
2320
2320
|
offscreenCanvasEnabled: Oe,
|
|
2321
2321
|
reconnectHandler: Ne
|
|
2322
2322
|
})), m(zr, e, new Dr(p(F, e))), p(I, e) || m(I, e, p(zr, e)), f(V, e, Pi).call(e), m(Lr, e, (n = e.shadowRoot) == null ? void 0 : n.querySelector("#video")), p(Lr, e) && p(F, e).attach(p(Lr, e)), e.setAttribute(g.MEDIA, p(F, e).media), p(F, e).muted && f(V, e, H).call(e, g.MUTED, ""), p(F, e).abrEnabled ? f(V, e, H).call(e, g.ABR_ENABLED, "") : f(V, e, U).call(e, g.ABR_ENABLED), f(V, e, H).call(e, g.SIZE_BASED_RESOLUTION_CAP_ENABLED, p(F, e).sizeBasedResolutionCapEnabled ? "true" : "false"), f(V, e, H).call(e, g.VOLUME, p(F, e).volume.toString()), v(x) || f(V, e, H).call(e, g.POSTER_SRC, p(F, e).getThumbnailUrl());
|
|
2323
|
-
let
|
|
2324
|
-
|
|
2323
|
+
let Pe = b(e.getAttribute(g.AIRPLAY_ENABLED), !1), Fe = b(e.getAttribute(g.CAST_ENABLED), !0), Ie = b(e.getAttribute(g.FULLSCREEN_ENABLED), !0), Le = b(e.getAttribute(g.PIP_ENABLED), !0), Re = b(e.getAttribute(g.VU_METER_ENABLED), !1), ze = b(e.getAttribute(g.TIMESHIFT_ENABLED), !1);
|
|
2324
|
+
Pe && f(V, e, Ji).call(e, p(F, e)), Fe && f(V, e, Gi).call(e, p(F, e)), Ie && f(V, e, Hi).call(e, p(F, e)), Le && f(V, e, Bi).call(e, p(F, e)), i || p(F, e).play(), Re && f(V, e, Yi).call(e, p(F, e)), e.dispatchEvent(new CustomEvent("vindral-instance-ready", {
|
|
2325
2325
|
bubbles: !0,
|
|
2326
2326
|
composed: !0,
|
|
2327
2327
|
detail: p(F, e)
|
|
2328
|
-
})),
|
|
2328
|
+
})), ze && (f(V, e, Li).call(e), Ie && f(V, e, Ui).call(e));
|
|
2329
2329
|
})();
|
|
2330
2330
|
}
|
|
2331
2331
|
function Pi() {
|
|
@@ -2433,7 +2433,7 @@ function Yi(e) {
|
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
function Xi() {
|
|
2436
|
-
let e = () => (customElements.get("vindral-debug-panel") || import("./
|
|
2436
|
+
let e = () => (customElements.get("vindral-debug-panel") || import("./ABGzdpO4.js").then((e) => e.n).then(({ registerDebugComponents: e }) => e()), this.setAttribute(g.DEBUG_PANEL_OPEN, ""), p(F, this));
|
|
2437
2437
|
window._vindralDebug = e, m($r, this, e);
|
|
2438
2438
|
}
|
|
2439
2439
|
function Zi() {
|
|
@@ -2448,7 +2448,7 @@ function $i(e) {
|
|
|
2448
2448
|
e.pointerType === "touch" && e.target instanceof HTMLElement ? [this, p(Lr, this)].includes(e.target) && t ? f(V, this, ia).call(this) : f(V, this, oa).call(this) : e.composedPath().some((e) => e instanceof HTMLElement && ["vindral-play-button"].includes(e == null ? void 0 : e.localName)) && f(V, this, oa).call(this);
|
|
2449
2449
|
}
|
|
2450
2450
|
function ea(e) {
|
|
2451
|
-
!p(Gr, this) || e.target instanceof x || e.target instanceof
|
|
2451
|
+
!p(Gr, this) || e.target instanceof x || e.target instanceof Re || e.target instanceof jr || (this.hasAttribute(g.FULLSCREEN) ? this.removeAttribute(g.FULLSCREEN) : this.setAttribute(g.FULLSCREEN, ""));
|
|
2452
2452
|
}
|
|
2453
2453
|
function ta(e) {
|
|
2454
2454
|
this.hasAttribute(g.USER_INTERACTING) || f(V, this, oa).call(this);
|
|
@@ -2692,7 +2692,7 @@ wa.innerHTML = `
|
|
|
2692
2692
|
<vindral-language-menu-list id="listbox" part="listbox"></vindral-language-menu-list>
|
|
2693
2693
|
</slot>
|
|
2694
2694
|
`;
|
|
2695
|
-
var Ta = /* @__PURE__ */ new WeakSet(), Ea = class extends
|
|
2695
|
+
var Ta = /* @__PURE__ */ new WeakSet(), Ea = class extends Re {
|
|
2696
2696
|
constructor() {
|
|
2697
2697
|
var e, t, n, r;
|
|
2698
2698
|
super(), h(this, Ta), (e = this.shadowRoot) == null || e.appendChild(wa.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]");
|
|
@@ -3617,7 +3617,7 @@ us.innerHTML = `
|
|
|
3617
3617
|
<vindral-rendition-levels-menu-list id="listbox" part="listbox"></vindral-rendition-levels-menu-list>
|
|
3618
3618
|
</slot>
|
|
3619
3619
|
`;
|
|
3620
|
-
var ds = /* @__PURE__ */ new WeakSet(), fs = class extends
|
|
3620
|
+
var ds = /* @__PURE__ */ new WeakSet(), fs = class extends Re {
|
|
3621
3621
|
constructor() {
|
|
3622
3622
|
var e, t, n, r;
|
|
3623
3623
|
super(), h(this, ds), (e = this.shadowRoot) == null || e.appendChild(us.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]");
|
|
@@ -3661,7 +3661,7 @@ var hs = /* @__PURE__ */ new WeakMap(), gs = /* @__PURE__ */ new WeakMap(), _s =
|
|
|
3661
3661
|
(e = p(ys, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", this);
|
|
3662
3662
|
}
|
|
3663
3663
|
attributeChangedCallback(e, t, n) {
|
|
3664
|
-
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n) : 2 ** 53 - 1));
|
|
3664
|
+
t !== n && (e === g.RENDITION_LEVELS && n && (this.list = JSON.parse(n)), e === g.MAX_VIDEO_BITRATE && n && (this.maxVideoBitrate = n ? parseInt(n, 10) : 2 ** 53 - 1));
|
|
3665
3665
|
}
|
|
3666
3666
|
set list(e) {
|
|
3667
3667
|
m(hs, this, e), f(X, this, Cs).call(this);
|
|
@@ -4037,7 +4037,7 @@ var Q = /* @__PURE__ */ new WeakMap(), nc = /* @__PURE__ */ new WeakMap(), rc =
|
|
|
4037
4037
|
}), d(this, pc, () => {
|
|
4038
4038
|
p(nc, this).style.opacity = "0", p(rc, this).style.opacity = "0";
|
|
4039
4039
|
}), d(this, mc, (e) => {
|
|
4040
|
-
if (f($, this, vc).call(this) || !p(Q, this) || p(Q, this) <= 0 || !isFinite(p(Q, this))) return;
|
|
4040
|
+
if (f($, this, vc).call(this) || !p(Q, this) || p(Q, this) <= 0 || !Number.isFinite(p(Q, this))) return;
|
|
4041
4041
|
let t = f($, this, gc).call(this);
|
|
4042
4042
|
if (t <= 0) return;
|
|
4043
4043
|
let n = this.range.valueAsNumber * t, r = n;
|
|
@@ -4104,14 +4104,14 @@ function gc() {
|
|
|
4104
4104
|
return p(Q, this) ? p(Q, this) : 1;
|
|
4105
4105
|
}
|
|
4106
4106
|
function _c() {
|
|
4107
|
-
return !!p(Q, this) && p(Q, this) > 0 && isFinite(p(Q, this));
|
|
4107
|
+
return !!p(Q, this) && p(Q, this) > 0 && Number.isFinite(p(Q, this));
|
|
4108
4108
|
}
|
|
4109
4109
|
function vc() {
|
|
4110
4110
|
return p(sc, this);
|
|
4111
4111
|
}
|
|
4112
4112
|
function yc() {
|
|
4113
4113
|
let e = f($, this, gc).call(this);
|
|
4114
|
-
!p(Q, this) || p(Q, this) <= 0 || !isFinite(p(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), p(ic, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${f($, this, Dc).call(this, this.range.valueAsNumber * e)} of ${f($, this, Dc).call(this, e)}`), !p(ic, this) && !f($, this, vc).call(this) && f($, this, Tc).call(this, this.range.valueAsNumber));
|
|
4114
|
+
!p(Q, this) || p(Q, this) <= 0 || !Number.isFinite(p(Q, this)) ? this.setAttribute("data-no-duration", "") : this.removeAttribute("data-no-duration"), p(ic, this) || (this.updateBar(), this.setAttribute("aria-valuetext", `${f($, this, Dc).call(this, this.range.valueAsNumber * e)} of ${f($, this, Dc).call(this, e)}`), !p(ic, this) && !f($, this, vc).call(this) && f($, this, Tc).call(this, this.range.valueAsNumber));
|
|
4115
4115
|
}
|
|
4116
4116
|
function bc(e) {
|
|
4117
4117
|
let t = this.getBoundingClientRect(), n = (e - t.left) / t.width;
|
|
@@ -4127,7 +4127,7 @@ function Sc(e) {
|
|
|
4127
4127
|
this.range.value = e.toString(), this.updateBar(), f($, this, wc).call(this, t);
|
|
4128
4128
|
}
|
|
4129
4129
|
function Cc(e, t) {
|
|
4130
|
-
if (!p(Q, this) || !isFinite(p(Q, this))) return;
|
|
4130
|
+
if (!p(Q, this) || !Number.isFinite(p(Q, this))) return;
|
|
4131
4131
|
let n = e * p(Q, this), r = p(Q, this) - n;
|
|
4132
4132
|
p(nc, this).textContent = `-${f($, this, Dc).call(this, r)}`;
|
|
4133
4133
|
let i = this.getBoundingClientRect(), a = (t - i.left) / i.width * 100;
|
|
@@ -4355,7 +4355,7 @@ Hc = Kc, e(Kc, "observedAttributes", [
|
|
|
4355
4355
|
//#endregion
|
|
4356
4356
|
//#region ../../libs/player-next/src/registerComponents.ts
|
|
4357
4357
|
function qc() {
|
|
4358
|
-
customElements.define("vindral-controller", Mi), customElements.define("vindral-control-bar", Fn), customElements.define("vindral-advanced-rendition-menu",
|
|
4358
|
+
customElements.define("vindral-controller", Mi), customElements.define("vindral-control-bar", Fn), customElements.define("vindral-advanced-rendition-menu", Ge), customElements.define("vindral-advanced-rendition-menu-list", rt), customElements.define("vindral-play-button", fo), customElements.define("vindral-mute-button", ao), customElements.define("vindral-buffering-overlay", At), customElements.define("vindral-scroll-overlay", Bs), customElements.define("vindral-play-overlay", Vc), customElements.define("vindral-user-input-play-overlay", Nc), customElements.define("vindral-fullscreen-button", xa), customElements.define("vindral-rendition-levels-menu", fs), customElements.define("vindral-rendition-levels-menu-list", xs), customElements.define("vindral-channel-grid-button", On), customElements.define("vindral-channel-grid", en), customElements.define("vindral-channel-grid-item", Wt), customElements.define("vindral-pip-button", co), customElements.define("vindral-airplay-button", Ct), customElements.define("vindral-cast-button", Pt), customElements.define("vindral-cast-overlay", Bt), customElements.define("vindral-buffering-icon", Dt), customElements.define("vindral-language-menu", Ea), customElements.define("vindral-language-menu-list", Ba), customElements.define("vindral-message", Rc), customElements.define("vindral-volume-range", Kc), customElements.define("vindral-poster-overlay", is), customElements.define("vindral-player", Wo), customElements.define("vindral-seek-bar", hc), customElements.define("vindral-live-button", no);
|
|
4359
4359
|
}
|
|
4360
4360
|
//#endregion
|
|
4361
4361
|
export { qc as t };
|