@wapri/gplayer 0.1.1 → 0.2.0

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/index.mjs CHANGED
@@ -1,292 +1,1115 @@
1
- import { defineComponent as N, ref as H, shallowRef as I, computed as V, watch as m, onMounted as U, onBeforeUnmount as _, openBlock as A, createElementBlock as O, normalizeStyle as j, normalizeClass as W, unref as q } from "vue";
2
- import x from "artplayer";
3
- import { downloadBlob as D } from "@wapri/gbase";
4
- const z = "@wapri/gplayer", K = "wa-player", Q = "16 / 9", G = {
1
+ import { defineComponent as We, ref as He, shallowRef as Ne, computed as Oe, watch as B, onMounted as Ae, onBeforeUnmount as je, openBlock as Ve, createElementBlock as Ke, normalizeStyle as De, normalizeClass as _e, unref as qe } from "vue";
2
+ import Z from "artplayer";
3
+ import { downloadBlob as Ue } from "@wapri/gbase";
4
+ const Xe = "网页全屏", ae = "马赛克", ie = "防抖", se = "模糊", re = "倒放", ce = "背景模糊", Ye = "开场动画", ue = "视频叠加", de = "绿幕", he = "视频滤镜", me = "横屏转竖屏", Qe = 1280, pe = 960, Ge = 2, Je = !1, Ze = 16, et = 2, tt = 64, nt = 1, ot = 0.35, lt = 0, at = 0.9, it = 0.05, st = 6, rt = 0, ct = 30, ut = 1, dt = 16, ht = 0, mt = 40, pt = 1, vt = 1.15, ft = 1, gt = "wapri", yt = 1600, bt = 0, wt = 68, xt = 68, Mt = 24, Ct = 1, kt = 6, $t = 80, Rt = "#00ff00", St = 0.35, Tt = 0.12, Pt = 0, It = 1, Ft = 0, Lt = 0.6, zt = "none", Bt = 1, Et = 0, Wt = 1, Ht = 0.05, Nt = "9:16", Ot = "crop", At = "块大小", jt = "稳像强度", Vt = "模糊程度", Kt = "背景模糊", Dt = "倒放速率", _t = "吸取背景色", qt = "点击画面取色", Ut = "相似度", Xt = "边缘羽化", Yt = "取色失败,视频源需开启跨域(CORS)", Qt = "强度", Gt = "适配方式", Jt = "裁切铺满", Zt = "完整显示", en = "旋转 90°", tn = "重播开场", nn = "透明度", on = "大小", ln = "重置位置", an = "未配置叠加素材", _ = "wa-player-intro", Pe = "wa-player-intro__text", Ie = "wa-player-intro__image", E = "wa-player-overlay", Fe = "wa-player-frame", ve = "data-wa-player-style", sn = `
5
+ .${Fe} {
6
+ position: absolute;
7
+ inset: 0;
8
+ width: 100%;
9
+ height: 100%;
10
+ pointer-events: none;
11
+ z-index: 20;
12
+ }
13
+ .${_} {
14
+ position: absolute;
15
+ inset: 0;
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: center;
19
+ justify-content: center;
20
+ gap: 8px;
21
+ background: #000;
22
+ opacity: 1;
23
+ transition: opacity 400ms ease;
24
+ pointer-events: none;
25
+ z-index: 40;
26
+ }
27
+ .${_}--out {
28
+ opacity: 0;
29
+ }
30
+ .${Ie} {
31
+ max-width: 40%;
32
+ max-height: 40%;
33
+ object-fit: contain;
34
+ animation: wa-player-intro-pop 600ms ease both;
35
+ }
36
+ .${Pe} {
37
+ color: #fff;
38
+ font-size: 20px;
39
+ letter-spacing: 2px;
40
+ animation: wa-player-intro-pop 600ms ease both;
41
+ }
42
+ .${E} {
43
+ position: absolute;
44
+ z-index: 30;
45
+ transform: translate(-50%, -50%);
46
+ touch-action: none;
47
+ user-select: none;
48
+ }
49
+ .${E}--draggable {
50
+ cursor: move;
51
+ }
52
+ .${E} img,
53
+ .${E} video {
54
+ display: block;
55
+ width: 100%;
56
+ height: auto;
57
+ pointer-events: none;
58
+ }
59
+ @keyframes wa-player-intro-pop {
60
+ from {
61
+ opacity: 0;
62
+ transform: scale(0.92);
63
+ }
64
+ to {
65
+ opacity: 1;
66
+ transform: scale(1);
67
+ }
68
+ }
69
+ `, R = (e) => Number(e.toFixed(2)), rn = {
70
+ none: () => "",
71
+ mono: (e) => `grayscale(${R(e)})`,
72
+ sepia: (e) => `sepia(${R(e * 0.75)}) saturate(${R(1 + e * 0.3)}) contrast(${R(
73
+ 1 + e * 0.05
74
+ )})`,
75
+ vivid: (e) => `saturate(${R(1 + e * 0.8)}) contrast(${R(1 + e * 0.15)})`,
76
+ warm: (e) => `sepia(${R(e * 0.35)}) saturate(${R(1 + e * 0.25)}) hue-rotate(${-Math.round(
77
+ e * 8
78
+ )}deg)`,
79
+ cool: (e) => `hue-rotate(${Math.round(e * 18)}deg) saturate(${R(1 + e * 0.15)})`,
80
+ fade: (e) => `contrast(${R(1 - e * 0.25)}) brightness(${R(1 + e * 0.12)}) saturate(${R(
81
+ 1 - e * 0.4
82
+ )})`,
83
+ film: (e) => `sepia(${R(e * 0.3)}) contrast(${R(1 + e * 0.2)}) brightness(${R(
84
+ 1 - e * 0.06
85
+ )}) saturate(${R(1 - e * 0.1)})`,
86
+ invert: (e) => `invert(${R(e)})`
87
+ }, X = {
88
+ none: "原图",
89
+ mono: "黑白",
90
+ sepia: "复古",
91
+ vivid: "鲜艳",
92
+ warm: "暖色",
93
+ cool: "冷色",
94
+ fade: "褪色",
95
+ film: "胶片",
96
+ invert: "反色"
97
+ }, cn = [
98
+ "none",
99
+ "mono",
100
+ "sepia",
101
+ "vivid",
102
+ "warm",
103
+ "cool",
104
+ "fade",
105
+ "film",
106
+ "invert"
107
+ ], Le = (e, o) => o <= 0 ? "" : rn[e](o), un = [
108
+ "filter",
109
+ "screenshot",
110
+ "webFullscreen",
111
+ "mosaic",
112
+ "blur",
113
+ "chromaKey"
114
+ ], ze = "@wapri/gplayer", dn = "wa-player", hn = "16 / 9", mn = {
5
115
  lang: "zh-cn",
6
116
  // 右侧菜单是插件的载体,默认打开
7
117
  setting: !0,
8
118
  fullscreen: !0,
9
119
  miniProgressBar: !0
10
- }, J = [0.5, 0.75, 1, 1.25, 1.5, 2], k = 1, X = ["default", "16:9", "4:3", "21:9"], y = "default", Y = ["normal", "horizontal", "vertical"], C = "normal", Z = "screenshot", ee = "image/png", te = 0.92, ne = {
120
+ }, pn = [0.5, 0.75, 1, 1.25, 1.5, 2], fe = 1, vn = ["default", "16:9", "4:3", "21:9"], Y = "default", fn = ["normal", "horizontal", "vertical"], ge = "normal", gn = "screenshot", yn = "image/png", bn = 0.92, wn = {
11
121
  "image/png": "png",
12
122
  "image/jpeg": "jpg",
13
123
  "image/webp": "webp"
14
- }, le = 0, b = 100, oe = 0, ae = 200, ie = 1, se = "播放速度", ce = "画面比例", ue = "画面翻转", re = "截图", pe = "画中画", S = "AB 循环", de = "画面调节", fe = "设置 A 点", me = "设置 B 点", he = "清除 A-B", E = "未设置", ve = "--:--", ge = "亮度", ye = "对比度", be = "饱和度", we = "恢复默认", L = "截图失败,视频源需开启跨域(CORS)", Re = (e) => Object.fromEntries(Object.entries(e).filter(([, s]) => s !== void 0)), xe = (e, s, o) => {
15
- var t, a, i, c, r, d, p;
16
- return Re({
17
- ...G,
124
+ }, xn = 0, Q = 100, Mn = 0, Cn = 200, kn = 1, $n = "播放速度", Rn = "画面比例", Sn = "画面翻转", Tn = "截图", Pn = "画中画", ye = "AB 循环", In = "画面调节", Fn = "设置 A 点", Ln = "设置 B 点", zn = "清除 A-B", be = "未设置", Bn = "--:--", En = "亮度", Wn = "对比度", Hn = "饱和度", Nn = "恢复默认", we = "截图失败,视频源需开启跨域(CORS)", On = (e) => Object.fromEntries(Object.entries(e).filter(([, o]) => o !== void 0)), An = (e, o, a) => {
125
+ var t, l, i, r, c, u, d;
126
+ return On({
127
+ ...mn,
18
128
  ...e.options,
19
129
  url: e.url,
20
130
  poster: e.poster ?? ((t = e.options) == null ? void 0 : t.poster),
21
- theme: e.theme ?? ((a = e.options) == null ? void 0 : a.theme),
131
+ theme: e.theme ?? ((l = e.options) == null ? void 0 : l.theme),
22
132
  lang: e.lang ?? ((i = e.options) == null ? void 0 : i.lang),
23
- autoplay: e.autoplay ?? ((c = e.options) == null ? void 0 : c.autoplay),
24
- muted: e.muted ?? ((r = e.options) == null ? void 0 : r.muted),
25
- loop: e.loop ?? ((d = e.options) == null ? void 0 : d.loop),
26
- volume: e.volume ?? ((p = e.options) == null ? void 0 : p.volume),
27
- container: s,
28
- plugins: o
133
+ autoplay: e.autoplay ?? ((r = e.options) == null ? void 0 : r.autoplay),
134
+ muted: e.muted ?? ((c = e.options) == null ? void 0 : c.muted),
135
+ loop: e.loop ?? ((u = e.options) == null ? void 0 : u.loop),
136
+ volume: e.volume ?? ((d = e.options) == null ? void 0 : d.volume),
137
+ container: o,
138
+ plugins: a
29
139
  });
30
- }, Te = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
140
+ }, jn = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
31
141
  <path d="M17 2l4 4-4 4V7H7a3 3 0 0 0-3 3v1H2v-1a5 5 0 0 1 5-5h10V2z"/>
32
142
  <path d="M7 22l-4-4 4-4v3h10a3 3 0 0 0 3-3v-1h2v1a5 5 0 0 1-5 5H7v3z"/>
33
- </svg>`, M = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
143
+ </svg>`, xe = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
34
144
  <path d="M3 5h18v2H3V5zm0 6h18v2H3v-2zm0 6h18v2H3v-2z" opacity=".35"/>
35
145
  <circle cx="8" cy="6" r="3"/>
36
146
  <circle cx="15" cy="12" r="3"/>
37
147
  <circle cx="10" cy="18" r="3"/>
38
- </svg>`, $ = (e) => e === null ? ve : x.utils.secondToTime(e), Pe = {
148
+ </svg>`, Vn = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
149
+ <path d="M3 3h6v6H3V3zm12 0h6v6h-6V3zM3 15h6v6H3v-6zm12 0h6v6h-6v-6z"/>
150
+ </svg>`, Kn = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
151
+ <circle cx="12" cy="12" r="6"/>
152
+ <path d="M12 2v4M12 18v4M2 12h4M18 12h4"/>
153
+ </svg>`, Dn = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
154
+ <circle cx="12" cy="12" r="9" opacity=".22"/>
155
+ <circle cx="12" cy="12" r="6" opacity=".5"/>
156
+ <circle cx="12" cy="12" r="3"/>
157
+ </svg>`, Me = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
158
+ <path d="M11 5v14l-8-7 8-7z"/>
159
+ <rect x="15" y="5" width="2.4" height="14" rx="1.2"/>
160
+ </svg>`, _n = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
161
+ <rect x="2" y="2" width="20" height="20" rx="3" opacity=".28"/>
162
+ <rect x="7" y="6" width="10" height="12" rx="2"/>
163
+ </svg>`, qn = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
164
+ <rect x="3" y="4" width="18" height="16" rx="2" opacity=".28"/>
165
+ <path d="M10 8.5v7l6-3.5-6-3.5z"/>
166
+ <path d="M18 2l.8 1.7 1.7.8-1.7.8L18 7l-.8-1.7-1.7-.8 1.7-.8L18 2z"/>
167
+ </svg>`, V = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
168
+ <path d="M12 3l9 5-9 5-9-5 9-5z"/>
169
+ <path d="M4.5 12.6L12 16.8l7.5-4.2 1.5 1.4-9 5-9-5 1.5-1.4z" opacity=".55"/>
170
+ </svg>`, K = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
171
+ <path d="M17.4 3.2a2.6 2.6 0 013.4 3.4l-2.6 2.6-3.4-3.4 2.6-2.6zM13.6 6.9l3.5 3.5-8.3 8.3-3.5-3.5 8.3-8.3zM4 18.4l2.6-.9-1.7-1.7-.9 2.6z"/>
172
+ </svg>`, Ce = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="currentColor">
173
+ <circle cx="9" cy="9" r="5.2" opacity=".7"/>
174
+ <circle cx="15" cy="9" r="5.2" opacity=".7"/>
175
+ <circle cx="12" cy="14.5" r="5.2" opacity=".7"/>
176
+ </svg>`, ke = `<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8">
177
+ <rect x="7" y="2" width="10" height="20" rx="2.2"/>
178
+ <path d="M10.5 18.5h3"/>
179
+ <path d="M3 7v4M3 11l1.6-1.6M3 11l1.6 1.6" stroke-linecap="round"/>
180
+ </svg>`, $e = (e) => e === null ? Bn : Z.utils.secondToTime(e), Un = {
39
181
  key: "abLoop",
40
- label: S,
182
+ label: ye,
41
183
  defaultConfig: {
42
- offset: le
184
+ offset: xn
43
185
  },
44
- install({ art: e, setting: s, onCleanup: o }, l) {
45
- let t = null, a = null;
46
- const i = () => t === null && a === null ? E : `${$(t)} - ${$(a)}`;
47
- s({
48
- html: S,
49
- icon: Te,
50
- tooltip: E,
186
+ install({ art: e, setting: o, onCleanup: a }, n) {
187
+ let t = null, l = null;
188
+ const i = () => t === null && l === null ? be : `${$e(t)} - ${$e(l)}`;
189
+ o({
190
+ html: ye,
191
+ icon: jn,
192
+ tooltip: be,
51
193
  selector: [
52
- { html: fe, value: "start" },
53
- { html: me, value: "end" },
54
- { html: he, value: "clear" }
194
+ { html: Fn, value: "start" },
195
+ { html: Ln, value: "end" },
196
+ { html: zn, value: "clear" }
55
197
  ],
56
- onSelect: (r) => {
57
- const d = String(r.value), p = e.currentTime;
58
- return d === "start" && (t = p, a !== null && a <= t && (a = null)), d === "end" && (a = p, t !== null && a <= t && (t = null)), d === "clear" && (t = null, a = null), e.notice.show = i(), i();
198
+ onSelect: (c) => {
199
+ const u = String(c.value), d = e.currentTime;
200
+ return u === "start" && (t = d, l !== null && l <= t && (l = null)), u === "end" && (l = d, t !== null && l <= t && (t = null)), u === "clear" && (t = null, l = null), e.notice.show = i(), i();
59
201
  }
60
202
  });
61
- const c = () => {
62
- t === null || a === null || e.currentTime >= a - l.offset && (e.currentTime = t);
203
+ const r = () => {
204
+ t === null || l === null || e.currentTime >= l - n.offset && (e.currentTime = t);
63
205
  };
64
- e.on("video:timeupdate", c), o(() => e.off("video:timeupdate", c));
206
+ e.on("video:timeupdate", r), a(() => e.off("video:timeupdate", r));
65
207
  }
66
- }, v = (e) => e.cloneNode(!0), ke = {
208
+ }, H = (e) => e.cloneNode(!0), Xn = {
67
209
  key: "aspectRatio",
68
- label: ce,
210
+ label: Rn,
69
211
  defaultConfig: {
70
- ratios: X,
71
- defaultRatio: y
212
+ ratios: vn,
213
+ defaultRatio: Y
72
214
  },
73
- install({ art: e, setting: s }, o) {
74
- const l = (t) => t === y ? e.i18n.get("Default") : t;
75
- o.defaultRatio !== y && (e.aspectRatio = o.defaultRatio), s({
215
+ install({ art: e, setting: o }, a) {
216
+ const n = (t) => t === Y ? e.i18n.get("Default") : t;
217
+ a.defaultRatio !== Y && (e.aspectRatio = a.defaultRatio), o({
76
218
  html: e.i18n.get("Aspect Ratio"),
77
- icon: v(e.icons.aspectRatio),
78
- tooltip: l(o.defaultRatio),
79
- selector: o.ratios.map((t) => ({
80
- html: l(t),
219
+ icon: H(e.icons.aspectRatio),
220
+ tooltip: n(a.defaultRatio),
221
+ selector: a.ratios.map((t) => ({
222
+ html: n(t),
81
223
  value: t,
82
- default: t === o.defaultRatio
224
+ default: t === a.defaultRatio
83
225
  })),
84
226
  onSelect: (t) => {
85
- const a = String(t.value);
86
- return e.aspectRatio = a, l(a);
227
+ const l = String(t.value);
228
+ return e.aspectRatio = l, n(l);
87
229
  }
88
230
  });
89
231
  }
90
- }, w = ["brightness", "contrast", "saturate"], Ce = {
91
- brightness: ge,
92
- contrast: ye,
93
- saturate: be
94
- }, Se = {
95
- key: "filter",
232
+ }, q = (e, o) => {
233
+ const a = e.setting({
234
+ html: o.label,
235
+ icon: o.icon,
236
+ switch: o.enabled,
237
+ onSwitch: (t) => {
238
+ const l = !t.switch;
239
+ return o.onToggle(l), l;
240
+ }
241
+ }), n = e.setting({
242
+ html: o.rangeLabel,
243
+ icon: o.icon,
244
+ range: [o.value, o.min, o.max, o.step],
245
+ onChange: (t) => {
246
+ var i;
247
+ const l = Number(((i = t.$range) == null ? void 0 : i.value) ?? o.value);
248
+ return o.onRange(l), String(l);
249
+ }
250
+ });
251
+ return { switchItem: a, rangeItem: n };
252
+ }, Yn = {
253
+ key: "backgroundBlur",
254
+ label: ce,
255
+ defaultConfig: {
256
+ enabled: !1,
257
+ radius: dt,
258
+ min: ht,
259
+ max: mt,
260
+ step: pt
261
+ },
262
+ install({ frame: e, setting: o, onCleanup: a }, n) {
263
+ let t = n.enabled, l = n.radius, i;
264
+ const r = () => {
265
+ e.set("backgroundBlur", t && l > 0 ? { radius: l, overscan: vt } : null);
266
+ };
267
+ i = q(
268
+ { setting: o },
269
+ {
270
+ label: ce,
271
+ icon: _n,
272
+ rangeLabel: Kt,
273
+ enabled: t,
274
+ value: l,
275
+ min: n.min,
276
+ max: n.max,
277
+ step: n.step,
278
+ onToggle: (c) => {
279
+ t = c, r();
280
+ },
281
+ onRange: (c) => {
282
+ l = c, t || (t = !0, i && (i.switchItem.switch = !0)), r();
283
+ }
284
+ }
285
+ ), r(), a(() => e.set("backgroundBlur", null));
286
+ }
287
+ }, Qn = {
288
+ key: "blur",
289
+ label: se,
290
+ defaultConfig: {
291
+ enabled: !1,
292
+ radius: st,
293
+ min: rt,
294
+ max: ct,
295
+ step: ut
296
+ },
297
+ install({ frame: e, setting: o, onCleanup: a }, n) {
298
+ let t = n.enabled, l = n.radius, i;
299
+ const r = () => {
300
+ e.set("blur", t && l > 0 ? { radius: l } : null);
301
+ };
302
+ i = q(
303
+ { setting: o },
304
+ {
305
+ label: se,
306
+ icon: Dn,
307
+ rangeLabel: Vt,
308
+ enabled: t,
309
+ value: l,
310
+ min: n.min,
311
+ max: n.max,
312
+ step: n.step,
313
+ onToggle: (c) => {
314
+ t = c, r();
315
+ },
316
+ onRange: (c) => {
317
+ l = c, t || (t = !0, i && (i.switchItem.switch = !0)), r();
318
+ }
319
+ }
320
+ ), r(), a(() => e.set("blur", null));
321
+ }
322
+ }, Gn = {
323
+ key: "chromaKey",
96
324
  label: de,
97
325
  defaultConfig: {
98
- brightness: b,
99
- contrast: b,
100
- saturate: b,
101
- min: oe,
102
- max: ae,
103
- step: ie
326
+ enabled: !1,
327
+ color: Rt,
328
+ similarity: St,
329
+ smoothness: Tt,
330
+ similarityMin: Pt,
331
+ similarityMax: It,
332
+ smoothnessMin: Ft,
333
+ smoothnessMax: Lt
104
334
  },
105
- install({ art: e, setting: s, onCleanup: o }, l) {
335
+ install({ art: e, frame: o, setting: a, onCleanup: n }, t) {
336
+ let l = t.enabled, i = t.color, r = t.similarity, c = t.smoothness, u, d, x;
337
+ const w = () => {
338
+ o.set("chromaKey", l ? { color: i, similarity: r, smoothness: c } : null);
339
+ }, v = () => {
340
+ l || (l = !0, u && (u.switch = !0));
341
+ }, s = () => {
342
+ x && (e.template.$player.removeEventListener("click", x, !0), x = void 0);
343
+ }, f = () => {
344
+ s(), e.notice.show = qt, x = (y) => {
345
+ y.stopPropagation(), s();
346
+ const C = o.pickColor(y.clientX, y.clientY);
347
+ if (!C) {
348
+ e.notice.show = Yt;
349
+ return;
350
+ }
351
+ i = C, d && (d.tooltip = C), v(), w();
352
+ }, e.template.$player.addEventListener("click", x, !0);
353
+ };
354
+ u = a({
355
+ html: de,
356
+ icon: K,
357
+ switch: l,
358
+ onSwitch: (y) => (l = !y.switch, w(), l)
359
+ }), d = a({
360
+ html: _t,
361
+ icon: K,
362
+ tooltip: i,
363
+ onClick: () => (f(), i)
364
+ }), a({
365
+ html: Ut,
366
+ icon: K,
367
+ range: [r, t.similarityMin, t.similarityMax, 0.01],
368
+ onChange: (y) => {
369
+ var C;
370
+ return r = Number(((C = y.$range) == null ? void 0 : C.value) ?? r), v(), w(), `${Math.round(r * 100)}%`;
371
+ }
372
+ }), a({
373
+ html: Xt,
374
+ icon: K,
375
+ range: [c, t.smoothnessMin, t.smoothnessMax, 0.01],
376
+ onChange: (y) => {
377
+ var C;
378
+ return c = Number(((C = y.$range) == null ? void 0 : C.value) ?? c), v(), w(), `${Math.round(c * 100)}%`;
379
+ }
380
+ }), w(), n(() => {
381
+ s(), o.set("chromaKey", null);
382
+ });
383
+ }
384
+ }, G = ["brightness", "contrast", "saturate"], Jn = {
385
+ brightness: En,
386
+ contrast: Wn,
387
+ saturate: Hn
388
+ }, Zn = {
389
+ key: "filter",
390
+ label: In,
391
+ defaultConfig: {
392
+ brightness: Q,
393
+ contrast: Q,
394
+ saturate: Q,
395
+ min: Mn,
396
+ max: Cn,
397
+ step: kn
398
+ },
399
+ install({ setting: e, onCleanup: o, cssFilter: a }, n) {
106
400
  const t = {
107
- brightness: l.brightness,
108
- contrast: l.contrast,
109
- saturate: l.saturate
110
- }, a = [], i = () => {
111
- e.video.style.filter = w.map((c) => `${c}(${t[c]}%)`).join(" ");
401
+ brightness: n.brightness,
402
+ contrast: n.contrast,
403
+ saturate: n.saturate
404
+ }, l = [], i = () => {
405
+ a.set("adjust", G.map((r) => `${r}(${t[r]}%)`).join(" "));
112
406
  };
113
- w.forEach((c) => {
114
- const r = s({
115
- html: Ce[c],
116
- icon: M,
117
- range: [t[c], l.min, l.max, l.step],
407
+ G.forEach((r) => {
408
+ const c = e({
409
+ html: Jn[r],
410
+ icon: xe,
411
+ range: [t[r], n.min, n.max, n.step],
118
412
  // 返回值会写回菜单项右侧的副标题
119
- onChange: (d) => {
120
- var p;
121
- return t[c] = Number(((p = d.$range) == null ? void 0 : p.value) ?? t[c]), i(), `${t[c]}%`;
413
+ onChange: (u) => {
414
+ var d;
415
+ return t[r] = Number(((d = u.$range) == null ? void 0 : d.value) ?? t[r]), i(), `${t[r]}%`;
122
416
  }
123
417
  });
124
- a.push({ key: c, item: r });
125
- }), s({
126
- html: we,
127
- icon: M,
128
- tooltip: `${l.brightness}%`,
129
- onClick: () => (w.forEach((c) => {
130
- t[c] = l[c];
131
- }), a.forEach(({ key: c, item: r }) => {
132
- r.$range && (r.$range.value = String(t[c]));
133
- }), i(), `${l.brightness}%`)
418
+ l.push({ key: r, item: c });
419
+ }), e({
420
+ html: Nn,
421
+ icon: xe,
422
+ tooltip: `${n.brightness}%`,
423
+ onClick: () => (G.forEach((r) => {
424
+ t[r] = n[r];
425
+ }), l.forEach(({ key: r, item: c }) => {
426
+ c.$range && (c.$range.value = String(t[r]));
427
+ }), i(), `${n.brightness}%`)
134
428
  }), i(), o(() => {
135
- e.video.style.filter = "";
429
+ a.remove("adjust");
136
430
  });
137
431
  }
138
- }, Ee = {
432
+ }, eo = {
139
433
  normal: "Normal",
140
434
  horizontal: "Horizontal",
141
435
  vertical: "Vertical"
142
- }, Le = {
436
+ }, to = {
143
437
  key: "flip",
144
- label: ue,
438
+ label: Sn,
145
439
  defaultConfig: {
146
- modes: Y,
147
- defaultMode: C
440
+ modes: fn,
441
+ defaultMode: ge
148
442
  },
149
- install({ art: e, setting: s }, o) {
150
- const l = (t) => e.i18n.get(Ee[t]);
151
- o.defaultMode !== C && (e.flip = o.defaultMode), s({
443
+ install({ art: e, setting: o }, a) {
444
+ const n = (t) => e.i18n.get(eo[t]);
445
+ a.defaultMode !== ge && (e.flip = a.defaultMode), o({
152
446
  html: e.i18n.get("Video Flip"),
153
- icon: v(e.icons.flip),
154
- tooltip: l(o.defaultMode),
155
- selector: o.modes.map((t) => ({
156
- html: l(t),
447
+ icon: H(e.icons.flip),
448
+ tooltip: n(a.defaultMode),
449
+ selector: a.modes.map((t) => ({
450
+ html: n(t),
157
451
  value: t,
158
- default: t === o.defaultMode
452
+ default: t === a.defaultMode
159
453
  })),
160
454
  onSelect: (t) => {
161
- const a = String(t.value);
162
- return e.flip = a, l(a);
455
+ const l = String(t.value);
456
+ return e.flip = l, n(l);
163
457
  }
164
458
  });
165
459
  }
166
- }, B = () => "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, Me = {
460
+ }, ee = () => {
461
+ if (typeof document > "u" || document.head.querySelector(`style[${ve}]`)) return;
462
+ const e = document.createElement("style");
463
+ e.setAttribute(ve, ""), e.textContent = sn, document.head.appendChild(e);
464
+ }, no = {
465
+ key: "intro",
466
+ label: Ye,
467
+ defaultConfig: {
468
+ image: "",
469
+ text: gt,
470
+ duration: yt,
471
+ delay: bt,
472
+ once: !0
473
+ },
474
+ install({ art: e, setting: o, onCleanup: a }, n) {
475
+ ee();
476
+ let t, l = 0;
477
+ const i = () => {
478
+ l && (window.clearTimeout(l), l = 0), t == null || t.remove(), t = void 0;
479
+ }, r = () => {
480
+ if (i(), !n.image && !n.text) return;
481
+ const u = document.createElement("div");
482
+ if (u.className = _, n.image) {
483
+ const d = document.createElement("img");
484
+ d.className = Ie, d.src = n.image, d.alt = "", u.appendChild(d);
485
+ }
486
+ if (n.text) {
487
+ const d = document.createElement("div");
488
+ d.className = Pe, d.textContent = n.text, u.appendChild(d);
489
+ }
490
+ e.template.$player.appendChild(u), t = u, l = window.setTimeout(
491
+ () => {
492
+ u.classList.add(`${_}--out`), l = window.setTimeout(i, 400);
493
+ },
494
+ Math.max(0, n.duration)
495
+ );
496
+ }, c = () => {
497
+ if (n.delay > 0) {
498
+ l = window.setTimeout(r, n.delay);
499
+ return;
500
+ }
501
+ r();
502
+ };
503
+ n.once ? e.once("play", c) : e.on("play", c), o({
504
+ html: tn,
505
+ icon: qn,
506
+ onClick: () => (r(), "")
507
+ }), a(() => {
508
+ i(), e.off("play", c);
509
+ });
510
+ }
511
+ }, oo = {
512
+ key: "mosaic",
513
+ label: ae,
514
+ defaultConfig: {
515
+ enabled: !1,
516
+ size: Ze,
517
+ min: et,
518
+ max: tt,
519
+ step: nt
520
+ },
521
+ install({ frame: e, setting: o, onCleanup: a }, n) {
522
+ let t = n.enabled, l = n.size, i;
523
+ const r = () => {
524
+ e.set("mosaic", t ? { size: l } : null);
525
+ };
526
+ i = q(
527
+ { setting: o },
528
+ {
529
+ label: ae,
530
+ icon: Vn,
531
+ rangeLabel: At,
532
+ enabled: t,
533
+ value: l,
534
+ min: n.min,
535
+ max: n.max,
536
+ step: n.step,
537
+ onToggle: (c) => {
538
+ t = c, r();
539
+ },
540
+ onRange: (c) => {
541
+ l = c, t || (t = !0, i && (i.switchItem.switch = !0)), r();
542
+ }
543
+ }
544
+ ), r(), a(() => e.set("mosaic", null));
545
+ }
546
+ }, Re = (e) => Math.min(100, Math.max(0, e)), lo = {
547
+ key: "overlay",
548
+ label: ue,
549
+ defaultConfig: {
550
+ src: "",
551
+ type: "image",
552
+ x: wt,
553
+ y: xt,
554
+ width: Mt,
555
+ opacity: Ct,
556
+ draggable: !0,
557
+ loop: !0
558
+ },
559
+ install({ art: e, setting: o, onCleanup: a }, n) {
560
+ ee();
561
+ let t, l, i = { x: n.x, y: n.y }, r = n.width, c = n.opacity;
562
+ const u = () => {
563
+ t && (t.style.left = `${i.x}%`, t.style.top = `${i.y}%`, t.style.width = `${r}%`, t.style.opacity = String(c));
564
+ }, d = (v) => {
565
+ let s, f;
566
+ const y = () => {
567
+ s && window.removeEventListener("pointermove", s), f && window.removeEventListener("pointerup", f), s = void 0, f = void 0;
568
+ }, C = (F) => {
569
+ F.preventDefault(), F.stopPropagation();
570
+ const L = e.template.$player.getBoundingClientRect();
571
+ s = (j) => {
572
+ i = {
573
+ x: Re((j.clientX - L.left) / L.width * 100),
574
+ y: Re((j.clientY - L.top) / L.height * 100)
575
+ }, u();
576
+ }, f = y, window.addEventListener("pointermove", s), window.addEventListener("pointerup", f);
577
+ };
578
+ v.addEventListener("pointerdown", C), a(() => {
579
+ v.removeEventListener("pointerdown", C), y();
580
+ });
581
+ }, x = () => {
582
+ if (t) return;
583
+ if (!n.src) {
584
+ e.notice.show = an;
585
+ return;
586
+ }
587
+ const v = document.createElement("div");
588
+ if (v.className = n.draggable ? `${E} ${E}--draggable` : E, n.type === "video") {
589
+ const s = document.createElement("video");
590
+ s.src = n.src, s.muted = !0, s.loop = n.loop, s.autoplay = !0, s.playsInline = !0, s.play().catch(() => {
591
+ }), v.appendChild(s);
592
+ } else {
593
+ const s = document.createElement("img");
594
+ s.src = n.src, s.alt = "", v.appendChild(s);
595
+ }
596
+ e.template.$player.appendChild(v), t = v, u(), n.draggable && d(v);
597
+ }, w = () => {
598
+ t == null || t.remove(), t = void 0;
599
+ };
600
+ l = o({
601
+ html: ue,
602
+ icon: V,
603
+ switch: !!n.src,
604
+ onSwitch: (v) => {
605
+ const s = !v.switch;
606
+ return s ? x() : w(), s;
607
+ }
608
+ }), o({
609
+ html: nn,
610
+ icon: V,
611
+ range: [c, 0, 1, 0.05],
612
+ onChange: (v) => {
613
+ var s;
614
+ return c = Number(((s = v.$range) == null ? void 0 : s.value) ?? c), u(), `${Math.round(c * 100)}%`;
615
+ }
616
+ }), o({
617
+ html: on,
618
+ icon: V,
619
+ range: [r, kt, $t, 1],
620
+ onChange: (v) => {
621
+ var s;
622
+ return r = Number(((s = v.$range) == null ? void 0 : s.value) ?? r), u(), `${r}%`;
623
+ }
624
+ }), o({
625
+ html: ln,
626
+ icon: V,
627
+ onClick: () => (i = { x: n.x, y: n.y }, u(), "")
628
+ }), l.switch && x(), a(w);
629
+ }
630
+ }, Se = () => "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ao = {
167
631
  key: "pip",
168
- label: pe,
632
+ label: Pn,
169
633
  defaultConfig: {
170
634
  autoEnter: !1
171
635
  },
172
- install({ art: e, setting: s, onCleanup: o }, l) {
173
- const t = s({
636
+ install({ art: e, setting: o, onCleanup: a }, n) {
637
+ const t = o({
174
638
  html: e.i18n.get("PIP Mode"),
175
- icon: v(e.icons.pip),
639
+ icon: H(e.icons.pip),
176
640
  switch: e.pip,
177
641
  onSwitch: () => {
178
- const a = !e.pip;
179
- return B() ? (e.pip = a, a) : (e.notice.show = e.i18n.get("PIP Not Supported"), e.pip);
642
+ const l = !e.pip;
643
+ return Se() ? (e.pip = l, l) : (e.notice.show = e.i18n.get("PIP Not Supported"), e.pip);
180
644
  }
181
645
  });
182
- if (e.on("pip", (a) => {
183
- t.switch = a;
184
- }), l.autoEnter) {
185
- const a = () => {
186
- document.visibilityState === "hidden" && e.playing && B() && (e.pip = !0);
646
+ if (e.on("pip", (l) => {
647
+ t.switch = l;
648
+ }), n.autoEnter) {
649
+ const l = () => {
650
+ document.visibilityState === "hidden" && e.playing && Se() && (e.pip = !0);
187
651
  };
188
- document.addEventListener("visibilitychange", a), o(() => document.removeEventListener("visibilitychange", a));
652
+ document.addEventListener("visibilitychange", l), a(() => document.removeEventListener("visibilitychange", l));
189
653
  }
190
654
  }
191
- }, R = (e) => `${e}x`, $e = {
655
+ }, J = (e) => `${e}x`, io = {
192
656
  key: "playbackRate",
193
- label: se,
657
+ label: $n,
194
658
  defaultConfig: {
195
- rates: J,
196
- defaultRate: k
659
+ rates: pn,
660
+ defaultRate: fe
197
661
  },
198
- install({ art: e, setting: s }, o) {
199
- o.defaultRate !== k && (e.playbackRate = o.defaultRate), s({
662
+ install({ art: e, setting: o }, a) {
663
+ a.defaultRate !== fe && (e.playbackRate = a.defaultRate), o({
200
664
  html: e.i18n.get("Play Speed"),
201
- icon: v(e.icons.playbackRate),
202
- tooltip: R(o.defaultRate),
203
- selector: o.rates.map((l) => ({
204
- html: R(l),
205
- value: l,
206
- default: l === o.defaultRate
665
+ icon: H(e.icons.playbackRate),
666
+ tooltip: J(a.defaultRate),
667
+ selector: a.rates.map((n) => ({
668
+ html: J(n),
669
+ value: n,
670
+ default: n === a.defaultRate
207
671
  })),
208
672
  // 返回值会写回菜单项右侧的副标题
209
- onSelect: (l) => {
210
- const t = Number(l.value);
211
- return Number.isNaN(t) ? "" : (e.playbackRate = t, R(t));
673
+ onSelect: (n) => {
674
+ const t = Number(n.value);
675
+ return Number.isNaN(t) ? "" : (e.playbackRate = t, J(t));
676
+ }
677
+ });
678
+ }
679
+ }, so = [0.5, 1, 1.5, 2], ro = {
680
+ key: "reverse",
681
+ label: re,
682
+ defaultConfig: {
683
+ enabled: !1,
684
+ rate: ft
685
+ },
686
+ install({ art: e, setting: o, onCleanup: a }, n) {
687
+ let t = n.enabled, l = n.rate, i = 0, r = 0, c;
688
+ const u = () => {
689
+ i && cancelAnimationFrame(i), i = 0;
690
+ }, d = (v) => {
691
+ const s = e.video, f = Math.max(0, (v - r) / 1e3);
692
+ r = v;
693
+ const y = s.currentTime - f * l;
694
+ if (y > 0) {
695
+ s.currentTime = y, i = requestAnimationFrame(d);
696
+ return;
697
+ }
698
+ if (s.loop && e.duration > 0) {
699
+ s.currentTime = e.duration, i = requestAnimationFrame(d);
700
+ return;
701
+ }
702
+ s.currentTime = 0, u(), t = !1, c && (c.switch = !1);
703
+ }, x = () => {
704
+ e.pause(), u(), r = performance.now(), i = requestAnimationFrame(d);
705
+ }, w = () => {
706
+ t && (t = !1, u(), c && (c.switch = !1));
707
+ };
708
+ c = o({
709
+ html: re,
710
+ icon: Me,
711
+ switch: t,
712
+ onSwitch: (v) => {
713
+ const s = !v.switch;
714
+ return t = s, s ? x() : u(), s;
212
715
  }
716
+ }), o({
717
+ html: Dt,
718
+ icon: Me,
719
+ tooltip: `${l}x`,
720
+ selector: so.map((v) => ({
721
+ html: `${v}x`,
722
+ value: v,
723
+ default: v === l
724
+ })),
725
+ onSelect: (v) => (l = Number(v.value), `${l}x`)
726
+ }), e.on("play", w), t && x(), a(() => {
727
+ u(), e.off("play", w);
213
728
  });
214
729
  }
215
- }, Be = (e) => x.utils.secondToTime(e).replace(/:/g, "-"), ze = (e, s) => {
730
+ }, co = (e) => Z.utils.secondToTime(e).replace(/:/g, "-"), uo = (e, o) => {
216
731
  if (!e.videoWidth || !e.videoHeight) return null;
217
- const o = document.createElement("canvas");
218
- o.width = e.videoWidth, o.height = e.videoHeight;
219
- const l = o.getContext("2d");
220
- if (!l) return null;
732
+ const a = document.createElement("canvas");
733
+ a.width = e.videoWidth, a.height = e.videoHeight;
734
+ const n = a.getContext("2d");
735
+ if (!n) return null;
221
736
  const t = e.style.filter;
222
- return t && (l.filter = t), l.drawImage(e, 0, 0, o.width, o.height), { dataUrl: o.toDataURL(s.type, s.quality), time: e.currentTime };
223
- }, Fe = {
737
+ return t && (n.filter = t), n.drawImage(e, 0, 0, a.width, a.height), { dataUrl: a.toDataURL(o.type, o.quality), time: e.currentTime };
738
+ }, ho = {
224
739
  key: "screenshot",
225
- label: re,
740
+ label: Tn,
226
741
  defaultConfig: {
227
- filename: Z,
228
- type: ee,
229
- quality: te,
742
+ filename: gn,
743
+ type: yn,
744
+ quality: bn,
230
745
  download: !0
231
746
  },
232
- install({ art: e, setting: s }, o) {
233
- const l = () => o.type.replace("image/", "").toUpperCase();
234
- s({
747
+ install({ art: e, setting: o }, a) {
748
+ const n = () => a.type.replace("image/", "").toUpperCase();
749
+ o({
235
750
  html: e.i18n.get("Screenshot"),
236
- icon: v(e.icons.screenshot),
237
- tooltip: l(),
751
+ icon: H(e.icons.screenshot),
752
+ tooltip: n(),
238
753
  onClick: async () => {
239
754
  var t;
240
755
  try {
241
- const a = ze(e.video, o);
242
- if (!a) return l();
243
- if (o.download) {
244
- const i = await (await fetch(a.dataUrl)).blob();
245
- D(`${o.filename}_${Be(a.time)}.${ne[o.type]}`, i);
756
+ const l = uo(e.video, a);
757
+ if (!l) return n();
758
+ if (a.download) {
759
+ const i = await (await fetch(l.dataUrl)).blob();
760
+ Ue(`${a.filename}_${co(l.time)}.${wn[a.type]}`, i);
246
761
  }
247
- (t = o.onCapture) == null || t.call(o, a), e.emit("screenshot", a.dataUrl);
248
- } catch (a) {
249
- console.warn(`[${z}] ${L}`, a), e.notice.show = L;
762
+ (t = a.onCapture) == null || t.call(a, l), e.emit("screenshot", l.dataUrl);
763
+ } catch (l) {
764
+ console.warn(`[${ze}] ${we}`, l), e.notice.show = we;
250
765
  }
251
- return l();
766
+ return n();
252
767
  }
253
768
  });
254
769
  }
255
- }, Ne = [
256
- $e,
257
- ke,
258
- Le,
259
- Fe,
260
- Me,
261
- Pe,
262
- Se
263
- ], g = new Map(Ne.map((e) => [e.key, e])), qe = (e) => (g.set(e.key, e), e), De = (e) => e, Ke = (e, s) => ({ key: e, setting: s }), Qe = (e) => g.get(e), Ge = () => [...g.values()], He = (e) => typeof e == "string" ? { key: e } : e, Ie = (e = []) => {
264
- const s = /* @__PURE__ */ new Map();
265
- return e.forEach((o) => {
266
- const l = He(o), t = g.get(l.key);
770
+ }, mo = {
771
+ key: "stabilizer",
772
+ label: ie,
773
+ defaultConfig: {
774
+ enabled: !1,
775
+ strength: ot,
776
+ min: lt,
777
+ max: at,
778
+ step: it
779
+ },
780
+ install({ frame: e, setting: o, onCleanup: a }, n) {
781
+ let t = n.enabled, l = n.strength, i;
782
+ const r = () => {
783
+ e.set("stabilizer", t && l > 0 ? { strength: l } : null);
784
+ };
785
+ i = q(
786
+ { setting: o },
787
+ {
788
+ label: ie,
789
+ icon: Kn,
790
+ rangeLabel: jt,
791
+ enabled: t,
792
+ value: l,
793
+ min: n.min,
794
+ max: n.max,
795
+ step: n.step,
796
+ onToggle: (c) => {
797
+ t = c, r();
798
+ },
799
+ onRange: (c) => {
800
+ l = c, t || (t = !0, i && (i.switchItem.switch = !0)), r();
801
+ }
802
+ }
803
+ ), r(), a(() => e.set("stabilizer", null));
804
+ }
805
+ }, D = {
806
+ crop: Jt,
807
+ contain: Zt,
808
+ rotate: en
809
+ }, po = {
810
+ key: "vertical",
811
+ label: me,
812
+ defaultConfig: {
813
+ enabled: !1,
814
+ mode: Ot,
815
+ ratio: Nt
816
+ },
817
+ install({ art: e, setting: o, frame: a, onCleanup: n }, t) {
818
+ let l = t.enabled, i = t.mode, r = e.aspectRatio;
819
+ const c = () => {
820
+ if (!l) {
821
+ e.aspectRatio = r, a.set("vertical", null);
822
+ return;
823
+ }
824
+ e.aspectRatio = t.ratio, a.set(
825
+ "vertical",
826
+ i === "rotate" ? { fit: "cover", rotate: 90 } : { fit: i === "contain" ? "contain" : "cover", rotate: 0 }
827
+ );
828
+ };
829
+ o({
830
+ html: me,
831
+ icon: ke,
832
+ switch: l,
833
+ onSwitch: (u) => {
834
+ const d = !u.switch;
835
+ return d && !l && (r = e.aspectRatio), l = d, c(), d;
836
+ }
837
+ }), o({
838
+ html: Gt,
839
+ icon: ke,
840
+ tooltip: D[i],
841
+ selector: Object.keys(D).map((u) => ({
842
+ html: D[u],
843
+ value: u,
844
+ default: u === i
845
+ })),
846
+ onSelect: (u) => (i = String(u.value), c(), D[i])
847
+ }), c(), n(() => {
848
+ a.set("vertical", null), e.aspectRatio = r;
849
+ });
850
+ }
851
+ }, vo = {
852
+ key: "videoFilter",
853
+ label: he,
854
+ defaultConfig: {
855
+ preset: zt,
856
+ intensity: Bt,
857
+ presets: cn,
858
+ min: Et,
859
+ max: Wt,
860
+ step: Ht
861
+ },
862
+ install({ setting: e, onCleanup: o, cssFilter: a }, n) {
863
+ let t = n.preset, l = n.intensity;
864
+ const i = (c) => `${Math.round(c * 100)}%`, r = () => {
865
+ const c = t === "none" || l <= 0 ? "" : Le(t, l);
866
+ a.set("preset", c);
867
+ };
868
+ e({
869
+ html: he,
870
+ icon: Ce,
871
+ tooltip: X[t],
872
+ selector: n.presets.map((c) => ({
873
+ html: X[c],
874
+ value: c,
875
+ default: c === t
876
+ })),
877
+ onSelect: (c) => (t = String(c.value), r(), X[t])
878
+ }), e({
879
+ html: Qt,
880
+ icon: Ce,
881
+ range: [l, n.min, n.max, n.step],
882
+ onChange: (c) => {
883
+ var u;
884
+ return l = Number(((u = c.$range) == null ? void 0 : u.value) ?? l), r(), i(l);
885
+ }
886
+ }), r(), o(() => a.remove("preset"));
887
+ }
888
+ }, fo = {
889
+ key: "webFullscreen",
890
+ label: Xe,
891
+ defaultConfig: {
892
+ defaultOn: Je
893
+ },
894
+ install({ art: e, setting: o }, a) {
895
+ const n = o({
896
+ html: e.i18n.get("Web Fullscreen"),
897
+ icon: H(e.icons.fullscreenWebOff),
898
+ switch: a.defaultOn,
899
+ onSwitch: () => (e.fullscreenWeb = !e.fullscreenWeb, e.fullscreenWeb)
900
+ });
901
+ e.on("fullscreenWeb", (t) => {
902
+ n.switch = t;
903
+ }), a.defaultOn && !e.fullscreenWeb && (e.fullscreenWeb = !0);
904
+ }
905
+ }, go = [
906
+ io,
907
+ Xn,
908
+ to,
909
+ fo,
910
+ ho,
911
+ ao,
912
+ Un,
913
+ Zn,
914
+ vo,
915
+ oo,
916
+ Qn,
917
+ Yn,
918
+ mo,
919
+ Gn,
920
+ po,
921
+ ro,
922
+ no,
923
+ lo
924
+ ], yo = (e) => {
925
+ const o = /* @__PURE__ */ new Map(), a = () => [...o.values()].map((t) => t.trim()).filter(Boolean).join(" "), n = () => {
926
+ e.video.style.filter = a();
927
+ };
928
+ return {
929
+ set: (t, l) => {
930
+ o.set(t, l), n();
931
+ },
932
+ remove: (t) => {
933
+ o.delete(t), n();
934
+ },
935
+ clear: () => {
936
+ o.clear(), n();
937
+ },
938
+ get value() {
939
+ return a();
940
+ }
941
+ };
942
+ }, bo = {
943
+ set: () => {
944
+ },
945
+ get: () => null,
946
+ pickColor: () => null,
947
+ dispose: () => {
948
+ }
949
+ }, wo = () => typeof document < "u" && typeof HTMLCanvasElement < "u", O = (e, o) => {
950
+ const a = document.createElement("canvas");
951
+ a.width = Math.max(1, Math.round(e)), a.height = Math.max(1, Math.round(o));
952
+ const n = a.getContext("2d", { willReadFrequently: !0 });
953
+ return n ? { canvas: a, context: n } : null;
954
+ }, A = (e, o, a) => {
955
+ const n = Math.max(1, Math.round(o)), t = Math.max(1, Math.round(a));
956
+ e.canvas.width === n && e.canvas.height === t || (e.canvas.width = n, e.canvas.height = t);
957
+ }, xo = (e) => {
958
+ const o = e.trim().replace("#", ""), a = o.length === 3 ? [...o].map((t) => `${t}${t}`).join("") : o;
959
+ if (!/^[0-9a-f]{6}$/i.test(a)) return null;
960
+ const n = Number.parseInt(a, 16);
961
+ return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
962
+ }, Mo = (e, o, a) => `#${[e, o, a].map(
963
+ (n) => Math.max(0, Math.min(255, Math.round(n))).toString(16).padStart(2, "0")
964
+ ).join("")}`, Te = (e, o, a, n, t) => {
965
+ const l = o.width, i = o.height, r = t.rotate === 90;
966
+ if (e.save(), e.translate(a / 2, n / 2), r && e.rotate(Math.PI / 2), t.fit === "fill" && !r && !t.overscan) {
967
+ e.drawImage(o, -a / 2, -n / 2, a, n), e.restore();
968
+ return;
969
+ }
970
+ const c = r ? i : l, u = r ? l : i, x = (t.fit === "cover" ? Math.max(a / c, n / u) : Math.min(a / c, n / u)) * (t.overscan ?? 1), w = l * x, v = i * x;
971
+ e.drawImage(o, -w / 2, -v / 2, w, v), e.restore();
972
+ }, Co = (e) => {
973
+ if (!wo()) return bo;
974
+ const o = {}, a = o;
975
+ let n, t = null, l = null, i = null, r = null, c = null, u = null, d = 0, x = !1, w = -1;
976
+ const v = () => {
977
+ if (n) return;
978
+ ee();
979
+ const h = document.createElement("canvas");
980
+ h.className = Fe, t = h.getContext("2d"), e.template.$player.appendChild(h), n = h;
981
+ }, s = () => {
982
+ const h = Math.min(typeof window > "u" ? 1 : window.devicePixelRatio || 1, Ge), p = Math.max(1, Math.round(e.video.clientWidth * h)), m = Math.max(1, Math.round(e.video.clientHeight * h));
983
+ return n ? ((n.width !== p || n.height !== m) && (n.width = p, n.height = m), { width: p, height: m }) : { width: p, height: m };
984
+ }, f = (h, p) => {
985
+ const m = o.chromaKey ? pe : Qe, b = Math.min(1, m / Math.max(h, p)), M = Math.round(h * b), g = Math.round(p * b);
986
+ return l ? A(l, M, g) : l = O(M, g), l;
987
+ }, y = (h, p) => {
988
+ const m = xo(p.color);
989
+ if (!m) return;
990
+ const { width: b, height: M } = h.canvas;
991
+ let g;
992
+ try {
993
+ g = h.context.getImageData(0, 0, b, M);
994
+ } catch {
995
+ return;
996
+ }
997
+ const k = g.data, z = Math.sqrt(3) * 255, T = Math.min(1, Math.max(0, p.similarity)) * z, S = Math.max(1, Math.min(1, Math.max(0, p.smoothness)) * z);
998
+ for (let $ = 0; $ < k.length; $ += 4) {
999
+ const P = k[$] - m.r, W = k[$ + 1] - m.g, N = k[$ + 2] - m.b, I = Math.sqrt(P * P + W * W + N * N);
1000
+ I <= T ? k[$ + 3] = 0 : I < T + S && (k[$ + 3] = Math.round((I - T) / S * 255));
1001
+ }
1002
+ h.context.putImageData(g, 0, 0);
1003
+ }, C = (h, p) => {
1004
+ const m = Math.max(2, Math.round(p)), { width: b, height: M } = h.canvas, g = Math.max(1, Math.floor(b / m)), k = Math.max(1, Math.floor(M / m));
1005
+ i ? A(i, g, k) : i = O(g, k), i && (i.context.imageSmoothingEnabled = !1, i.context.clearRect(0, 0, g, k), i.context.drawImage(h.canvas, 0, 0, g, k), h.context.imageSmoothingEnabled = !1, h.context.clearRect(0, 0, b, M), h.context.drawImage(i.canvas, 0, 0, g, k, 0, 0, b, M), h.context.imageSmoothingEnabled = !0);
1006
+ }, F = () => {
1007
+ const h = [], p = e.video.style.filter;
1008
+ if (p && h.push(p), o.blur && o.blur.radius > 0 && h.push(`blur(${o.blur.radius}px)`), o.videoFilter) {
1009
+ const m = Le(o.videoFilter.preset, o.videoFilter.intensity);
1010
+ m && h.push(m);
1011
+ }
1012
+ return h.join(" ");
1013
+ }, L = () => {
1014
+ const h = o.vertical;
1015
+ if (h) return h.fit;
1016
+ if (o.backgroundBlur) return "contain";
1017
+ const p = e.video.style.objectFit;
1018
+ return p === "contain" || p === "cover" ? p : "fill";
1019
+ }, j = () => {
1020
+ if (!n || !t) return;
1021
+ const h = e.video;
1022
+ if (!h.videoWidth || !h.videoHeight) return;
1023
+ const p = f(h.videoWidth, h.videoHeight);
1024
+ if (!p) return;
1025
+ const { width: m, height: b } = p.canvas;
1026
+ p.context.clearRect(0, 0, m, b), p.context.drawImage(h, 0, 0, m, b), o.chromaKey && y(p, o.chromaKey), o.mosaic && C(p, o.mosaic.size);
1027
+ const { width: M, height: g } = s();
1028
+ if (r ? A(r, M, g) : r = O(M, g), !r) return;
1029
+ const k = o.vertical, z = L(), T = (k == null ? void 0 : k.rotate) ?? 0, S = F(), $ = o.backgroundBlur;
1030
+ r.context.clearRect(0, 0, M, g), $ && $.radius > 0 && (r.context.save(), r.context.filter = [`blur(${$.radius}px)`, S].filter(Boolean).join(" "), Te(r.context, p.canvas, M, g, {
1031
+ fit: "cover",
1032
+ rotate: 0,
1033
+ overscan: $.overscan
1034
+ }), r.context.restore()), r.context.save(), S && (r.context.filter = S), Te(r.context, p.canvas, M, g, { fit: z, rotate: T }), r.context.restore(), t.clearRect(0, 0, M, g), t.drawImage(r.canvas, 0, 0);
1035
+ const P = o.stabilizer;
1036
+ P && P.strength > 0 && r && (c ? A(c, M, g) : c = O(M, g), c && (t.globalAlpha = Math.min(0.9, Math.max(0, P.strength)), t.drawImage(c.canvas, 0, 0, M, g), t.globalAlpha = 1, c.context.clearRect(0, 0, M, g), c.context.drawImage(r.canvas, 0, 0)));
1037
+ }, Be = () => Object.values(o).some(Boolean), te = () => {
1038
+ if (x) return;
1039
+ d = requestAnimationFrame(te);
1040
+ const h = e.video;
1041
+ if (!n) return;
1042
+ const p = h.readyState >= 2 && h.videoWidth > 0;
1043
+ n.style.visibility = p ? "visible" : "hidden", p && (!e.playing && h.currentTime === w || (w = h.currentTime, j()));
1044
+ }, Ee = () => {
1045
+ v(), n && (n.style.visibility = "hidden"), w = -1, d || (d = requestAnimationFrame(te));
1046
+ }, ne = () => {
1047
+ d && cancelAnimationFrame(d), d = 0, w = -1, n && (n.style.visibility = "hidden");
1048
+ };
1049
+ return { set: (h, p) => {
1050
+ x || (p ? a[h] = p : delete a[h], Be() ? Ee() : ne());
1051
+ }, get: (h) => o[h] ?? null, pickColor: (h, p) => {
1052
+ var N;
1053
+ const m = e.video;
1054
+ if (!m.videoWidth || !m.videoHeight) return null;
1055
+ const b = m.getBoundingClientRect();
1056
+ if (!b.width || !b.height) return null;
1057
+ const M = L(), g = (((N = o.vertical) == null ? void 0 : N.rotate) ?? 0) === 90, k = h - b.left - b.width / 2, z = p - b.top - b.height / 2;
1058
+ let T, S;
1059
+ if (M === "fill" && !g)
1060
+ T = (h - b.left) / (b.width / m.videoWidth), S = (p - b.top) / (b.height / m.videoHeight);
1061
+ else {
1062
+ const I = g ? m.videoHeight : m.videoWidth, oe = g ? m.videoWidth : m.videoHeight, le = M === "cover" ? Math.max(b.width / I, b.height / oe) : Math.min(b.width / I, b.height / oe);
1063
+ T = (g ? z : k) / le + m.videoWidth / 2, S = (g ? -k : z) / le + m.videoHeight / 2;
1064
+ }
1065
+ if (T < 0 || S < 0 || T >= m.videoWidth || S >= m.videoHeight) return null;
1066
+ const $ = Math.min(1, pe / Math.max(m.videoWidth, m.videoHeight)), P = Math.max(1, Math.round(m.videoWidth * $)), W = Math.max(1, Math.round(m.videoHeight * $));
1067
+ if (u ? A(u, P, W) : u = O(P, W), !u) return null;
1068
+ try {
1069
+ u.context.drawImage(m, 0, 0, P, W);
1070
+ const I = u.context.getImageData(Math.floor(T * $), Math.floor(S * $), 1, 1).data;
1071
+ return Mo(I[0], I[1], I[2]);
1072
+ } catch {
1073
+ return null;
1074
+ }
1075
+ }, dispose: () => {
1076
+ x = !0, ne(), n == null || n.remove(), n = void 0, t = null, l = null, i = null, r = null, c = null, u = null;
1077
+ } };
1078
+ }, U = new Map(go.map((e) => [e.key, e])), Wo = (e) => (U.set(e.key, e), e), Ho = (e) => e, No = (e, o) => ({ key: e, setting: o }), Oo = (e) => U.get(e), Ao = () => [...U.values()], ko = (e) => typeof e == "string" ? { key: e } : e, $o = (e = []) => {
1079
+ const o = /* @__PURE__ */ new Map();
1080
+ return e.forEach((a) => {
1081
+ const n = ko(a), t = U.get(n.key);
267
1082
  if (!t) {
268
- console.warn(`[${z}] 未注册的插件:${l.key}`);
1083
+ console.warn(`[${ze}] 未注册的插件:${n.key}`);
269
1084
  return;
270
1085
  }
271
- const a = l.setting, i = a ? { ...t.defaultConfig, ...a({ ...t.defaultConfig }) } : { ...t.defaultConfig };
272
- s.set(l.key, { definition: t, config: i });
273
- }), [...s.values()];
274
- }, Ve = (e) => {
275
- const s = [];
276
- return { plugins: e.map(({ definition: t, config: a }) => (i) => {
277
- const c = {
278
- art: i,
1086
+ const l = n.setting, i = l ? { ...t.defaultConfig, ...l({ ...t.defaultConfig }) } : { ...t.defaultConfig };
1087
+ o.set(n.key, { definition: t, config: i });
1088
+ }), [...o.values()];
1089
+ }, Ro = (e) => {
1090
+ const o = [];
1091
+ let a, n;
1092
+ const t = (c) => (a ?? (a = Co(c)), a), l = (c) => (n ?? (n = yo(c)), n);
1093
+ return { plugins: e.map(({ definition: c, config: u }) => (d) => {
1094
+ const x = {
1095
+ art: d,
279
1096
  // artplayer 的 setting.add 运行时返回菜单项,类型声明却写成了 setting 组件本身
280
- setting: (r) => i.setting.add(r),
281
- onCleanup: (r) => {
282
- s.push(r);
1097
+ setting: (w) => d.setting.add(w),
1098
+ onCleanup: (w) => {
1099
+ o.push(w);
1100
+ },
1101
+ get frame() {
1102
+ return t(d);
1103
+ },
1104
+ get cssFilter() {
1105
+ return l(d);
283
1106
  }
284
1107
  };
285
- t.install(c, a);
1108
+ c.install(x, u);
286
1109
  }), dispose: () => {
287
- s.splice(0).forEach((t) => t());
1110
+ o.splice(0).forEach((c) => c()), a == null || a.dispose(), a = void 0, n == null || n.clear(), n = void 0;
288
1111
  } };
289
- }, Ue = /* @__PURE__ */ N({
1112
+ }, So = /* @__PURE__ */ We({
290
1113
  name: "VideoPlayer",
291
1114
  __name: "index",
292
1115
  props: {
@@ -299,129 +1122,146 @@ const z = "@wapri/gplayer", K = "wa-player", Q = "16 / 9", G = {
299
1122
  loop: { type: Boolean },
300
1123
  volume: {},
301
1124
  height: {},
302
- plugins: { default: () => [] },
1125
+ plugins: { default: () => [...un] },
303
1126
  options: { default: () => ({}) }
304
1127
  },
305
1128
  emits: ["ready", "play", "pause", "ended", "timeupdate", "volumechange", "ratechange", "seek", "error", "flip", "pip", "screenshot", "fullscreen", "fullscreen-web", "destroy"],
306
- setup(e, { expose: s, emit: o }) {
307
- const l = e, t = o, a = H(), i = I();
308
- let c;
309
- const r = V(() => ({
1129
+ setup(e, { expose: o, emit: a }) {
1130
+ const n = e, t = a, l = He(), i = Ne();
1131
+ let r;
1132
+ const c = Oe(() => ({
310
1133
  position: "relative",
311
1134
  width: "100%",
312
1135
  background: "#000",
313
- ...l.height === void 0 ? { aspectRatio: Q } : { height: typeof l.height == "number" ? `${l.height}px` : l.height }
314
- })), d = (n) => {
315
- n.on("play", () => t("play")), n.on("pause", () => t("pause")), n.on("seek", (u, f) => t("seek", u, f)), n.on("flip", (u) => t("flip", u)), n.on("pip", (u) => t("pip", u)), n.on("screenshot", (u) => t("screenshot", u)), n.on("fullscreen", (u) => t("fullscreen", u)), n.on("fullscreenWeb", (u) => t("fullscreen-web", u)), n.on("error", (u, f) => t("error", u, f)), n.on("destroy", () => t("destroy")), n.on("video:ended", () => t("ended")), n.on("video:timeupdate", () => t("timeupdate")), n.on("video:volumechange", () => t("volumechange")), n.on("video:ratechange", () => t("ratechange"));
316
- }, p = (n) => {
317
- const u = a.value;
318
- if (!u || !l.url) return;
319
- const f = Ve(Ie(l.plugins));
320
- c = f.dispose;
321
- const h = new x(xe(l, u, f.plugins), (P) => {
322
- n != null && n.currentTime && (P.currentTime = n.currentTime), n != null && n.playing && P.play().catch(() => {
1136
+ ...n.height === void 0 ? { aspectRatio: hn } : { height: typeof n.height == "number" ? `${n.height}px` : n.height }
1137
+ })), u = (s) => {
1138
+ s.on("play", () => t("play")), s.on("pause", () => t("pause")), s.on("seek", (f, y) => t("seek", f, y)), s.on("flip", (f) => t("flip", f)), s.on("pip", (f) => t("pip", f)), s.on("screenshot", (f) => t("screenshot", f)), s.on("fullscreen", (f) => t("fullscreen", f)), s.on("fullscreenWeb", (f) => t("fullscreen-web", f)), s.on("error", (f, y) => t("error", f, y)), s.on("destroy", () => t("destroy")), s.on("video:ended", () => t("ended")), s.on("video:timeupdate", () => t("timeupdate")), s.on("video:volumechange", () => t("volumechange")), s.on("video:ratechange", () => t("ratechange"));
1139
+ }, d = (s) => {
1140
+ const f = l.value;
1141
+ if (!f || !n.url) return;
1142
+ const y = Ro($o(n.plugins));
1143
+ r = y.dispose;
1144
+ const C = new Z(An(n, f, y.plugins), (F) => {
1145
+ s != null && s.currentTime && (F.currentTime = s.currentTime), s != null && s.playing && F.play().catch(() => {
323
1146
  }), t("ready");
324
1147
  });
325
- i.value = h, d(h);
326
- }, T = () => {
327
- var n;
328
- c == null || c(), c = void 0, (n = i.value) == null || n.destroy(), i.value = void 0;
329
- }, F = () => {
330
- var f, h;
331
- const n = ((f = i.value) == null ? void 0 : f.currentTime) ?? 0, u = ((h = i.value) == null ? void 0 : h.playing) ?? !1;
332
- T(), p({ currentTime: n, playing: u });
1148
+ i.value = C, u(C);
1149
+ }, x = () => {
1150
+ var s;
1151
+ r == null || r(), r = void 0, (s = i.value) == null || s.destroy(), i.value = void 0;
1152
+ }, w = () => {
1153
+ var y, C;
1154
+ const s = ((y = i.value) == null ? void 0 : y.currentTime) ?? 0, f = ((C = i.value) == null ? void 0 : C.playing) ?? !1;
1155
+ x(), d({ currentTime: s, playing: f });
333
1156
  };
334
- return m(
335
- () => l.url,
336
- (n) => {
1157
+ return B(
1158
+ () => n.url,
1159
+ (s) => {
337
1160
  if (!i.value) {
338
- p();
1161
+ d();
339
1162
  return;
340
1163
  }
341
- n && (i.value.url = n);
342
- }
343
- ), m(() => [l.plugins, l.options], F, { deep: !0 }), m(
344
- () => l.poster,
345
- (n) => {
346
- i.value && n && (i.value.poster = n);
347
- }
348
- ), m(
349
- () => l.theme,
350
- (n) => {
351
- i.value && n && (i.value.theme = n);
352
- }
353
- ), m(
354
- () => l.volume,
355
- (n) => {
356
- i.value && n !== void 0 && (i.value.volume = n);
357
- }
358
- ), m(
359
- () => l.muted,
360
- (n) => {
361
- i.value && n !== void 0 && (i.value.muted = n);
362
- }
363
- ), m(
364
- () => l.loop,
365
- (n) => {
366
- i.value && n !== void 0 && (i.value.video.loop = n);
367
- }
368
- ), U(p), _(T), s({
1164
+ s && (i.value.url = s);
1165
+ }
1166
+ ), B(() => [n.plugins, n.options], w, { deep: !0 }), B(
1167
+ () => n.poster,
1168
+ (s) => {
1169
+ i.value && s && (i.value.poster = s);
1170
+ }
1171
+ ), B(
1172
+ () => n.theme,
1173
+ (s) => {
1174
+ i.value && s && (i.value.theme = s);
1175
+ }
1176
+ ), B(
1177
+ () => n.volume,
1178
+ (s) => {
1179
+ i.value && s !== void 0 && (i.value.volume = s);
1180
+ }
1181
+ ), B(
1182
+ () => n.muted,
1183
+ (s) => {
1184
+ i.value && s !== void 0 && (i.value.muted = s);
1185
+ }
1186
+ ), B(
1187
+ () => n.loop,
1188
+ (s) => {
1189
+ i.value && s !== void 0 && (i.value.video.loop = s);
1190
+ }
1191
+ ), Ae(d), je(x), o({
369
1192
  get player() {
370
1193
  return i.value;
371
1194
  },
372
1195
  play: () => {
373
- var n;
374
- return (n = i.value) == null ? void 0 : n.play();
1196
+ var s;
1197
+ return (s = i.value) == null ? void 0 : s.play();
375
1198
  },
376
1199
  pause: () => {
377
- var n;
378
- return (n = i.value) == null ? void 0 : n.pause();
1200
+ var s;
1201
+ return (s = i.value) == null ? void 0 : s.pause();
379
1202
  },
380
1203
  toggle: () => {
381
- var n;
382
- return (n = i.value) == null ? void 0 : n.toggle();
1204
+ var s;
1205
+ return (s = i.value) == null ? void 0 : s.toggle();
383
1206
  },
384
- seek: (n) => {
385
- i.value && (i.value.currentTime = n);
1207
+ seek: (s) => {
1208
+ i.value && (i.value.currentTime = s);
386
1209
  },
387
- screenshot: (n) => {
388
- var u;
389
- return (u = i.value) == null ? void 0 : u.screenshot(n);
1210
+ screenshot: (s) => {
1211
+ var f;
1212
+ return (f = i.value) == null ? void 0 : f.screenshot(s);
390
1213
  },
391
- fullscreen: (n) => {
392
- i.value && (i.value.fullscreen = n ?? !i.value.fullscreen);
1214
+ fullscreen: (s) => {
1215
+ i.value && (i.value.fullscreen = s ?? !i.value.fullscreen);
393
1216
  }
394
- }), (n, u) => (A(), O("div", {
1217
+ }), (s, f) => (Ve(), Ke("div", {
395
1218
  ref_key: "containerRef",
396
- ref: a,
397
- class: W(q(K)),
398
- style: j(r.value)
1219
+ ref: l,
1220
+ class: _e(qe(dn)),
1221
+ style: De(c.value)
399
1222
  }, null, 6));
400
1223
  }
401
- }), _e = (e) => {
402
- const s = e;
403
- return s.install = (o) => {
404
- e.name && o.component(e.name, e);
405
- }, s;
406
- }, Je = _e(Ue);
1224
+ }), To = (e) => {
1225
+ const o = e;
1226
+ return o.install = (a) => {
1227
+ e.name && a.component(e.name, e);
1228
+ }, o;
1229
+ }, jo = To(So);
407
1230
  export {
408
- Je as VideoPlayer,
409
- Pe as abLoopPlugin,
410
- ke as aspectRatioPlugin,
411
- Ne as builtinPlugins,
412
- Je as default,
413
- Q as defaultPlayerRatio,
414
- De as definePlugin,
415
- Se as filterPlugin,
416
- Le as flipPlugin,
417
- Qe as getPlugin,
418
- Ge as listPlugins,
419
- z as packageName,
420
- Me as pipPlugin,
421
- $e as playbackRatePlugin,
422
- Ke as pluginEntry,
423
- K as prefix,
424
- qe as registerPlugin,
425
- Ie as resolvePlugins,
426
- Fe as screenshotPlugin
1231
+ jo as VideoPlayer,
1232
+ Un as abLoopPlugin,
1233
+ Xn as aspectRatioPlugin,
1234
+ Yn as backgroundBlurPlugin,
1235
+ Qn as blurPlugin,
1236
+ go as builtinPlugins,
1237
+ Gn as chromaKeyPlugin,
1238
+ yo as createCssFilterStack,
1239
+ Co as createFrameRenderer,
1240
+ jo as default,
1241
+ un as defaultPlayerPlugins,
1242
+ hn as defaultPlayerRatio,
1243
+ Ho as definePlugin,
1244
+ Zn as filterPlugin,
1245
+ to as flipPlugin,
1246
+ Oo as getPlugin,
1247
+ no as introPlugin,
1248
+ Ao as listPlugins,
1249
+ oo as mosaicPlugin,
1250
+ lo as overlayPlugin,
1251
+ ze as packageName,
1252
+ ao as pipPlugin,
1253
+ io as playbackRatePlugin,
1254
+ No as pluginEntry,
1255
+ dn as prefix,
1256
+ Wo as registerPlugin,
1257
+ $o as resolvePlugins,
1258
+ ro as reversePlugin,
1259
+ ho as screenshotPlugin,
1260
+ mo as stabilizerPlugin,
1261
+ po as verticalPlugin,
1262
+ vo as videoFilterPlugin,
1263
+ X as videoFilterPresetLabels,
1264
+ cn as videoFilterPresetOrder,
1265
+ rn as videoFilterPresets,
1266
+ fo as webFullscreenPlugin
427
1267
  };