@validol4ik/uikit 0.14.4 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio/audio.cjs +1 -1
- package/dist/audio/audio.es.js +1 -1
- package/dist/kl.woff +0 -0
- package/dist/style.css +1 -1
- package/dist/types/components/AppIcon/iconsList.d.ts +2 -2
- package/dist/types/components/media/AppVideo/AppVideo.vue.d.ts +6 -2
- package/dist/types/components/media/AppVideo/engines.d.ts +3 -1
- package/dist/types/components/media/AppVideo/types.d.ts +12 -0
- package/dist/types/video.d.ts +2 -2
- package/dist/types-BBHxDUDF.cjs +1 -0
- package/dist/types-BzvY-lmh.js +18 -0
- package/dist/video/video.cjs +1 -1
- package/dist/video/video.es.js +341 -268
- package/package.json +1 -1
- package/dist/types-BqPrdGCK.cjs +0 -1
- package/dist/types-CEnNorca.js +0 -15
package/dist/video/video.es.js
CHANGED
|
@@ -1,130 +1,188 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var $ = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { ref as
|
|
7
|
-
import
|
|
8
|
-
import { V as
|
|
9
|
-
import { _ as
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const s = (
|
|
13
|
-
return
|
|
14
|
-
},
|
|
15
|
-
var s,
|
|
16
|
-
const { ManagedMediaSource:
|
|
17
|
-
return !!((
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
},
|
|
22
|
-
var
|
|
23
|
-
class
|
|
24
|
-
constructor(
|
|
4
|
+
var H = (t, r, e) => r.has(t) || $("Cannot " + e);
|
|
5
|
+
var R = (t, r, e) => (H(t, r, "read from private field"), e ? e.call(t) : r.get(t)), A = (t, r, e) => r.has(t) ? $("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, e), z = (t, r, e, s) => (H(t, r, "write to private field"), s ? s.call(t, e) : r.set(t, e), e), ee = (t, r, e) => (H(t, r, "access private method"), e);
|
|
6
|
+
import { ref as k, onBeforeUnmount as oe, defineComponent as he, watch as te, onMounted as ye, createElementBlock as D, openBlock as O, unref as T, createCommentVNode as re, createElementVNode as F, normalizeClass as se, toDisplayString as ge, nextTick as Re } from "vue";
|
|
7
|
+
import ae from "quasar/src/plugins/storage/LocalStorage.js";
|
|
8
|
+
import { V as _, D as Se, S as _e, a as ne, b as we, E as Te, c as be, d as Le, B as ke, e as Pe, P as Ae, R as De, W as Oe, f as Ce } from "../types-BzvY-lmh.js";
|
|
9
|
+
import { _ as Ie } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const ze = (t, r, e) => {
|
|
11
|
+
var a;
|
|
12
|
+
const s = (u) => !e.includes(u);
|
|
13
|
+
return t.hlsSrc && r.hls && s(_.Hls) ? _.Hls : t.dashSrc && r.dash && s(_.Dash) ? _.Dash : (a = t.sources) != null && a.length && s(_.Progressive) ? _.Progressive : null;
|
|
14
|
+
}, Ve = () => {
|
|
15
|
+
var s, a;
|
|
16
|
+
const { ManagedMediaSource: t, MediaSource: r, WebKitMediaSource: e } = window;
|
|
17
|
+
return !!((a = (s = t ?? r ?? e) == null ? void 0 : s.isTypeSupported) != null && a.call(s, Se));
|
|
18
|
+
}, Me = (t) => _e.filter((r) => t.includes(r)), Ke = (t) => {
|
|
19
|
+
const r = Me(t.map(({ size: s }) => s)), e = r.includes(ne) ? ne : r[0];
|
|
20
|
+
return t.find((s) => s.size === e) ?? t[0] ?? null;
|
|
21
|
+
}, Ne = () => /iPhone|iPod/.test(navigator.userAgent), xe = () => Ne() || /iPad/.test(navigator.userAgent) || /Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints > 1;
|
|
22
|
+
var M, C, K, P, L, V, ie;
|
|
23
|
+
class Be extends EventTarget {
|
|
24
|
+
constructor(e, s, a) {
|
|
25
25
|
super();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
A(this, L);
|
|
27
|
+
A(this, M);
|
|
28
|
+
A(this, C);
|
|
29
|
+
A(this, K);
|
|
30
|
+
A(this, P, -1);
|
|
31
|
+
z(this, M, e), z(this, C, [...s].sort((u, i) => i.size - u.size)), z(this, K, a);
|
|
32
32
|
}
|
|
33
33
|
get selectedIndex() {
|
|
34
|
-
return
|
|
34
|
+
return R(this, P);
|
|
35
35
|
}
|
|
36
|
-
set selectedIndex(
|
|
37
|
-
const s =
|
|
38
|
-
|
|
36
|
+
set selectedIndex(e) {
|
|
37
|
+
const s = R(this, L, V);
|
|
38
|
+
z(this, P, e), R(this, L, V) !== s && ee(this, L, ie).call(this), this.dispatchEvent(new Event("change"));
|
|
39
39
|
}
|
|
40
40
|
*[Symbol.iterator]() {
|
|
41
|
-
for (const [
|
|
41
|
+
for (const [e, s] of R(this, C).entries())
|
|
42
42
|
yield {
|
|
43
43
|
id: String(s.size),
|
|
44
44
|
height: s.size,
|
|
45
|
-
selected:
|
|
46
|
-
active: s ===
|
|
45
|
+
selected: e === R(this, P),
|
|
46
|
+
active: s === R(this, L, V)
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
return
|
|
50
|
+
M = new WeakMap(), C = new WeakMap(), K = new WeakMap(), P = new WeakMap(), L = new WeakSet(), V = function() {
|
|
51
|
+
return R(this, C)[R(this, P)] ?? R(this, K);
|
|
52
52
|
}, // Loading a new src resets the position and speed
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
ie = function() {
|
|
54
|
+
const e = R(this, M), s = e.currentTime, a = e.playbackRate, u = !e.paused;
|
|
55
|
+
e.addEventListener(
|
|
56
56
|
"loadedmetadata",
|
|
57
57
|
() => {
|
|
58
|
-
s && (
|
|
58
|
+
s && (e.currentTime = s), e.playbackRate = a, u && e.play();
|
|
59
59
|
},
|
|
60
60
|
{ once: !0 }
|
|
61
|
-
), s && (
|
|
61
|
+
), s && (e.preload = "metadata"), e.src = R(this, L, V).src;
|
|
62
62
|
};
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const He = (t, r) => {
|
|
64
|
+
t.preload = "metadata", t.addEventListener(
|
|
65
65
|
"loadedmetadata",
|
|
66
66
|
() => {
|
|
67
|
-
|
|
67
|
+
r(), t.play().catch(() => {
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
70
|
{ once: !0 }
|
|
71
71
|
);
|
|
72
|
-
},
|
|
73
|
-
let
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
}, le = () => {
|
|
73
|
+
let t = 0, r = 0;
|
|
74
|
+
return (e) => {
|
|
75
|
+
const s = Date.now();
|
|
76
|
+
if (s - r > Le && (t = 0), r = s, t >= Te) return !1;
|
|
77
|
+
const a = t++;
|
|
78
|
+
return setTimeout(() => e(a), be * 2 ** a), !0;
|
|
79
|
+
};
|
|
80
|
+
}, ue = (t, r) => {
|
|
81
|
+
const { currentTime: e, playbackRate: s, paused: a } = t;
|
|
82
|
+
return () => {
|
|
83
|
+
t.addEventListener(
|
|
84
|
+
"loadedmetadata",
|
|
85
|
+
() => {
|
|
86
|
+
t.currentTime = e, t.playbackRate = s, a || t.play().catch(() => {
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
{ once: !0 }
|
|
90
|
+
), r(e);
|
|
91
|
+
};
|
|
92
|
+
}, Fe = (t, r, e) => {
|
|
93
|
+
let s = null;
|
|
94
|
+
const a = le();
|
|
95
|
+
t.addEventListener("loadstart", () => {
|
|
96
|
+
if (!t.engine || t.engine === s) return;
|
|
97
|
+
const i = t.engine;
|
|
98
|
+
s = i;
|
|
99
|
+
const c = () => t.engine === i;
|
|
100
|
+
i.on(r.Events.ERROR, async (p, d) => {
|
|
101
|
+
var n;
|
|
102
|
+
if (!d.fatal) return;
|
|
103
|
+
const m = (E) => {
|
|
104
|
+
var h, y;
|
|
105
|
+
return e.report({
|
|
106
|
+
type: d.type,
|
|
107
|
+
details: d.details,
|
|
108
|
+
status: (h = d.response) == null ? void 0 : h.code,
|
|
109
|
+
url: ((y = d.frag) == null ? void 0 : y.url) ?? d.url,
|
|
110
|
+
recovering: E
|
|
111
|
+
});
|
|
112
|
+
}, S = () => {
|
|
113
|
+
m(!0), e.dismissError();
|
|
114
|
+
};
|
|
115
|
+
if (d.type === r.ErrorTypes.NETWORK_ERROR) {
|
|
116
|
+
if (((n = d.response) == null ? void 0 : n.code) === 401 && await e.reauthorize()) {
|
|
117
|
+
S(), i.startLoad(t.currentTime);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (e.hasLoaded() && a(() => c() && i.startLoad(t.currentTime))) {
|
|
121
|
+
S();
|
|
87
122
|
return;
|
|
88
123
|
}
|
|
89
|
-
|
|
124
|
+
} else if (d.type === r.ErrorTypes.MEDIA_ERROR && e.hasLoaded() && a((E) => {
|
|
125
|
+
c() && (E > 0 && i.swapAudioCodec(), i.recoverMediaError());
|
|
126
|
+
})) {
|
|
127
|
+
S();
|
|
128
|
+
return;
|
|
90
129
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (
|
|
95
|
-
|
|
130
|
+
m(!1), e.fail();
|
|
131
|
+
}), i.on(r.Events.FRAG_LOADED, e.loaded);
|
|
132
|
+
}), t.addEventListener("error", async () => {
|
|
133
|
+
if (t.engine) return;
|
|
134
|
+
const i = ue(t, () => t.load()), c = (d) => {
|
|
135
|
+
var m;
|
|
136
|
+
return e.report({
|
|
137
|
+
type: "nativeError",
|
|
138
|
+
details: String(((m = t.error) == null ? void 0 : m.code) ?? ""),
|
|
139
|
+
recovering: d
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
if ((await e.reauthorize() || e.hasLoaded()) && a(() => t.isConnected && i())) {
|
|
143
|
+
c(!0), e.dismissError();
|
|
96
144
|
return;
|
|
97
145
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
{ once: !0 }
|
|
106
|
-
), e.load();
|
|
107
|
-
}), e.addEventListener("loadeddata", r.loaded);
|
|
108
|
-
const l = Oe();
|
|
109
|
-
r.withCredentials && !l && (e.crossOrigin = "use-credentials"), e.source = {
|
|
110
|
-
src: r.src,
|
|
111
|
-
preferPlayback: l ? "native" : "mse"
|
|
146
|
+
c(!1), e.fail();
|
|
147
|
+
}), t.addEventListener("loadeddata", e.loaded);
|
|
148
|
+
const u = xe();
|
|
149
|
+
e.withCredentials && !u && (t.crossOrigin = "use-credentials"), t.source = {
|
|
150
|
+
src: e.src,
|
|
151
|
+
preferPlayback: u ? "native" : "mse"
|
|
112
152
|
};
|
|
113
|
-
},
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
153
|
+
}, We = (t, r) => {
|
|
154
|
+
const e = t.engine;
|
|
155
|
+
e.setXHRWithCredentialsForType("default", r.withCredentials);
|
|
156
|
+
const s = le(), a = () => ue(
|
|
157
|
+
t,
|
|
158
|
+
(u) => e.attachSource(r.src, u)
|
|
159
|
+
);
|
|
160
|
+
e.on("error", async (u) => {
|
|
161
|
+
var d, m;
|
|
162
|
+
const i = u.error, c = (m = (d = i.data) == null ? void 0 : d.response) == null ? void 0 : m.status, p = (S) => r.report({
|
|
163
|
+
type: "dashError",
|
|
164
|
+
details: String(i.code ?? ""),
|
|
165
|
+
status: c,
|
|
166
|
+
recovering: S
|
|
167
|
+
});
|
|
168
|
+
if (c === 401) {
|
|
169
|
+
if (await r.reauthorize()) {
|
|
170
|
+
p(!0), a()();
|
|
121
171
|
return;
|
|
122
172
|
}
|
|
123
|
-
} else if (!
|
|
173
|
+
} else if (!we.includes(i.code ?? -1))
|
|
124
174
|
return;
|
|
125
|
-
|
|
126
|
-
}),
|
|
127
|
-
|
|
175
|
+
p(!1), r.fail();
|
|
176
|
+
}), e.on("fragmentLoadingCompleted", r.loaded), t.addEventListener("error", () => {
|
|
177
|
+
var c;
|
|
178
|
+
const u = a(), i = r.hasLoaded() && s(() => t.isConnected && u());
|
|
179
|
+
r.report({
|
|
180
|
+
type: "mediaError",
|
|
181
|
+
details: String(((c = t.error) == null ? void 0 : c.code) ?? ""),
|
|
182
|
+
recovering: i
|
|
183
|
+
}), i ? r.dismissError() : r.fail();
|
|
184
|
+
}), t.source = {
|
|
185
|
+
src: r.src,
|
|
128
186
|
engine: {
|
|
129
187
|
dashJs: {
|
|
130
188
|
streaming: {
|
|
@@ -135,90 +193,90 @@ const Ie = (e, t) => {
|
|
|
135
193
|
}
|
|
136
194
|
}
|
|
137
195
|
};
|
|
138
|
-
},
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
videoRenditions: new
|
|
142
|
-
}),
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
const
|
|
196
|
+
}, Ye = (t, r) => {
|
|
197
|
+
const e = Ke(r);
|
|
198
|
+
e && (Object.assign(t, {
|
|
199
|
+
videoRenditions: new Be(t, r, e)
|
|
200
|
+
}), t.src = e.src);
|
|
201
|
+
}, Ue = "media-controls-content, .media-popup, media-error-dialog", Ge = (t) => t instanceof Element && t.matches(Ue), qe = (t) => {
|
|
202
|
+
const r = k(!1);
|
|
203
|
+
let e, s = 1, a = null;
|
|
204
|
+
const u = () => {
|
|
147
205
|
var n;
|
|
148
|
-
return (n =
|
|
206
|
+
return (n = t.value) == null ? void 0 : n.store;
|
|
149
207
|
}, i = () => {
|
|
150
|
-
const n =
|
|
151
|
-
!n || n.paused || (s = n.playbackRate, n.setPlaybackRate(
|
|
152
|
-
},
|
|
208
|
+
const n = u();
|
|
209
|
+
!n || n.paused || (s = n.playbackRate, n.setPlaybackRate(Pe), r.value = !0);
|
|
210
|
+
}, c = () => {
|
|
153
211
|
var n;
|
|
154
|
-
return clearTimeout(
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
160
|
-
|
|
212
|
+
return clearTimeout(e), a == null || a(), a = null, r.value ? (r.value = !1, (n = u()) == null || n.setPlaybackRate(s), !0) : !1;
|
|
213
|
+
}, p = (n, E, h) => {
|
|
214
|
+
c(), E && (e = setTimeout(i, ke));
|
|
215
|
+
const y = (f) => {
|
|
216
|
+
if (f instanceof KeyboardEvent) {
|
|
217
|
+
if (f.key !== " ") return;
|
|
218
|
+
f.preventDefault(), f.stopPropagation();
|
|
161
219
|
}
|
|
162
|
-
const
|
|
163
|
-
|
|
220
|
+
const w = c();
|
|
221
|
+
h == null || h(w);
|
|
164
222
|
};
|
|
165
|
-
n.forEach((
|
|
223
|
+
n.forEach((f) => window.addEventListener(f, y, !0)), window.addEventListener("blur", c), a = () => {
|
|
166
224
|
n.forEach(
|
|
167
|
-
(
|
|
168
|
-
), window.removeEventListener("blur",
|
|
225
|
+
(f) => window.removeEventListener(f, y, !0)
|
|
226
|
+
), window.removeEventListener("blur", c);
|
|
169
227
|
};
|
|
170
|
-
},
|
|
171
|
-
var
|
|
228
|
+
}, d = (n) => {
|
|
229
|
+
var f;
|
|
172
230
|
if (n.key !== " " || n.altKey || n.ctrlKey || n.metaKey)
|
|
173
231
|
return;
|
|
174
232
|
if (n.repeat) {
|
|
175
|
-
|
|
233
|
+
a && (n.preventDefault(), n.stopPropagation());
|
|
176
234
|
return;
|
|
177
235
|
}
|
|
178
|
-
const
|
|
179
|
-
if (!
|
|
236
|
+
const E = u(), h = document.activeElement;
|
|
237
|
+
if (!E || !h || !((f = t.value) != null && f.contains(h))) return;
|
|
180
238
|
n.preventDefault(), n.stopPropagation();
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
!
|
|
239
|
+
const y = E.paused;
|
|
240
|
+
y && E.play(), p(["keyup"], !y, (w) => {
|
|
241
|
+
!y && !w && E.pause();
|
|
184
242
|
});
|
|
185
|
-
},
|
|
186
|
-
const
|
|
187
|
-
!
|
|
188
|
-
},
|
|
189
|
-
|
|
243
|
+
}, m = (n) => {
|
|
244
|
+
const E = u();
|
|
245
|
+
!E || E.paused || n.button !== 0 || n.composedPath().some(Ge) || p(["pointerup", "pointercancel"], !0);
|
|
246
|
+
}, S = (n) => {
|
|
247
|
+
r.value && n.preventDefault();
|
|
190
248
|
};
|
|
191
|
-
return
|
|
192
|
-
},
|
|
193
|
-
if (customElements.get(
|
|
194
|
-
const [{ createPlayer:
|
|
249
|
+
return oe(c), { boosted: r, release: c, onKeyDown: d, onPointerDown: m, onContextMenu: S };
|
|
250
|
+
}, W = "app-video-player", je = "linear-gradient(to top, rgb(0 0 0 / 0.15), rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.02))", Je = async () => {
|
|
251
|
+
if (customElements.get(W)) return;
|
|
252
|
+
const [{ createPlayer: t, definePlayerFeature: r }, { videoFeatures: e }] = await Promise.all([
|
|
195
253
|
import("@videojs/html"),
|
|
196
254
|
import("@videojs/html/video")
|
|
197
|
-
]), s =
|
|
255
|
+
]), s = r({
|
|
198
256
|
name: "idleControls",
|
|
199
257
|
// the fields belong to the playback and controls features, this one only reads and sets them
|
|
200
258
|
state: () => ({}),
|
|
201
|
-
attach({ target:
|
|
259
|
+
attach({ target: u, signal: i, store: c, get: p, set: d }) {
|
|
202
260
|
var n;
|
|
203
|
-
(n =
|
|
261
|
+
(n = u.container) == null || n.style.setProperty(
|
|
204
262
|
"--media-controls-gradient",
|
|
205
|
-
|
|
263
|
+
je
|
|
206
264
|
);
|
|
207
|
-
const
|
|
208
|
-
const { paused:
|
|
209
|
-
return
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
!i.aborted &&
|
|
265
|
+
const m = () => {
|
|
266
|
+
const { paused: E, started: h, ended: y, userActive: f, controlsVisible: w } = p();
|
|
267
|
+
return E && h && !y && !f && w;
|
|
268
|
+
}, S = c.subscribe(() => {
|
|
269
|
+
m() && queueMicrotask(() => {
|
|
270
|
+
!i.aborted && m() && d({ controlsVisible: !1 });
|
|
213
271
|
});
|
|
214
272
|
});
|
|
215
|
-
i.addEventListener("abort",
|
|
273
|
+
i.addEventListener("abort", S, { once: !0 });
|
|
216
274
|
}
|
|
217
|
-
}), { PlayerElement:
|
|
218
|
-
features: [...
|
|
275
|
+
}), { PlayerElement: a } = t({
|
|
276
|
+
features: [...e, s]
|
|
219
277
|
});
|
|
220
|
-
customElements.get(
|
|
221
|
-
},
|
|
278
|
+
customElements.get(W) || customElements.define(W, a);
|
|
279
|
+
}, Qe = ["lang"], Xe = ["poster"], Ze = { class: "app-video__skin" }, $e = /* @__PURE__ */ he({
|
|
222
280
|
__name: "AppVideo",
|
|
223
281
|
props: {
|
|
224
282
|
hlsSrc: {},
|
|
@@ -231,156 +289,171 @@ const Ie = (e, t) => {
|
|
|
231
289
|
watermark: {},
|
|
232
290
|
color: {}
|
|
233
291
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
292
|
+
emits: ["error"],
|
|
293
|
+
setup(t, { emit: r }) {
|
|
294
|
+
const e = t, s = r, a = k(null), u = k(null), i = k(null), c = k([]), p = k(null), d = k(!0), m = k(!1), { boosted: S, release: n, onKeyDown: E, onPointerDown: h, onContextMenu: y } = qe(a);
|
|
295
|
+
let f = null, w = !1, N = !1, I, Y, U, x = 0, g = null;
|
|
296
|
+
const ce = (o) => {
|
|
297
|
+
var l;
|
|
298
|
+
if (p.value !== o) return;
|
|
299
|
+
const v = N ? u.value : null;
|
|
300
|
+
g = {
|
|
301
|
+
time: v ? v.currentTime : (g == null ? void 0 : g.time) ?? 0,
|
|
302
|
+
rate: v ? v.playbackRate : (g == null ? void 0 : g.rate) ?? 1,
|
|
303
|
+
playing: !!(g != null && g.playing) || ((l = a.value) == null ? void 0 : l.store.paused) === !1
|
|
304
|
+
}, c.value = [...c.value, o];
|
|
305
|
+
}, G = async () => {
|
|
306
|
+
if (!e.authorize) return !0;
|
|
242
307
|
try {
|
|
243
|
-
return await
|
|
244
|
-
} catch (
|
|
245
|
-
return console.error("Video authorization failed",
|
|
308
|
+
return await e.authorize(), !0;
|
|
309
|
+
} catch (o) {
|
|
310
|
+
return console.error("Video authorization failed", o), !1;
|
|
246
311
|
}
|
|
247
|
-
}, q = (
|
|
248
|
-
src:
|
|
249
|
-
withCredentials:
|
|
250
|
-
reauthorize: async () =>
|
|
251
|
-
loaded: () =>
|
|
252
|
-
|
|
312
|
+
}, q = (o, v) => ({
|
|
313
|
+
src: o ?? "",
|
|
314
|
+
withCredentials: e.withCredentials,
|
|
315
|
+
reauthorize: async () => w ? !1 : (w = !0, G()),
|
|
316
|
+
loaded: () => {
|
|
317
|
+
w = !1, N = !0;
|
|
318
|
+
},
|
|
319
|
+
hasLoaded: () => N,
|
|
320
|
+
fail: () => ce(v),
|
|
321
|
+
report: (l) => {
|
|
322
|
+
var b;
|
|
323
|
+
return s("error", {
|
|
324
|
+
...l,
|
|
325
|
+
mode: v,
|
|
326
|
+
time: ((b = u.value) == null ? void 0 : b.currentTime) ?? 0
|
|
327
|
+
});
|
|
328
|
+
},
|
|
253
329
|
dismissError: () => queueMicrotask(() => {
|
|
254
|
-
var
|
|
255
|
-
return (
|
|
330
|
+
var l;
|
|
331
|
+
return (l = a.value) == null ? void 0 : l.store.dismissError();
|
|
256
332
|
})
|
|
257
|
-
}),
|
|
258
|
-
if (!
|
|
259
|
-
const
|
|
260
|
-
let
|
|
261
|
-
if (
|
|
262
|
-
const
|
|
263
|
-
|
|
333
|
+
}), de = (o) => {
|
|
334
|
+
if (!e.resumeKey) return;
|
|
335
|
+
const v = e.resumeKey;
|
|
336
|
+
let l = Number(ae.getItem(v)) || 0;
|
|
337
|
+
if (l) {
|
|
338
|
+
const b = l;
|
|
339
|
+
o.addEventListener(
|
|
264
340
|
"loadedmetadata",
|
|
265
|
-
() =>
|
|
341
|
+
() => o.currentTime = b,
|
|
266
342
|
{ once: !0 }
|
|
267
343
|
);
|
|
268
344
|
}
|
|
269
|
-
|
|
270
|
-
Math.abs(
|
|
345
|
+
o.addEventListener("timeupdate", () => {
|
|
346
|
+
Math.abs(o.currentTime - l) >= De && (l = o.currentTime, ae.setItem(v, l));
|
|
271
347
|
});
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
var
|
|
275
|
-
(((
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
var
|
|
281
|
-
const
|
|
282
|
-
await
|
|
283
|
-
const
|
|
284
|
-
if (!
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
348
|
+
}, pe = () => {
|
|
349
|
+
e.watermark && (Y = setInterval(() => {
|
|
350
|
+
var o;
|
|
351
|
+
(((o = a.value) == null ? void 0 : o.store.paused) ?? !0) || (m.value = !0, U = setTimeout(() => {
|
|
352
|
+
m.value = !1;
|
|
353
|
+
}, Oe));
|
|
354
|
+
}, Ce));
|
|
355
|
+
}, fe = async (o) => {
|
|
356
|
+
var Q;
|
|
357
|
+
const v = ++x;
|
|
358
|
+
await Re();
|
|
359
|
+
const l = u.value, b = (Q = a.value) == null ? void 0 : Q.store;
|
|
360
|
+
if (!(!l || !b) && (w = !1, N = !1, o !== _.Progressive && await G(), v === x)) {
|
|
361
|
+
if (de(l), g) {
|
|
362
|
+
const { time: X, rate: me, playing: Ee } = g, Z = () => {
|
|
363
|
+
g = null, X && (l.currentTime = X), l.playbackRate = me;
|
|
364
|
+
};
|
|
365
|
+
Ee ? He(l, Z) : l.addEventListener("loadedmetadata", Z, { once: !0 });
|
|
366
|
+
}
|
|
367
|
+
o === _.Hls && f ? Fe(
|
|
368
|
+
l,
|
|
369
|
+
f,
|
|
370
|
+
q(e.hlsSrc, o)
|
|
371
|
+
) : o === _.Dash ? We(
|
|
372
|
+
l,
|
|
373
|
+
q(e.dashSrc, o)
|
|
374
|
+
) : Ye(l, e.sources ?? []), d.value = b.controlsVisible, I = b.subscribe(() => {
|
|
375
|
+
d.value = b.controlsVisible;
|
|
376
|
+
}), pe();
|
|
377
|
+
}
|
|
378
|
+
}, B = () => {
|
|
379
|
+
x++, n(), I == null || I(), I = void 0, clearInterval(Y), clearTimeout(U), m.value = !1;
|
|
380
|
+
}, j = () => {
|
|
381
|
+
if (!i.value) return;
|
|
382
|
+
const o = ze(e, i.value, c.value);
|
|
383
|
+
o !== p.value && (!o && p.value || (B(), p.value = o, o && fe(o)));
|
|
384
|
+
}, ve = async () => {
|
|
385
|
+
const [o] = await Promise.all([
|
|
386
|
+
e.hlsSrc ? import("@videojs/hlsjs-video") : null,
|
|
387
|
+
e.hlsSrc ? import("@videojs/html/media/hlsjs-video") : null,
|
|
388
|
+
e.dashSrc ? import("@videojs/html/media/dash-video") : null,
|
|
312
389
|
import("@videojs/html/i18n"),
|
|
313
390
|
import("@videojs/html/i18n/locales/uk/register"),
|
|
314
|
-
|
|
391
|
+
Je(),
|
|
315
392
|
import("@videojs/html/video/skin")
|
|
316
393
|
]);
|
|
317
|
-
return
|
|
318
|
-
hls: !!
|
|
319
|
-
dash: !!
|
|
394
|
+
return f = (o == null ? void 0 : o.Hls) ?? null, {
|
|
395
|
+
hls: !!f && (f.isSupported() || !!document.createElement("video").canPlayType("application/vnd.apple.mpegurl")),
|
|
396
|
+
dash: !!e.dashSrc && Ve()
|
|
320
397
|
};
|
|
321
|
-
},
|
|
322
|
-
|
|
398
|
+
}, J = async () => {
|
|
399
|
+
i.value = await ve(), j();
|
|
323
400
|
};
|
|
324
|
-
return
|
|
325
|
-
() => JSON.stringify([
|
|
401
|
+
return te(c, j), te(
|
|
402
|
+
() => JSON.stringify([e.hlsSrc, e.dashSrc, e.sources]),
|
|
326
403
|
() => {
|
|
327
|
-
|
|
404
|
+
B(), g = null, p.value = null, i.value = null, c.value = [], J();
|
|
328
405
|
}
|
|
329
|
-
),
|
|
406
|
+
), ye(J), oe(B), (o, v) => (O(), D("div", {
|
|
330
407
|
class: "app-video",
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
(...u) => S(E) && S(E)(...u))
|
|
408
|
+
onKeydownCapture: v[0] || (v[0] = //@ts-ignore
|
|
409
|
+
(...l) => T(E) && T(E)(...l)),
|
|
410
|
+
onPointerdownCapture: v[1] || (v[1] = //@ts-ignore
|
|
411
|
+
(...l) => T(h) && T(h)(...l)),
|
|
412
|
+
onContextmenuCapture: v[2] || (v[2] = //@ts-ignore
|
|
413
|
+
(...l) => T(y) && T(y)(...l))
|
|
338
414
|
}, [
|
|
339
|
-
|
|
340
|
-
key:
|
|
341
|
-
lang:
|
|
415
|
+
p.value ? (O(), D("media-i18n", {
|
|
416
|
+
key: p.value,
|
|
417
|
+
lang: T(Ae)
|
|
342
418
|
}, [
|
|
343
|
-
|
|
419
|
+
F("app-video-player", {
|
|
344
420
|
ref_key: "playerEl",
|
|
345
|
-
ref:
|
|
346
|
-
poster:
|
|
421
|
+
ref: a,
|
|
422
|
+
poster: o.poster
|
|
347
423
|
}, [
|
|
348
|
-
|
|
349
|
-
|
|
424
|
+
F("video-skin", Ze, [
|
|
425
|
+
p.value === T(_).Hls ? (O(), D("hlsjs-video", {
|
|
350
426
|
key: 0,
|
|
351
427
|
ref_key: "mediaEl",
|
|
352
|
-
ref:
|
|
353
|
-
preload: "none"
|
|
354
|
-
|
|
355
|
-
}, null, 8, qe)) : i.value === S(g).Dash ? (L(), A("dash-video", {
|
|
428
|
+
ref: u,
|
|
429
|
+
preload: "none"
|
|
430
|
+
}, null, 512)) : p.value === T(_).Dash ? (O(), D("dash-video", {
|
|
356
431
|
key: 1,
|
|
357
432
|
ref_key: "mediaEl",
|
|
358
|
-
ref:
|
|
359
|
-
preload: "none"
|
|
360
|
-
|
|
361
|
-
}, null, 8, Ge)) : (L(), A("video", {
|
|
433
|
+
ref: u,
|
|
434
|
+
preload: "none"
|
|
435
|
+
}, null, 512)) : (O(), D("video", {
|
|
362
436
|
key: 2,
|
|
363
437
|
ref_key: "mediaEl",
|
|
364
|
-
ref:
|
|
365
|
-
preload: "none"
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
a.watermark ? (L(), A("div", {
|
|
438
|
+
ref: u,
|
|
439
|
+
preload: "none"
|
|
440
|
+
}, null, 512)),
|
|
441
|
+
o.watermark ? (O(), D("div", {
|
|
369
442
|
key: 3,
|
|
370
|
-
class:
|
|
371
|
-
"app-video__watermark_visible":
|
|
372
|
-
"app-video__watermark_raised":
|
|
443
|
+
class: se(["app-video__watermark", {
|
|
444
|
+
"app-video__watermark_visible": m.value,
|
|
445
|
+
"app-video__watermark_raised": d.value
|
|
373
446
|
}])
|
|
374
|
-
},
|
|
375
|
-
|
|
376
|
-
class:
|
|
447
|
+
}, ge(o.watermark), 3)) : re("", !0),
|
|
448
|
+
F("div", {
|
|
449
|
+
class: se(["app-video__boost", { "app-video__boost_visible": T(S) }])
|
|
377
450
|
}, " 2× ", 2)
|
|
378
451
|
])
|
|
379
|
-
], 8,
|
|
380
|
-
], 8,
|
|
381
|
-
],
|
|
452
|
+
], 8, Xe)
|
|
453
|
+
], 8, Qe)) : re("", !0)
|
|
454
|
+
], 32));
|
|
382
455
|
}
|
|
383
|
-
}),
|
|
456
|
+
}), nt = /* @__PURE__ */ Ie($e, [["__scopeId", "data-v-ef107492"]]);
|
|
384
457
|
export {
|
|
385
|
-
|
|
458
|
+
nt as AppVideo
|
|
386
459
|
};
|