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