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