@glitchlab/vue-video-player 1.1.0 → 1.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/README.md +69 -2
- package/dist/HLSPlayer.vue.d.ts +10 -0
- package/dist/HLSPlayer.vue.d.ts.map +1 -1
- package/dist/VideoPlayer.vue.d.ts +1 -1
- package/dist/VideoPlayer.vue.d.ts.map +1 -1
- package/dist/components/AudioTrackSwitcher.vue.d.ts +24 -0
- package/dist/components/AudioTrackSwitcher.vue.d.ts.map +1 -0
- package/dist/components/CaptionsSwitcher.vue.d.ts +16 -0
- package/dist/components/CaptionsSwitcher.vue.d.ts.map +1 -0
- package/dist/components/ControlBar.vue.d.ts +22 -0
- package/dist/components/ControlBar.vue.d.ts.map +1 -0
- package/dist/components/IconAudio.vue.d.ts +16 -0
- package/dist/components/IconAudio.vue.d.ts.map +1 -0
- package/dist/components/IconCaptions.vue.d.ts +16 -0
- package/dist/components/IconCaptions.vue.d.ts.map +1 -0
- package/dist/components/IconChevron.vue.d.ts +16 -0
- package/dist/components/IconChevron.vue.d.ts.map +1 -0
- package/dist/components/IconFullscreen.vue.d.ts +16 -0
- package/dist/components/IconFullscreen.vue.d.ts.map +1 -0
- package/dist/components/IconFullscreenExit.vue.d.ts +16 -0
- package/dist/components/IconFullscreenExit.vue.d.ts.map +1 -0
- package/dist/components/IconPause.vue.d.ts +16 -0
- package/dist/components/IconPause.vue.d.ts.map +1 -0
- package/dist/components/IconPiP.vue.d.ts +16 -0
- package/dist/components/IconPiP.vue.d.ts.map +1 -0
- package/dist/components/IconPlaySolid.vue.d.ts +16 -0
- package/dist/components/IconPlaySolid.vue.d.ts.map +1 -0
- package/dist/components/IconSpeed.vue.d.ts +16 -0
- package/dist/components/IconSpeed.vue.d.ts.map +1 -0
- package/dist/components/IconVolumeHigh.vue.d.ts +16 -0
- package/dist/components/IconVolumeHigh.vue.d.ts.map +1 -0
- package/dist/components/IconVolumeLow.vue.d.ts +16 -0
- package/dist/components/IconVolumeLow.vue.d.ts.map +1 -0
- package/dist/components/IconVolumeMuted.vue.d.ts +16 -0
- package/dist/components/IconVolumeMuted.vue.d.ts.map +1 -0
- package/dist/components/SpeedSwitcher.vue.d.ts +20 -0
- package/dist/components/SpeedSwitcher.vue.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1371 -222
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/audio-tracks.d.ts +15 -0
- package/dist/utils/audio-tracks.d.ts.map +1 -0
- package/dist/utils/format-time.d.ts +2 -0
- package/dist/utils/format-time.d.ts.map +1 -0
- package/dist/utils/types.d.ts +7 -2
- package/dist/utils/types.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as T, ref as w, onMounted as fe, watch as F, onBeforeUnmount as X, openBlock as i, createElementBlock as v, normalizeClass as C, renderSlot as ke, createElementVNode as s, computed as Z, createVNode as j, toDisplayString as q, Fragment as oe, renderList as ae, createCommentVNode as M, createBlock as U, normalizeStyle as ce, unref as J, withCtx as xe } from "vue";
|
|
2
|
+
import ee from "hls.js";
|
|
3
|
+
function he(t, a, l) {
|
|
4
|
+
const e = t == null ? void 0 : t.trim();
|
|
5
|
+
if (e) return e;
|
|
6
|
+
if (a) {
|
|
7
|
+
try {
|
|
8
|
+
const m = new Intl.DisplayNames(void 0, { type: "language" }).of(a);
|
|
9
|
+
if (m && m !== a) return m;
|
|
10
|
+
} catch {
|
|
11
|
+
}
|
|
12
|
+
return a;
|
|
13
|
+
}
|
|
14
|
+
return `Audio ${l + 1}`;
|
|
15
|
+
}
|
|
16
|
+
const _e = ["muted", "loop", "controls", "autoplay", "playsinline", "preload", "poster"], Ee = /* @__PURE__ */ T({
|
|
4
17
|
__name: "HLSPlayer",
|
|
5
18
|
props: {
|
|
6
19
|
src: {},
|
|
@@ -13,90 +26,1108 @@ const Y = ["muted", "loop", "controls", "autoplay", "playsinline", "preload", "p
|
|
|
13
26
|
playsInline: { type: Boolean, default: !0 },
|
|
14
27
|
preload: { default: "metadata" },
|
|
15
28
|
poster: {},
|
|
29
|
+
class: {},
|
|
30
|
+
audioTrackIndex: { default: -1 }
|
|
31
|
+
},
|
|
32
|
+
emits: ["play", "pause", "audio-tracks"],
|
|
33
|
+
setup(t, { expose: a, emit: l }) {
|
|
34
|
+
const e = t, o = l, m = w(null), g = w(null);
|
|
35
|
+
let p, L;
|
|
36
|
+
const P = globalThis.window !== void 0 && ee.isSupported(), x = (r) => !!e.isHls || P && r.endsWith(".m3u8");
|
|
37
|
+
function _() {
|
|
38
|
+
L == null || L(), L = void 0, p == null || p(), p = void 0, g.value && (g.value.destroy(), g.value = null);
|
|
39
|
+
const r = m.value;
|
|
40
|
+
if (r) {
|
|
41
|
+
for (r.pause(), r.removeAttribute("src"); r.firstChild; ) r.firstChild.remove();
|
|
42
|
+
r.load(), o("audio-tracks", []);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function k(r) {
|
|
46
|
+
var R, H, A;
|
|
47
|
+
const b = m.value;
|
|
48
|
+
if (!b || !r) return;
|
|
49
|
+
_();
|
|
50
|
+
const E = () => {
|
|
51
|
+
e.autoPlay && b.play().catch(() => {
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
if (x(r)) {
|
|
55
|
+
const y = new ee(e.hlsConfig);
|
|
56
|
+
g.value = y;
|
|
57
|
+
const I = () => {
|
|
58
|
+
const D = y.audioTracks.map((B, N) => ({
|
|
59
|
+
index: N,
|
|
60
|
+
label: he(B.name, B.lang, N),
|
|
61
|
+
lang: B.lang || void 0
|
|
62
|
+
}));
|
|
63
|
+
o("audio-tracks", D);
|
|
64
|
+
};
|
|
65
|
+
y.on(ee.Events.MANIFEST_PARSED, E), y.on(ee.Events.AUDIO_TRACKS_UPDATED, I), y.on(ee.Events.AUDIO_TRACK_SWITCHED, I), y.on(ee.Events.ERROR, (D, B) => {
|
|
66
|
+
B.fatal && (y.destroy(), g.value = null);
|
|
67
|
+
}), y.attachMedia(b), y.loadSource(r);
|
|
68
|
+
} else {
|
|
69
|
+
b.src = r, b.load(), b.addEventListener("loadedmetadata", E, { once: !0 }), L = () => {
|
|
70
|
+
b.removeEventListener("loadedmetadata", E);
|
|
71
|
+
};
|
|
72
|
+
const y = b.audioTracks;
|
|
73
|
+
if (y) {
|
|
74
|
+
const I = () => {
|
|
75
|
+
const D = [];
|
|
76
|
+
for (let B = 0; B < y.length; B++) {
|
|
77
|
+
const N = y[B];
|
|
78
|
+
D.push({
|
|
79
|
+
index: B,
|
|
80
|
+
label: he(N.label, N.language, B),
|
|
81
|
+
lang: N.language || void 0
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
o("audio-tracks", D);
|
|
85
|
+
};
|
|
86
|
+
(R = y.addEventListener) == null || R.call(y, "addtrack", I), (H = y.addEventListener) == null || H.call(y, "removetrack", I), (A = y.addEventListener) == null || A.call(y, "change", I), y.length > 0 && I(), p = () => {
|
|
87
|
+
var D, B, N;
|
|
88
|
+
(D = y.removeEventListener) == null || D.call(y, "addtrack", I), (B = y.removeEventListener) == null || B.call(y, "removetrack", I), (N = y.removeEventListener) == null || N.call(y, "change", I);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function h(r) {
|
|
94
|
+
var R;
|
|
95
|
+
if (r == null || r < 0) return;
|
|
96
|
+
const b = g.value;
|
|
97
|
+
if (b) {
|
|
98
|
+
b.audioTrack !== r && (b.audioTrack = r);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const E = (R = m.value) == null ? void 0 : R.audioTracks;
|
|
102
|
+
if (E)
|
|
103
|
+
for (let H = 0; H < E.length; H++)
|
|
104
|
+
E[H].enabled = H === r;
|
|
105
|
+
}
|
|
106
|
+
return fe(() => {
|
|
107
|
+
e.src && k(e.src);
|
|
108
|
+
}), F(
|
|
109
|
+
() => e.src,
|
|
110
|
+
(r) => {
|
|
111
|
+
r && k(r);
|
|
112
|
+
}
|
|
113
|
+
), F(
|
|
114
|
+
() => e.audioTrackIndex,
|
|
115
|
+
(r) => h(r)
|
|
116
|
+
), X(_), a({ videoEl: m }), (r, b) => (i(), v("video", {
|
|
117
|
+
ref_key: "videoEl",
|
|
118
|
+
ref: m,
|
|
119
|
+
muted: t.muted,
|
|
120
|
+
loop: t.loop,
|
|
121
|
+
controls: t.controls,
|
|
122
|
+
autoplay: t.autoPlay,
|
|
123
|
+
playsinline: t.playsInline,
|
|
124
|
+
preload: t.preload,
|
|
125
|
+
poster: t.poster,
|
|
126
|
+
class: C(e.class),
|
|
127
|
+
onPlay: b[0] || (b[0] = (E) => o("play")),
|
|
128
|
+
onPause: b[1] || (b[1] = (E) => o("pause"))
|
|
129
|
+
}, [
|
|
130
|
+
ke(r.$slots, "default")
|
|
131
|
+
], 42, _e));
|
|
132
|
+
}
|
|
133
|
+
}), $e = { name: "IconAudio" }, Le = /* @__PURE__ */ T({
|
|
134
|
+
...$e,
|
|
135
|
+
props: {
|
|
16
136
|
class: {}
|
|
17
137
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
138
|
+
setup(t) {
|
|
139
|
+
const a = t;
|
|
140
|
+
return (l, e) => (i(), v("svg", {
|
|
141
|
+
class: C(["gvp-icon", a.class]),
|
|
142
|
+
width: "16",
|
|
143
|
+
height: "16",
|
|
144
|
+
viewBox: "0 0 24 24",
|
|
145
|
+
fill: "none",
|
|
146
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
147
|
+
"aria-hidden": "true"
|
|
148
|
+
}, [...e[0] || (e[0] = [
|
|
149
|
+
s("path", {
|
|
150
|
+
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
151
|
+
stroke: "currentColor",
|
|
152
|
+
"stroke-width": "1.5",
|
|
153
|
+
"stroke-linejoin": "round"
|
|
154
|
+
}, null, -1),
|
|
155
|
+
s("path", {
|
|
156
|
+
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16M19 5.5C20.5 7 21.5 9.5 21.5 12C21.5 14.5 20.5 17 19 18.5",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
"stroke-width": "1.5",
|
|
159
|
+
"stroke-linecap": "round"
|
|
160
|
+
}, null, -1)
|
|
161
|
+
])], 2));
|
|
162
|
+
}
|
|
163
|
+
}), Pe = { name: "IconChevron" }, ye = /* @__PURE__ */ T({
|
|
164
|
+
...Pe,
|
|
165
|
+
props: {
|
|
166
|
+
class: {}
|
|
167
|
+
},
|
|
168
|
+
setup(t) {
|
|
169
|
+
const a = t;
|
|
170
|
+
return (l, e) => (i(), v("svg", {
|
|
171
|
+
class: C(["gvp-icon", a.class]),
|
|
172
|
+
width: "12",
|
|
173
|
+
height: "12",
|
|
174
|
+
viewBox: "0 0 24 24",
|
|
175
|
+
fill: "none",
|
|
176
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
177
|
+
"aria-hidden": "true"
|
|
178
|
+
}, [...e[0] || (e[0] = [
|
|
179
|
+
s("path", {
|
|
180
|
+
d: "M6 9L12 15L18 9",
|
|
181
|
+
stroke: "currentColor",
|
|
182
|
+
"stroke-width": "2",
|
|
183
|
+
"stroke-linecap": "round",
|
|
184
|
+
"stroke-linejoin": "round"
|
|
185
|
+
}, null, -1)
|
|
186
|
+
])], 2));
|
|
187
|
+
}
|
|
188
|
+
}), Me = ["aria-expanded"], Te = { class: "gvp-audio-label" }, Ie = {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: "gvp-audio-menu",
|
|
191
|
+
role: "listbox",
|
|
192
|
+
"aria-label": "Audio tracks"
|
|
193
|
+
}, Se = ["aria-selected", "onClick"], He = /* @__PURE__ */ T({
|
|
194
|
+
__name: "AudioTrackSwitcher",
|
|
195
|
+
props: {
|
|
196
|
+
tracks: {},
|
|
197
|
+
activeIndex: {}
|
|
198
|
+
},
|
|
199
|
+
emits: ["select"],
|
|
200
|
+
setup(t, { emit: a }) {
|
|
201
|
+
const l = t, e = a, o = w(!1), m = w(null), g = Z(
|
|
202
|
+
() => l.tracks.find((x) => x.index === l.activeIndex) ?? l.tracks[0]
|
|
203
|
+
);
|
|
204
|
+
function p(x) {
|
|
205
|
+
m.value && !m.value.contains(x.target) && (o.value = !1);
|
|
206
|
+
}
|
|
207
|
+
function L(x) {
|
|
208
|
+
x.key === "Escape" && (o.value = !1);
|
|
209
|
+
}
|
|
210
|
+
F(o, (x) => {
|
|
211
|
+
x ? (document.addEventListener("mousedown", p), document.addEventListener("keydown", L)) : (document.removeEventListener("mousedown", p), document.removeEventListener("keydown", L));
|
|
212
|
+
}), X(() => {
|
|
213
|
+
document.removeEventListener("mousedown", p), document.removeEventListener("keydown", L);
|
|
214
|
+
});
|
|
215
|
+
function P(x) {
|
|
216
|
+
e("select", x), o.value = !1;
|
|
217
|
+
}
|
|
218
|
+
return (x, _) => {
|
|
219
|
+
var k;
|
|
220
|
+
return i(), v("div", {
|
|
221
|
+
ref_key: "rootEl",
|
|
222
|
+
ref: m,
|
|
223
|
+
class: "gvp-audio"
|
|
224
|
+
}, [
|
|
225
|
+
s("button", {
|
|
226
|
+
type: "button",
|
|
227
|
+
class: "gvp-audio-btn",
|
|
228
|
+
"aria-haspopup": "listbox",
|
|
229
|
+
"aria-expanded": o.value,
|
|
230
|
+
"aria-label": "Audio track",
|
|
231
|
+
onClick: _[0] || (_[0] = (h) => o.value = !o.value)
|
|
232
|
+
}, [
|
|
233
|
+
j(Le),
|
|
234
|
+
s("span", Te, q((k = g.value) == null ? void 0 : k.label), 1),
|
|
235
|
+
j(ye)
|
|
236
|
+
], 8, Me),
|
|
237
|
+
o.value ? (i(), v("ul", Ie, [
|
|
238
|
+
(i(!0), v(oe, null, ae(t.tracks, (h) => (i(), v("li", {
|
|
239
|
+
key: h.index
|
|
240
|
+
}, [
|
|
241
|
+
s("button", {
|
|
242
|
+
type: "button",
|
|
243
|
+
role: "option",
|
|
244
|
+
"aria-selected": h.index === t.activeIndex,
|
|
245
|
+
class: C(["gvp-audio-menu-item", { "is-active": h.index === t.activeIndex }]),
|
|
246
|
+
onClick: (r) => P(h.index)
|
|
247
|
+
}, q(h.label), 11, Se)
|
|
248
|
+
]))), 128))
|
|
249
|
+
])) : M("", !0)
|
|
250
|
+
], 512);
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}), Be = { name: "IconSpeed" }, we = /* @__PURE__ */ T({
|
|
254
|
+
...Be,
|
|
255
|
+
props: {
|
|
256
|
+
class: {}
|
|
257
|
+
},
|
|
258
|
+
setup(t) {
|
|
259
|
+
const a = t;
|
|
260
|
+
return (l, e) => (i(), v("svg", {
|
|
261
|
+
class: C(["gvp-icon", a.class]),
|
|
262
|
+
width: "16",
|
|
263
|
+
height: "16",
|
|
264
|
+
viewBox: "0 0 24 24",
|
|
265
|
+
fill: "none",
|
|
266
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
267
|
+
"aria-hidden": "true"
|
|
268
|
+
}, [...e[0] || (e[0] = [
|
|
269
|
+
s("path", {
|
|
270
|
+
d: "M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2Z",
|
|
271
|
+
stroke: "currentColor",
|
|
272
|
+
"stroke-width": "1.5"
|
|
273
|
+
}, null, -1),
|
|
274
|
+
s("path", {
|
|
275
|
+
d: "M12 8V12L14.5 14.5",
|
|
276
|
+
stroke: "currentColor",
|
|
277
|
+
"stroke-width": "1.5",
|
|
278
|
+
"stroke-linecap": "round",
|
|
279
|
+
"stroke-linejoin": "round"
|
|
280
|
+
}, null, -1)
|
|
281
|
+
])], 2));
|
|
282
|
+
}
|
|
283
|
+
}), Ve = ["aria-expanded"], Ae = { class: "gvp-speed-label" }, De = {
|
|
284
|
+
key: 0,
|
|
285
|
+
class: "gvp-speed-menu",
|
|
286
|
+
role: "listbox",
|
|
287
|
+
"aria-label": "Playback speed"
|
|
288
|
+
}, Re = ["aria-selected", "onClick"], Fe = /* @__PURE__ */ T({
|
|
289
|
+
__name: "SpeedSwitcher",
|
|
290
|
+
props: {
|
|
291
|
+
speed: {}
|
|
292
|
+
},
|
|
293
|
+
emits: ["select"],
|
|
294
|
+
setup(t, { emit: a }) {
|
|
295
|
+
const l = [0.5, 0.75, 1, 1.25, 1.5, 2], e = a, o = w(!1), m = w(null);
|
|
296
|
+
function g(P) {
|
|
297
|
+
m.value && !m.value.contains(P.target) && (o.value = !1);
|
|
298
|
+
}
|
|
299
|
+
function p(P) {
|
|
300
|
+
P.key === "Escape" && (o.value = !1);
|
|
301
|
+
}
|
|
302
|
+
F(o, (P) => {
|
|
303
|
+
P ? (document.addEventListener("mousedown", g), document.addEventListener("keydown", p)) : (document.removeEventListener("mousedown", g), document.removeEventListener("keydown", p));
|
|
304
|
+
}), X(() => {
|
|
305
|
+
document.removeEventListener("mousedown", g), document.removeEventListener("keydown", p);
|
|
306
|
+
});
|
|
307
|
+
function L(P) {
|
|
308
|
+
e("select", P), o.value = !1;
|
|
309
|
+
}
|
|
310
|
+
return (P, x) => (i(), v("div", {
|
|
311
|
+
ref_key: "rootEl",
|
|
312
|
+
ref: m,
|
|
313
|
+
class: "gvp-speed"
|
|
314
|
+
}, [
|
|
315
|
+
s("button", {
|
|
316
|
+
type: "button",
|
|
317
|
+
class: "gvp-speed-btn",
|
|
318
|
+
"aria-haspopup": "listbox",
|
|
319
|
+
"aria-expanded": o.value,
|
|
320
|
+
"aria-label": "`Playback speed: ${speed === 1 ? '1×' : speed + '×'}`",
|
|
321
|
+
onClick: x[0] || (x[0] = (_) => o.value = !o.value)
|
|
322
|
+
}, [
|
|
323
|
+
j(we),
|
|
324
|
+
s("span", Ae, q(t.speed === 1 ? "1×" : `${t.speed}×`), 1),
|
|
325
|
+
j(ye)
|
|
326
|
+
], 8, Ve),
|
|
327
|
+
o.value ? (i(), v("ul", De, [
|
|
328
|
+
(i(), v(oe, null, ae(l, (_) => s("li", { key: _ }, [
|
|
329
|
+
s("button", {
|
|
330
|
+
type: "button",
|
|
331
|
+
role: "option",
|
|
332
|
+
"aria-selected": _ === t.speed,
|
|
333
|
+
class: C(["gvp-speed-menu-item", { "is-active": _ === t.speed }]),
|
|
334
|
+
onClick: (k) => L(_)
|
|
335
|
+
}, q(_ === 1 ? "Normal" : `${_}×`), 11, Re)
|
|
336
|
+
])), 64))
|
|
337
|
+
])) : M("", !0)
|
|
338
|
+
], 512));
|
|
339
|
+
}
|
|
340
|
+
}), Ne = { name: "IconCaptions" }, be = /* @__PURE__ */ T({
|
|
341
|
+
...Ne,
|
|
342
|
+
props: {
|
|
343
|
+
class: {}
|
|
344
|
+
},
|
|
345
|
+
setup(t) {
|
|
346
|
+
const a = t;
|
|
347
|
+
return (l, e) => (i(), v("svg", {
|
|
348
|
+
class: C(["gvp-icon", a.class]),
|
|
349
|
+
width: "18",
|
|
350
|
+
height: "18",
|
|
351
|
+
viewBox: "0 0 24 24",
|
|
352
|
+
fill: "none",
|
|
353
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
354
|
+
"aria-hidden": "true"
|
|
355
|
+
}, [...e[0] || (e[0] = [
|
|
356
|
+
s("rect", {
|
|
357
|
+
x: "2",
|
|
358
|
+
y: "5",
|
|
359
|
+
width: "20",
|
|
360
|
+
height: "14",
|
|
361
|
+
rx: "3",
|
|
362
|
+
stroke: "currentColor",
|
|
363
|
+
"stroke-width": "1.5"
|
|
364
|
+
}, null, -1),
|
|
365
|
+
s("path", {
|
|
366
|
+
d: "M7 12H11M13 12H17M7 15H9M11 15H13M15 15H17",
|
|
367
|
+
stroke: "currentColor",
|
|
368
|
+
"stroke-width": "1.5",
|
|
369
|
+
"stroke-linecap": "round"
|
|
370
|
+
}, null, -1)
|
|
371
|
+
])], 2));
|
|
372
|
+
}
|
|
373
|
+
}), Oe = ["aria-expanded", "aria-pressed"], je = {
|
|
374
|
+
key: 0,
|
|
375
|
+
class: "gvp-captions-menu",
|
|
376
|
+
role: "listbox",
|
|
377
|
+
"aria-label": "Captions"
|
|
378
|
+
}, Ue = ["aria-selected"], Ze = ["aria-selected", "onClick"], qe = /* @__PURE__ */ T({
|
|
379
|
+
__name: "CaptionsSwitcher",
|
|
380
|
+
props: {
|
|
381
|
+
video: {}
|
|
382
|
+
},
|
|
383
|
+
setup(t) {
|
|
384
|
+
const a = t, l = w([]), e = w(-1), o = w(!1), m = w(null);
|
|
385
|
+
function g(k) {
|
|
386
|
+
const h = [];
|
|
387
|
+
for (let b = 0; b < k.length; b++) {
|
|
388
|
+
const E = k[b];
|
|
389
|
+
(E.kind === "subtitles" || E.kind === "captions") && h.push({ index: b, label: E.label || E.language || `Track ${b + 1}` });
|
|
27
390
|
}
|
|
391
|
+
l.value = h;
|
|
392
|
+
let r = -1;
|
|
393
|
+
for (let b = 0; b < k.length; b++)
|
|
394
|
+
if (k[b].mode === "showing") {
|
|
395
|
+
r = b;
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
e.value = r;
|
|
399
|
+
}
|
|
400
|
+
let p = null;
|
|
401
|
+
F(() => a.video, (k) => {
|
|
402
|
+
if (p == null || p(), p = null, !k) {
|
|
403
|
+
l.value = [], e.value = -1;
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
const h = k.textTracks;
|
|
407
|
+
g(h);
|
|
408
|
+
const r = () => g(h);
|
|
409
|
+
typeof h.addEventListener == "function" && (h.addEventListener("addtrack", r), h.addEventListener("removetrack", r), h.addEventListener("change", r), p = () => {
|
|
410
|
+
h.removeEventListener("addtrack", r), h.removeEventListener("removetrack", r), h.removeEventListener("change", r);
|
|
411
|
+
});
|
|
412
|
+
}, { immediate: !0 }), X(() => {
|
|
413
|
+
p == null || p(), document.removeEventListener("mousedown", L), document.removeEventListener("keydown", P);
|
|
414
|
+
});
|
|
415
|
+
function L(k) {
|
|
416
|
+
m.value && !m.value.contains(k.target) && (o.value = !1);
|
|
417
|
+
}
|
|
418
|
+
function P(k) {
|
|
419
|
+
k.key === "Escape" && (o.value = !1);
|
|
420
|
+
}
|
|
421
|
+
F(o, (k) => {
|
|
422
|
+
k ? (document.addEventListener("mousedown", L), document.addEventListener("keydown", P)) : (document.removeEventListener("mousedown", L), document.removeEventListener("keydown", P));
|
|
423
|
+
});
|
|
424
|
+
function x() {
|
|
425
|
+
if (!a.video) return;
|
|
426
|
+
const k = a.video.textTracks;
|
|
427
|
+
for (let h = 0; h < k.length; h++) k[h].mode = "hidden";
|
|
428
|
+
e.value = -1, o.value = !1;
|
|
429
|
+
}
|
|
430
|
+
function _(k) {
|
|
431
|
+
if (!a.video) return;
|
|
432
|
+
const h = a.video.textTracks;
|
|
433
|
+
for (let r = 0; r < h.length; r++)
|
|
434
|
+
h[r].mode = r === k ? "showing" : "hidden";
|
|
435
|
+
e.value = k, o.value = !1;
|
|
436
|
+
}
|
|
437
|
+
return (k, h) => l.value.length > 0 ? (i(), v("div", {
|
|
438
|
+
key: 0,
|
|
439
|
+
ref_key: "rootEl",
|
|
440
|
+
ref: m,
|
|
441
|
+
class: "gvp-captions"
|
|
442
|
+
}, [
|
|
443
|
+
s("button", {
|
|
444
|
+
type: "button",
|
|
445
|
+
class: C(["gvp-captions-btn", { "is-active": e.value >= 0 }]),
|
|
446
|
+
"aria-haspopup": "listbox",
|
|
447
|
+
"aria-expanded": o.value,
|
|
448
|
+
"aria-pressed": e.value >= 0,
|
|
449
|
+
"aria-label": "Captions",
|
|
450
|
+
onClick: h[0] || (h[0] = (r) => o.value = !o.value)
|
|
451
|
+
}, [
|
|
452
|
+
j(be)
|
|
453
|
+
], 10, Oe),
|
|
454
|
+
o.value ? (i(), v("ul", je, [
|
|
455
|
+
s("li", null, [
|
|
456
|
+
s("button", {
|
|
457
|
+
type: "button",
|
|
458
|
+
role: "option",
|
|
459
|
+
"aria-selected": e.value === -1,
|
|
460
|
+
class: C(["gvp-captions-menu-item", { "is-active": e.value === -1 }]),
|
|
461
|
+
onClick: x
|
|
462
|
+
}, " Off ", 10, Ue)
|
|
463
|
+
]),
|
|
464
|
+
(i(!0), v(oe, null, ae(l.value, (r) => (i(), v("li", {
|
|
465
|
+
key: r.index
|
|
466
|
+
}, [
|
|
467
|
+
s("button", {
|
|
468
|
+
type: "button",
|
|
469
|
+
role: "option",
|
|
470
|
+
"aria-selected": r.index === e.value,
|
|
471
|
+
class: C(["gvp-captions-menu-item", { "is-active": r.index === e.value }]),
|
|
472
|
+
onClick: (b) => _(r.index)
|
|
473
|
+
}, q(r.label), 11, Ze)
|
|
474
|
+
]))), 128))
|
|
475
|
+
])) : M("", !0)
|
|
476
|
+
], 512)) : M("", !0);
|
|
477
|
+
}
|
|
478
|
+
}), ze = { name: "IconPause" }, We = /* @__PURE__ */ T({
|
|
479
|
+
...ze,
|
|
480
|
+
props: {
|
|
481
|
+
class: {}
|
|
482
|
+
},
|
|
483
|
+
setup(t) {
|
|
484
|
+
const a = t;
|
|
485
|
+
return (l, e) => (i(), v("svg", {
|
|
486
|
+
class: C(["gvp-icon", a.class]),
|
|
487
|
+
width: "16",
|
|
488
|
+
height: "16",
|
|
489
|
+
viewBox: "0 0 24 24",
|
|
490
|
+
fill: "none",
|
|
491
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
492
|
+
"aria-hidden": "true"
|
|
493
|
+
}, [...e[0] || (e[0] = [
|
|
494
|
+
s("rect", {
|
|
495
|
+
x: "6",
|
|
496
|
+
y: "5",
|
|
497
|
+
width: "4",
|
|
498
|
+
height: "14",
|
|
499
|
+
rx: "1",
|
|
500
|
+
fill: "currentColor"
|
|
501
|
+
}, null, -1),
|
|
502
|
+
s("rect", {
|
|
503
|
+
x: "14",
|
|
504
|
+
y: "5",
|
|
505
|
+
width: "4",
|
|
506
|
+
height: "14",
|
|
507
|
+
rx: "1",
|
|
508
|
+
fill: "currentColor"
|
|
509
|
+
}, null, -1)
|
|
510
|
+
])], 2));
|
|
511
|
+
}
|
|
512
|
+
}), Ye = { name: "IconPlaySolid" }, Ke = /* @__PURE__ */ T({
|
|
513
|
+
...Ye,
|
|
514
|
+
props: {
|
|
515
|
+
class: {}
|
|
516
|
+
},
|
|
517
|
+
setup(t) {
|
|
518
|
+
const a = t;
|
|
519
|
+
return (l, e) => (i(), v("svg", {
|
|
520
|
+
class: C(["gvp-icon", a.class]),
|
|
521
|
+
width: "16",
|
|
522
|
+
height: "16",
|
|
523
|
+
viewBox: "0 0 24 24",
|
|
524
|
+
fill: "none",
|
|
525
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
526
|
+
"aria-hidden": "true"
|
|
527
|
+
}, [...e[0] || (e[0] = [
|
|
528
|
+
s("path", {
|
|
529
|
+
d: "M7 5.5V18.5C7 19.2659 7.84856 19.7261 8.4899 19.3071L19.0801 12.4014C19.6644 12.0204 19.6644 11.9796 19.0801 11.5986L8.4899 4.69288C7.84856 4.27388 7 4.73408 7 5.5Z",
|
|
530
|
+
fill: "currentColor"
|
|
531
|
+
}, null, -1)
|
|
532
|
+
])], 2));
|
|
533
|
+
}
|
|
534
|
+
}), Je = { name: "IconVolumeHigh" }, Xe = /* @__PURE__ */ T({
|
|
535
|
+
...Je,
|
|
536
|
+
props: {
|
|
537
|
+
class: {}
|
|
538
|
+
},
|
|
539
|
+
setup(t) {
|
|
540
|
+
const a = t;
|
|
541
|
+
return (l, e) => (i(), v("svg", {
|
|
542
|
+
class: C(["gvp-icon", a.class]),
|
|
543
|
+
width: "18",
|
|
544
|
+
height: "18",
|
|
545
|
+
viewBox: "0 0 24 24",
|
|
546
|
+
fill: "none",
|
|
547
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
548
|
+
"aria-hidden": "true"
|
|
549
|
+
}, [...e[0] || (e[0] = [
|
|
550
|
+
s("path", {
|
|
551
|
+
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
552
|
+
stroke: "currentColor",
|
|
553
|
+
"stroke-width": "1.5",
|
|
554
|
+
"stroke-linejoin": "round"
|
|
555
|
+
}, null, -1),
|
|
556
|
+
s("path", {
|
|
557
|
+
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16M19 5.5C20.5 7 21.5 9.5 21.5 12C21.5 14.5 20.5 17 19 18.5",
|
|
558
|
+
stroke: "currentColor",
|
|
559
|
+
"stroke-width": "1.5",
|
|
560
|
+
"stroke-linecap": "round"
|
|
561
|
+
}, null, -1)
|
|
562
|
+
])], 2));
|
|
563
|
+
}
|
|
564
|
+
}), Ge = { name: "IconVolumeLow" }, Qe = /* @__PURE__ */ T({
|
|
565
|
+
...Ge,
|
|
566
|
+
props: {
|
|
567
|
+
class: {}
|
|
568
|
+
},
|
|
569
|
+
setup(t) {
|
|
570
|
+
const a = t;
|
|
571
|
+
return (l, e) => (i(), v("svg", {
|
|
572
|
+
class: C(["gvp-icon", a.class]),
|
|
573
|
+
width: "18",
|
|
574
|
+
height: "18",
|
|
575
|
+
viewBox: "0 0 24 24",
|
|
576
|
+
fill: "none",
|
|
577
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
578
|
+
"aria-hidden": "true"
|
|
579
|
+
}, [...e[0] || (e[0] = [
|
|
580
|
+
s("path", {
|
|
581
|
+
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
582
|
+
stroke: "currentColor",
|
|
583
|
+
"stroke-width": "1.5",
|
|
584
|
+
"stroke-linejoin": "round"
|
|
585
|
+
}, null, -1),
|
|
586
|
+
s("path", {
|
|
587
|
+
d: "M16.5 8C17.5 9 18 10.5 18 12C18 13.5 17.5 15 16.5 16",
|
|
588
|
+
stroke: "currentColor",
|
|
589
|
+
"stroke-width": "1.5",
|
|
590
|
+
"stroke-linecap": "round"
|
|
591
|
+
}, null, -1)
|
|
592
|
+
])], 2));
|
|
593
|
+
}
|
|
594
|
+
}), et = { name: "IconVolumeMuted" }, tt = /* @__PURE__ */ T({
|
|
595
|
+
...et,
|
|
596
|
+
props: {
|
|
597
|
+
class: {}
|
|
598
|
+
},
|
|
599
|
+
setup(t) {
|
|
600
|
+
const a = t;
|
|
601
|
+
return (l, e) => (i(), v("svg", {
|
|
602
|
+
class: C(["gvp-icon", a.class]),
|
|
603
|
+
width: "18",
|
|
604
|
+
height: "18",
|
|
605
|
+
viewBox: "0 0 24 24",
|
|
606
|
+
fill: "none",
|
|
607
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
608
|
+
"aria-hidden": "true"
|
|
609
|
+
}, [...e[0] || (e[0] = [
|
|
610
|
+
s("path", {
|
|
611
|
+
d: "M3 14V10C3 9.44772 3.44772 9 4 9H6.58579C6.851 9 7.10536 8.89464 7.29289 8.70711L11.2929 4.70711C11.9229 4.07714 13 4.52331 13 5.41421V18.5858C13 19.4767 11.9229 19.9229 11.2929 19.2929L7.29289 15.2929C7.10536 15.1054 6.851 15 6.58579 15H4C3.44772 15 3 14.5523 3 14Z",
|
|
612
|
+
stroke: "currentColor",
|
|
613
|
+
"stroke-width": "1.5",
|
|
614
|
+
"stroke-linejoin": "round"
|
|
615
|
+
}, null, -1),
|
|
616
|
+
s("path", {
|
|
617
|
+
d: "M16 9L22 15M22 9L16 15",
|
|
618
|
+
stroke: "currentColor",
|
|
619
|
+
"stroke-width": "1.5",
|
|
620
|
+
"stroke-linecap": "round"
|
|
621
|
+
}, null, -1)
|
|
622
|
+
])], 2));
|
|
623
|
+
}
|
|
624
|
+
}), nt = { name: "IconPiP" }, Ce = /* @__PURE__ */ T({
|
|
625
|
+
...nt,
|
|
626
|
+
props: {
|
|
627
|
+
class: {}
|
|
628
|
+
},
|
|
629
|
+
setup(t) {
|
|
630
|
+
const a = t;
|
|
631
|
+
return (l, e) => (i(), v("svg", {
|
|
632
|
+
class: C(["gvp-icon", a.class]),
|
|
633
|
+
width: "18",
|
|
634
|
+
height: "18",
|
|
635
|
+
viewBox: "0 0 24 24",
|
|
636
|
+
fill: "none",
|
|
637
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
638
|
+
"aria-hidden": "true"
|
|
639
|
+
}, [...e[0] || (e[0] = [
|
|
640
|
+
s("rect", {
|
|
641
|
+
x: "2",
|
|
642
|
+
y: "4",
|
|
643
|
+
width: "20",
|
|
644
|
+
height: "16",
|
|
645
|
+
rx: "2",
|
|
646
|
+
stroke: "currentColor",
|
|
647
|
+
"stroke-width": "1.5"
|
|
648
|
+
}, null, -1),
|
|
649
|
+
s("rect", {
|
|
650
|
+
x: "12",
|
|
651
|
+
y: "12",
|
|
652
|
+
width: "8",
|
|
653
|
+
height: "5",
|
|
654
|
+
rx: "1",
|
|
655
|
+
fill: "currentColor"
|
|
656
|
+
}, null, -1)
|
|
657
|
+
])], 2));
|
|
658
|
+
}
|
|
659
|
+
}), ot = { name: "IconFullscreen" }, at = /* @__PURE__ */ T({
|
|
660
|
+
...ot,
|
|
661
|
+
props: {
|
|
662
|
+
class: {}
|
|
663
|
+
},
|
|
664
|
+
setup(t) {
|
|
665
|
+
const a = t;
|
|
666
|
+
return (l, e) => (i(), v("svg", {
|
|
667
|
+
class: C(["gvp-icon", a.class]),
|
|
668
|
+
width: "18",
|
|
669
|
+
height: "18",
|
|
670
|
+
viewBox: "0 0 24 24",
|
|
671
|
+
fill: "none",
|
|
672
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
673
|
+
"aria-hidden": "true"
|
|
674
|
+
}, [...e[0] || (e[0] = [
|
|
675
|
+
s("path", {
|
|
676
|
+
d: "M4 9V4H9M15 4H20V9M20 15V20H15M9 20H4V15",
|
|
677
|
+
stroke: "currentColor",
|
|
678
|
+
"stroke-width": "1.75",
|
|
679
|
+
"stroke-linecap": "round",
|
|
680
|
+
"stroke-linejoin": "round"
|
|
681
|
+
}, null, -1)
|
|
682
|
+
])], 2));
|
|
683
|
+
}
|
|
684
|
+
}), st = { name: "IconFullscreenExit" }, lt = /* @__PURE__ */ T({
|
|
685
|
+
...st,
|
|
686
|
+
props: {
|
|
687
|
+
class: {}
|
|
688
|
+
},
|
|
689
|
+
setup(t) {
|
|
690
|
+
const a = t;
|
|
691
|
+
return (l, e) => (i(), v("svg", {
|
|
692
|
+
class: C(["gvp-icon", a.class]),
|
|
693
|
+
width: "18",
|
|
694
|
+
height: "18",
|
|
695
|
+
viewBox: "0 0 24 24",
|
|
696
|
+
fill: "none",
|
|
697
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
698
|
+
"aria-hidden": "true"
|
|
699
|
+
}, [...e[0] || (e[0] = [
|
|
700
|
+
s("path", {
|
|
701
|
+
d: "M9 4V9H4M15 9V4H20M15 20V15H20M9 15H4V20",
|
|
702
|
+
stroke: "currentColor",
|
|
703
|
+
"stroke-width": "1.75",
|
|
704
|
+
"stroke-linecap": "round",
|
|
705
|
+
"stroke-linejoin": "round"
|
|
706
|
+
}, null, -1)
|
|
707
|
+
])], 2));
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
function ge(t) {
|
|
711
|
+
if (!Number.isFinite(t) || t < 0) return "--:--";
|
|
712
|
+
const a = Math.floor(t), l = Math.floor(a / 3600), e = Math.floor(a % 3600 / 60), m = (a % 60).toString().padStart(2, "0");
|
|
713
|
+
if (l > 0) {
|
|
714
|
+
const g = e.toString().padStart(2, "0");
|
|
715
|
+
return `${l}:${g}:${m}`;
|
|
716
|
+
}
|
|
717
|
+
return `${e}:${m}`;
|
|
718
|
+
}
|
|
719
|
+
const rt = { class: "gvp-controls-row" }, it = ["aria-label", "aria-pressed"], ut = { class: "gvp-seek" }, ct = { class: "gvp-seek-track" }, dt = ["value", "disabled", "aria-valuemax", "aria-valuenow"], vt = {
|
|
720
|
+
class: "gvp-time",
|
|
721
|
+
"aria-live": "off"
|
|
722
|
+
}, pt = ["aria-expanded", "aria-label"], ft = { class: "gvp-speed-label" }, mt = {
|
|
723
|
+
key: 0,
|
|
724
|
+
class: "gvp-speed-menu",
|
|
725
|
+
role: "listbox",
|
|
726
|
+
"aria-label": "Playback speed"
|
|
727
|
+
}, ht = ["aria-selected", "onClick"], gt = ["aria-expanded", "aria-pressed"], kt = {
|
|
728
|
+
key: 0,
|
|
729
|
+
class: "gvp-captions-menu",
|
|
730
|
+
role: "listbox",
|
|
731
|
+
"aria-label": "Captions"
|
|
732
|
+
}, yt = ["aria-selected"], wt = ["aria-selected", "onClick"], bt = ["aria-label", "aria-pressed"], Ct = {
|
|
733
|
+
key: 0,
|
|
734
|
+
class: "gvp-volume-slider-wrap"
|
|
735
|
+
}, xt = { class: "gvp-volume-track" }, _t = ["value", "aria-valuenow"], Et = ["aria-label", "aria-pressed"], $t = ["aria-label", "aria-pressed"], Lt = 3e3, Pt = /* @__PURE__ */ T({
|
|
736
|
+
__name: "ControlBar",
|
|
737
|
+
props: {
|
|
738
|
+
video: {},
|
|
739
|
+
isPlaying: { type: Boolean },
|
|
740
|
+
container: {},
|
|
741
|
+
onTogglePlay: { type: Function }
|
|
742
|
+
},
|
|
743
|
+
setup(t) {
|
|
744
|
+
const a = (() => {
|
|
745
|
+
if (typeof navigator > "u") return !1;
|
|
746
|
+
const n = navigator.userAgent;
|
|
747
|
+
return /iPad|iPhone|iPod/.test(n) || n.includes("Mac") && navigator.maxTouchPoints > 1;
|
|
748
|
+
})(), l = typeof navigator > "u" ? !1 : /iPhone|iPod/.test(navigator.userAgent), e = [0.5, 0.75, 1, 1.25, 1.5, 2], o = t, m = w(!0);
|
|
749
|
+
let g = null;
|
|
750
|
+
function p() {
|
|
751
|
+
g !== null && (clearTimeout(g), g = null);
|
|
752
|
+
}
|
|
753
|
+
function L() {
|
|
754
|
+
p(), o.isPlaying && (g = setTimeout(() => {
|
|
755
|
+
m.value = !1;
|
|
756
|
+
}, Lt));
|
|
757
|
+
}
|
|
758
|
+
function P() {
|
|
759
|
+
m.value = !0, L();
|
|
760
|
+
}
|
|
761
|
+
F(() => o.isPlaying, (n) => {
|
|
762
|
+
n ? L() : (p(), m.value = !0);
|
|
763
|
+
}, { immediate: !0 }), F(() => o.container, (n) => {
|
|
764
|
+
if (!n) return;
|
|
765
|
+
const u = () => P();
|
|
766
|
+
n.addEventListener("mousemove", u), n.addEventListener("touchstart", u), n.addEventListener("focusin", u);
|
|
767
|
+
}, { immediate: !0 });
|
|
768
|
+
const x = w(0), _ = w(0), k = w(0);
|
|
769
|
+
F(() => o.video, (n) => {
|
|
770
|
+
if (!n) return;
|
|
771
|
+
const u = () => {
|
|
772
|
+
x.value = n.currentTime;
|
|
773
|
+
}, f = () => {
|
|
774
|
+
_.value = Number.isFinite(n.duration) ? n.duration : 0;
|
|
775
|
+
}, $ = () => {
|
|
776
|
+
const V = n.buffered;
|
|
777
|
+
if (!V || V.length === 0) {
|
|
778
|
+
k.value = 0;
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
let me = V.end(V.length - 1);
|
|
782
|
+
for (let ne = 0; ne < V.length; ne++)
|
|
783
|
+
if (V.start(ne) <= n.currentTime && n.currentTime <= V.end(ne)) {
|
|
784
|
+
me = V.end(ne);
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
k.value = me;
|
|
788
|
+
};
|
|
789
|
+
u(), f(), $(), n.addEventListener("timeupdate", u), n.addEventListener("durationchange", f), n.addEventListener("loadedmetadata", f), n.addEventListener("progress", $), n.addEventListener("timeupdate", $);
|
|
790
|
+
}, { immediate: !0 });
|
|
791
|
+
const h = () => _.value > 0, r = () => h() ? x.value / _.value * 100 : 0, b = () => h() ? k.value / _.value * 100 : 0;
|
|
792
|
+
function E(n) {
|
|
793
|
+
const u = o.video;
|
|
794
|
+
if (!u || !h()) return;
|
|
795
|
+
const f = Number(n.target.value) / 100 * _.value;
|
|
796
|
+
u.currentTime = f, x.value = f;
|
|
797
|
+
}
|
|
798
|
+
const R = w(1), H = w(!1);
|
|
799
|
+
F(() => o.video, (n) => {
|
|
800
|
+
if (!n) return;
|
|
801
|
+
const u = () => {
|
|
802
|
+
R.value = n.volume, H.value = n.muted;
|
|
803
|
+
};
|
|
804
|
+
u(), n.addEventListener("volumechange", u);
|
|
805
|
+
}, { immediate: !0 });
|
|
806
|
+
function A() {
|
|
807
|
+
o.video && (o.video.muted = !o.video.muted);
|
|
28
808
|
}
|
|
29
809
|
function y(n) {
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
(n)
|
|
45
|
-
|
|
810
|
+
const u = o.video;
|
|
811
|
+
if (!u) return;
|
|
812
|
+
const f = Number(n.target.value) / 100;
|
|
813
|
+
u.volume = f, f > 0 && u.muted && (u.muted = !1);
|
|
814
|
+
}
|
|
815
|
+
const I = w(1), D = w(!1), B = w(null);
|
|
816
|
+
F(() => o.video, (n) => {
|
|
817
|
+
if (!n) return;
|
|
818
|
+
const u = () => {
|
|
819
|
+
I.value = n.playbackRate;
|
|
820
|
+
};
|
|
821
|
+
u(), n.addEventListener("ratechange", u);
|
|
822
|
+
}, { immediate: !0 });
|
|
823
|
+
function N(n) {
|
|
824
|
+
o.video && (o.video.playbackRate = n), I.value = n, D.value = !1;
|
|
825
|
+
}
|
|
826
|
+
const G = w([]), S = w(-1), z = w(!1), te = w(null);
|
|
827
|
+
function se(n) {
|
|
828
|
+
const u = [];
|
|
829
|
+
for (let $ = 0; $ < n.length; $++) {
|
|
830
|
+
const V = n[$];
|
|
831
|
+
(V.kind === "subtitles" || V.kind === "captions") && u.push({ index: $, label: V.label || V.language || `Track ${$ + 1}` });
|
|
46
832
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
833
|
+
G.value = u;
|
|
834
|
+
let f = -1;
|
|
835
|
+
for (let $ = 0; $ < n.length; $++)
|
|
836
|
+
if (n[$].mode === "showing") {
|
|
837
|
+
f = $;
|
|
838
|
+
break;
|
|
839
|
+
}
|
|
840
|
+
S.value = f;
|
|
841
|
+
}
|
|
842
|
+
F(() => o.video, (n) => {
|
|
843
|
+
if (!n) {
|
|
844
|
+
G.value = [], S.value = -1;
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
const u = n.textTracks;
|
|
848
|
+
se(u);
|
|
849
|
+
const f = () => se(u);
|
|
850
|
+
typeof u.addEventListener == "function" && (u.addEventListener("addtrack", f), u.addEventListener("removetrack", f), u.addEventListener("change", f));
|
|
851
|
+
}, { immediate: !0 });
|
|
852
|
+
function de(n) {
|
|
853
|
+
var f;
|
|
854
|
+
const u = (f = o.video) == null ? void 0 : f.textTracks;
|
|
855
|
+
if (u) {
|
|
856
|
+
for (let $ = 0; $ < u.length; $++) u[$].mode = $ === n ? "showing" : "hidden";
|
|
857
|
+
S.value = n, z.value = !1;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function Q() {
|
|
861
|
+
var u;
|
|
862
|
+
const n = (u = o.video) == null ? void 0 : u.textTracks;
|
|
863
|
+
if (n) {
|
|
864
|
+
for (let f = 0; f < n.length; f++) n[f].mode = "hidden";
|
|
865
|
+
S.value = -1, z.value = !1;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
const Y = w(!1), ve = typeof document < "u" && !!document.pictureInPictureEnabled;
|
|
869
|
+
F(() => o.video, (n) => {
|
|
870
|
+
n && (n.addEventListener("enterpictureinpicture", () => {
|
|
871
|
+
Y.value = !0;
|
|
872
|
+
}), n.addEventListener("leavepictureinpicture", () => {
|
|
873
|
+
Y.value = !1;
|
|
874
|
+
}));
|
|
875
|
+
}, { immediate: !0 });
|
|
876
|
+
function pe() {
|
|
877
|
+
o.video && (document.pictureInPictureElement ? document.exitPictureInPicture().catch(() => {
|
|
878
|
+
}) : o.video.requestPictureInPicture().catch(() => {
|
|
879
|
+
}));
|
|
880
|
+
}
|
|
881
|
+
const W = w(!1), le = typeof document > "u" ? !1 : !!(document.fullscreenEnabled || document.webkitFullscreenEnabled);
|
|
882
|
+
function d() {
|
|
883
|
+
return document.fullscreenElement ?? document.webkitFullscreenElement ?? null;
|
|
884
|
+
}
|
|
885
|
+
function c(n) {
|
|
886
|
+
const u = n.requestFullscreen ?? n.webkitRequestFullscreen;
|
|
887
|
+
return u ? u.call(n) : Promise.reject(new Error("unsupported"));
|
|
888
|
+
}
|
|
889
|
+
function O() {
|
|
890
|
+
const n = document.exitFullscreen ?? document.webkitExitFullscreen;
|
|
891
|
+
return n ? n.call(document) : Promise.reject(new Error("unsupported"));
|
|
892
|
+
}
|
|
893
|
+
function K() {
|
|
894
|
+
W.value = d() === o.container;
|
|
895
|
+
}
|
|
896
|
+
fe(() => {
|
|
897
|
+
document.addEventListener("fullscreenchange", K), document.addEventListener("webkitfullscreenchange", K);
|
|
898
|
+
}), X(() => {
|
|
899
|
+
p(), document.removeEventListener("fullscreenchange", K), document.removeEventListener("webkitfullscreenchange", K);
|
|
900
|
+
});
|
|
901
|
+
function re() {
|
|
902
|
+
var n, u;
|
|
903
|
+
if (l) {
|
|
904
|
+
(u = (n = o.video) == null ? void 0 : n.webkitEnterFullscreen) == null || u.call(n);
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
W.value ? O().catch(() => {
|
|
908
|
+
}) : o.container && c(o.container).catch(() => {
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
const ie = le || l && o.video !== null && typeof o.video.webkitEnterFullscreen == "function";
|
|
912
|
+
function ue(n, u) {
|
|
913
|
+
function f(V) {
|
|
914
|
+
u.value && !u.value.contains(V.target) && (n.value = !1);
|
|
915
|
+
}
|
|
916
|
+
function $(V) {
|
|
917
|
+
V.key === "Escape" && (n.value = !1);
|
|
918
|
+
}
|
|
919
|
+
F(n, (V) => {
|
|
920
|
+
V ? (document.addEventListener("mousedown", f), document.addEventListener("keydown", $)) : (document.removeEventListener("mousedown", f), document.removeEventListener("keydown", $));
|
|
921
|
+
}), X(() => {
|
|
922
|
+
document.removeEventListener("mousedown", f), document.removeEventListener("keydown", $);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
return ue(D, B), ue(z, te), (n, u) => (i(), v("div", {
|
|
926
|
+
role: "toolbar",
|
|
927
|
+
"aria-label": "Video controls",
|
|
928
|
+
class: C(["gvp-controls", !m.value && "is-hidden"]),
|
|
929
|
+
onMouseenter: p,
|
|
930
|
+
onMouseleave: L
|
|
60
931
|
}, [
|
|
61
|
-
|
|
62
|
-
|
|
932
|
+
s("div", rt, [
|
|
933
|
+
s("button", {
|
|
934
|
+
type: "button",
|
|
935
|
+
class: "gvp-ctrl-btn",
|
|
936
|
+
"aria-label": t.isPlaying ? "Pause" : "Play",
|
|
937
|
+
"aria-pressed": t.isPlaying,
|
|
938
|
+
onClick: u[0] || (u[0] = //@ts-ignore
|
|
939
|
+
(...f) => t.onTogglePlay && t.onTogglePlay(...f))
|
|
940
|
+
}, [
|
|
941
|
+
t.isPlaying ? (i(), U(We, { key: 0 })) : (i(), U(Ke, { key: 1 }))
|
|
942
|
+
], 8, it),
|
|
943
|
+
s("div", ut, [
|
|
944
|
+
s("div", ct, [
|
|
945
|
+
s("div", {
|
|
946
|
+
class: "gvp-seek-buffered",
|
|
947
|
+
style: ce({ width: `${b()}%` })
|
|
948
|
+
}, null, 4),
|
|
949
|
+
s("div", {
|
|
950
|
+
class: "gvp-seek-progress",
|
|
951
|
+
style: ce({ width: `${r()}%` })
|
|
952
|
+
}, null, 4)
|
|
953
|
+
]),
|
|
954
|
+
s("input", {
|
|
955
|
+
type: "range",
|
|
956
|
+
class: "gvp-seek-input",
|
|
957
|
+
min: 0,
|
|
958
|
+
max: 100,
|
|
959
|
+
step: 0.1,
|
|
960
|
+
value: r(),
|
|
961
|
+
disabled: !h(),
|
|
962
|
+
"aria-label": "Seek",
|
|
963
|
+
"aria-valuemin": 0,
|
|
964
|
+
"aria-valuemax": Math.floor(_.value),
|
|
965
|
+
"aria-valuenow": Math.floor(x.value),
|
|
966
|
+
onInput: E
|
|
967
|
+
}, null, 40, dt)
|
|
968
|
+
]),
|
|
969
|
+
s("span", vt, q(J(ge)(x.value)) + " / " + q(J(ge)(_.value)), 1),
|
|
970
|
+
s("div", {
|
|
971
|
+
ref_key: "speedRootEl",
|
|
972
|
+
ref: B,
|
|
973
|
+
class: "gvp-speed"
|
|
974
|
+
}, [
|
|
975
|
+
s("button", {
|
|
976
|
+
type: "button",
|
|
977
|
+
class: "gvp-ctrl-btn gvp-speed-btn",
|
|
978
|
+
"aria-haspopup": "listbox",
|
|
979
|
+
"aria-expanded": D.value,
|
|
980
|
+
"aria-label": `Playback speed: ${I.value === 1 ? "1×" : I.value + "×"}`,
|
|
981
|
+
onClick: u[1] || (u[1] = (f) => D.value = !D.value)
|
|
982
|
+
}, [
|
|
983
|
+
j(we),
|
|
984
|
+
s("span", ft, q(I.value === 1 ? "1×" : `${I.value}×`), 1)
|
|
985
|
+
], 8, pt),
|
|
986
|
+
D.value ? (i(), v("ul", mt, [
|
|
987
|
+
(i(), v(oe, null, ae(e, (f) => s("li", { key: f }, [
|
|
988
|
+
s("button", {
|
|
989
|
+
type: "button",
|
|
990
|
+
role: "option",
|
|
991
|
+
"aria-selected": f === I.value,
|
|
992
|
+
class: C(["gvp-speed-menu-item", { "is-active": f === I.value }]),
|
|
993
|
+
onClick: ($) => N(f)
|
|
994
|
+
}, q(f === 1 ? "Normal" : `${f}×`), 11, ht)
|
|
995
|
+
])), 64))
|
|
996
|
+
])) : M("", !0)
|
|
997
|
+
], 512),
|
|
998
|
+
G.value.length > 0 ? (i(), v("div", {
|
|
999
|
+
key: 0,
|
|
1000
|
+
ref_key: "captionsRootEl",
|
|
1001
|
+
ref: te,
|
|
1002
|
+
class: "gvp-captions"
|
|
1003
|
+
}, [
|
|
1004
|
+
s("button", {
|
|
1005
|
+
type: "button",
|
|
1006
|
+
class: C(["gvp-ctrl-btn", S.value >= 0 && "is-active"]),
|
|
1007
|
+
"aria-haspopup": "listbox",
|
|
1008
|
+
"aria-expanded": z.value,
|
|
1009
|
+
"aria-label": "Captions",
|
|
1010
|
+
"aria-pressed": S.value >= 0,
|
|
1011
|
+
onClick: u[2] || (u[2] = (f) => z.value = !z.value)
|
|
1012
|
+
}, [
|
|
1013
|
+
j(be)
|
|
1014
|
+
], 10, gt),
|
|
1015
|
+
z.value ? (i(), v("ul", kt, [
|
|
1016
|
+
s("li", null, [
|
|
1017
|
+
s("button", {
|
|
1018
|
+
type: "button",
|
|
1019
|
+
role: "option",
|
|
1020
|
+
"aria-selected": S.value === -1,
|
|
1021
|
+
class: C(["gvp-captions-menu-item", { "is-active": S.value === -1 }]),
|
|
1022
|
+
onClick: Q
|
|
1023
|
+
}, "Off", 10, yt)
|
|
1024
|
+
]),
|
|
1025
|
+
(i(!0), v(oe, null, ae(G.value, (f) => (i(), v("li", {
|
|
1026
|
+
key: f.index
|
|
1027
|
+
}, [
|
|
1028
|
+
s("button", {
|
|
1029
|
+
type: "button",
|
|
1030
|
+
role: "option",
|
|
1031
|
+
"aria-selected": f.index === S.value,
|
|
1032
|
+
class: C(["gvp-captions-menu-item", { "is-active": f.index === S.value }]),
|
|
1033
|
+
onClick: ($) => de(f.index)
|
|
1034
|
+
}, q(f.label), 11, wt)
|
|
1035
|
+
]))), 128))
|
|
1036
|
+
])) : M("", !0)
|
|
1037
|
+
], 512)) : M("", !0),
|
|
1038
|
+
s("div", {
|
|
1039
|
+
class: C(["gvp-volume", !J(a) && "is-expandable"])
|
|
1040
|
+
}, [
|
|
1041
|
+
s("button", {
|
|
1042
|
+
type: "button",
|
|
1043
|
+
class: "gvp-ctrl-btn",
|
|
1044
|
+
"aria-label": H.value ? "Unmute" : "Mute",
|
|
1045
|
+
"aria-pressed": H.value,
|
|
1046
|
+
onClick: A
|
|
1047
|
+
}, [
|
|
1048
|
+
H.value || R.value === 0 ? (i(), U(tt, { key: 0 })) : R.value < 0.5 ? (i(), U(Qe, { key: 1 })) : (i(), U(Xe, { key: 2 }))
|
|
1049
|
+
], 8, bt),
|
|
1050
|
+
J(a) ? M("", !0) : (i(), v("div", Ct, [
|
|
1051
|
+
s("div", xt, [
|
|
1052
|
+
s("div", {
|
|
1053
|
+
class: "gvp-volume-fill",
|
|
1054
|
+
style: ce({ width: `${H.value ? 0 : Math.round(R.value * 100)}%` })
|
|
1055
|
+
}, null, 4)
|
|
1056
|
+
]),
|
|
1057
|
+
s("input", {
|
|
1058
|
+
type: "range",
|
|
1059
|
+
class: "gvp-volume-input",
|
|
1060
|
+
min: 0,
|
|
1061
|
+
max: 100,
|
|
1062
|
+
step: 1,
|
|
1063
|
+
value: H.value ? 0 : Math.round(R.value * 100),
|
|
1064
|
+
"aria-label": "Volume",
|
|
1065
|
+
"aria-valuemin": 0,
|
|
1066
|
+
"aria-valuemax": 100,
|
|
1067
|
+
"aria-valuenow": H.value ? 0 : Math.round(R.value * 100),
|
|
1068
|
+
onInput: y
|
|
1069
|
+
}, null, 40, _t)
|
|
1070
|
+
]))
|
|
1071
|
+
], 2),
|
|
1072
|
+
J(ve) ? (i(), v("button", {
|
|
1073
|
+
key: 1,
|
|
1074
|
+
type: "button",
|
|
1075
|
+
class: C(["gvp-ctrl-btn", Y.value && "is-active"]),
|
|
1076
|
+
"aria-label": Y.value ? "Exit picture-in-picture" : "Picture-in-picture",
|
|
1077
|
+
"aria-pressed": Y.value,
|
|
1078
|
+
onClick: pe
|
|
1079
|
+
}, [
|
|
1080
|
+
j(Ce)
|
|
1081
|
+
], 10, Et)) : M("", !0),
|
|
1082
|
+
J(ie) ? (i(), v("button", {
|
|
1083
|
+
key: 2,
|
|
1084
|
+
type: "button",
|
|
1085
|
+
class: C(["gvp-ctrl-btn", W.value && "is-active"]),
|
|
1086
|
+
"aria-label": W.value ? "Exit fullscreen" : "Enter fullscreen",
|
|
1087
|
+
"aria-pressed": W.value,
|
|
1088
|
+
onClick: re
|
|
1089
|
+
}, [
|
|
1090
|
+
W.value ? (i(), U(lt, { key: 0 })) : (i(), U(at, { key: 1 }))
|
|
1091
|
+
], 10, $t)) : M("", !0)
|
|
1092
|
+
])
|
|
1093
|
+
], 34));
|
|
63
1094
|
}
|
|
64
|
-
}),
|
|
65
|
-
...
|
|
1095
|
+
}), Mt = { name: "IconDesktop" }, Tt = /* @__PURE__ */ T({
|
|
1096
|
+
...Mt,
|
|
66
1097
|
props: {
|
|
67
1098
|
class: {}
|
|
68
1099
|
},
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
return (
|
|
72
|
-
class:
|
|
1100
|
+
setup(t) {
|
|
1101
|
+
const a = t;
|
|
1102
|
+
return (l, e) => (i(), v("svg", {
|
|
1103
|
+
class: C(["gvp-icon", a.class]),
|
|
73
1104
|
width: "20",
|
|
74
1105
|
height: "20",
|
|
75
1106
|
viewBox: "0 0 24 24",
|
|
76
1107
|
fill: "none",
|
|
77
1108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
78
1109
|
"aria-hidden": "true"
|
|
79
|
-
}, [...
|
|
80
|
-
|
|
1110
|
+
}, [...e[0] || (e[0] = [
|
|
1111
|
+
s("path", {
|
|
81
1112
|
d: "M14 2H10C6.72077 2 5.08116 2 3.91891 2.81382C3.48891 3.1149 3.1149 3.48891 2.81382 3.91891C2 5.08116 2 6.72077 2 10C2 13.2792 2 14.9188 2.81382 16.0811C3.1149 16.5111 3.48891 16.8851 3.91891 17.1862C5.08116 18 6.72077 18 10 18H14C17.2792 18 18.9188 18 20.0811 17.1862C20.5111 16.8851 20.8851 16.5111 21.1862 16.0811C22 14.9188 22 13.2792 22 10C22 6.72077 22 5.08116 21.1862 3.91891C20.8851 3.48891 20.5111 3.1149 20.0811 2.81382C18.9188 2 17.2792 2 14 2Z",
|
|
82
1113
|
stroke: "currentColor",
|
|
83
1114
|
"stroke-width": "1.5",
|
|
84
1115
|
"stroke-linecap": "round"
|
|
85
1116
|
}, null, -1),
|
|
86
|
-
|
|
1117
|
+
s("path", {
|
|
87
1118
|
d: "M11 15H13",
|
|
88
1119
|
stroke: "currentColor",
|
|
89
1120
|
"stroke-width": "1.5",
|
|
90
1121
|
"stroke-linecap": "round",
|
|
91
1122
|
"stroke-linejoin": "round"
|
|
92
1123
|
}, null, -1),
|
|
93
|
-
|
|
1124
|
+
s("path", {
|
|
94
1125
|
d: "M14.5 22L14.1845 21.5811C13.4733 20.6369 13.2969 19.1944 13.7468 18M9.5 22L9.8155 21.5811C10.5267 20.6369 10.7031 19.1944 10.2532 18",
|
|
95
1126
|
stroke: "currentColor",
|
|
96
1127
|
"stroke-width": "1.5",
|
|
97
1128
|
"stroke-linecap": "round"
|
|
98
1129
|
}, null, -1),
|
|
99
|
-
|
|
1130
|
+
s("path", {
|
|
100
1131
|
d: "M7 22H17",
|
|
101
1132
|
stroke: "currentColor",
|
|
102
1133
|
"stroke-width": "1.5",
|
|
@@ -104,36 +1135,36 @@ const Y = ["muted", "loop", "controls", "autoplay", "playsinline", "preload", "p
|
|
|
104
1135
|
}, null, -1)
|
|
105
1136
|
])], 2));
|
|
106
1137
|
}
|
|
107
|
-
}),
|
|
108
|
-
...
|
|
1138
|
+
}), It = { name: "IconMobile" }, St = /* @__PURE__ */ T({
|
|
1139
|
+
...It,
|
|
109
1140
|
props: {
|
|
110
1141
|
class: {}
|
|
111
1142
|
},
|
|
112
|
-
setup(
|
|
113
|
-
const
|
|
114
|
-
return (
|
|
115
|
-
class:
|
|
1143
|
+
setup(t) {
|
|
1144
|
+
const a = t;
|
|
1145
|
+
return (l, e) => (i(), v("svg", {
|
|
1146
|
+
class: C(["gvp-icon", a.class]),
|
|
116
1147
|
width: "20",
|
|
117
1148
|
height: "20",
|
|
118
1149
|
viewBox: "0 0 24 24",
|
|
119
1150
|
fill: "none",
|
|
120
1151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
121
1152
|
"aria-hidden": "true"
|
|
122
|
-
}, [...
|
|
123
|
-
|
|
1153
|
+
}, [...e[0] || (e[0] = [
|
|
1154
|
+
s("path", {
|
|
124
1155
|
d: "M5 9C5 5.70017 5 4.05025 6.02513 3.02513C7.05025 2 8.70017 2 12 2C15.2998 2 16.9497 2 17.9749 3.02513C19 4.05025 19 5.70017 19 9V15C19 18.2998 19 19.9497 17.9749 20.9749C16.9497 22 15.2998 22 12 22C8.70017 22 7.05025 22 6.02513 20.9749C5 19.9497 5 18.2998 5 15V9Z",
|
|
125
1156
|
stroke: "currentColor",
|
|
126
1157
|
"stroke-width": "2",
|
|
127
1158
|
"stroke-linecap": "round"
|
|
128
1159
|
}, null, -1),
|
|
129
|
-
|
|
1160
|
+
s("path", {
|
|
130
1161
|
d: "M11 19H13",
|
|
131
1162
|
stroke: "currentColor",
|
|
132
1163
|
"stroke-width": "2",
|
|
133
1164
|
"stroke-linecap": "round",
|
|
134
1165
|
"stroke-linejoin": "round"
|
|
135
1166
|
}, null, -1),
|
|
136
|
-
|
|
1167
|
+
s("path", {
|
|
137
1168
|
d: "M9 2L9.089 2.53402C9.28188 3.69129 9.37832 4.26993 9.77519 4.62204C10.1892 4.98934 10.7761 5 12 5C13.2239 5 13.8108 4.98934 14.2248 4.62204C14.6217 4.26993 14.7181 3.69129 14.911 2.53402L15 2",
|
|
138
1169
|
stroke: "currentColor",
|
|
139
1170
|
"stroke-width": "2",
|
|
@@ -141,121 +1172,121 @@ const Y = ["muted", "loop", "controls", "autoplay", "playsinline", "preload", "p
|
|
|
141
1172
|
}, null, -1)
|
|
142
1173
|
])], 2));
|
|
143
1174
|
}
|
|
144
|
-
}),
|
|
145
|
-
...
|
|
1175
|
+
}), Ht = { name: "IconPlay" }, Bt = /* @__PURE__ */ T({
|
|
1176
|
+
...Ht,
|
|
146
1177
|
props: {
|
|
147
1178
|
class: {}
|
|
148
1179
|
},
|
|
149
|
-
setup(
|
|
150
|
-
const
|
|
151
|
-
return (
|
|
152
|
-
class:
|
|
1180
|
+
setup(t) {
|
|
1181
|
+
const a = t;
|
|
1182
|
+
return (l, e) => (i(), v("svg", {
|
|
1183
|
+
class: C(["gvp-icon", a.class]),
|
|
153
1184
|
width: "22",
|
|
154
1185
|
height: "22",
|
|
155
1186
|
viewBox: "0 0 16 16",
|
|
156
1187
|
fill: "none",
|
|
157
1188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
158
1189
|
"aria-hidden": "true"
|
|
159
|
-
}, [...
|
|
160
|
-
|
|
1190
|
+
}, [...e[0] || (e[0] = [
|
|
1191
|
+
s("path", {
|
|
161
1192
|
d: "M5.3335 11.45V4.54997C5.3335 4.36108 5.40016 4.20275 5.5335 4.07497C5.66683 3.94719 5.82238 3.8833 6.00016 3.8833C6.05572 3.8833 6.11405 3.89163 6.17516 3.9083C6.23627 3.92497 6.29461 3.94997 6.35016 3.9833L11.7835 7.4333C11.8835 7.49997 11.9585 7.5833 12.0085 7.6833C12.0585 7.7833 12.0835 7.88886 12.0835 7.99997C12.0835 8.11108 12.0585 8.21663 12.0085 8.31663C11.9585 8.41663 11.8835 8.49997 11.7835 8.56663L6.35016 12.0166C6.29461 12.05 6.23627 12.075 6.17516 12.0916C6.11405 12.1083 6.05572 12.1166 6.00016 12.1166C5.82238 12.1166 5.66683 12.0527 5.5335 11.925C5.40016 11.7972 5.3335 11.6389 5.3335 11.45Z",
|
|
162
1193
|
fill: "currentColor"
|
|
163
1194
|
}, null, -1)
|
|
164
1195
|
])], 2));
|
|
165
1196
|
}
|
|
166
|
-
}),
|
|
167
|
-
...
|
|
1197
|
+
}), Vt = { name: "IconX" }, At = /* @__PURE__ */ T({
|
|
1198
|
+
...Vt,
|
|
168
1199
|
props: {
|
|
169
1200
|
class: {}
|
|
170
1201
|
},
|
|
171
|
-
setup(
|
|
172
|
-
const
|
|
173
|
-
return (
|
|
174
|
-
class:
|
|
1202
|
+
setup(t) {
|
|
1203
|
+
const a = t;
|
|
1204
|
+
return (l, e) => (i(), v("svg", {
|
|
1205
|
+
class: C(["gvp-icon", a.class]),
|
|
175
1206
|
width: "14",
|
|
176
1207
|
height: "14",
|
|
177
1208
|
viewBox: "0 0 14 14",
|
|
178
1209
|
fill: "none",
|
|
179
1210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
180
1211
|
"aria-hidden": "true"
|
|
181
|
-
}, [...
|
|
182
|
-
|
|
1212
|
+
}, [...e[0] || (e[0] = [
|
|
1213
|
+
s("path", {
|
|
183
1214
|
d: "M6.94994 5.53594L12.1929 0.292938C12.5834 -0.0975275 13.2165 -0.0975279 13.6069 0.292938C13.9974 0.683403 13.9974 1.31647 13.6069 1.70694L8.36394 6.94994L13.6069 12.1929C13.9974 12.5834 13.9974 13.2165 13.6069 13.6069C13.2165 13.9974 12.5834 13.9974 12.1929 13.6069L6.94994 8.36394L1.70694 13.6069C1.31647 13.9974 0.683403 13.9974 0.292938 13.6069C-0.0975279 13.2165 -0.0975277 12.5834 0.292938 12.1929L5.53594 6.94994L0.292938 1.70694C-0.0975279 1.31647 -0.0975279 0.683403 0.292938 0.292938C0.683403 -0.0975279 1.31647 -0.0975277 1.70694 0.292938L6.94994 5.53594Z",
|
|
184
1215
|
fill: "currentColor"
|
|
185
1216
|
}, null, -1)
|
|
186
1217
|
])], 2));
|
|
187
1218
|
}
|
|
188
1219
|
});
|
|
189
|
-
function
|
|
190
|
-
if (!
|
|
191
|
-
if (/^[A-Za-z0-9_-]{11}$/.test(
|
|
192
|
-
let
|
|
1220
|
+
function Dt(t) {
|
|
1221
|
+
if (!t) return null;
|
|
1222
|
+
if (/^[A-Za-z0-9_-]{11}$/.test(t)) return t;
|
|
1223
|
+
let a;
|
|
193
1224
|
try {
|
|
194
|
-
|
|
1225
|
+
a = new URL(t);
|
|
195
1226
|
} catch {
|
|
196
1227
|
return null;
|
|
197
1228
|
}
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
const
|
|
201
|
-
return /^[A-Za-z0-9_-]{11}$/.test(
|
|
1229
|
+
const l = a.hostname.replace(/^www\./, "");
|
|
1230
|
+
if (l === "youtu.be") {
|
|
1231
|
+
const e = a.pathname.slice(1).split("/")[0];
|
|
1232
|
+
return /^[A-Za-z0-9_-]{11}$/.test(e) ? e : null;
|
|
202
1233
|
}
|
|
203
|
-
if (
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
206
|
-
const
|
|
207
|
-
|
|
1234
|
+
if (l === "youtube.com" || l === "m.youtube.com" || l === "music.youtube.com" || l === "youtube-nocookie.com") {
|
|
1235
|
+
const e = a.searchParams.get("v");
|
|
1236
|
+
if (e && /^[A-Za-z0-9_-]{11}$/.test(e)) return e;
|
|
1237
|
+
const o = /^\/(?:embed|shorts|v|live)\/([A-Za-z0-9_-]{11})/.exec(
|
|
1238
|
+
a.pathname
|
|
208
1239
|
);
|
|
209
|
-
if (
|
|
1240
|
+
if (o) return o[1];
|
|
210
1241
|
}
|
|
211
1242
|
return null;
|
|
212
1243
|
}
|
|
213
|
-
function
|
|
1244
|
+
function Rt(t) {
|
|
214
1245
|
try {
|
|
215
|
-
const
|
|
216
|
-
if (!
|
|
217
|
-
if (/^\d+s?$/.test(
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
const
|
|
221
|
-
return
|
|
1246
|
+
const a = new URL(t), l = a.searchParams.get("t") ?? a.searchParams.get("start");
|
|
1247
|
+
if (!l) return null;
|
|
1248
|
+
if (/^\d+s?$/.test(l)) return Number.parseInt(l, 10);
|
|
1249
|
+
const e = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(l);
|
|
1250
|
+
if (e) {
|
|
1251
|
+
const o = Number.parseInt(e[1] ?? "0", 10), m = Number.parseInt(e[2] ?? "0", 10), g = Number.parseInt(e[3] ?? "0", 10), p = o * 3600 + m * 60 + g;
|
|
1252
|
+
return p > 0 ? p : null;
|
|
222
1253
|
}
|
|
223
1254
|
} catch {
|
|
224
1255
|
}
|
|
225
1256
|
return null;
|
|
226
1257
|
}
|
|
227
|
-
function
|
|
1258
|
+
function Ft(t, a = {}) {
|
|
228
1259
|
const {
|
|
229
|
-
autoPlay:
|
|
230
|
-
muted:
|
|
231
|
-
loop:
|
|
232
|
-
controls:
|
|
233
|
-
startSeconds:
|
|
234
|
-
} =
|
|
1260
|
+
autoPlay: l = !1,
|
|
1261
|
+
muted: e = !0,
|
|
1262
|
+
loop: o = !1,
|
|
1263
|
+
controls: m = !0,
|
|
1264
|
+
startSeconds: g
|
|
1265
|
+
} = a, p = new URLSearchParams({
|
|
235
1266
|
rel: "0",
|
|
236
1267
|
modestbranding: "1",
|
|
237
1268
|
playsinline: "1",
|
|
238
|
-
controls:
|
|
1269
|
+
controls: m ? "1" : "0"
|
|
239
1270
|
});
|
|
240
|
-
return
|
|
1271
|
+
return l ? (p.set("autoplay", "1"), p.set("mute", "1")) : e && p.set("mute", "1"), o && (p.set("loop", "1"), p.set("playlist", t)), g && g > 0 && p.set("start", String(g)), `https://www.youtube-nocookie.com/embed/${t}?${p.toString()}`;
|
|
241
1272
|
}
|
|
242
|
-
const
|
|
1273
|
+
const Nt = ["src"], Ot = {
|
|
243
1274
|
key: 2,
|
|
244
1275
|
class: "gvp-vignette"
|
|
245
|
-
},
|
|
1276
|
+
}, jt = {
|
|
246
1277
|
key: 3,
|
|
247
1278
|
class: "gvp-toggle"
|
|
248
|
-
},
|
|
249
|
-
key:
|
|
1279
|
+
}, Ut = { class: "gvp-toggle-pill" }, Zt = ["aria-pressed"], qt = ["aria-pressed"], zt = ["aria-label", "aria-pressed"], Wt = ["aria-label"], Yt = {
|
|
1280
|
+
key: 10,
|
|
250
1281
|
class: "gvp-play-wrap"
|
|
251
|
-
},
|
|
1282
|
+
}, Kt = {
|
|
252
1283
|
key: 0,
|
|
253
1284
|
class: "gvp-tooltip",
|
|
254
1285
|
role: "tooltip"
|
|
255
|
-
},
|
|
256
|
-
key:
|
|
1286
|
+
}, Jt = {
|
|
1287
|
+
key: 12,
|
|
257
1288
|
class: "gvp-bottom-fade"
|
|
258
|
-
},
|
|
1289
|
+
}, Qt = /* @__PURE__ */ T({
|
|
259
1290
|
__name: "VideoPlayer",
|
|
260
1291
|
props: {
|
|
261
1292
|
src: {},
|
|
@@ -266,7 +1297,7 @@ const oe = ["src"], le = {
|
|
|
266
1297
|
tooltipText: {},
|
|
267
1298
|
muted: { type: Boolean, default: !0 },
|
|
268
1299
|
loop: { type: Boolean, default: !1 },
|
|
269
|
-
controls: { type: Boolean, default: !1 },
|
|
1300
|
+
controls: { type: [Boolean, String], default: !1 },
|
|
270
1301
|
autoPlay: { type: Boolean, default: !1 },
|
|
271
1302
|
frameMaxWidth: {},
|
|
272
1303
|
aspectRatio: {},
|
|
@@ -276,165 +1307,283 @@ const oe = ["src"], le = {
|
|
|
276
1307
|
closable: { type: Boolean, default: !1 }
|
|
277
1308
|
},
|
|
278
1309
|
emits: ["close", "play", "pause"],
|
|
279
|
-
setup(
|
|
280
|
-
const
|
|
281
|
-
() =>
|
|
282
|
-
autoPlay:
|
|
283
|
-
muted:
|
|
284
|
-
loop:
|
|
285
|
-
controls:
|
|
286
|
-
startSeconds:
|
|
1310
|
+
setup(t, { emit: a }) {
|
|
1311
|
+
const l = t, e = a, o = w(null), m = w(l.defaultDevice), g = w(!1), p = w(!1), L = w(null), P = w([]), x = w(-1), _ = w(1), k = w(!1), h = w(!1), r = w(null), b = typeof document < "u" && !!document.pictureInPictureEnabled, E = Z(() => l.controls === "custom"), R = Z(() => l.controls === !0), H = Z(() => Dt(l.src)), A = Z(() => H.value !== null), y = Z(
|
|
1312
|
+
() => H.value ? Ft(H.value, {
|
|
1313
|
+
autoPlay: l.autoPlay,
|
|
1314
|
+
muted: l.muted,
|
|
1315
|
+
loop: l.loop,
|
|
1316
|
+
controls: E.value ? !0 : R.value,
|
|
1317
|
+
startSeconds: Rt(l.src)
|
|
287
1318
|
}) : null
|
|
288
|
-
)
|
|
1319
|
+
);
|
|
1320
|
+
function I(d) {
|
|
1321
|
+
P.value = d, x.value = -1;
|
|
1322
|
+
}
|
|
1323
|
+
const D = Z(
|
|
1324
|
+
() => !A.value && P.value.length > 1
|
|
1325
|
+
), B = Z(
|
|
1326
|
+
() => {
|
|
1327
|
+
var d;
|
|
1328
|
+
return x.value >= 0 ? x.value : ((d = P.value[0]) == null ? void 0 : d.index) ?? -1;
|
|
1329
|
+
}
|
|
1330
|
+
), N = Z(
|
|
289
1331
|
() => {
|
|
290
|
-
var
|
|
291
|
-
return
|
|
1332
|
+
var d, c;
|
|
1333
|
+
return m.value === "mobile" ? ((d = l.aspectRatio) == null ? void 0 : d.mobile) ?? "9/16" : ((c = l.aspectRatio) == null ? void 0 : c.desktop) ?? "16/9";
|
|
292
1334
|
}
|
|
293
|
-
),
|
|
1335
|
+
), G = Z(
|
|
294
1336
|
() => {
|
|
295
|
-
var
|
|
296
|
-
return
|
|
1337
|
+
var d, c;
|
|
1338
|
+
return m.value === "mobile" ? ((d = l.frameMaxWidth) == null ? void 0 : d.mobile) ?? "420px" : ((c = l.frameMaxWidth) == null ? void 0 : c.desktop) ?? "960px";
|
|
297
1339
|
}
|
|
298
|
-
),
|
|
299
|
-
var
|
|
300
|
-
return ((
|
|
1340
|
+
), S = Z(() => {
|
|
1341
|
+
var d;
|
|
1342
|
+
return ((d = o.value) == null ? void 0 : d.videoEl) ?? null;
|
|
301
1343
|
});
|
|
302
|
-
async function
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
1344
|
+
async function z() {
|
|
1345
|
+
const d = S.value;
|
|
1346
|
+
if (d)
|
|
305
1347
|
try {
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
|
|
1348
|
+
d.readyState < 2 && d.load();
|
|
1349
|
+
const c = d.play();
|
|
1350
|
+
L.value = c, await c, g.value = !0;
|
|
309
1351
|
} catch {
|
|
310
|
-
|
|
1352
|
+
g.value = !1;
|
|
311
1353
|
} finally {
|
|
312
|
-
|
|
1354
|
+
L.value = null;
|
|
313
1355
|
}
|
|
314
1356
|
}
|
|
315
|
-
async function
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
1357
|
+
async function te() {
|
|
1358
|
+
const d = S.value;
|
|
1359
|
+
if (d) {
|
|
1360
|
+
if (L.value)
|
|
319
1361
|
try {
|
|
320
|
-
await
|
|
1362
|
+
await L.value;
|
|
321
1363
|
} catch {
|
|
322
1364
|
}
|
|
323
|
-
|
|
1365
|
+
d.pause();
|
|
324
1366
|
}
|
|
325
1367
|
}
|
|
326
|
-
async function
|
|
327
|
-
!
|
|
1368
|
+
async function se() {
|
|
1369
|
+
!l.hoverPlay || A.value || await z();
|
|
328
1370
|
}
|
|
329
|
-
async function
|
|
330
|
-
!
|
|
1371
|
+
async function de() {
|
|
1372
|
+
!l.hoverPlay || A.value || (await te(), g.value = !1);
|
|
331
1373
|
}
|
|
332
|
-
async function
|
|
333
|
-
const
|
|
334
|
-
|
|
1374
|
+
async function Q() {
|
|
1375
|
+
const d = S.value;
|
|
1376
|
+
d && (d.paused ? await z() : (await te(), g.value = !1));
|
|
335
1377
|
}
|
|
336
|
-
function
|
|
337
|
-
|
|
1378
|
+
function Y() {
|
|
1379
|
+
p.value = !0, se();
|
|
338
1380
|
}
|
|
339
|
-
function
|
|
340
|
-
|
|
1381
|
+
function ve() {
|
|
1382
|
+
p.value = !1, de();
|
|
341
1383
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
1384
|
+
function pe(d) {
|
|
1385
|
+
_.value = d;
|
|
1386
|
+
const c = S.value;
|
|
1387
|
+
c && (c.playbackRate = d);
|
|
1388
|
+
}
|
|
1389
|
+
F(S, (d) => {
|
|
1390
|
+
d && (d.addEventListener("ratechange", () => {
|
|
1391
|
+
_.value = d.playbackRate;
|
|
1392
|
+
}), d.addEventListener("enterpictureinpicture", () => {
|
|
1393
|
+
k.value = !0;
|
|
1394
|
+
}), d.addEventListener("leavepictureinpicture", () => {
|
|
1395
|
+
k.value = !1;
|
|
1396
|
+
}));
|
|
1397
|
+
});
|
|
1398
|
+
function W() {
|
|
1399
|
+
const d = S.value;
|
|
1400
|
+
d && (document.pictureInPictureElement ? document.exitPictureInPicture().catch(() => {
|
|
1401
|
+
}) : d.requestPictureInPicture().catch(() => {
|
|
1402
|
+
}));
|
|
1403
|
+
}
|
|
1404
|
+
function le(d) {
|
|
1405
|
+
var K, re, ie;
|
|
1406
|
+
const c = S.value;
|
|
1407
|
+
if (!(!c || !h.value && !((K = r.value) != null && K.contains(document.activeElement)) || d.target.tagName === "INPUT" && d.key !== " "))
|
|
1408
|
+
switch (d.key) {
|
|
1409
|
+
case " ":
|
|
1410
|
+
case "k":
|
|
1411
|
+
d.preventDefault(), Q();
|
|
1412
|
+
break;
|
|
1413
|
+
case "ArrowLeft":
|
|
1414
|
+
d.preventDefault(), c.currentTime = Math.max(0, c.currentTime - 5);
|
|
1415
|
+
break;
|
|
1416
|
+
case "ArrowRight":
|
|
1417
|
+
d.preventDefault(), c.currentTime = Math.min(c.duration || 0, c.currentTime + 5);
|
|
1418
|
+
break;
|
|
1419
|
+
case "ArrowUp":
|
|
1420
|
+
d.preventDefault(), c.volume = Math.min(1, c.volume + 0.1), c.muted && (c.muted = !1);
|
|
1421
|
+
break;
|
|
1422
|
+
case "ArrowDown":
|
|
1423
|
+
d.preventDefault(), c.volume = Math.max(0, c.volume - 0.1);
|
|
1424
|
+
break;
|
|
1425
|
+
case "m":
|
|
1426
|
+
c.muted = !c.muted;
|
|
1427
|
+
break;
|
|
1428
|
+
case "f": {
|
|
1429
|
+
const ue = document.fullscreenElement ?? document.webkitFullscreenElement ?? null, n = ((re = r.value) == null ? void 0 : re.requestFullscreen) ?? ((ie = r.value) == null ? void 0 : ie.webkitRequestFullscreen), u = document.exitFullscreen ?? document.webkitExitFullscreen;
|
|
1430
|
+
ue === r.value ? u == null || u.call(document).catch(() => {
|
|
1431
|
+
}) : n && r.value && n.call(r.value).catch(() => {
|
|
1432
|
+
});
|
|
1433
|
+
break;
|
|
1434
|
+
}
|
|
1435
|
+
case "p":
|
|
1436
|
+
b && W();
|
|
1437
|
+
break;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
return fe(() => {
|
|
1441
|
+
document.addEventListener("keydown", le);
|
|
1442
|
+
}), X(() => {
|
|
1443
|
+
document.removeEventListener("keydown", le);
|
|
1444
|
+
}), (d, c) => (i(), v("div", {
|
|
1445
|
+
ref_key: "rootEl",
|
|
1446
|
+
ref: r,
|
|
1447
|
+
class: C(["gvp-root", l.class]),
|
|
1448
|
+
style: ce({ width: G.value, aspectRatio: N.value }),
|
|
1449
|
+
onMouseenter: c[8] || (c[8] = (O) => {
|
|
1450
|
+
h.value = !0, Y();
|
|
1451
|
+
}),
|
|
1452
|
+
onMouseleave: c[9] || (c[9] = (O) => {
|
|
1453
|
+
h.value = !1, ve();
|
|
1454
|
+
})
|
|
347
1455
|
}, [
|
|
348
|
-
|
|
1456
|
+
A.value ? (i(), v("iframe", {
|
|
349
1457
|
key: 0,
|
|
350
1458
|
class: "gvp-video gvp-youtube",
|
|
351
|
-
src:
|
|
1459
|
+
src: y.value ?? void 0,
|
|
352
1460
|
title: "YouTube video player",
|
|
353
1461
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
354
1462
|
allowfullscreen: "",
|
|
355
1463
|
referrerpolicy: "strict-origin-when-cross-origin"
|
|
356
|
-
}, null, 8,
|
|
1464
|
+
}, null, 8, Nt)) : (i(), U(Ee, {
|
|
357
1465
|
key: 1,
|
|
358
1466
|
ref_key: "hlsPlayerRef",
|
|
359
|
-
ref:
|
|
360
|
-
controls:
|
|
361
|
-
"hls-config":
|
|
362
|
-
"is-hls":
|
|
363
|
-
loop:
|
|
364
|
-
muted:
|
|
365
|
-
"auto-play":
|
|
1467
|
+
ref: o,
|
|
1468
|
+
controls: R.value,
|
|
1469
|
+
"hls-config": t.hlsConfig,
|
|
1470
|
+
"is-hls": t.isHls,
|
|
1471
|
+
loop: t.loop,
|
|
1472
|
+
muted: t.muted,
|
|
1473
|
+
"auto-play": t.autoPlay,
|
|
1474
|
+
"audio-track-index": x.value,
|
|
366
1475
|
"plays-inline": !0,
|
|
367
|
-
poster:
|
|
368
|
-
src:
|
|
1476
|
+
poster: t.poster,
|
|
1477
|
+
src: t.src,
|
|
369
1478
|
class: "gvp-video",
|
|
370
1479
|
preload: "metadata",
|
|
371
|
-
|
|
372
|
-
|
|
1480
|
+
onAudioTracks: I,
|
|
1481
|
+
onPause: c[0] || (c[0] = (O) => {
|
|
1482
|
+
g.value = !1, e("pause");
|
|
373
1483
|
}),
|
|
374
|
-
onPlay:
|
|
375
|
-
|
|
1484
|
+
onPlay: c[1] || (c[1] = (O) => {
|
|
1485
|
+
g.value = !0, e("play");
|
|
376
1486
|
})
|
|
377
1487
|
}, {
|
|
378
|
-
default:
|
|
379
|
-
|
|
1488
|
+
default: xe(() => [
|
|
1489
|
+
ke(d.$slots, "default")
|
|
380
1490
|
]),
|
|
381
1491
|
_: 3
|
|
382
|
-
}, 8, ["controls", "hls-config", "is-hls", "loop", "muted", "auto-play", "poster", "src"])),
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
"aria-pressed":
|
|
388
|
-
class:
|
|
1492
|
+
}, 8, ["controls", "hls-config", "is-hls", "loop", "muted", "auto-play", "audio-track-index", "poster", "src"])),
|
|
1493
|
+
A.value ? M("", !0) : (i(), v("div", Ot)),
|
|
1494
|
+
t.showDeviceToggle ? (i(), v("div", jt, [
|
|
1495
|
+
s("div", Ut, [
|
|
1496
|
+
s("button", {
|
|
1497
|
+
"aria-pressed": m.value === "desktop",
|
|
1498
|
+
class: C(["gvp-toggle-btn", { "is-active": m.value === "desktop" }]),
|
|
389
1499
|
"aria-label": "Desktop view",
|
|
390
1500
|
type: "button",
|
|
391
|
-
onClick:
|
|
1501
|
+
onClick: c[2] || (c[2] = (O) => m.value = "desktop")
|
|
392
1502
|
}, [
|
|
393
|
-
|
|
394
|
-
], 10,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
"aria-pressed":
|
|
398
|
-
class:
|
|
1503
|
+
j(Tt)
|
|
1504
|
+
], 10, Zt),
|
|
1505
|
+
c[10] || (c[10] = s("div", { class: "gvp-toggle-divider" }, null, -1)),
|
|
1506
|
+
s("button", {
|
|
1507
|
+
"aria-pressed": m.value === "mobile",
|
|
1508
|
+
class: C(["gvp-toggle-btn", { "is-active": m.value === "mobile" }]),
|
|
399
1509
|
"aria-label": "Mobile view",
|
|
400
1510
|
type: "button",
|
|
401
|
-
onClick:
|
|
1511
|
+
onClick: c[3] || (c[3] = (O) => m.value = "mobile")
|
|
402
1512
|
}, [
|
|
403
|
-
|
|
404
|
-
], 10,
|
|
1513
|
+
j(St)
|
|
1514
|
+
], 10, qt)
|
|
405
1515
|
])
|
|
406
|
-
])) :
|
|
407
|
-
|
|
1516
|
+
])) : M("", !0),
|
|
1517
|
+
t.closable ? (i(), v("button", {
|
|
408
1518
|
key: 4,
|
|
409
1519
|
"aria-label": "Close",
|
|
410
1520
|
class: "gvp-close",
|
|
411
1521
|
type: "button",
|
|
412
|
-
onClick:
|
|
1522
|
+
onClick: c[4] || (c[4] = (O) => e("close"))
|
|
1523
|
+
}, [
|
|
1524
|
+
j(At)
|
|
1525
|
+
])) : M("", !0),
|
|
1526
|
+
D.value && !E.value ? (i(), U(He, {
|
|
1527
|
+
key: 5,
|
|
1528
|
+
tracks: P.value,
|
|
1529
|
+
"active-index": B.value,
|
|
1530
|
+
onSelect: c[5] || (c[5] = (O) => x.value = O)
|
|
1531
|
+
}, null, 8, ["tracks", "active-index"])) : M("", !0),
|
|
1532
|
+
!A.value && !E.value ? (i(), U(Fe, {
|
|
1533
|
+
key: 6,
|
|
1534
|
+
speed: _.value,
|
|
1535
|
+
onSelect: pe
|
|
1536
|
+
}, null, 8, ["speed"])) : M("", !0),
|
|
1537
|
+
!A.value && !E.value ? (i(), U(qe, {
|
|
1538
|
+
key: 7,
|
|
1539
|
+
video: S.value
|
|
1540
|
+
}, null, 8, ["video"])) : M("", !0),
|
|
1541
|
+
!A.value && J(b) && !E.value ? (i(), v("button", {
|
|
1542
|
+
key: 8,
|
|
1543
|
+
type: "button",
|
|
1544
|
+
class: C(["gvp-pip-btn", { "is-active": k.value }]),
|
|
1545
|
+
"aria-label": k.value ? "Exit picture-in-picture" : "Picture-in-picture",
|
|
1546
|
+
"aria-pressed": k.value,
|
|
1547
|
+
onClick: W
|
|
413
1548
|
}, [
|
|
414
|
-
|
|
415
|
-
])) :
|
|
416
|
-
!
|
|
417
|
-
|
|
1549
|
+
j(Ce)
|
|
1550
|
+
], 10, zt)) : M("", !0),
|
|
1551
|
+
!A.value && E.value ? (i(), v("button", {
|
|
1552
|
+
key: 9,
|
|
1553
|
+
type: "button",
|
|
1554
|
+
class: "gvp-click-layer",
|
|
1555
|
+
"aria-label": g.value ? "Pause" : "Play",
|
|
1556
|
+
onClick: Q
|
|
1557
|
+
}, null, 8, Wt)) : M("", !0),
|
|
1558
|
+
!A.value && !E.value && !g.value ? (i(), v("div", Yt, [
|
|
1559
|
+
s("button", {
|
|
418
1560
|
"aria-label": "Play",
|
|
419
1561
|
class: "gvp-play",
|
|
420
1562
|
type: "button",
|
|
421
|
-
onClick:
|
|
422
|
-
onMouseenter:
|
|
423
|
-
onMouseleave:
|
|
1563
|
+
onClick: Q,
|
|
1564
|
+
onMouseenter: c[6] || (c[6] = (O) => p.value = !0),
|
|
1565
|
+
onMouseleave: c[7] || (c[7] = (O) => p.value = !1)
|
|
424
1566
|
}, [
|
|
425
|
-
|
|
426
|
-
|
|
1567
|
+
j(Bt),
|
|
1568
|
+
t.tooltipText && p.value ? (i(), v("span", Kt, q(t.tooltipText), 1)) : M("", !0)
|
|
427
1569
|
], 32)
|
|
428
|
-
])) :
|
|
429
|
-
|
|
1570
|
+
])) : M("", !0),
|
|
1571
|
+
!A.value && E.value ? (i(), U(Pt, {
|
|
1572
|
+
key: 11,
|
|
1573
|
+
video: S.value,
|
|
1574
|
+
"is-playing": g.value,
|
|
1575
|
+
container: r.value,
|
|
1576
|
+
"on-toggle-play": Q
|
|
1577
|
+
}, null, 8, ["video", "is-playing", "container"])) : M("", !0),
|
|
1578
|
+
!A.value && !E.value ? (i(), v("div", Jt)) : M("", !0)
|
|
430
1579
|
], 38));
|
|
431
1580
|
}
|
|
432
1581
|
});
|
|
433
1582
|
export {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
1583
|
+
Ee as HLSPlayer,
|
|
1584
|
+
Qt as VueVideoPlayer,
|
|
1585
|
+
Dt as parseYouTubeId,
|
|
1586
|
+
Rt as parseYouTubeStart,
|
|
1587
|
+
Ft as youTubeEmbedUrl
|
|
439
1588
|
};
|
|
440
1589
|
//# sourceMappingURL=index.mjs.map
|