@webitel/ui-sdk 26.2.70 → 26.2.72

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.
Files changed (97) hide show
  1. package/dist/{errors-DCJKAXTz.js → errors-CTL-RV3B.js} +1 -1
  2. package/dist/{index-B71drQtj.js → index-DWA4o3XJ.js} +4 -4
  3. package/dist/{index-cVwBpL1P.js → index-pMfSnCae.js} +1 -1
  4. package/dist/{install-BEn6vjFW.js → install-UIKG1ERr.js} +9496 -8874
  5. package/dist/{isObject-DB0eH0MA.js → isObject-B3V85Sws.js} +1 -1
  6. package/dist/prod-BoQuiIB3.js +973 -0
  7. package/dist/srt-parser-CsN7bp5E.js +26 -0
  8. package/dist/ssa-parser-BJOOPeQF.js +200 -0
  9. package/dist/ui-sdk.css +1 -1
  10. package/dist/ui-sdk.js +1 -1
  11. package/dist/ui-sdk.umd.cjs +464 -482
  12. package/dist/vidstack-Bq6c3Bam-pb8Xltql.js +425 -0
  13. package/dist/vidstack-D2pY00kU-DiDeMWBZ.js +135 -0
  14. package/dist/vidstack-DDXt6fpN-BJpO5v6W.js +50 -0
  15. package/dist/vidstack-D_-9AA6_-D9IZ6RtF.js +20 -0
  16. package/dist/{vidstack-Dm1xEU9Q-qSXq3AI-.js → vidstack-Dm1xEU9Q-CXHNvShT.js} +10 -11
  17. package/dist/vidstack-DqAw8m9J-R8izgrMK.js +22 -0
  18. package/dist/vidstack-audio-RReC5vyt.js +28 -0
  19. package/dist/vidstack-dash-DW7Ue8Mf.js +392 -0
  20. package/dist/vidstack-google-cast-C0U2wzqB.js +382 -0
  21. package/dist/vidstack-hls-BZgfDsGk.js +309 -0
  22. package/dist/vidstack-krOAtKMi-C50BTxmn.js +28 -0
  23. package/dist/vidstack-video-CI2rq89j.js +163 -0
  24. package/dist/vidstack-vimeo-CgwZpCSk.js +451 -0
  25. package/dist/vidstack-youtube-BYXk8CK9.js +232 -0
  26. package/dist/{wt-action-bar-ColV1kXE.js → wt-action-bar-DR8FqGoN.js} +1 -1
  27. package/dist/{wt-button-select-CfoSEYMj.js → wt-button-select-DZ_mMZr7.js} +1 -1
  28. package/dist/{wt-chat-emoji-Bgv9Viz-.js → wt-chat-emoji-Bx7YenHF.js} +6 -11
  29. package/dist/{wt-confirm-dialog-bVhuyR-Q.js → wt-confirm-dialog-Bmt7hVhO.js} +1 -1
  30. package/dist/{wt-context-menu-Cd8pgBRV.js → wt-context-menu-DEonPBI7.js} +1 -1
  31. package/dist/{wt-copy-action-jjp1mO2h.js → wt-copy-action-DQZ5qUUm.js} +1 -1
  32. package/dist/wt-datepicker-DRUiK--W.js +5660 -0
  33. package/dist/wt-display-chip-items-x25aFJxY.js +46 -0
  34. package/dist/{wt-dual-panel-DJsiR6RF.js → wt-dual-panel-0fDOCrlS.js} +1 -1
  35. package/dist/{wt-dummy-O94iGdZS.js → wt-dummy-CFcLvVwn.js} +1 -1
  36. package/dist/{wt-error-page-xgSWJ65z.js → wt-error-page-CebFt3Gg.js} +1 -1
  37. package/dist/{wt-expansion-panel-vzG02b62.js → wt-expansion-panel-cJWQaqAc.js} +1 -1
  38. package/dist/{wt-filters-panel-wrapper-h-UaAMuF.js → wt-filters-panel-wrapper-4-k7czbS.js} +1 -1
  39. package/dist/wt-galleria-Ds-HZvJq.js +322 -0
  40. package/dist/{wt-navigation-menu-Cu5Y9kua.js → wt-navigation-menu-DqnvQB3G.js} +2 -5
  41. package/dist/wt-notifications-bar-Bmww4vJb.js +79 -0
  42. package/dist/{wt-page-header-DlRrRzG7.js → wt-page-header-6lJKDnEs.js} +1 -1
  43. package/dist/{wt-pagination-CW46I4u2.js → wt-pagination-D7BhUkrI.js} +1 -1
  44. package/dist/{wt-player-3qh_Jzm2.js → wt-player-Bx_9-9R6.js} +1 -1
  45. package/dist/{wt-popover-BTG5bUP0.js → wt-popover-U7JE0uoX.js} +19 -22
  46. package/dist/{wt-search-bar-CTsNf7bp.js → wt-search-bar-BfHsofcU.js} +25 -28
  47. package/dist/{wt-selection-popup-DvaUvY4O.js → wt-selection-popup-B5Wt1WQk.js} +1 -1
  48. package/dist/{wt-start-page-CcN7JC_u.js → wt-start-page-8ywFCoUJ.js} +7 -7
  49. package/dist/{wt-status-select-C8t0cgTg.js → wt-status-select-CFdNgbIP.js} +1 -1
  50. package/dist/{wt-stepper-BLb42q2I.js → wt-stepper-59a_rP7o.js} +1 -1
  51. package/dist/{wt-table-9gmsV0Y9.js → wt-table-DuxjiiFi.js} +111 -114
  52. package/dist/{wt-table-actions-BB7AH7sR.js → wt-table-actions-CsrvF6d8.js} +1 -1
  53. package/dist/{wt-table-column-select-B3lrCEaV.js → wt-table-column-select-Zga4Zyfd.js} +28 -31
  54. package/dist/{wt-tabs-CCHi_E1a.js → wt-tabs-CMMlNgqE.js} +1 -1
  55. package/dist/{wt-tags-input-DLicKjv3.js → wt-tags-input-O1wer3-w.js} +56 -57
  56. package/dist/{wt-timepicker-B9ONDzNQ.js → wt-timepicker-BscP21YM.js} +1 -1
  57. package/dist/{wt-tree-cQlvJmh5.js → wt-tree-BRPd5QbE.js} +4 -5
  58. package/dist/{wt-tree-table-B89YKiMf.js → wt-tree-table-CZQ7xmja.js} +5 -5
  59. package/dist/{wt-type-extension-value-input-Da8FXLDs.js → wt-type-extension-value-input-DZqeSLGx.js} +214 -218
  60. package/dist/wt-vidstack-player-CA18U-L9.js +10229 -0
  61. package/package.json +5 -5
  62. package/src/components/wt-button/wt-button.vue +9 -13
  63. package/src/install.ts +0 -1
  64. package/src/locale/i18n.js +1 -1
  65. package/src/modules/Notifications/store/NotificationsStoreModule.js +1 -1
  66. package/src/modules/Userinfo/classes/ApplicationsAccess.ts +36 -3
  67. package/src/modules/Userinfo/scripts/utils.ts +2 -22
  68. package/src/modules/Userinfo/stores/accessStore.ts +20 -5
  69. package/src/modules/Userinfo/types/UserAccess.d.ts +11 -3
  70. package/types/locale/i18n.d.ts +1 -1
  71. package/types/modules/Notifications/store/NotificationsStoreModule.d.ts +1 -1
  72. package/types/modules/Userinfo/classes/ApplicationsAccess.d.ts +34 -243
  73. package/types/modules/Userinfo/scripts/utils.d.ts +1 -2
  74. package/types/modules/Userinfo/stores/accessStore.d.ts +1 -1
  75. package/types/modules/Userinfo/stores/userinfoStore.d.ts +21 -9
  76. package/dist/prod-DTLJXtPo.js +0 -994
  77. package/dist/srt-parser-CWqahKwO.js +0 -27
  78. package/dist/ssa-parser-BqjjKy4M.js +0 -209
  79. package/dist/vidstack-Bq6c3Bam-w5y-QQDX.js +0 -413
  80. package/dist/vidstack-D2pY00kU-BI5rYx7p.js +0 -138
  81. package/dist/vidstack-DDXt6fpN-QZPrP2dy.js +0 -60
  82. package/dist/vidstack-D_-9AA6_-Bo1xPN-G.js +0 -20
  83. package/dist/vidstack-DqAw8m9J-DL7LzrFt.js +0 -29
  84. package/dist/vidstack-audio-lX1O0fza.js +0 -32
  85. package/dist/vidstack-dash-BQkRGWe_.js +0 -403
  86. package/dist/vidstack-google-cast-C39n-PU1.js +0 -377
  87. package/dist/vidstack-hls-BCLhCuNJ.js +0 -324
  88. package/dist/vidstack-krOAtKMi-B4IZWKdc.js +0 -29
  89. package/dist/vidstack-video-BgayrEIC.js +0 -181
  90. package/dist/vidstack-vimeo-Lpe7iySs.js +0 -437
  91. package/dist/vidstack-youtube-Dmcz0xVm.js +0 -236
  92. package/dist/vuex.esm-bundler-tZVctzTj.js +0 -950
  93. package/dist/wt-datepicker-Cs3xDzVq.js +0 -5789
  94. package/dist/wt-display-chip-items-IqNMxa_X.js +0 -52
  95. package/dist/wt-galleria-cDjsiOcp.js +0 -324
  96. package/dist/wt-notifications-bar-KNH47kZ7.js +0 -80
  97. package/dist/wt-vidstack-player-BzFbIwCa.js +0 -10250
