@webitel/ui-sdk 25.10.52 → 25.10.54

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 (67) hide show
  1. package/dist/img/sprite/index.js +14 -1
  2. package/dist/img/sprite/record-start.svg +7 -0
  3. package/dist/img/sprite/record-stop.svg +7 -0
  4. package/dist/img/sprite/screenshot-done.svg +7 -0
  5. package/dist/img/sprite/screenshot-false.svg +7 -0
  6. package/dist/img/sprite/screenshot.svg +8 -0
  7. package/dist/img/sprite/sharing-end.svg +5 -0
  8. package/dist/{install-hlMLq0U3.js → install-Cvn-xDmg.js} +30453 -31092
  9. package/dist/ui-sdk.css +1 -1
  10. package/dist/ui-sdk.js +1 -1
  11. package/dist/ui-sdk.umd.cjs +1001 -989
  12. package/dist/vidstack-Bq6c3Bam-S5OrhBq2.js +413 -0
  13. package/dist/vidstack-D2pY00kU-HK4wj-R2.js +138 -0
  14. package/dist/vidstack-DDXt6fpN-D1Nzo26r.js +60 -0
  15. package/dist/vidstack-D_-9AA6_-DBOQembh.js +20 -0
  16. package/dist/vidstack-Dm1xEU9Q-qSXq3AI-.js +31 -0
  17. package/dist/vidstack-DqAw8m9J-k1JRevJl.js +29 -0
  18. package/dist/vidstack-audio-B1snbo-4.js +32 -0
  19. package/dist/vidstack-dash-BeCOt7Pp.js +403 -0
  20. package/dist/vidstack-google-cast-iUp-BySZ.js +377 -0
  21. package/dist/vidstack-hls-DVZy4g9e.js +324 -0
  22. package/dist/vidstack-krOAtKMi-B4IZWKdc.js +29 -0
  23. package/dist/vidstack-video-ykJKnrB2.js +181 -0
  24. package/dist/vidstack-vimeo-Bk8cduzE.js +437 -0
  25. package/dist/vidstack-youtube-FNzWU8v0.js +236 -0
  26. package/package.json +3 -3
  27. package/src/assets/icons/sprite/index.js +14 -1
  28. package/src/assets/icons/sprite/record-start.svg +7 -0
  29. package/src/assets/icons/sprite/record-stop.svg +7 -0
  30. package/src/assets/icons/sprite/screenshot-done.svg +7 -0
  31. package/src/assets/icons/sprite/screenshot-false.svg +7 -0
  32. package/src/assets/icons/sprite/screenshot.svg +8 -0
  33. package/src/assets/icons/sprite/sharing-end.svg +5 -0
  34. package/src/components/wt-image/wt-image.vue +4 -1
  35. package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +12 -2
  36. package/src/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue +211 -0
  37. package/src/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.ts +7 -0
  38. package/src/components/wt-vidstack-player/types/WtVidstackPlayerSession.ts +7 -0
  39. package/src/components/wt-vidstack-player/wt-vidstack-player.vue +24 -3
  40. package/src/plugins/primevue/theme/components/components.js +1 -2
  41. package/src/plugins/primevue/theme/extend/player/player.js +15 -0
  42. package/src/plugins/primevue/theme/webitel-theme.js +6 -1
  43. package/types/components/wt-image/wt-image.vue.d.ts +12 -2
  44. package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +5 -1
  45. package/types/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue.d.ts +6 -0
  46. package/types/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.d.ts +5 -0
  47. package/types/components/wt-vidstack-player/types/WtVidstackPlayerSession.d.ts +7 -0
  48. package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +6 -0
  49. package/types/plugins/primevue/theme/extend/player/player.d.ts +3 -0
  50. package/dist/vidstack-54Jpr2Lq-B-3uagaf.js +0 -142
  51. package/dist/vidstack-BP-l85ST-cd089zs4.js +0 -21
  52. package/dist/vidstack-BTBUzdbF-BuhaE3ef.js +0 -29
  53. package/dist/vidstack-Ccp8mxka-Cyoe3N05.js +0 -20
  54. package/dist/vidstack-Dgd3Tj9x-D_ifpfX9.js +0 -397
  55. package/dist/vidstack-DscYSLiW-Dk1undJ-.js +0 -33
  56. package/dist/vidstack-HTyVv8Yq-DRdwbVZd.js +0 -52
  57. package/dist/vidstack-audio-CFFRqrJ3.js +0 -26
  58. package/dist/vidstack-dash-BDtu3f4j.js +0 -405
  59. package/dist/vidstack-google-cast-hKSzmdiF.js +0 -405
  60. package/dist/vidstack-hls-BLyFYePL.js +0 -328
  61. package/dist/vidstack-video-BlmYiw-x.js +0 -149
  62. package/dist/vidstack-vimeo-DhWdWK51.js +0 -434
  63. package/dist/vidstack-youtube-l9Si5Vl-.js +0 -204
  64. package/src/plugins/primevue/theme/extend/extend.js +0 -7
  65. package/src/plugins/primevue/theme/extend/spacings/spacings.js +0 -15
  66. package/types/plugins/primevue/theme/extend/extend.d.ts +0 -5
  67. package/types/plugins/primevue/theme/extend/spacings/spacings.d.ts +0 -13
