@vindral/web-sdk 4.8.2-3-g790c0b18 → 4.8.2-31-gc8564b2f9

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/CoLAnqGB.js DELETED
@@ -1,378 +0,0 @@
1
- import { n as e } from "./BsfwXDui.js";
2
- import { i as t, n, r, t as i } from "./DSw1XhvD.js";
3
- import { t as a } from "./Tj9xPXja.js";
4
- //#region ../../libs/utils/src/formatting.ts
5
- var o = 1e3, s = o * 1e3, c = s * 1e3, l = (e, t, n) => e % t === 0 ? e / t : (e / t).toFixed(n), u = (e, t = 1) => e >= c ? `${l(e, c, t)} Gbit/s` : e >= s ? `${l(e, s, t)} Mbit/s` : e >= o ? `${l(e, o, t)} Kbit/s` : `${e} bit/s`, d = ({ width: e, height: t }) => `${e}x${t}`, f = {
6
- PAUSED: "paused",
7
- MUTED: "muted",
8
- USER_INTERACTING: "user-interacting",
9
- IS_CASTING: "is-casting",
10
- CAST_AVAILABLE: "cast-available",
11
- CAST_RECEIVER_NAME: "cast-receiver-name",
12
- BUFFERING: "buffering",
13
- UI_LOCKED: "ui-locked",
14
- HIDE_UI_ON_PAUSE: "hide-ui-on-pause",
15
- FULLSCREEN: "is-fullscreen",
16
- FULLSCREEN_FALLBACK: "is-fullscreen-fallback",
17
- RENDITION_LEVELS: "rendition-levels",
18
- RENDITION_LEVEL: "rendition-level",
19
- MAX_VIDEO_BITRATE: "max-video-bit-rate",
20
- MAX_INITIAL_BITRATE: "max-initial-bit-rate",
21
- ABR_ENABLED: "abr-enabled",
22
- SIZE_BASED_RESOLUTION_CAP_ENABLED: "size-based-resolution-cap-enabled",
23
- CHANNELS: "channels",
24
- CHANNEL_ID: "channel-id",
25
- CHANNEL_GROUP_ID: "channel-group-id",
26
- PIP_AVAILABLE: "pip-available",
27
- IS_PIP: "is-pip",
28
- AIRPLAY_AVAILABLE: "airplay-available",
29
- IS_AIRPLAYING: "is-airplaying",
30
- MEDIA: "media",
31
- LANGUAGES: "languages",
32
- LANGUAGE: "language",
33
- TEXT_TRACKS: "text-tracks",
34
- TEXT_TRACK: "text-track",
35
- NEEDS_USER_INPUT_VIDEO: "needs-user-input-video",
36
- NEEDS_USER_INPUT_AUDIO: "needs-user-input-audio",
37
- AUTHENTICATION_TOKEN: "authentication-token",
38
- VOLUME: "volume",
39
- VOLUME_LEVEL: "volume-level",
40
- CAST_ENABLED: "cast",
41
- AIRPLAY_ENABLED: "airplay",
42
- PIP_ENABLED: "pip",
43
- FULLSCREEN_ENABLED: "fullscreen",
44
- DOUBLE_CLICK_FULLSCREEN_ENABLED: "double-click-fullscreen",
45
- VU_METER_ENABLED: "vu-meter",
46
- TIMESHIFT_ENABLED: "timeshift",
47
- TIMESHIFT_POSITION: "timeshift-position",
48
- TIMESHIFT_THUMBNAIL_URL: "timeshift-thumbnail-url",
49
- SEEK_PREVIEW: "seek-preview",
50
- TIMELINE_MARKERS: "timeline-markers",
51
- POSTER_SRC: "poster-src",
52
- DURATION: "duration",
53
- DEBUG_PANEL_OPEN: "debug-panel-open",
54
- TARGET_BUFFER_TIME: "target-buffer-time",
55
- DRIFT: "drift",
56
- PLAYBACK_LATENCY: "playback-latency",
57
- CONNECTION_STATE: "connection-state"
58
- }, p = Object.values(f), m = {
59
- PLAY: "play",
60
- PAUSE: "pause",
61
- MUTE: "mute",
62
- UNMUTE: "unmute",
63
- LOCK_UI: "lock-ui",
64
- UNLOCK_UI: "unlock-ui",
65
- ENTER_FULLSCREEN: "enter-fullscreen",
66
- EXIT_FULLSCREEN: "exit-fullscreen",
67
- SET_RENDITION: "set-rendition",
68
- SET_ABR_MODE: "set-abr-mode",
69
- SET_SIZE_BASED_RESOLUTION_CAP_MODE: "set-size-based-resolution-cap-mode",
70
- CHANNEL_GRID_OPENED: "channel-grid-opened",
71
- CHANNEL_GRID_CLOSED: "channel-grid-closed",
72
- ENTER_PIP: "enter-pip",
73
- EXIT_PIP: "exit-pip",
74
- REQUEST_AIRPLAY: "request-airplay",
75
- SET_LANGUAGE: "set-language",
76
- SET_TEXT_TRACK: "set-text-track",
77
- REQUEST_USER_INPUT: "request-user-input",
78
- SET_VOLUME: "set-volume",
79
- SEEK: "seek",
80
- SEEK_PREVIEW: "seek-preview",
81
- GO_LIVE: "go-live",
82
- TOGGLE_DEBUG_PANEL: "toggle-debug-panel",
83
- SET_TARGET_BUFFER_TIME: "set-target-buffer-time"
84
- };
85
- //#endregion
86
- //#region ../../libs/player-next/src/utils/vindralAttributesUtils.ts
87
- function h(e) {
88
- return e === "audio" || e === "video" || e === "audio+video" ? e : "audio+video";
89
- }
90
- function g(e) {
91
- return e === "trace" || e === "debug" || e === "info" || e === "warn" || e === "error" || e === "off" ? e : "off";
92
- }
93
- function _(e) {
94
- if (e === null) return;
95
- let t = e.split(",").map((e) => e.trim()).filter((e) => e === "h264" || e === "h265" || e === "av1");
96
- if (t.length !== 0) return t;
97
- }
98
- function v(e) {
99
- if (e !== null) try {
100
- let t = JSON.parse(e);
101
- if (typeof t == "object" && t) {
102
- let e = t;
103
- if (typeof e.width == "number" && typeof e.height == "number") return e;
104
- }
105
- } catch (e) {
106
- return;
107
- }
108
- }
109
- function y(e) {
110
- if (e !== null) try {
111
- let t = JSON.parse(e);
112
- if (typeof t == "object" && t) return t;
113
- } catch (e) {
114
- return;
115
- }
116
- }
117
- function b(e) {
118
- if (e === null) return;
119
- let t = parseFloat(e);
120
- return Number.isNaN(t) ? void 0 : t;
121
- }
122
- function x(e) {
123
- return typeof e == "string";
124
- }
125
- function S(e, t) {
126
- if (e === null) return t == null ? void 0 : t;
127
- let n = e.toLowerCase();
128
- return n === "false" ? !1 : n === "true" || n === "" || t == null ? !0 : t;
129
- }
130
- function C(e, t) {
131
- return e === null ? t == null ? void 0 : t : e === "" || e.toLowerCase() === "true" ? !0 : e.toLowerCase() === "false" ? !1 : e;
132
- }
133
- function w(e) {
134
- if (e === null) return;
135
- let t = {}, n = e.split(",");
136
- for (let e of n) {
137
- let [n, r] = e.split(":");
138
- n && r && (t[n.trim()] = r.trim());
139
- }
140
- return Object.keys(t).length > 0 ? t : void 0;
141
- }
142
- function T(e) {
143
- if (e === null) return;
144
- let t = e.split(",").map((e) => e.trim()).filter((e) => e.length > 0);
145
- return t.length > 0 ? t : void 0;
146
- }
147
- //#endregion
148
- //#region ../../libs/player-next/src/components/tooltip.ts
149
- var E = "\n background: var(--bg-subtle, rgba(0, 0, 0, 0.8));\n color: var(--fg-strong, #fff);\n font-family: var(--ui-font, inherit);\n font-size: 12px;\n font-weight: normal;\n line-height: 1.2;\n padding: 4px 8px;\n border-radius: 4px;\n white-space: nowrap;\n", D = `
150
- .tooltip {
151
- ${E}
152
- --_tooltip-gap: 4px;
153
- /* Hit-testable only while the controls are, so the pointer can move onto it (WCAG 1.4.13, hoverable). */
154
- pointer-events: inherit;
155
- display: var(--tooltip-display, block);
156
- position: absolute;
157
- left: 50%;
158
- bottom: calc(100% + var(--_tooltip-gap));
159
- transform: translateX(calc(-50% + var(--tooltip-shift, 0px)));
160
- z-index: 1;
161
- opacity: 0;
162
- visibility: hidden;
163
- transition: opacity 0.15s, visibility 0s 0.15s;
164
- }
165
-
166
- /* Bridges the gap so moving from the control onto the tooltip keeps it open. */
167
- .tooltip::after {
168
- content: "";
169
- position: absolute;
170
- left: 0;
171
- right: 0;
172
- top: 100%;
173
- height: var(--_tooltip-gap);
174
- }
175
-
176
- .tooltip[hidden],
177
- :host([tooltip-dismissed]) .tooltip {
178
- display: none;
179
- }
180
-
181
- @media (hover: hover) and (pointer: fine) {
182
- :host(:hover:not([disabled])) .tooltip {
183
- opacity: 1;
184
- visibility: visible;
185
- transition: opacity 0.15s 0.3s, visibility 0s 0.3s;
186
- }
187
- }
188
- `;
189
- function O(e, t) {
190
- let n = !1, r = !1, i = () => {
191
- !n && !r && e.removeAttribute("tooltip-dismissed");
192
- }, a = () => {
193
- let e = getComputedStyle(t);
194
- return e.display !== "none" && e.visibility === "visible";
195
- }, o = (t) => {
196
- t.key === "Escape" && (n || r) && a() && e.setAttribute("tooltip-dismissed", "");
197
- }, s = () => {
198
- n = !0;
199
- }, c = () => {
200
- n = !1, i();
201
- }, l = () => {
202
- r = !0;
203
- }, u = (t) => {
204
- e.contains(t.relatedTarget) || (r = !1, i());
205
- };
206
- return document.addEventListener("keydown", o), e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", c), e.addEventListener("focusin", l), e.addEventListener("focusout", u), () => {
207
- document.removeEventListener("keydown", o), e.removeEventListener("mouseenter", s), e.removeEventListener("mouseleave", c), e.removeEventListener("focusin", l), e.removeEventListener("focusout", u);
208
- };
209
- }
210
- //#endregion
211
- //#region ../../libs/player-next/src/components/VindralButton.ts
212
- var k = document.createElement("template");
213
- k.innerHTML = `
214
- <style>
215
- :host {
216
- cursor: pointer;
217
- color: var(--fg-strong);
218
- padding: var(--button-padding) !important;
219
- background: transparent;
220
- transition: background 0.2s linear;
221
- -webkit-tap-highlight-color: transparent;
222
- position: relative;
223
- }
224
-
225
- :host(:focus-visible) {
226
- box-shadow: inset 0 0 0 2px var(--fg-strong);
227
- outline: 0;
228
- }
229
-
230
- :host(:where(:focus)) {
231
- box-shadow: none;
232
- outline: 0;
233
- }
234
-
235
- @media (hover: hover) and (pointer: fine) {
236
- :host(:hover) {
237
- background: rgba(255, 255, 255, 0.15);
238
- }
239
- }
240
-
241
- :host(:active) {
242
- background: rgba(255, 255, 255, 0.25);
243
- }
244
-
245
- :host(:active) svg {
246
- scale: 0.9;
247
- }
248
-
249
- :host([disabled]) {
250
- opacity: 0.5;
251
- background: transparent;
252
- }
253
-
254
- slot > svg {
255
- display: block;
256
- width: var(--button-icon-size);
257
- height: var(--button-icon-size);
258
- }
259
-
260
- ${D}
261
-
262
- :host([aria-expanded="true"]) .tooltip {
263
- display: none;
264
- }
265
-
266
- .tooltip[below] {
267
- bottom: auto;
268
- top: calc(100% + var(--_tooltip-gap));
269
- }
270
-
271
- .tooltip[below]::after {
272
- top: auto;
273
- bottom: 100%;
274
- }
275
-
276
- :host(:focus-visible:not([disabled])) .tooltip {
277
- opacity: 1;
278
- visibility: visible;
279
- transition-delay: 0s;
280
- }
281
- </style>
282
- <span class="tooltip" aria-hidden="true" hidden></span>
283
- `;
284
- var A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakSet(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = class extends HTMLElement {
285
- constructor() {
286
- super(), a(this, N), t(this, A, null), t(this, j, void 0), t(this, M, void 0), t(this, P, () => {
287
- if (i(j, this).style.setProperty("--tooltip-shift", "0px"), i(j, this).removeAttribute("below"), !i(A, this)) return;
288
- let e = i(A, this).getBoundingClientRect(), t = i(j, this).getBoundingClientRect();
289
- if (t.width === 0) return;
290
- t.top < e.top && i(j, this).setAttribute("below", "");
291
- let n = e.left - t.left, r = t.right - e.right, a = 0;
292
- n > 0 ? a = n : r > 0 && (a = -r), i(j, this).style.setProperty("--tooltip-shift", `${a}px`);
293
- }), t(this, F, (e) => {
294
- e.composedPath().includes(i(j, this)) || this.handleClick(e);
295
- }), t(this, I, (e) => {
296
- let { key: t } = e;
297
- if (!this.keysUsed.includes(t)) {
298
- this.removeEventListener("keyup", i(I, this));
299
- return;
300
- }
301
- this.handleClick(e);
302
- }), t(this, L, (e) => {
303
- let { metaKey: t, altKey: n, key: r } = e;
304
- if (t || n || !this.keysUsed.includes(r)) {
305
- this.removeEventListener("keyup", i(I, this));
306
- return;
307
- }
308
- this.addEventListener("keyup", i(I, this), { once: !0 });
309
- });
310
- let e = this.attachShadow({ mode: "open" });
311
- e.appendChild(k.content.cloneNode(!0)), n(j, this, e.querySelector(".tooltip")), this.addEventListener("mouseenter", i(P, this)), this.addEventListener("focus", i(P, this));
312
- }
313
- get keysUsed() {
314
- return ["Enter", " "];
315
- }
316
- connectedCallback() {
317
- var e;
318
- n(A, this, this.closest("vindral-controller")), (e = i(A, this)) == null || e.connectListener(this), n(M, this, O(this, i(j, this))), this.hasAttribute("disabled") || this.enable(), this.setAttribute("role", "button");
319
- }
320
- enable() {
321
- this.addEventListener("click", i(F, this)), this.addEventListener("keydown", i(L, this)), this.tabIndex = 0;
322
- }
323
- disable() {
324
- this.removeEventListener("click", i(F, this)), this.removeEventListener("keydown", i(L, this)), this.removeEventListener("keyup", i(I, this)), this.tabIndex = -1;
325
- }
326
- disconnectedCallback() {
327
- var e, t;
328
- (e = i(A, this)) == null || e.disconnectListener(this), (t = i(M, this)) == null || t.call(this);
329
- }
330
- attributeChangedCallback(e, t, n) {
331
- e === "disabled" && (x(n) ? this.disable() : this.enable()), e === "aria-label" && (i(j, this).textContent = n == null ? "" : n, i(j, this).hidden = !n, r(N, this, z).call(this)), e === "aria-expanded" && n !== "true" && r(N, this, z).call(this);
332
- }
333
- };
334
- function z() {
335
- this.matches(":hover, :focus") && i(P, this).call(this);
336
- }
337
- e(R, "observedAttributes", [
338
- "disabled",
339
- "aria-label",
340
- "aria-expanded"
341
- ]);
342
- //#endregion
343
- //#region \0@oxc-project+runtime@0.115.0/helpers/getPrototypeOf.js
344
- function B(e) {
345
- return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
346
- return e.__proto__ || Object.getPrototypeOf(e);
347
- }, B(e);
348
- }
349
- //#endregion
350
- //#region \0@oxc-project+runtime@0.115.0/helpers/superPropBase.js
351
- function V(e, t) {
352
- for (; !{}.hasOwnProperty.call(e, t) && (e = B(e)) !== null;);
353
- return e;
354
- }
355
- //#endregion
356
- //#region \0@oxc-project+runtime@0.115.0/helpers/get.js
357
- function H() {
358
- return H = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(e, t, n) {
359
- var r = V(e, t);
360
- if (r) {
361
- var i = Object.getOwnPropertyDescriptor(r, t);
362
- return i.get ? i.get.call(arguments.length < 3 ? e : n) : i.value;
363
- }
364
- }, H.apply(null, arguments);
365
- }
366
- //#endregion
367
- //#region \0@oxc-project+runtime@0.115.0/helpers/superPropGet.js
368
- function U(e, t, n, r) {
369
- var i = H(B(1 & r ? e.prototype : e), t, n);
370
- return 2 & r && typeof i == "function" ? function(e) {
371
- return i.apply(n, e);
372
- } : i;
373
- }
374
- //#endregion
375
- //#region ../../libs/player-next/src/constants.ts
376
- var W = 5e3, G = "https://lb.cdn.vindral.com";
377
- //#endregion
378
- export { d as C, u as S, T as _, E as a, f as b, x as c, C as d, g as f, b as g, h, R as i, y as l, v as m, G as n, D as o, w as p, U as r, O as s, W as t, S as u, _ as v, p as x, m as y };