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