@@ -1,377 +0,0 @@
1
- var Lt = Object.defineProperty;
2
- var W = (d) => {
3
- throw TypeError(d);
4
- };
5
- var vt = (d, t, s) => t in d ? Lt(d, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[t] = s;
6
- var G = (d, t, s) => vt(d, typeof t != "symbol" ? t + "" : t, s), O = (d, t, s) => t.has(d) || W("Cannot " + s);
7
- var e = (d, t, s) => (O(d, t, "read from private field"), s ? s.call(d) : t.get(d)), T = (d, t, s) => t.has(d) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(d) : t.set(d, s), l = (d, t, s, i) => (O(d, t, "write to private field"), i ? i.call(d, s) : t.set(d, s), s), r = (d, t, s) => (O(d, t, "access private method"), s);
8
- import { b as St, K as L, U as Z, o as At, D as tt, p as V, l as et, e as It, V as bt, L as Rt } from "./wt-vidstack-player-BzFbIwCa.js";
9
- import { R as wt } from "./vidstack-DqAw8m9J-DL7LzrFt.js";
10
- import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-BI5rYx7p.js";
11
- var g, _, at;
12
- class _t {
13
- constructor(t) {
14
- T(this, _);
15
- T(this, g);
16
- l(this, g, new chrome.cast.media.MediaInfo(t.src, t.type));
17
- }
18
- build() {
19
- return e(this, g);
20
- }
21
- setStreamType(t) {
22
- return t.includes("live") ? e(this, g).streamType = chrome.cast.media.StreamType.LIVE : e(this, g).streamType = chrome.cast.media.StreamType.BUFFERED, this;
23
- }
24
- setTracks(t) {
25
- return e(this, g).tracks = t.map(r(this, _, at)), this;
26
- }
27
- setMetadata(t, s) {
28
- return e(this, g).metadata = new chrome.cast.media.GenericMediaMetadata(), e(this, g).metadata.title = t, e(this, g).metadata.images = [{ url: s }], this;
29
- }
30
- }
31
- g = new WeakMap(), _ = new WeakSet(), at = function(t, s) {
32
- const i = new chrome.cast.media.Track(s, chrome.cast.media.TrackType.TEXT);
33
- return i.name = t.label, i.trackContentId = t.src, i.trackContentType = "text/vtt", i.language = t.language, i.subtype = t.kind.toUpperCase(), i;
34
- };
35
- var p, k, M, c, $, A, rt, nt, ot, U, P, H;
36
- class xt {
37
- constructor(t, s, i) {
38
- T(this, c);
39
- T(this, p);
40
- T(this, k);
41
- T(this, M);
42
- l(this, p, t), l(this, k, s), l(this, M, i);
43
- }
44
- setup() {
45
- const t = this.syncRemoteActiveIds.bind(this);
46
- et(e(this, k).audioTracks, "change", t), et(e(this, k).textTracks, "mode-change", t), It(r(this, c, nt).bind(this));
47
- }
48
- getLocalTextTracks() {
49
- return e(this, k).$state.textTracks().filter((t) => t.src && t.type === "vtt");
50
- }
51
- syncRemoteTracks(t) {
52
- if (!e(this, p).isMediaLoaded) return;
53
- const s = r(this, c, $).call(this), i = this.getLocalTextTracks(), n = r(this, c, A).call(this, chrome.cast.media.TrackType.AUDIO), m = r(this, c, A).call(this, chrome.cast.media.TrackType.TEXT);
54
- for (const u of n) {
55
- if (r(this, c, U).call(this, s, u)) continue;
56
- const w = {
57
- id: u.trackId.toString(),
58
- label: u.name,
59
- language: u.language,
60
- kind: u.subtype ?? "main",
61
- selected: !1
62
- };
63
- e(this, k).audioTracks[Rt.add](w, t);
64
- }
65
- for (const u of m) {
66
- if (r(this, c, U).call(this, i, u)) continue;
67
- const w = {
68
- id: u.trackId.toString(),
69
- src: u.trackContentId,
70
- label: u.name,
71
- language: u.language,
72
- kind: u.subtype.toLowerCase()
73
- };
74
- e(this, k).textTracks.add(w, t);
75
- }
76
- }
77
- syncRemoteActiveIds(t) {
78
- if (!e(this, p).isMediaLoaded) return;
79
- const s = r(this, c, rt).call(this), i = new chrome.cast.media.EditTracksInfoRequest(s);
80
- r(this, c, ot).call(this, i).catch((n) => {
81
- });
82
- }
83
- }
84
- p = new WeakMap(), k = new WeakMap(), M = new WeakMap(), c = new WeakSet(), $ = function() {
85
- return e(this, k).$state.audioTracks();
86
- }, A = function(t) {
87
- var i;
88
- const s = ((i = e(this, p).mediaInfo) == null ? void 0 : i.tracks) ?? [];
89
- return t ? s.filter((n) => n.type === t) : s;
90
- }, rt = function() {
91
- const t = [], s = r(this, c, $).call(this).find((n) => n.selected), i = this.getLocalTextTracks().filter((n) => n.mode === "showing");
92
- if (s) {
93
- const n = r(this, c, A).call(this, chrome.cast.media.TrackType.AUDIO), m = r(this, c, P).call(this, n, s);
94
- m && t.push(m.trackId);
95
- }
96
- if (i != null && i.length) {
97
- const n = r(this, c, A).call(this, chrome.cast.media.TrackType.TEXT);
98
- if (n.length)
99
- for (const m of i) {
100
- const u = r(this, c, P).call(this, n, m);
101
- u && t.push(u.trackId);
102
- }
103
- }
104
- return t;
105
- }, nt = function() {
106
- const t = this.getLocalTextTracks();
107
- if (!e(this, p).isMediaLoaded) return;
108
- const s = r(this, c, A).call(this, chrome.cast.media.TrackType.TEXT);
109
- for (const i of t)
110
- if (!r(this, c, P).call(this, s, i)) {
111
- bt(() => {
112
- var m;
113
- return (m = e(this, M)) == null ? void 0 : m.call(this);
114
- });
115
- break;
116
- }
117
- }, ot = function(t) {
118
- const s = it();
119
- return new Promise((i, n) => s == null ? void 0 : s.editTracksInfo(t, i, n));
120
- }, U = function(t, s) {
121
- return t.find((i) => r(this, c, H).call(this, i, s));
122
- }, P = function(t, s) {
123
- return t.find((i) => r(this, c, H).call(this, s, i));
124
- }, // Note: we can't rely on id matching because they will differ between local/remote. A local
125
- // track id might not even exist.
126
- H = function(t, s) {
127
- return s.name === t.label && s.language === t.language && s.subtype.toLowerCase() === t.kind.toLowerCase();
128
- };
129
- var o, h, C, E, D, I, v, S, b, N, f, R, a, ht, ct, F, dt, q, ut, lt, mt, B, X, K, Y, Tt, ft, gt, j, kt, z, yt, J, y, pt, Ct, Q, Et;
130
- class Ut {
131
- constructor(t, s) {
132
- T(this, a);
133
- G(this, "$$PROVIDER_TYPE", "GOOGLE_CAST");
134
- G(this, "scope", St());
135
- T(this, o);
136
- T(this, h);
137
- T(this, C);
138
- T(this, E, null);
139
- T(this, D, "disconnected");
140
- T(this, I, 0);
141
- T(this, v, 0);
142
- T(this, S, new L(0, 0));
143
- T(this, b, new wt(r(this, a, lt).bind(this)));
144
- T(this, N);
145
- T(this, f, null);
146
- T(this, R, !1);
147
- l(this, o, t), l(this, h, s), l(this, C, new xt(t, s, r(this, a, Et).bind(this)));
148
- }
149
- get type() {
150
- return "google-cast";
151
- }
152
- get currentSrc() {
153
- return e(this, E);
154
- }
155
- /**
156
- * The Google Cast remote player.
157
- *
158
- * @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.RemotePlayer}
159
- */
160
- get player() {
161
- return e(this, o);
162
- }
163
- /**
164
- * @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastContext}
165
- */
166
- get cast() {
167
- return Mt();
168
- }
169
- /**
170
- * @see {@link https://developers.google.com/cast/docs/reference/web_sender/cast.framework.CastSession}
171
- */
172
- get session() {
173
- return Dt();
174
- }
175
- /**
176
- * @see {@link https://developers.google.com/cast/docs/reference/web_sender/chrome.cast.media.Media}
177
- */
178
- get media() {
179
- return it();
180
- }
181
- /**
182
- * Whether the current Google Cast session belongs to this provider.
183
- */
184
- get hasActiveSession() {
185
- return st(e(this, E));
186
- }
187
- setup() {
188
- r(this, a, ht).call(this), r(this, a, ct).call(this), e(this, C).setup(), e(this, h).notify("provider-setup", this);
189
- }
190
- async play() {
191
- var t;
192
- if (!(!e(this, o).isPaused && !e(this, R))) {
193
- if (e(this, R)) {
194
- await r(this, a, Q).call(this, !1, 0);
195
- return;
196
- }
197
- (t = e(this, o).controller) == null || t.playOrPause();
198
- }
199
- }
200
- async pause() {
201
- var t;
202
- e(this, o).isPaused || (t = e(this, o).controller) == null || t.playOrPause();
203
- }
204
- getMediaStatus(t) {
205
- return new Promise((s, i) => {
206
- var n;
207
- (n = this.media) == null || n.getStatus(t, s, i);
208
- });
209
- }
210
- setMuted(t) {
211
- var i;
212
- (t && !e(this, o).isMuted || !t && e(this, o).isMuted) && ((i = e(this, o).controller) == null || i.muteOrUnmute());
213
- }
214
- setCurrentTime(t) {
215
- var s;
216
- e(this, o).currentTime = t, e(this, h).notify("seeking", t), (s = e(this, o).controller) == null || s.seek();
217
- }
218
- setVolume(t) {
219
- var s;
220
- e(this, o).volumeLevel = t, (s = e(this, o).controller) == null || s.setVolumeLevel();
221
- }
222
- async loadSource(t) {
223
- var n;
224
- if (((n = e(this, f)) == null ? void 0 : n.src) !== t && l(this, f, null), st(t)) {
225
- r(this, a, dt).call(this), l(this, E, t);
226
- return;
227
- }
228
- e(this, h).notify("load-start");
229
- const s = r(this, a, Ct).call(this, t), i = await this.session.loadMedia(s);
230
- if (i) {
231
- l(this, E, null), e(this, h).notify("error", Error(Pt(i)));
232
- return;
233
- }
234
- l(this, E, t);
235
- }
236
- destroy() {
237
- r(this, a, F).call(this), r(this, a, q).call(this);
238
- }
239
- }
240
- o = new WeakMap(), h = new WeakMap(), C = new WeakMap(), E = new WeakMap(), D = new WeakMap(), I = new WeakMap(), v = new WeakMap(), S = new WeakMap(), b = new WeakMap(), N = new WeakMap(), f = new WeakMap(), R = new WeakMap(), a = new WeakSet(), ht = function() {
241
- Nt(
242
- cast.framework.CastContextEventType.CAST_STATE_CHANGED,
243
- r(this, a, B).bind(this)
244
- );
245
- }, ct = function() {
246
- const t = cast.framework.RemotePlayerEventType, s = {
247
- [t.IS_CONNECTED_CHANGED]: r(this, a, B),
248
- [t.IS_MEDIA_LOADED_CHANGED]: r(this, a, X),
249
- [t.CAN_CONTROL_VOLUME_CHANGED]: r(this, a, K),
250
- [t.CAN_SEEK_CHANGED]: r(this, a, Y),
251
- [t.DURATION_CHANGED]: r(this, a, gt),
252
- [t.IS_MUTED_CHANGED]: r(this, a, j),
253
- [t.VOLUME_LEVEL_CHANGED]: r(this, a, j),
254
- [t.IS_PAUSED_CHANGED]: r(this, a, kt),
255
- [t.LIVE_SEEKABLE_RANGE_CHANGED]: r(this, a, z),
256
- [t.PLAYER_STATE_CHANGED]: r(this, a, yt)
257
- };
258
- l(this, N, s);
259
- const i = r(this, a, mt).bind(this);
260
- for (const n of Z(s))
261
- e(this, o).controller.addEventListener(n, i);
262
- At(() => {
263
- for (const n of Z(s))
264
- e(this, o).controller.removeEventListener(n, i);
265
- });
266
- }, F = function() {
267
- e(this, f) || (l(this, v, 0), l(this, S, new L(0, 0))), e(this, b).stop(), l(this, I, 0), l(this, f, null);
268
- }, dt = function() {
269
- const t = new tt("resume-session", { detail: this.session });
270
- r(this, a, X).call(this, t);
271
- const { muted: s, volume: i, savedState: n } = e(this, h).$state, m = n();
272
- this.setCurrentTime(Math.max(e(this, o).currentTime, (m == null ? void 0 : m.currentTime) ?? 0)), this.setMuted(s()), this.setVolume(i()), (m == null ? void 0 : m.paused) === !1 && this.play();
273
- }, q = function() {
274
- this.cast.endCurrentSession(!0);
275
- const { remotePlaybackLoader: t } = e(this, h).$state;
276
- t.set(null);
277
- }, ut = function() {
278
- const { savedState: t } = e(this, h).$state;
279
- t.set({
280
- paused: e(this, o).isPaused,
281
- currentTime: e(this, o).currentTime
282
- }), r(this, a, q).call(this);
283
- }, lt = function() {
284
- r(this, a, ft).call(this);
285
- }, mt = function(t) {
286
- e(this, N)[t.type].call(this, t);
287
- }, B = function(t) {
288
- const s = this.cast.getCastState(), i = s === cast.framework.CastState.CONNECTED ? "connected" : s === cast.framework.CastState.CONNECTING ? "connecting" : "disconnected";
289
- if (e(this, D) === i) return;
290
- const n = { type: "google-cast", state: i }, m = r(this, a, y).call(this, t);
291
- l(this, D, i), e(this, h).notify("remote-playback-change", n, m), i === "disconnected" && r(this, a, ut).call(this);
292
- }, X = function(t) {
293
- if (!!!e(this, o).isMediaLoaded) return;
294
- const i = V(e(this, h).$state.source);
295
- Promise.resolve().then(() => {
296
- if (i !== V(e(this, h).$state.source) || !e(this, o).isMediaLoaded) return;
297
- r(this, a, F).call(this);
298
- const n = e(this, o).duration;
299
- l(this, S, new L(0, n));
300
- const m = {
301
- provider: this,
302
- duration: n,
303
- buffered: new L(0, 0),
304
- seekable: r(this, a, J).call(this)
305
- }, u = r(this, a, y).call(this, t);
306
- e(this, h).notify("loaded-metadata", void 0, u), e(this, h).notify("loaded-data", void 0, u), e(this, h).notify("can-play", m, u), r(this, a, K).call(this), r(this, a, Y).call(this, t);
307
- const { volume: x, muted: w } = e(this, h).$state;
308
- this.setVolume(x()), this.setMuted(w()), e(this, b).start(), e(this, C).syncRemoteTracks(u), e(this, C).syncRemoteActiveIds(u);
309
- });
310
- }, K = function() {
311
- e(this, h).$state.canSetVolume.set(e(this, o).canControlVolume);
312
- }, Y = function(t) {
313
- const s = r(this, a, y).call(this, t);
314
- e(this, h).notify("stream-type-change", r(this, a, Tt).call(this), s);
315
- }, Tt = function() {
316
- var s;
317
- return ((s = e(this, o).mediaInfo) == null ? void 0 : s.streamType) === chrome.cast.media.StreamType.LIVE ? e(this, o).canSeek ? "live:dvr" : "live" : "on-demand";
318
- }, ft = function() {
319
- if (e(this, f)) return;
320
- const t = e(this, o).currentTime;
321
- t !== e(this, I) && (e(this, h).notify("time-change", t), t > e(this, v) && (l(this, v, t), r(this, a, z).call(this)), e(this, h).$state.seeking() && e(this, h).notify("seeked", t), l(this, I, t));
322
- }, gt = function(t) {
323
- if (!e(this, o).isMediaLoaded || e(this, f)) return;
324
- const s = e(this, o).duration, i = r(this, a, y).call(this, t);
325
- l(this, S, new L(0, s)), e(this, h).notify("duration-change", s, i);
326
- }, j = function(t) {
327
- if (!e(this, o).isMediaLoaded) return;
328
- const s = {
329
- muted: e(this, o).isMuted,
330
- volume: e(this, o).volumeLevel
331
- }, i = r(this, a, y).call(this, t);
332
- e(this, h).notify("volume-change", s, i);
333
- }, kt = function(t) {
334
- const s = r(this, a, y).call(this, t);
335
- e(this, o).isPaused ? e(this, h).notify("pause", void 0, s) : e(this, h).notify("play", void 0, s);
336
- }, z = function(t) {
337
- const s = {
338
- seekable: r(this, a, J).call(this),
339
- buffered: new L(0, e(this, v))
340
- }, i = t ? r(this, a, y).call(this, t) : void 0;
341
- e(this, h).notify("progress", s, i);
342
- }, yt = function(t) {
343
- const s = e(this, o).playerState, i = chrome.cast.media.PlayerState;
344
- if (l(this, R, s === i.IDLE), s === i.PAUSED) return;
345
- const n = r(this, a, y).call(this, t);
346
- switch (s) {
347
- case i.PLAYING:
348
- e(this, h).notify("playing", void 0, n);
349
- break;
350
- case i.BUFFERING:
351
- e(this, h).notify("waiting", void 0, n);
352
- break;
353
- case i.IDLE:
354
- e(this, b).stop(), e(this, h).notify("pause"), e(this, h).notify("end");
355
- break;
356
- }
357
- }, J = function() {
358
- return e(this, o).liveSeekableRange ? new L(e(this, o).liveSeekableRange.start, e(this, o).liveSeekableRange.end) : e(this, S);
359
- }, y = function(t) {
360
- return t instanceof Event ? t : new tt(t.type, { detail: t });
361
- }, pt = function(t) {
362
- const { streamType: s, title: i, poster: n } = e(this, h).$state;
363
- return new _t(t).setMetadata(i(), n()).setStreamType(s()).setTracks(e(this, C).getLocalTextTracks()).build();
364
- }, Ct = function(t) {
365
- var m, u;
366
- const s = r(this, a, pt).call(this, t), i = new chrome.cast.media.LoadRequest(s), n = e(this, h).$state.savedState();
367
- return i.autoplay = (((m = e(this, f)) == null ? void 0 : m.paused) ?? (n == null ? void 0 : n.paused)) === !1, i.currentTime = ((u = e(this, f)) == null ? void 0 : u.time) ?? (n == null ? void 0 : n.currentTime) ?? 0, i;
368
- }, Q = async function(t, s) {
369
- const i = V(e(this, h).$state.source);
370
- l(this, f, { src: i, paused: t, time: s }), await this.loadSource(i);
371
- }, Et = function() {
372
- r(this, a, Q).call(this, e(this, o).isPaused, e(this, o).currentTime).catch((t) => {
373
- });
374
- };
375
- export {
376
- Ut as GoogleCastProvider
377
- };
@@ -1,324 +0,0 @@
1
- var rt = Object.defineProperty;
2
- var q = (n) => {
3
- throw TypeError(n);
4
- };
5
- var ot = (n, t, i) => t in n ? rt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[t] = i;
6
- var _ = (n, t, i) => ot(n, typeof t != "symbol" ? t + "" : t, i), R = (n, t, i) => t.has(n) || q("Cannot " + i);
7
- var e = (n, t, i) => (R(n, t, "read from private field"), i ? i.call(n) : t.get(n)), p = (n, t, i) => t.has(n) ? q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, i), f = (n, t, i, s) => (R(n, t, "write to private field"), s ? s.call(n, i) : t.set(n, i), i), a = (n, t, i) => (R(n, t, "access private method"), i);
8
- import { x as ht, f as b, y as at, p as O, Q as N, l as V, e as dt, D as x, z as ut, T as ct, w as F, L as $, A as lt, q as M, B as pt, C as ft, F as vt } from "./wt-vidstack-player-BzFbIwCa.js";
9
- import { VideoProvider as yt } from "./vidstack-video-BgayrEIC.js";
10
- import { R as gt } from "./vidstack-DqAw8m9J-DL7LzrFt.js";
11
- const Lt = (n) => ut(n);
12
- var T, h, o, D, C, r, E, U, j, k, Q, B, K, W, z, J, X, Y, G, Z, tt;
13
- class St {
14
- constructor(t, i) {
15
- p(this, r);
16
- p(this, T);
17
- p(this, h);
18
- p(this, o, null);
19
- p(this, D, null);
20
- _(this, "config", {});
21
- p(this, C, /* @__PURE__ */ new Set());
22
- f(this, T, t), f(this, h, i);
23
- }
24
- get instance() {
25
- return e(this, o);
26
- }
27
- setup(t) {
28
- const { streamType: i } = e(this, h).$state, s = O(i).includes("live"), c = O(i).includes("ll-");
29
- f(this, o, new t({
30
- lowLatencyMode: c,
31
- backBufferLength: c ? 4 : s ? 8 : void 0,
32
- renderTextTracksNatively: !1,
33
- ...this.config
34
- }));
35
- const u = a(this, r, k).bind(this);
36
- for (const l of Object.values(t.Events)) e(this, o).on(l, u);
37
- e(this, o).on(t.Events.ERROR, a(this, r, X).bind(this));
38
- for (const l of e(this, C)) l(e(this, o));
39
- e(this, h).player.dispatch("hls-instance", {
40
- detail: e(this, o)
41
- }), e(this, o).attachMedia(e(this, T)), e(this, o).on(t.Events.AUDIO_TRACK_SWITCHED, a(this, r, K).bind(this)), e(this, o).on(t.Events.LEVEL_SWITCHED, a(this, r, W).bind(this)), e(this, o).on(t.Events.LEVEL_LOADED, a(this, r, J).bind(this)), e(this, o).on(t.Events.LEVEL_UPDATED, a(this, r, z).bind(this)), e(this, o).on(t.Events.NON_NATIVE_TEXT_TRACKS_FOUND, a(this, r, Q).bind(this)), e(this, o).on(t.Events.CUES_PARSED, a(this, r, B).bind(this)), e(this, h).qualities[N.enableAuto] = a(this, r, G).bind(this), V(e(this, h).qualities, "change", a(this, r, Z).bind(this)), V(e(this, h).audioTracks, "change", a(this, r, tt).bind(this)), f(this, D, dt(a(this, r, U).bind(this)));
42
- }
43
- onInstance(t) {
44
- return e(this, C).add(t), () => e(this, C).delete(t);
45
- }
46
- loadSource(t) {
47
- var i;
48
- b(t.src) && ((i = e(this, o)) == null || i.loadSource(t.src));
49
- }
50
- destroy() {
51
- var t, i;
52
- (t = e(this, o)) == null || t.destroy(), f(this, o, null), (i = e(this, D)) == null || i.call(this), f(this, D, null);
53
- }
54
- }
55
- T = new WeakMap(), h = new WeakMap(), o = new WeakMap(), D = new WeakMap(), C = new WeakMap(), r = new WeakSet(), E = function(t, i) {
56
- return new x(Lt(t), { detail: i });
57
- }, U = function() {
58
- if (!e(this, h).$state.live()) return;
59
- const t = new gt(a(this, r, j).bind(this));
60
- return t.start(), t.stop.bind(t);
61
- }, j = function() {
62
- var t;
63
- e(this, h).$state.liveSyncPosition.set(((t = e(this, o)) == null ? void 0 : t.liveSyncPosition) ?? 1 / 0);
64
- }, k = function(t, i) {
65
- var s;
66
- (s = e(this, h).player) == null || s.dispatch(a(this, r, E).call(this, t, i));
67
- }, Q = function(t, i) {
68
- const s = a(this, r, E).call(this, t, i);
69
- let c = -1;
70
- for (let u = 0; u < i.tracks.length; u++) {
71
- const l = i.tracks[u], d = l.subtitleTrack ?? l.closedCaptions, w = new ct({
72
- id: `hls-${l.kind}-${u}`,
73
- src: d == null ? void 0 : d.url,
74
- label: l.label,
75
- language: d == null ? void 0 : d.lang,
76
- kind: l.kind,
77
- default: l.default
78
- });
79
- w[F.readyState] = 2, w[F.onModeChange] = () => {
80
- w.mode === "showing" ? (e(this, o).subtitleTrack = u, c = u) : c === u && (e(this, o).subtitleTrack = -1, c = -1);
81
- }, e(this, h).textTracks.add(w, s);
82
- }
83
- }, B = function(t, i) {
84
- var l;
85
- const s = (l = e(this, o)) == null ? void 0 : l.subtitleTrack, c = e(this, h).textTracks.getById(`hls-${i.type}-${s}`);
86
- if (!c) return;
87
- const u = a(this, r, E).call(this, t, i);
88
- for (const d of i.cues)
89
- d.positionAlign = "auto", c.addCue(d, u);
90
- }, K = function(t, i) {
91
- const s = e(this, h).audioTracks[i.id];
92
- if (s) {
93
- const c = a(this, r, E).call(this, t, i);
94
- e(this, h).audioTracks[$.select](s, !0, c);
95
- }
96
- }, W = function(t, i) {
97
- const s = e(this, h).qualities[i.level];
98
- if (s) {
99
- const c = a(this, r, E).call(this, t, i);
100
- e(this, h).qualities[$.select](s, !0, c);
101
- }
102
- }, z = function(t, i) {
103
- i.details.totalduration > 0 && e(this, h).$state.inferredLiveDVRWindow.set(i.details.totalduration);
104
- }, J = function(t, i) {
105
- var P;
106
- if (e(this, h).$state.canPlay()) return;
107
- const { type: s, live: c, totalduration: u, targetduration: l } = i.details, d = a(this, r, E).call(this, t, i);
108
- e(this, h).notify(
109
- "stream-type-change",
110
- c ? s === "EVENT" && Number.isFinite(u) && l >= 10 ? "live:dvr" : "live" : "on-demand",
111
- d
112
- ), e(this, h).notify("duration-change", u, d);
113
- const w = e(this, o).media;
114
- e(this, o).currentLevel === -1 && e(this, h).qualities[N.setAuto](!0, d);
115
- for (const y of e(this, o).audioTracks) {
116
- const H = {
117
- id: y.id.toString(),
118
- label: y.name,
119
- language: y.lang || "",
120
- kind: "main"
121
- };
122
- e(this, h).audioTracks[$.add](H, d);
123
- }
124
- for (const y of e(this, o).levels) {
125
- const H = {
126
- id: ((P = y.id) == null ? void 0 : P.toString()) ?? y.height + "p",
127
- width: y.width,
128
- height: y.height,
129
- codec: y.codecSet,
130
- bitrate: y.bitrate
131
- };
132
- e(this, h).qualities[$.add](H, d);
133
- }
134
- w.dispatchEvent(new x("canplay", { trigger: d }));
135
- }, X = function(t, i) {
136
- var s;
137
- if (i.fatal)
138
- switch (i.type) {
139
- case "mediaError":
140
- (s = e(this, o)) == null || s.recoverMediaError();
141
- break;
142
- default:
143
- a(this, r, Y).call(this, i.error);
144
- break;
145
- }
146
- }, Y = function(t) {
147
- e(this, h).notify("error", {
148
- message: t.message,
149
- code: 1,
150
- error: t
151
- });
152
- }, G = function() {
153
- e(this, o) && (e(this, o).currentLevel = -1);
154
- }, Z = function() {
155
- const { qualities: t } = e(this, h);
156
- !e(this, o) || t.auto || (e(this, o)[t.switch + "Level"] = t.selectedIndex, lt && (e(this, T).currentTime = e(this, T).currentTime));
157
- }, tt = function() {
158
- const { audioTracks: t } = e(this, h);
159
- e(this, o) && e(this, o).audioTrack !== t.selectedIndex && (e(this, o).audioTrack = t.selectedIndex);
160
- };
161
- var m, g, A, L, it, et, st, nt;
162
- class Et {
163
- constructor(t, i, s) {
164
- p(this, L);
165
- p(this, m);
166
- p(this, g);
167
- p(this, A);
168
- f(this, m, t), f(this, g, i), f(this, A, s), a(this, L, it).call(this);
169
- }
170
- }
171
- m = new WeakMap(), g = new WeakMap(), A = new WeakMap(), L = new WeakSet(), it = async function() {
172
- const t = {
173
- onLoadStart: a(this, L, et).bind(this),
174
- onLoaded: a(this, L, st).bind(this),
175
- onLoadError: a(this, L, nt).bind(this)
176
- };
177
- let i = await mt(e(this, m), t);
178
- if (M(i) && !b(e(this, m)) && (i = await Tt(e(this, m), t)), !i) return null;
179
- if (!i.isSupported()) {
180
- const s = "[vidstack] `hls.js` is not supported in this environment";
181
- return e(this, g).player.dispatch(new x("hls-unsupported")), e(this, g).notify("error", { message: s, code: 4 }), null;
182
- }
183
- return i;
184
- }, et = function() {
185
- e(this, g).player.dispatch(new x("hls-lib-load-start"));
186
- }, st = function(t) {
187
- e(this, g).player.dispatch(
188
- new x("hls-lib-loaded", {
189
- detail: t
190
- })
191
- ), e(this, A).call(this, t);
192
- }, nt = function(t) {
193
- const i = pt(t);
194
- e(this, g).player.dispatch(
195
- new x("hls-lib-load-error", {
196
- detail: i
197
- })
198
- ), e(this, g).notify("error", {
199
- message: i.message,
200
- code: 4,
201
- error: i
202
- });
203
- };
204
- async function Tt(n, t = {}) {
205
- var i, s, c, u, l;
206
- if (!M(n)) {
207
- if ((i = t.onLoadStart) == null || i.call(t), n.prototype && n.prototype !== Function)
208
- return (s = t.onLoaded) == null || s.call(t, n), n;
209
- try {
210
- const d = (c = await n()) == null ? void 0 : c.default;
211
- if (d && d.isSupported)
212
- (u = t.onLoaded) == null || u.call(t, d);
213
- else
214
- throw Error(
215
- ""
216
- );
217
- return d;
218
- } catch (d) {
219
- (l = t.onLoadError) == null || l.call(t, d);
220
- }
221
- }
222
- }
223
- async function mt(n, t = {}) {
224
- var i, s, c;
225
- if (b(n)) {
226
- (i = t.onLoadStart) == null || i.call(t);
227
- try {
228
- if (await ft(n), !vt(window.Hls))
229
- throw Error(
230
- ""
231
- );
232
- const u = window.Hls;
233
- return (s = t.onLoaded) == null || s.call(t, u), u;
234
- } catch (u) {
235
- (c = t.onLoadError) == null || c.call(t, u);
236
- }
237
- }
238
- }
239
- const wt = "https://cdn.jsdelivr.net";
240
- var I, v, S;
241
- class xt extends yt {
242
- constructor() {
243
- super(...arguments);
244
- _(this, "$$PROVIDER_TYPE", "HLS");
245
- p(this, I, null);
246
- p(this, v, new St(this.video, this.ctx));
247
- p(this, S, `${wt}/npm/hls.js@^1.5.0/dist/hls.min.js`);
248
- }
249
- /**
250
- * The `hls.js` constructor.
251
- */
252
- get ctor() {
253
- return e(this, I);
254
- }
255
- /**
256
- * The current `hls.js` instance.
257
- */
258
- get instance() {
259
- return e(this, v).instance;
260
- }
261
- get type() {
262
- return "hls";
263
- }
264
- get canLiveSync() {
265
- return !0;
266
- }
267
- /**
268
- * The `hls.js` configuration object.
269
- *
270
- * @see {@link https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning}
271
- */
272
- get config() {
273
- return e(this, v).config;
274
- }
275
- set config(i) {
276
- e(this, v).config = i;
277
- }
278
- /**
279
- * The `hls.js` constructor (supports dynamic imports) or a URL of where it can be found.
280
- *
281
- * @defaultValue `https://cdn.jsdelivr.net/npm/hls.js@^1.0.0/dist/hls.min.js`
282
- */
283
- get library() {
284
- return e(this, S);
285
- }
286
- set library(i) {
287
- f(this, S, i);
288
- }
289
- preconnect() {
290
- b(e(this, S)) && at(e(this, S));
291
- }
292
- setup() {
293
- super.setup(), new Et(e(this, S), this.ctx, (i) => {
294
- f(this, I, i), e(this, v).setup(i), this.ctx.notify("provider-setup", this);
295
- const s = O(this.ctx.$state.source);
296
- s && this.loadSource(s);
297
- });
298
- }
299
- async loadSource(i, s) {
300
- if (!b(i.src)) {
301
- this.removeSource();
302
- return;
303
- }
304
- this.media.preload = s || "", this.appendSource(i, "application/x-mpegurl"), e(this, v).loadSource(i), this.currentSrc = i;
305
- }
306
- /**
307
- * The given callback is invoked when a new `hls.js` instance is created and right before it's
308
- * attached to media.
309
- */
310
- onInstance(i) {
311
- const s = e(this, v).instance;
312
- return s && i(s), e(this, v).onInstance(i);
313
- }
314
- destroy() {
315
- e(this, v).destroy();
316
- }
317
- }
318
- I = new WeakMap(), v = new WeakMap(), S = new WeakMap(), /**
319
- * Whether `hls.js` is supported in this environment.
320
- */
321
- _(xt, "supported", ht());
322
- export {
323
- xt as HLSProvider
324
- };