@webitel/ui-sdk 25.10.53 → 25.10.55
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/dist/img/sprite/index.js +14 -1
- package/dist/img/sprite/record-start.svg +7 -0
- package/dist/img/sprite/record-stop.svg +7 -0
- package/dist/img/sprite/screenshot-done.svg +7 -0
- package/dist/img/sprite/screenshot-false.svg +7 -0
- package/dist/img/sprite/screenshot.svg +8 -0
- package/dist/img/sprite/sharing-end.svg +5 -0
- package/dist/{install-By5bv5Ga.js → install-DkMhJ88S.js} +30449 -31088
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1001 -989
- package/dist/vidstack-Bq6c3Bam-CcUn4SyX.js +413 -0
- package/dist/vidstack-D2pY00kU-DpjDzLuY.js +138 -0
- package/dist/vidstack-DDXt6fpN-4gTC4hYW.js +60 -0
- package/dist/vidstack-D_-9AA6_-CM7yLN0V.js +20 -0
- package/dist/vidstack-Dm1xEU9Q-qSXq3AI-.js +31 -0
- package/dist/vidstack-DqAw8m9J-CCk5vkMc.js +29 -0
- package/dist/vidstack-audio-xxW_I9rG.js +32 -0
- package/dist/vidstack-dash-DOuceC5F.js +403 -0
- package/dist/vidstack-google-cast-BIeOl5GP.js +377 -0
- package/dist/vidstack-hls-DRS2V7zw.js +324 -0
- package/dist/vidstack-krOAtKMi-B4IZWKdc.js +29 -0
- package/dist/vidstack-video-BIG7CBfM.js +181 -0
- package/dist/vidstack-vimeo-BigSbyhb.js +437 -0
- package/dist/vidstack-youtube-GXzNaQsh.js +236 -0
- package/package.json +3 -3
- package/src/assets/icons/sprite/index.js +14 -1
- package/src/assets/icons/sprite/record-start.svg +7 -0
- package/src/assets/icons/sprite/record-stop.svg +7 -0
- package/src/assets/icons/sprite/screenshot-done.svg +7 -0
- package/src/assets/icons/sprite/screenshot-false.svg +7 -0
- package/src/assets/icons/sprite/screenshot.svg +8 -0
- package/src/assets/icons/sprite/sharing-end.svg +5 -0
- package/src/components/wt-checkbox/wt-checkbox.vue +8 -2
- package/src/components/wt-radio/wt-radio.vue +8 -2
- package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +12 -2
- package/src/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue +211 -0
- package/src/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.ts +7 -0
- package/src/components/wt-vidstack-player/types/WtVidstackPlayerSession.ts +7 -0
- package/src/components/wt-vidstack-player/wt-vidstack-player.vue +24 -3
- package/src/plugins/primevue/theme/components/components.js +1 -2
- package/src/plugins/primevue/theme/extend/player/player.js +15 -0
- package/src/plugins/primevue/theme/webitel-theme.js +6 -1
- package/types/components/wt-checkbox/wt-checkbox.vue.d.ts +2 -0
- package/types/components/wt-radio/wt-radio.vue.d.ts +2 -0
- package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +5 -1
- package/types/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue.d.ts +6 -0
- package/types/components/wt-vidstack-player/types/WtVidstackPlayerControlsMode.d.ts +5 -0
- package/types/components/wt-vidstack-player/types/WtVidstackPlayerSession.d.ts +7 -0
- package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +6 -0
- package/types/plugins/primevue/theme/extend/player/player.d.ts +3 -0
- package/dist/vidstack-54Jpr2Lq-B2le6Uto.js +0 -142
- package/dist/vidstack-BP-l85ST-CTFw3KUN.js +0 -21
- package/dist/vidstack-BTBUzdbF-BuhaE3ef.js +0 -29
- package/dist/vidstack-Ccp8mxka-2ZiXmway.js +0 -20
- package/dist/vidstack-Dgd3Tj9x-BuTqiZFH.js +0 -397
- package/dist/vidstack-DscYSLiW-Dk1undJ-.js +0 -33
- package/dist/vidstack-HTyVv8Yq-DzaVyW2f.js +0 -52
- package/dist/vidstack-audio-BEcEzkeF.js +0 -26
- package/dist/vidstack-dash-D8SZVGUN.js +0 -405
- package/dist/vidstack-google-cast-Yhgv2Xji.js +0 -405
- package/dist/vidstack-hls-C5jjqF8L.js +0 -328
- package/dist/vidstack-video-1erl9Gbe.js +0 -149
- package/dist/vidstack-vimeo-BSb58vEP.js +0 -434
- package/dist/vidstack-youtube-BeeLfeYv.js +0 -204
- package/src/plugins/primevue/theme/extend/extend.js +0 -7
- package/src/plugins/primevue/theme/extend/spacings/spacings.js +0 -15
- package/types/plugins/primevue/theme/extend/extend.d.ts +0 -5
- package/types/plugins/primevue/theme/extend/spacings/spacings.d.ts +0 -13
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
import { x as p, J as h, H as d, p as k, e as u, d as l, b as v, K as m, L as o, l as y, M as w, g as T, Q as b } from "./install-By5bv5Ga.js";
|
|
2
|
-
import { R as $ } from "./vidstack-Ccp8mxka-2ZiXmway.js";
|
|
3
|
-
import { E as I, t as f } from "./vidstack-HTyVv8Yq-DzaVyW2f.js";
|
|
4
|
-
import { resolveVimeoVideoId as j, getVimeoVideoInfo as R } from "./vidstack-BTBUzdbF-BuhaE3ef.js";
|
|
5
|
-
const P = [
|
|
6
|
-
"bufferend",
|
|
7
|
-
"bufferstart",
|
|
8
|
-
// 'cuechange',
|
|
9
|
-
"durationchange",
|
|
10
|
-
"ended",
|
|
11
|
-
"enterpictureinpicture",
|
|
12
|
-
"error",
|
|
13
|
-
"fullscreenchange",
|
|
14
|
-
"leavepictureinpicture",
|
|
15
|
-
"loaded",
|
|
16
|
-
// 'loadeddata',
|
|
17
|
-
// 'loadedmetadata',
|
|
18
|
-
// 'loadstart',
|
|
19
|
-
"playProgress",
|
|
20
|
-
"loadProgress",
|
|
21
|
-
"pause",
|
|
22
|
-
"play",
|
|
23
|
-
"playbackratechange",
|
|
24
|
-
// 'progress',
|
|
25
|
-
"qualitychange",
|
|
26
|
-
"seeked",
|
|
27
|
-
"seeking",
|
|
28
|
-
// 'texttrackchange',
|
|
29
|
-
"timeupdate",
|
|
30
|
-
"volumechange",
|
|
31
|
-
"waiting"
|
|
32
|
-
// 'adstarted',
|
|
33
|
-
// 'adcompleted',
|
|
34
|
-
// 'aderror',
|
|
35
|
-
// 'adskipped',
|
|
36
|
-
// 'adallcompleted',
|
|
37
|
-
// 'adclicked',
|
|
38
|
-
// 'chapterchange',
|
|
39
|
-
// 'chromecastconnected',
|
|
40
|
-
// 'remoteplaybackavailabilitychange',
|
|
41
|
-
// 'remoteplaybackconnecting',
|
|
42
|
-
// 'remoteplaybackconnect',
|
|
43
|
-
// 'remoteplaybackdisconnect',
|
|
44
|
-
// 'liveeventended',
|
|
45
|
-
// 'liveeventstarted',
|
|
46
|
-
// 'livestreamoffline',
|
|
47
|
-
// 'livestreamonline',
|
|
48
|
-
];
|
|
49
|
-
class Q extends I {
|
|
50
|
-
constructor(t, e) {
|
|
51
|
-
super(t), this.b = e, this.$$PROVIDER_TYPE = "VIMEO", this.scope = p(), this.ga = 0, this.ba = new h(0, 0), this.Aa = new h(0, 0), this.I = null, this.R = null, this.ue = null, this.ha = d(""), this.tc = d(!1), this.ve = null, this.K = null, this.Yi = null, this.fa = new $(this.kc.bind(this)), this.hd = null, this.cookies = !1, this.title = !0, this.byline = !0, this.portrait = !0, this.color = "00ADEF", this.jd = !1;
|
|
52
|
-
}
|
|
53
|
-
get c() {
|
|
54
|
-
return this.b.delegate.c;
|
|
55
|
-
}
|
|
56
|
-
get type() {
|
|
57
|
-
return "vimeo";
|
|
58
|
-
}
|
|
59
|
-
get currentSrc() {
|
|
60
|
-
return this.K;
|
|
61
|
-
}
|
|
62
|
-
get videoId() {
|
|
63
|
-
return this.ha();
|
|
64
|
-
}
|
|
65
|
-
get hash() {
|
|
66
|
-
return this.ve;
|
|
67
|
-
}
|
|
68
|
-
get isPro() {
|
|
69
|
-
return this.tc();
|
|
70
|
-
}
|
|
71
|
-
preconnect() {
|
|
72
|
-
k(this.Nb());
|
|
73
|
-
}
|
|
74
|
-
setup() {
|
|
75
|
-
super.setup(), u(this.we.bind(this)), u(this.Zi.bind(this)), u(this._i.bind(this)), this.c("provider-setup", this);
|
|
76
|
-
}
|
|
77
|
-
destroy() {
|
|
78
|
-
this.z(), this.t("destroy");
|
|
79
|
-
}
|
|
80
|
-
async play() {
|
|
81
|
-
const { paused: t } = this.b.$state;
|
|
82
|
-
return this.I || (this.I = f(() => {
|
|
83
|
-
if (this.I = null, t())
|
|
84
|
-
return "Timed out.";
|
|
85
|
-
}), this.t("play")), this.I.promise;
|
|
86
|
-
}
|
|
87
|
-
async pause() {
|
|
88
|
-
const { paused: t } = this.b.$state;
|
|
89
|
-
return this.R || (this.R = f(() => {
|
|
90
|
-
if (this.R = null, !t())
|
|
91
|
-
return "Timed out.";
|
|
92
|
-
}), this.t("pause")), this.R.promise;
|
|
93
|
-
}
|
|
94
|
-
setMuted(t) {
|
|
95
|
-
this.t("setMuted", t);
|
|
96
|
-
}
|
|
97
|
-
setCurrentTime(t) {
|
|
98
|
-
this.t("seekTo", t), this.c("seeking", t);
|
|
99
|
-
}
|
|
100
|
-
setVolume(t) {
|
|
101
|
-
this.t("setVolume", t), this.t("setMuted", l(this.b.$state.muted));
|
|
102
|
-
}
|
|
103
|
-
setPlaybackRate(t) {
|
|
104
|
-
this.t("setPlaybackRate", t);
|
|
105
|
-
}
|
|
106
|
-
async loadSource(t) {
|
|
107
|
-
if (!v(t.src)) {
|
|
108
|
-
this.K = null, this.ve = null, this.ha.set("");
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const { videoId: e, hash: s } = j(t.src);
|
|
112
|
-
this.ha.set(e ?? ""), this.ve = s ?? null, this.K = t;
|
|
113
|
-
}
|
|
114
|
-
we() {
|
|
115
|
-
this.z();
|
|
116
|
-
const t = this.ha();
|
|
117
|
-
if (!t) {
|
|
118
|
-
this.sc.set("");
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
this.sc.set(`${this.Nb()}/video/${t}`), this.c("load-start");
|
|
122
|
-
}
|
|
123
|
-
Zi() {
|
|
124
|
-
const t = this.ha();
|
|
125
|
-
if (!t)
|
|
126
|
-
return;
|
|
127
|
-
const e = m(), s = new AbortController();
|
|
128
|
-
return this.ue = e, R(t, s).then((i) => {
|
|
129
|
-
e.resolve(i);
|
|
130
|
-
}).catch((i) => {
|
|
131
|
-
e.reject();
|
|
132
|
-
}), () => {
|
|
133
|
-
e.reject(), s.abort();
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
_i() {
|
|
137
|
-
const t = this.tc(), { $state: e, qualities: s } = this.b;
|
|
138
|
-
if (e.canSetPlaybackRate.set(t), s[o.Od](!t), t)
|
|
139
|
-
return y(s, "change", () => {
|
|
140
|
-
var a;
|
|
141
|
-
if (s.auto)
|
|
142
|
-
return;
|
|
143
|
-
const i = (a = s.selected) == null ? void 0 : a.id;
|
|
144
|
-
i && this.t("setQuality", i);
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
Nb() {
|
|
148
|
-
return "https://player.vimeo.com";
|
|
149
|
-
}
|
|
150
|
-
mg() {
|
|
151
|
-
const { keyDisabled: t } = this.b.$props, { playsInline: e, nativeControls: s } = this.b.$state, i = s();
|
|
152
|
-
return {
|
|
153
|
-
title: this.title,
|
|
154
|
-
byline: this.byline,
|
|
155
|
-
color: this.color,
|
|
156
|
-
portrait: this.portrait,
|
|
157
|
-
controls: i,
|
|
158
|
-
h: this.hash,
|
|
159
|
-
keyboard: i && !t(),
|
|
160
|
-
transparent: !0,
|
|
161
|
-
playsinline: e(),
|
|
162
|
-
dnt: !this.cookies
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
kc() {
|
|
166
|
-
this.t("getCurrentTime");
|
|
167
|
-
}
|
|
168
|
-
mc(t, e) {
|
|
169
|
-
if (this.jd && t === 0)
|
|
170
|
-
return;
|
|
171
|
-
const { realCurrentTime: s, realDuration: i, paused: a, bufferedEnd: n } = this.b.$state;
|
|
172
|
-
if (s() === t)
|
|
173
|
-
return;
|
|
174
|
-
const c = s(), r = {
|
|
175
|
-
currentTime: t,
|
|
176
|
-
played: this.uc(t)
|
|
177
|
-
};
|
|
178
|
-
this.c("time-update", r, e), Math.abs(c - t) > 1.5 && (this.c("seeking", t, e), !a() && n() < t && this.c("waiting", void 0, e)), i() - t < 0.01 && (this.c("end", void 0, e), this.jd = !0, setTimeout(() => {
|
|
179
|
-
this.jd = !1;
|
|
180
|
-
}, 500));
|
|
181
|
-
}
|
|
182
|
-
uc(t) {
|
|
183
|
-
return this.ga >= t ? this.ba : this.ba = new h(0, this.ga = t);
|
|
184
|
-
}
|
|
185
|
-
ob(t, e) {
|
|
186
|
-
this.c("seeked", t, e);
|
|
187
|
-
}
|
|
188
|
-
tb(t) {
|
|
189
|
-
var s;
|
|
190
|
-
const e = this.ha();
|
|
191
|
-
(s = this.ue) == null || s.promise.then((i) => {
|
|
192
|
-
if (!i)
|
|
193
|
-
return;
|
|
194
|
-
const { title: a, poster: n, duration: c, pro: r } = i;
|
|
195
|
-
this.tc.set(r), this.c("title-change", a, t), this.c("poster-change", n, t), this.c("duration-change", c, t), this.kd(c, t);
|
|
196
|
-
}).catch(() => {
|
|
197
|
-
e === this.ha() && (this.t("getVideoTitle"), this.t("getDuration"));
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
kd(t, e) {
|
|
201
|
-
const { nativeControls: s } = this.b.$state, i = s();
|
|
202
|
-
this.Aa = new h(0, t);
|
|
203
|
-
const a = {
|
|
204
|
-
buffered: new h(0, 0),
|
|
205
|
-
seekable: this.Aa,
|
|
206
|
-
duration: t
|
|
207
|
-
};
|
|
208
|
-
this.b.delegate.Ga(a, e), i || this.t("_hideOverlay"), this.t("getQualities"), this.t("getChapters");
|
|
209
|
-
}
|
|
210
|
-
$i(t, e, s) {
|
|
211
|
-
switch (t) {
|
|
212
|
-
case "getVideoTitle":
|
|
213
|
-
const i = e;
|
|
214
|
-
this.c("title-change", i, s);
|
|
215
|
-
break;
|
|
216
|
-
case "getDuration":
|
|
217
|
-
const a = e;
|
|
218
|
-
this.b.$state.canPlay() ? this.c("duration-change", a, s) : this.kd(a, s);
|
|
219
|
-
break;
|
|
220
|
-
case "getCurrentTime":
|
|
221
|
-
this.mc(e, s);
|
|
222
|
-
break;
|
|
223
|
-
case "getBuffered":
|
|
224
|
-
w(e) && e.length && this.ng(e[e.length - 1][1], s);
|
|
225
|
-
break;
|
|
226
|
-
case "setMuted":
|
|
227
|
-
this.Na(l(this.b.$state.volume), e, s);
|
|
228
|
-
break;
|
|
229
|
-
case "getChapters":
|
|
230
|
-
this.aj(e);
|
|
231
|
-
break;
|
|
232
|
-
case "getQualities":
|
|
233
|
-
this.ld(e, s);
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
bj() {
|
|
238
|
-
for (const t of P)
|
|
239
|
-
this.t("addEventListener", t);
|
|
240
|
-
}
|
|
241
|
-
ib(t) {
|
|
242
|
-
var e;
|
|
243
|
-
this.fa.$(), this.c("pause", void 0, t), (e = this.R) == null || e.resolve(), this.R = null;
|
|
244
|
-
}
|
|
245
|
-
gc(t) {
|
|
246
|
-
var e;
|
|
247
|
-
this.fa.Xa(), this.c("play", void 0, t), (e = this.I) == null || e.resolve(), this.I = null;
|
|
248
|
-
}
|
|
249
|
-
cj(t) {
|
|
250
|
-
const { paused: e } = this.b.$state;
|
|
251
|
-
!e() && !this.jd && this.c("playing", void 0, t);
|
|
252
|
-
}
|
|
253
|
-
ng(t, e) {
|
|
254
|
-
const s = {
|
|
255
|
-
buffered: new h(0, t),
|
|
256
|
-
seekable: this.Aa
|
|
257
|
-
};
|
|
258
|
-
this.c("progress", s, e);
|
|
259
|
-
}
|
|
260
|
-
dj(t) {
|
|
261
|
-
this.c("waiting", void 0, t);
|
|
262
|
-
}
|
|
263
|
-
ej(t) {
|
|
264
|
-
const { paused: e } = this.b.$state;
|
|
265
|
-
e() || this.c("playing", void 0, t);
|
|
266
|
-
}
|
|
267
|
-
ee(t) {
|
|
268
|
-
const { paused: e } = this.b.$state;
|
|
269
|
-
e() && this.c("play", void 0, t), this.c("waiting", void 0, t);
|
|
270
|
-
}
|
|
271
|
-
Na(t, e, s) {
|
|
272
|
-
const i = { volume: t, muted: e };
|
|
273
|
-
this.c("volume-change", i, s);
|
|
274
|
-
}
|
|
275
|
-
// protected _onTextTrackChange(track: VimeoTextTrack, trigger: Event) {
|
|
276
|
-
// const textTrack = this._ctx.textTracks.toArray().find((t) => t.language === track.language);
|
|
277
|
-
// if (textTrack) textTrack.mode = track.mode;
|
|
278
|
-
// }
|
|
279
|
-
// protected _onTextTracksChange(tracks: VimeoTextTrack[], trigger: Event) {
|
|
280
|
-
// for (const init of tracks) {
|
|
281
|
-
// const textTrack = new TextTrack({
|
|
282
|
-
// ...init,
|
|
283
|
-
// label: init.label.replace('auto-generated', 'auto'),
|
|
284
|
-
// });
|
|
285
|
-
// textTrack[TextTrackSymbol._readyState] = 2;
|
|
286
|
-
// this._ctx.textTracks.add(textTrack, trigger);
|
|
287
|
-
// textTrack.setMode(init.mode, trigger);
|
|
288
|
-
// }
|
|
289
|
-
// }
|
|
290
|
-
// protected _onCueChange(cue: VimeoTextCue, trigger: Event) {
|
|
291
|
-
// const { textTracks, $state } = this._ctx,
|
|
292
|
-
// { currentTime } = $state,
|
|
293
|
-
// track = textTracks.selected;
|
|
294
|
-
// if (this._currentCue) track?.removeCue(this._currentCue, trigger);
|
|
295
|
-
// this._currentCue = new window.VTTCue(currentTime(), Number.MAX_SAFE_INTEGER, cue.text);
|
|
296
|
-
// track?.addCue(this._currentCue, trigger);
|
|
297
|
-
// }
|
|
298
|
-
aj(t) {
|
|
299
|
-
if (this.og(), !t.length)
|
|
300
|
-
return;
|
|
301
|
-
const e = new T({
|
|
302
|
-
kind: "chapters",
|
|
303
|
-
default: !0
|
|
304
|
-
}), { realDuration: s } = this.b.$state;
|
|
305
|
-
for (let i = 0; i < t.length; i++) {
|
|
306
|
-
const a = t[i], n = t[i + 1];
|
|
307
|
-
e.addCue(
|
|
308
|
-
new window.VTTCue(
|
|
309
|
-
a.startTime,
|
|
310
|
-
(n == null ? void 0 : n.startTime) ?? s(),
|
|
311
|
-
a.title
|
|
312
|
-
)
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
this.hd = e, this.b.textTracks.add(e);
|
|
316
|
-
}
|
|
317
|
-
og() {
|
|
318
|
-
this.hd && (this.b.textTracks.remove(this.hd), this.hd = null);
|
|
319
|
-
}
|
|
320
|
-
ld(t, e) {
|
|
321
|
-
this.b.qualities[b.Ia] = t.some((s) => s.id === "auto") ? () => this.t("setQuality", "auto") : void 0;
|
|
322
|
-
for (const s of t) {
|
|
323
|
-
if (s.id === "auto")
|
|
324
|
-
continue;
|
|
325
|
-
const i = +s.id.slice(0, -1);
|
|
326
|
-
isNaN(i) || this.b.qualities[o.da](
|
|
327
|
-
{
|
|
328
|
-
id: s.id,
|
|
329
|
-
width: i * (16 / 9),
|
|
330
|
-
height: i,
|
|
331
|
-
codec: "avc1,h.264",
|
|
332
|
-
bitrate: -1
|
|
333
|
-
},
|
|
334
|
-
e
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
this.Za(
|
|
338
|
-
t.find((s) => s.active),
|
|
339
|
-
e
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
Za({ id: t } = {}, e) {
|
|
343
|
-
if (!t)
|
|
344
|
-
return;
|
|
345
|
-
const s = t === "auto", i = this.b.qualities.getById(t);
|
|
346
|
-
s ? (this.b.qualities[b.Wa](s, e), this.b.qualities[o.ea](void 0, !0, e)) : this.b.qualities[o.ea](i ?? void 0, !0, e);
|
|
347
|
-
}
|
|
348
|
-
fj(t, e, s) {
|
|
349
|
-
switch (t) {
|
|
350
|
-
case "ready":
|
|
351
|
-
this.bj();
|
|
352
|
-
break;
|
|
353
|
-
case "loaded":
|
|
354
|
-
this.tb(s);
|
|
355
|
-
break;
|
|
356
|
-
case "play":
|
|
357
|
-
this.gc(s);
|
|
358
|
-
break;
|
|
359
|
-
case "playProgress":
|
|
360
|
-
this.cj(s);
|
|
361
|
-
break;
|
|
362
|
-
case "pause":
|
|
363
|
-
this.ib(s);
|
|
364
|
-
break;
|
|
365
|
-
case "loadProgress":
|
|
366
|
-
this.ng(e.seconds, s);
|
|
367
|
-
break;
|
|
368
|
-
case "waiting":
|
|
369
|
-
this.ee(s);
|
|
370
|
-
break;
|
|
371
|
-
case "bufferstart":
|
|
372
|
-
this.dj(s);
|
|
373
|
-
break;
|
|
374
|
-
case "bufferend":
|
|
375
|
-
this.ej(s);
|
|
376
|
-
break;
|
|
377
|
-
case "volumechange":
|
|
378
|
-
this.Na(e.volume, l(this.b.$state.muted), s);
|
|
379
|
-
break;
|
|
380
|
-
case "durationchange":
|
|
381
|
-
this.Aa = new h(0, e.duration), this.c("duration-change", e.duration, s);
|
|
382
|
-
break;
|
|
383
|
-
case "playbackratechange":
|
|
384
|
-
this.c("rate-change", e.playbackRate, s);
|
|
385
|
-
break;
|
|
386
|
-
case "qualitychange":
|
|
387
|
-
this.Za(e, s);
|
|
388
|
-
break;
|
|
389
|
-
case "fullscreenchange":
|
|
390
|
-
this.c("fullscreen-change", e.fullscreen, s);
|
|
391
|
-
break;
|
|
392
|
-
case "enterpictureinpicture":
|
|
393
|
-
this.c("picture-in-picture-change", !0, s);
|
|
394
|
-
break;
|
|
395
|
-
case "leavepictureinpicture":
|
|
396
|
-
this.c("picture-in-picture-change", !1, s);
|
|
397
|
-
break;
|
|
398
|
-
case "ended":
|
|
399
|
-
this.c("end", void 0, s);
|
|
400
|
-
break;
|
|
401
|
-
case "error":
|
|
402
|
-
this.Q(e, s);
|
|
403
|
-
break;
|
|
404
|
-
case "seek":
|
|
405
|
-
case "seeked":
|
|
406
|
-
this.ob(e.seconds, s);
|
|
407
|
-
break;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
Q(t, e) {
|
|
411
|
-
var s;
|
|
412
|
-
if (t.method === "setPlaybackRate" && this.tc.set(!1), t.method === "play") {
|
|
413
|
-
(s = this.I) == null || s.reject(t.message);
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
te(t, e) {
|
|
418
|
-
t.event ? this.fj(t.event, t.data, e) : t.method && this.$i(t.method, t.value, e);
|
|
419
|
-
}
|
|
420
|
-
gd() {
|
|
421
|
-
}
|
|
422
|
-
t(t, e) {
|
|
423
|
-
return this.se({
|
|
424
|
-
method: t,
|
|
425
|
-
value: e
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
z() {
|
|
429
|
-
this.fa.$(), this.ga = 0, this.ba = new h(0, 0), this.Aa = new h(0, 0), this.I = null, this.R = null, this.ue = null, this.Yi = null, this.tc.set(!1), this.og();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
export {
|
|
433
|
-
Q as VimeoProvider
|
|
434
|
-
};
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { x as m, H as y, J as r, p as v, e as g, b as k, N as w, k as u, O as f } from "./install-By5bv5Ga.js";
|
|
2
|
-
import { E as I, t as p } from "./vidstack-HTyVv8Yq-DzaVyW2f.js";
|
|
3
|
-
import { resolveYouTubeVideoId as R } from "./vidstack-DscYSLiW-Dk1undJ-.js";
|
|
4
|
-
const c = {
|
|
5
|
-
pg: 0,
|
|
6
|
-
qg: 1,
|
|
7
|
-
gj: 2,
|
|
8
|
-
hj: 3,
|
|
9
|
-
ij: 5
|
|
10
|
-
};
|
|
11
|
-
class j extends I {
|
|
12
|
-
constructor(t, s) {
|
|
13
|
-
super(t), this.b = s, this.$$PROVIDER_TYPE = "YOUTUBE", this.scope = m(), this.ha = y(""), this.za = -1, this.md = -1, this.vc = !1, this.ga = 0, this.ba = new r(0, 0), this.K = null, this.I = null, this.R = null, this.language = "en", this.color = "red", this.cookies = !1;
|
|
14
|
-
}
|
|
15
|
-
get c() {
|
|
16
|
-
return this.b.delegate.c;
|
|
17
|
-
}
|
|
18
|
-
get currentSrc() {
|
|
19
|
-
return this.K;
|
|
20
|
-
}
|
|
21
|
-
get type() {
|
|
22
|
-
return "youtube";
|
|
23
|
-
}
|
|
24
|
-
get videoId() {
|
|
25
|
-
return this.ha();
|
|
26
|
-
}
|
|
27
|
-
preconnect() {
|
|
28
|
-
v(this.Nb());
|
|
29
|
-
}
|
|
30
|
-
setup() {
|
|
31
|
-
super.setup(), g(this.we.bind(this)), this.c("provider-setup", this);
|
|
32
|
-
}
|
|
33
|
-
async play() {
|
|
34
|
-
const { paused: t } = this.b.$state;
|
|
35
|
-
return this.I || (this.I = p(() => {
|
|
36
|
-
if (this.I = null, t())
|
|
37
|
-
return "Timed out.";
|
|
38
|
-
}), this.t("playVideo")), this.I.promise;
|
|
39
|
-
}
|
|
40
|
-
async pause() {
|
|
41
|
-
const { paused: t } = this.b.$state;
|
|
42
|
-
return this.R || (this.R = p(() => {
|
|
43
|
-
this.R = null, t();
|
|
44
|
-
}), this.t("pauseVideo")), this.R.promise;
|
|
45
|
-
}
|
|
46
|
-
setMuted(t) {
|
|
47
|
-
t ? this.t("mute") : this.t("unMute");
|
|
48
|
-
}
|
|
49
|
-
setCurrentTime(t) {
|
|
50
|
-
this.vc = this.b.$state.paused(), this.t("seekTo", t), this.c("seeking", t);
|
|
51
|
-
}
|
|
52
|
-
setVolume(t) {
|
|
53
|
-
this.t("setVolume", t * 100);
|
|
54
|
-
}
|
|
55
|
-
setPlaybackRate(t) {
|
|
56
|
-
this.t("setPlaybackRate", t);
|
|
57
|
-
}
|
|
58
|
-
async loadSource(t) {
|
|
59
|
-
if (!k(t.src)) {
|
|
60
|
-
this.K = null, this.ha.set("");
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const s = R(t.src);
|
|
64
|
-
this.ha.set(s ?? ""), this.K = t;
|
|
65
|
-
}
|
|
66
|
-
Nb() {
|
|
67
|
-
return this.cookies ? "https://www.youtube.com" : "https://www.youtube-nocookie.com";
|
|
68
|
-
}
|
|
69
|
-
we() {
|
|
70
|
-
this.z();
|
|
71
|
-
const t = this.ha();
|
|
72
|
-
if (!t) {
|
|
73
|
-
this.sc.set("");
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
this.sc.set(`${this.Nb()}/embed/${t}`), this.c("load-start");
|
|
77
|
-
}
|
|
78
|
-
mg() {
|
|
79
|
-
const { keyDisabled: t } = this.b.$props, { muted: s, playsInline: a, nativeControls: h } = this.b.$state, e = h();
|
|
80
|
-
return {
|
|
81
|
-
autoplay: 0,
|
|
82
|
-
cc_lang_pref: this.language,
|
|
83
|
-
cc_load_policy: e ? 1 : void 0,
|
|
84
|
-
color: this.color,
|
|
85
|
-
controls: e ? 1 : 0,
|
|
86
|
-
disablekb: !e || t() ? 1 : 0,
|
|
87
|
-
enablejsapi: 1,
|
|
88
|
-
fs: 1,
|
|
89
|
-
hl: this.language,
|
|
90
|
-
iv_load_policy: e ? 1 : 3,
|
|
91
|
-
mute: s() ? 1 : 0,
|
|
92
|
-
playsinline: a() ? 1 : 0
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
t(t, s) {
|
|
96
|
-
this.se({
|
|
97
|
-
event: "command",
|
|
98
|
-
func: t,
|
|
99
|
-
args: s ? [s] : void 0
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
gd() {
|
|
103
|
-
window.setTimeout(() => this.se({ event: "listening" }), 100);
|
|
104
|
-
}
|
|
105
|
-
kd(t) {
|
|
106
|
-
this.c("loaded-metadata"), this.c("loaded-data"), this.b.delegate.Ga(void 0, t);
|
|
107
|
-
}
|
|
108
|
-
ib(t) {
|
|
109
|
-
var s;
|
|
110
|
-
(s = this.R) == null || s.resolve(), this.R = null, this.c("pause", void 0, t);
|
|
111
|
-
}
|
|
112
|
-
mc(t, s) {
|
|
113
|
-
const { duration: a, realCurrentTime: h } = this.b.$state, e = this.za === c.pg, i = e ? a() : t, o = {
|
|
114
|
-
currentTime: i,
|
|
115
|
-
played: this.uc(i)
|
|
116
|
-
};
|
|
117
|
-
this.c("time-update", o, s), !e && Math.abs(i - h()) > 1 && this.c("seeking", i, s);
|
|
118
|
-
}
|
|
119
|
-
uc(t) {
|
|
120
|
-
return this.ga >= t ? this.ba : this.ba = new r(0, this.ga = t);
|
|
121
|
-
}
|
|
122
|
-
nb(t, s, a) {
|
|
123
|
-
const h = {
|
|
124
|
-
buffered: new r(0, t),
|
|
125
|
-
seekable: s
|
|
126
|
-
};
|
|
127
|
-
this.c("progress", h, a);
|
|
128
|
-
const { seeking: e, realCurrentTime: i } = this.b.$state;
|
|
129
|
-
e() && t > i() && this.ob(a);
|
|
130
|
-
}
|
|
131
|
-
ob(t) {
|
|
132
|
-
const { paused: s, realCurrentTime: a } = this.b.$state;
|
|
133
|
-
window.clearTimeout(this.md), this.md = window.setTimeout(
|
|
134
|
-
() => {
|
|
135
|
-
this.c("seeked", a(), t), this.md = -1;
|
|
136
|
-
},
|
|
137
|
-
s() ? 100 : 0
|
|
138
|
-
), this.vc = !1;
|
|
139
|
-
}
|
|
140
|
-
lc(t) {
|
|
141
|
-
const { seeking: s } = this.b.$state;
|
|
142
|
-
s() && this.ob(t), this.c("pause", void 0, t), this.c("end", void 0, t);
|
|
143
|
-
}
|
|
144
|
-
ie(t, s) {
|
|
145
|
-
var d, n;
|
|
146
|
-
const { started: a, paused: h, seeking: e } = this.b.$state, i = t === c.qg, o = t === c.hj, l = (h() || this.I) && (o || i);
|
|
147
|
-
if (o && this.c("waiting", void 0, s), e() && i && this.ob(s), !a() && l && this.vc) {
|
|
148
|
-
(d = this.I) == null || d.reject("invalid internal play operation"), this.I = null, i && (this.pause(), this.vc = !1);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
switch (l && ((n = this.I) == null || n.resolve(), this.I = null, this.c("play", void 0, s)), t) {
|
|
152
|
-
case c.ij:
|
|
153
|
-
this.kd(s);
|
|
154
|
-
break;
|
|
155
|
-
case c.qg:
|
|
156
|
-
this.c("playing", void 0, s);
|
|
157
|
-
break;
|
|
158
|
-
case c.gj:
|
|
159
|
-
this.ib(s);
|
|
160
|
-
break;
|
|
161
|
-
case c.pg:
|
|
162
|
-
this.lc(s);
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
this.za = t;
|
|
166
|
-
}
|
|
167
|
-
te({ info: t }, s) {
|
|
168
|
-
var i;
|
|
169
|
-
if (!t)
|
|
170
|
-
return;
|
|
171
|
-
const { title: a, intrinsicDuration: h, playbackRate: e } = this.b.$state;
|
|
172
|
-
if (w(t.videoData) && t.videoData.title !== a() && this.c("title-change", t.videoData.title, s), u(t.duration) && t.duration !== h()) {
|
|
173
|
-
if (u(t.videoLoadedFraction)) {
|
|
174
|
-
const o = ((i = t.progressState) == null ? void 0 : i.loaded) ?? t.videoLoadedFraction * t.duration, l = new r(0, t.duration);
|
|
175
|
-
this.nb(o, l, s);
|
|
176
|
-
}
|
|
177
|
-
this.c("duration-change", t.duration, s);
|
|
178
|
-
}
|
|
179
|
-
if (u(t.playbackRate) && t.playbackRate !== e() && this.c("rate-change", t.playbackRate, s), t.progressState) {
|
|
180
|
-
const {
|
|
181
|
-
current: o,
|
|
182
|
-
seekableStart: l,
|
|
183
|
-
seekableEnd: d,
|
|
184
|
-
loaded: n,
|
|
185
|
-
duration: b
|
|
186
|
-
} = t.progressState;
|
|
187
|
-
this.mc(o, s), this.nb(n, new r(l, d), s), b !== h() && this.c("duration-change", b, s);
|
|
188
|
-
}
|
|
189
|
-
if (u(t.volume) && f(t.muted)) {
|
|
190
|
-
const o = {
|
|
191
|
-
muted: t.muted,
|
|
192
|
-
volume: t.volume / 100
|
|
193
|
-
};
|
|
194
|
-
this.c("volume-change", o, s);
|
|
195
|
-
}
|
|
196
|
-
u(t.playerState) && t.playerState !== this.za && this.ie(t.playerState, s);
|
|
197
|
-
}
|
|
198
|
-
z() {
|
|
199
|
-
this.za = -1, this.md = -1, this.ga = 0, this.ba = new r(0, 0), this.I = null, this.R = null, this.vc = !1;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
export {
|
|
203
|
-
j as YouTubeProvider
|
|
204
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const spacings = {
|
|
2
|
-
multiplicator: '8px',
|
|
3
|
-
|
|
4
|
-
'3xs': 'calc({spacings.multiplicator} / 4)',
|
|
5
|
-
'2xs': 'calc({spacings.multiplicator} / 2)',
|
|
6
|
-
xs: 'calc({spacings.multiplicator} * 1)',
|
|
7
|
-
sm: 'calc({spacings.multiplicator} * 2)',
|
|
8
|
-
md: 'calc({spacings.multiplicator} * 3)',
|
|
9
|
-
lg: 'calc({spacings.multiplicator} * 4)',
|
|
10
|
-
xl: 'calc({spacings.multiplicator} * 5)',
|
|
11
|
-
'2xl': 'calc({spacings.multiplicator} * 6)',
|
|
12
|
-
'3xl': 'calc({spacings.multiplicator} * 7)',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default spacings;
|