@@ -1,397 +0,0 @@
1
- import { x as m, w as f, y as n, z as y, b as k, A as v, e as p, l as h, B as T, C as S, E as F, d as x, F as w, G as b, D as A, L as u, H as $ } from "./install-hlMLq0U3.js";
2
- import { R as E } from "./vidstack-Ccp8mxka-Cyoe3N05.js";
3
- let c = null, o = [], d = [];
4
- function l() {
5
- return c ?? (c = new AudioContext());
6
- }
7
- function C() {
8
- const s = l(), t = s.createGain();
9
- return t.connect(s.destination), o.push(t), t;
10
- }
11
- function G(s, t) {
12
- const i = l(), e = i.createMediaElementSource(s);
13
- return t && e.connect(t), d.push(e), e;
14
- }
15
- function M(s) {
16
- const t = o.indexOf(s);
17
- t !== -1 && (o.splice(t, 1), s.disconnect(), g());
18
- }
19
- function K(s) {
20
- const t = d.indexOf(s);
21
- t !== -1 && (d.splice(t, 1), s.disconnect(), g());
22
- }
23
- function g() {
24
- c && o.length === 0 && d.length === 0 && c.close().then(() => {
25
- c = null;
26
- });
27
- }
28
- class j {
29
- constructor(t, i) {
30
- this.a = t, this.E = i, this.xa = null, this.Ka = null;
31
- }
32
- get currentGain() {
33
- var t, i;
34
- return ((i = (t = this.xa) == null ? void 0 : t.gain) == null ? void 0 : i.value) ?? null;
35
- }
36
- get supported() {
37
- return !0;
38
- }
39
- setGain(t) {
40
- const i = this.currentGain;
41
- if (t !== this.currentGain) {
42
- if (t === 1 && i !== 1) {
43
- this.removeGain();
44
- return;
45
- }
46
- this.xa || (this.xa = C(), this.Ka && this.Ka.connect(this.xa)), this.Ka || (this.Ka = G(this.a, this.xa)), this.xa.gain.value = t, this.E(t);
47
- }
48
- }
49
- removeGain() {
50
- this.xa && (this.Ka && this.Ka.connect(l().destination), this.eg(), this.E(null));
51
- }
52
- destroy() {
53
- this.li(), this.eg();
54
- }
55
- li() {
56
- if (this.Ka)
57
- try {
58
- K(this.Ka);
59
- } catch {
60
- } finally {
61
- this.Ka = null;
62
- }
63
- }
64
- eg() {
65
- if (this.xa)
66
- try {
67
- M(this.xa);
68
- } catch {
69
- } finally {
70
- this.xa = null;
71
- }
72
- }
73
- }
74
- class P {
75
- constructor(t, i) {
76
- this.p = t, this.b = i, this.Ya = v(), this.jc = !1, this.ae = !1, this.be = !1, this.fa = new E(this.kc.bind(this)), this.hg = void 0, this.zi = void 0, this.mi(), p(this.ni.bind(this)), f(this.ce.bind(this));
77
- }
78
- get a() {
79
- return this.p.media;
80
- }
81
- get c() {
82
- return this.b.delegate.c;
83
- }
84
- ce() {
85
- this.ae = !1, this.be = !1, this.fa.$(), this.Ya.empty();
86
- }
87
- /**
88
- * The `timeupdate` event fires surprisingly infrequently during playback, meaning your progress
89
- * bar (or whatever else is synced to the currentTime) moves in a choppy fashion. This helps
90
- * resolve that by retrieving time updates in a request animation frame loop.
91
- */
92
- kc() {
93
- const t = this.a.currentTime;
94
- this.b.$state.realCurrentTime() !== t && this.Jb(t);
95
- }
96
- mi() {
97
- this.F("loadstart", this.Ma), this.F("abort", this.gg), this.F("emptied", this.oi), this.F("error", this.Q), this.F("volumechange", this.Na);
98
- }
99
- pi() {
100
- this.ae || (this.Ya.add(
101
- this.F("loadeddata", this.qi),
102
- this.F("loadedmetadata", this.ri),
103
- this.F("canplay", this.ed),
104
- this.F("canplaythrough", this.si),
105
- this.F("durationchange", this.de),
106
- this.F("play", this.gc),
107
- this.F("progress", this.nb),
108
- this.F("stalled", this.ti),
109
- this.F("suspend", this.ui),
110
- this.F("ratechange", this.vi)
111
- ), this.ae = !0);
112
- }
113
- wi() {
114
- this.be || (this.Ya.add(
115
- this.F("pause", this.ib),
116
- this.F("playing", this.xi),
117
- this.F("seeked", this.ob),
118
- this.F("seeking", this.yi),
119
- this.F("ended", this.lc),
120
- this.F("waiting", this.ee)
121
- ), this.be = !0);
122
- }
123
- F(t, i) {
124
- return h(
125
- this.a,
126
- t,
127
- i.bind(this)
128
- );
129
- }
130
- Ai(t) {
131
- }
132
- Jb(t, i) {
133
- const e = {
134
- // Avoid errors where `currentTime` can have higher precision.
135
- currentTime: Math.min(t, this.b.$state.seekableEnd()),
136
- played: this.a.played
137
- };
138
- this.c("time-update", e, i);
139
- }
140
- Ma(t) {
141
- if (this.a.networkState === 3) {
142
- this.gg(t);
143
- return;
144
- }
145
- this.pi(), this.c("load-start", void 0, t);
146
- }
147
- gg(t) {
148
- this.c("abort", void 0, t);
149
- }
150
- oi() {
151
- this.c("emptied", void 0, event);
152
- }
153
- qi(t) {
154
- this.c("loaded-data", void 0, t);
155
- }
156
- ri(t) {
157
- this.wi(), this.c("loaded-metadata", void 0, t), (T || S && F(this.b.$state.source())) && this.b.delegate.Ga(this.fe(), t);
158
- }
159
- fe() {
160
- return {
161
- provider: x(this.b.$provider),
162
- duration: this.a.duration,
163
- buffered: this.a.buffered,
164
- seekable: this.a.seekable
165
- };
166
- }
167
- gc(t) {
168
- this.b.$state.canPlay && this.c("play", void 0, t);
169
- }
170
- ib(t) {
171
- this.a.readyState === 1 && !this.jc || (this.jc = !1, this.fa.$(), this.c("pause", void 0, t));
172
- }
173
- ed(t) {
174
- this.b.delegate.Ga(this.fe(), t);
175
- }
176
- si(t) {
177
- this.b.$state.started() || this.c("can-play-through", this.fe(), t);
178
- }
179
- xi(t) {
180
- this.jc = !1, this.c("playing", void 0, t), this.fa.Xa();
181
- }
182
- ti(t) {
183
- this.c("stalled", void 0, t), this.a.readyState < 3 && (this.jc = !0, this.c("waiting", void 0, t));
184
- }
185
- ee(t) {
186
- this.a.readyState < 3 && (this.jc = !0, this.c("waiting", void 0, t));
187
- }
188
- lc(t) {
189
- this.fa.$(), this.Jb(this.a.duration, t), this.c("end", void 0, t), this.b.$state.loop() && w(this.a.controls) && (this.a.controls = !1);
190
- }
191
- ni() {
192
- this.b.$state.paused() && h(this.a, "timeupdate", this.mc.bind(this));
193
- }
194
- mc(t) {
195
- this.Jb(this.a.currentTime, t);
196
- }
197
- de(t) {
198
- this.b.$state.ended() && this.Jb(this.a.duration, t), this.c("duration-change", this.a.duration, t);
199
- }
200
- Na(t) {
201
- const i = {
202
- volume: this.a.volume,
203
- muted: this.a.muted
204
- };
205
- this.c("volume-change", i, t);
206
- }
207
- ob(t) {
208
- this.Jb(this.a.currentTime, t), this.c("seeked", this.a.currentTime, t), Math.trunc(this.a.currentTime) === Math.trunc(this.a.duration) && b(this.a.duration) > b(this.a.currentTime) && (this.Jb(this.a.duration, t), this.a.ended || this.b.player.dispatch(
209
- new A("media-play-request", {
210
- trigger: t
211
- })
212
- ));
213
- }
214
- yi(t) {
215
- this.c("seeking", this.a.currentTime, t);
216
- }
217
- nb(t) {
218
- const i = {
219
- buffered: this.a.buffered,
220
- seekable: this.a.seekable
221
- };
222
- this.c("progress", i, t);
223
- }
224
- ui(t) {
225
- this.c("suspend", void 0, t);
226
- }
227
- vi(t) {
228
- this.c("rate-change", this.a.playbackRate, t);
229
- }
230
- Q(t) {
231
- const i = this.a.error;
232
- if (!i)
233
- return;
234
- const e = {
235
- message: i.message,
236
- code: i.code,
237
- mediaError: i
238
- };
239
- this.c("error", e, t);
240
- }
241
- }
242
- class L {
243
- constructor(t, i) {
244
- this.p = t, this.b = i, this.nc.onaddtrack = this.Bi.bind(this), this.nc.onremovetrack = this.Ci.bind(this), this.nc.onchange = this.Di.bind(this), h(this.b.audioTracks, "change", this.Ei.bind(this));
245
- }
246
- get nc() {
247
- return this.p.media.audioTracks;
248
- }
249
- Bi(t) {
250
- const i = t.track;
251
- if (i.label === "")
252
- return;
253
- const e = i.id.toString() || `native-audio-${this.b.audioTracks.length}`, a = {
254
- id: e,
255
- label: i.label,
256
- language: i.language,
257
- kind: i.kind,
258
- selected: !1
259
- };
260
- this.b.audioTracks[u.da](a, t), i.enabled && (a.selected = !0);
261
- }
262
- Ci(t) {
263
- const i = this.b.audioTracks.getById(t.track.id);
264
- i && this.b.audioTracks[u.cc](i, t);
265
- }
266
- Di(t) {
267
- let i = this.ig();
268
- if (!i)
269
- return;
270
- const e = this.b.audioTracks.getById(i.id);
271
- e && this.b.audioTracks[u.ea](e, !0, t);
272
- }
273
- ig() {
274
- return Array.from(this.nc).find((t) => t.enabled);
275
- }
276
- Ei(t) {
277
- const { current: i } = t.detail;
278
- if (!i)
279
- return;
280
- const e = this.nc.getTrackById(i.id);
281
- if (e) {
282
- const a = this.ig();
283
- a && (a.enabled = !1), e.enabled = !0;
284
- }
285
- }
286
- }
287
- class I {
288
- constructor(t, i) {
289
- this.a = t, this.b = i, this.scope = m(), this.K = null, this.audioGain = new j(this.a, (e) => {
290
- this.b.delegate.c("audio-gain-change", e);
291
- });
292
- }
293
- setup() {
294
- new P(this, this.b), "audioTracks" in this.media && new L(this, this.b), f(() => {
295
- this.audioGain.destroy(), this.a.srcObject = null, this.a.removeAttribute("src");
296
- for (const t of this.a.querySelectorAll("source"))
297
- t.remove();
298
- this.a.load();
299
- });
300
- }
301
- get type() {
302
- return "";
303
- }
304
- get media() {
305
- return this.a;
306
- }
307
- get currentSrc() {
308
- return this.K;
309
- }
310
- setPlaybackRate(t) {
311
- this.a.playbackRate = t;
312
- }
313
- async play() {
314
- return this.a.play();
315
- }
316
- async pause() {
317
- return this.a.pause();
318
- }
319
- setMuted(t) {
320
- this.a.muted = t;
321
- }
322
- setVolume(t) {
323
- this.a.volume = t;
324
- }
325
- setCurrentTime(t) {
326
- this.a.currentTime = t;
327
- }
328
- setPlaysInline(t) {
329
- n(this.a, "playsinline", t);
330
- }
331
- async loadSource({ src: t, type: i }, e) {
332
- this.a.preload = e || "", y(t) ? (this.oc(), this.a.srcObject = t) : (this.a.srcObject = null, k(t) ? i !== "?" ? this.ge({ src: t, type: i }) : (this.oc(), this.a.src = this.jg(t)) : (this.oc(), this.a.src = window.URL.createObjectURL(t))), this.a.load(), this.K = { src: t, type: i };
333
- }
334
- /**
335
- * Append source so it works when requesting AirPlay since hls.js will remove it.
336
- */
337
- ge(t, i) {
338
- const e = this.a.querySelector("source[data-vds]"), a = e ?? document.createElement("source");
339
- n(a, "src", this.jg(t.src)), n(a, "type", t.type !== "?" ? t.type : i), n(a, "data-vds", ""), e || this.a.append(a);
340
- }
341
- oc() {
342
- var t;
343
- (t = this.a.querySelector("source[data-vds]")) == null || t.remove();
344
- }
345
- jg(t) {
346
- const { clipStartTime: i, clipEndTime: e } = this.b.$state, a = i(), r = e();
347
- return a > 0 && r > 0 ? `${t}#t=${a},${r}` : a > 0 ? `${t}#t=${a}` : r > 0 ? `${t}#t=0,${r}` : t;
348
- }
349
- }
350
- class O {
351
- constructor(t, i) {
352
- this.a = t, this.b = i, this.pb = $(!1), this.he();
353
- }
354
- get supported() {
355
- return this.pb();
356
- }
357
- he() {
358
- var t;
359
- !((t = this.a) != null && t.remote) || !this.kg || (this.a.remote.watchAvailability((i) => {
360
- this.pb.set(i);
361
- }).catch(() => {
362
- this.pb.set(!1);
363
- }), p(this.Fi.bind(this)));
364
- }
365
- Fi() {
366
- if (!this.pb())
367
- return;
368
- const t = ["connecting", "connect", "disconnect"], i = this.ie.bind(this);
369
- i(), h(this.a, "playing", i);
370
- for (const e of t)
371
- h(this.a.remote, e, i);
372
- }
373
- async prompt() {
374
- if (!this.supported)
375
- throw Error("Not supported on this platform.");
376
- return this.la === "airplay" && this.a.webkitShowPlaybackTargetPicker ? this.a.webkitShowPlaybackTargetPicker() : this.a.remote.prompt();
377
- }
378
- ie(t) {
379
- const i = this.a.remote.state;
380
- if (i === this.za)
381
- return;
382
- const e = { type: this.la, state: i };
383
- this.b.delegate.c("remote-playback-change", e, t), this.za = i;
384
- }
385
- }
386
- class B extends O {
387
- constructor() {
388
- super(...arguments), this.la = "airplay";
389
- }
390
- get kg() {
391
- return "WebKitPlaybackTargetAvailabilityEvent" in window;
392
- }
393
- }
394
- export {
395
- I as H,
396
- B as a
397
- };
@@ -1,33 +0,0 @@
1
- const i = /(?:youtu\.be|youtube|youtube\.com|youtube-nocookie\.com)\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|)((?:\w|-){11})/, u = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
2
- function h(e) {
3
- var t;
4
- return (t = e.match(i)) == null ? void 0 : t[1];
5
- }
6
- async function b(e, t) {
7
- if (u.has(e))
8
- return u.get(e);
9
- if (s.has(e))
10
- return s.get(e);
11
- const n = new Promise(async (c) => {
12
- const r = ["maxresdefault", "sddefault", "hqdefault"];
13
- for (const a of r)
14
- for (const f of [!0, !1]) {
15
- const o = p(e, a, f);
16
- if ((await fetch(o, {
17
- mode: "no-cors",
18
- signal: t.signal
19
- })).status < 400) {
20
- u.set(e, o), c(o);
21
- return;
22
- }
23
- }
24
- }).catch(() => "").finally(() => s.delete(e));
25
- return s.set(e, n), n;
26
- }
27
- function p(e, t, n) {
28
- return `https://i.ytimg.com/${n ? "vi_webp" : "vi"}/${e}/${t}.${n ? "webp" : "jpg"}`;
29
- }
30
- export {
31
- b as findYouTubePoster,
32
- h as resolveYouTubeVideoId
33
- };
@@ -1,52 +0,0 @@
1
- import { H as n, l as c, e as a, d as h, P as u, b as d, K as l } from "./install-hlMLq0U3.js";
2
- function p(r, t = 3e3) {
3
- const s = l();
4
- return setTimeout(() => {
5
- const i = r();
6
- i && s.reject(i);
7
- }, t), s;
8
- }
9
- class f {
10
- constructor(t) {
11
- this.Lb = t, this.sc = n(""), this.referrerPolicy = null, t.setAttribute("frameBorder", "0"), t.setAttribute("aria-hidden", "true"), t.setAttribute(
12
- "allow",
13
- "autoplay; fullscreen; encrypted-media; picture-in-picture; accelerometer; gyroscope"
14
- ), this.referrerPolicy !== null && t.setAttribute("referrerpolicy", this.referrerPolicy);
15
- }
16
- get iframe() {
17
- return this.Lb;
18
- }
19
- setup() {
20
- c(window, "message", this.Xi.bind(this)), c(this.Lb, "load", this.gd.bind(this)), a(this.Mb.bind(this));
21
- }
22
- Mb() {
23
- const t = this.sc();
24
- if (!t.length) {
25
- this.Lb.setAttribute("src", "");
26
- return;
27
- }
28
- const s = h(() => this.mg());
29
- this.Lb.setAttribute("src", u(t, s));
30
- }
31
- se(t, s) {
32
- var i;
33
- (i = this.Lb.contentWindow) == null || i.postMessage(JSON.stringify(t), s ?? "*");
34
- }
35
- Xi(t) {
36
- var o;
37
- const s = this.Nb();
38
- if ((t.source === null || t.source === ((o = this.Lb) == null ? void 0 : o.contentWindow)) && (!d(s) || s === t.origin)) {
39
- try {
40
- const e = JSON.parse(t.data);
41
- e && this.te(e, t);
42
- return;
43
- } catch {
44
- }
45
- t.data && this.te(t.data, t);
46
- }
47
- }
48
- }
49
- export {
50
- f as E,
51
- p as t
52
- };
@@ -1,26 +0,0 @@
1
- import { s } from "./install-hlMLq0U3.js";
2
- import { H as i, a as r } from "./vidstack-Dgd3Tj9x-D_ifpfX9.js";
3
- class d extends i {
4
- constructor(t, e) {
5
- super(t, e), this.$$PROVIDER_TYPE = "AUDIO", s(() => {
6
- this.airPlay = new r(this.media, e);
7
- }, this.scope);
8
- }
9
- get type() {
10
- return "audio";
11
- }
12
- setup() {
13
- super.setup(), this.type === "audio" && this.b.delegate.c("provider-setup", this);
14
- }
15
- /**
16
- * The native HTML `<audio>` element.
17
- *
18
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement}
19
- */
20
- get audio() {
21
- return this.a;
22
- }
23
- }
24
- export {
25
- d as AudioProvider
26
- };