iking-web-ui-pro 0.2.37 → 0.2.38
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/{IkApprovalProcess → IKApprovalProcess}/ik.index.es.js +189 -188
- package/dist/{IkApprovalProcess → IKApprovalProcess}/ik.index.umd.js +1 -1
- package/dist/{IkApprovalProcess → IKApprovalProcess}/style.css +1 -1
- package/dist/{IkApprovalProcessDetail → IKApprovalProcessDetail}/ik.index.es.js +9 -13
- package/dist/{IkApprovalProcessDetail → IKApprovalProcessDetail}/ik.index.umd.js +2 -2
- package/dist/{IkApprovalProcessDetail → IKApprovalProcessDetail}/style.css +1 -1
- package/dist/{IkCalendar → IKCalendar}/ik.index.es.js +901 -917
- package/dist/IKCalendar/ik.index.umd.js +1 -0
- package/dist/{IkCalendar → IKCalendar}/style.css +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +7 -11
- package/dist/IKPreviewFile/ik.index.umd.js +1 -1
- package/dist/IKSearch/ik.index.es.js +406 -405
- package/dist/IKSearch/ik.index.umd.js +2 -2
- package/dist/IKSearch/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +7 -11
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +250 -254
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IkFullCalendar/ik.index.es.js +584 -601
- package/dist/IkFullCalendar/ik.index.umd.js +1 -1
- package/dist/IkPageFull/ik.index.es.js +424 -423
- package/dist/IkPageFull/ik.index.umd.js +2 -2
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPickerUser/ik.index.es.js +24 -23
- package/dist/IkPickerUser/ik.index.umd.js +1 -1
- package/dist/IkPickerUser/style.css +1 -1
- package/dist/IkSchedule/ik.index.es.js +674 -691
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/ik.index.es.js +405 -410
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +11550 -11575
- package/dist/index.umd.js +89 -89
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/IkCalendar/ik.index.umd.js +0 -1
|
@@ -913,13 +913,13 @@ const Fi = [
|
|
|
913
913
|
size: "size",
|
|
914
914
|
...r.field
|
|
915
915
|
})), l = se({}), u = se(!1), c = (g) => {
|
|
916
|
-
var
|
|
916
|
+
var m, y;
|
|
917
917
|
l.value = {
|
|
918
918
|
...g,
|
|
919
919
|
name: g.name,
|
|
920
920
|
url: ht(
|
|
921
921
|
t.value,
|
|
922
|
-
|
|
922
|
+
g[s.value.url] || ((y = (m = g == null ? void 0 : g.response) == null ? void 0 : m.data) == null ? void 0 : y.id) || (g == null ? void 0 : g.id)
|
|
923
923
|
)
|
|
924
924
|
}, r.isOnlyOfficePreview && (u.value = !0), n("handPreview", l.value);
|
|
925
925
|
}, h = (g) => {
|
|
@@ -930,17 +930,13 @@ const Fi = [
|
|
|
930
930
|
),
|
|
931
931
|
g[s.value.name] || g.attachmentName
|
|
932
932
|
);
|
|
933
|
-
}, d = Y(() => ni.isNumber(r.width) ? `${r.width}px` : r.width), p = Y(() => r.list.map((g) => {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
suffix: g[s.value.suffix] || (g == null ? void 0 : g.attachmentSuffix) || ((y = v.split(".")) == null ? void 0 : y.at(-1))
|
|
941
|
-
};
|
|
942
|
-
}));
|
|
943
|
-
return (g, v) => {
|
|
933
|
+
}, d = Y(() => ni.isNumber(r.width) ? `${r.width}px` : r.width), p = Y(() => r.list.map((g) => ({
|
|
934
|
+
...g,
|
|
935
|
+
name: g[s.value.name] || g.attachmentName,
|
|
936
|
+
size: g[s.value.size] || g.fileSize || g.attachmentSize,
|
|
937
|
+
suffix: g[s.value.suffix] || g.attachmentSuffix
|
|
938
|
+
})));
|
|
939
|
+
return (g, m) => {
|
|
944
940
|
var C, b, w;
|
|
945
941
|
const y = rt("tmplate");
|
|
946
942
|
return E(), P(
|
|
@@ -1084,7 +1080,7 @@ const Fi = [
|
|
|
1084
1080
|
)) : ee("v-if", !0),
|
|
1085
1081
|
j(S(to), {
|
|
1086
1082
|
show: u.value,
|
|
1087
|
-
"onUpdate:show":
|
|
1083
|
+
"onUpdate:show": m[0] || (m[0] = (L) => u.value = L),
|
|
1088
1084
|
loadUrl: S(t),
|
|
1089
1085
|
file: l.value,
|
|
1090
1086
|
onlyofficeServer: ((b = S(e)) == null ? void 0 : b.serverUrl) || a.onlyofficeServer,
|
|
@@ -1146,7 +1142,7 @@ const Qs = Pe(Js), eo = /* @__PURE__ */ Z({
|
|
|
1146
1142
|
office: !1,
|
|
1147
1143
|
video: !1
|
|
1148
1144
|
}), s = (u) => {
|
|
1149
|
-
var c, h, d, p, g,
|
|
1145
|
+
var c, h, d, p, g, m, y;
|
|
1150
1146
|
try {
|
|
1151
1147
|
const C = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, b = C[t.value.url] || (C == null ? void 0 : C.id) || C.attachmentId, w = (h = C[t.value.suffix] || C.attachmentSuffix) == null ? void 0 : h.toLowerCase(), L = C[t.value.name] || (C == null ? void 0 : C.attachmentName) || (C == null ? void 0 : C.originName);
|
|
1152
1148
|
if (i.value = {
|
|
@@ -1165,7 +1161,7 @@ const Qs = Pe(Js), eo = /* @__PURE__ */ Z({
|
|
|
1165
1161
|
editorConfig: {
|
|
1166
1162
|
...((p = o.onlyOfficeConfig) == null ? void 0 : p.editorConfig) || {},
|
|
1167
1163
|
customization: {
|
|
1168
|
-
...((
|
|
1164
|
+
...((m = (g = o.onlyOfficeConfig) == null ? void 0 : g.editorConfig) == null ? void 0 : m.customization) || {},
|
|
1169
1165
|
review: {
|
|
1170
1166
|
reviewDisplay: "final"
|
|
1171
1167
|
}
|
|
@@ -2091,7 +2087,7 @@ const No = {
|
|
|
2091
2087
|
name: "original",
|
|
2092
2088
|
icon: Oi(Hs)
|
|
2093
2089
|
}
|
|
2094
|
-
}, i = a, n = r, { t: s } = kr(), l = wn("image-viewer"), { nextZIndex: u } = Cr(), c = se(), h = se([]), d = ur(), p = se(!0), g = se(i.initialIndex),
|
|
2090
|
+
}, i = a, n = r, { t: s } = kr(), l = wn("image-viewer"), { nextZIndex: u } = Cr(), c = se(), h = se([]), d = ur(), p = se(!0), g = se(i.initialIndex), m = cr(e.CONTAIN), y = se({
|
|
2095
2091
|
scale: 1,
|
|
2096
2092
|
deg: 0,
|
|
2097
2093
|
offsetX: 0,
|
|
@@ -2117,7 +2113,7 @@ const No = {
|
|
|
2117
2113
|
transform: `scale(${N}) rotate(${G}deg) translate(${_e}px, ${Le}px)`,
|
|
2118
2114
|
transition: ye ? "transform .3s" : ""
|
|
2119
2115
|
};
|
|
2120
|
-
return
|
|
2116
|
+
return m.value.name === e.CONTAIN.name && (Ht.maxWidth = Ht.maxHeight = "100%"), Ht;
|
|
2121
2117
|
});
|
|
2122
2118
|
function J() {
|
|
2123
2119
|
ne(), n("close");
|
|
@@ -2191,8 +2187,8 @@ const No = {
|
|
|
2191
2187
|
function Ii() {
|
|
2192
2188
|
if (p.value)
|
|
2193
2189
|
return;
|
|
2194
|
-
const N = t(e), G = Object.values(e), X =
|
|
2195
|
-
|
|
2190
|
+
const N = t(e), G = Object.values(e), X = m.value.name, ye = ((G == null ? void 0 : G.findIndex((_e) => _e.name === X)) + 1) % N.length;
|
|
2191
|
+
m.value = e[N[ye]], xi();
|
|
2196
2192
|
}
|
|
2197
2193
|
function Bt(N) {
|
|
2198
2194
|
const G = i.urlList.length;
|
|
@@ -2380,7 +2376,7 @@ const No = {
|
|
|
2380
2376
|
),
|
|
2381
2377
|
j(S(Ae), { onClick: Ii }, {
|
|
2382
2378
|
default: Q(() => [
|
|
2383
|
-
(E(), pe(hr(
|
|
2379
|
+
(E(), pe(hr(m.value.icon)))
|
|
2384
2380
|
]),
|
|
2385
2381
|
_: 1
|
|
2386
2382
|
/* STABLE */
|
|
@@ -2550,7 +2546,7 @@ function Vo() {
|
|
|
2550
2546
|
return !1;
|
|
2551
2547
|
}
|
|
2552
2548
|
}
|
|
2553
|
-
function
|
|
2549
|
+
function v(a) {
|
|
2554
2550
|
if (a === void 0)
|
|
2555
2551
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2556
2552
|
return a;
|
|
@@ -2560,7 +2556,7 @@ function pi(a, o) {
|
|
|
2560
2556
|
return o;
|
|
2561
2557
|
if (o !== void 0)
|
|
2562
2558
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
2563
|
-
return
|
|
2559
|
+
return v(a);
|
|
2564
2560
|
}
|
|
2565
2561
|
function D(a) {
|
|
2566
2562
|
var o = Vo();
|
|
@@ -2677,10 +2673,10 @@ var In = { exports: {} };
|
|
|
2677
2673
|
var c = r ? r + u : u, h = this._events[c];
|
|
2678
2674
|
return h ? h.fn ? 1 : h.length : 0;
|
|
2679
2675
|
}, s.prototype.emit = function(u, c, h, d, p, g) {
|
|
2680
|
-
var
|
|
2681
|
-
if (!this._events[
|
|
2676
|
+
var m = r ? r + u : u;
|
|
2677
|
+
if (!this._events[m])
|
|
2682
2678
|
return !1;
|
|
2683
|
-
var y = this._events[
|
|
2679
|
+
var y = this._events[m], C = arguments.length, b, w;
|
|
2684
2680
|
if (y.fn) {
|
|
2685
2681
|
switch (y.once && this.removeListener(u, y.fn, void 0, !0), C) {
|
|
2686
2682
|
case 1:
|
|
@@ -2737,8 +2733,8 @@ var In = { exports: {} };
|
|
|
2737
2733
|
if (g.fn)
|
|
2738
2734
|
g.fn === c && (!d || g.once) && (!h || g.context === h) && n(this, p);
|
|
2739
2735
|
else {
|
|
2740
|
-
for (var
|
|
2741
|
-
(g[
|
|
2736
|
+
for (var m = 0, y = [], C = g.length; m < C; m++)
|
|
2737
|
+
(g[m].fn !== c || d && !g[m].once || h && g[m].context !== h) && y.push(g[m]);
|
|
2742
2738
|
y.length ? this._events[p] = y.length === 1 ? y[0] : y : n(this, p);
|
|
2743
2739
|
}
|
|
2744
2740
|
return this;
|
|
@@ -3237,7 +3233,7 @@ function Qo(a, o, r) {
|
|
|
3237
3233
|
var ne = t, ue = e;
|
|
3238
3234
|
return t = e = void 0, u = z, n = a.apply(ue, ne), n;
|
|
3239
3235
|
}
|
|
3240
|
-
function
|
|
3236
|
+
function m(z, ne) {
|
|
3241
3237
|
return p ? (window.cancelAnimationFrame(s), window.requestAnimationFrame(z)) : setTimeout(z, ne);
|
|
3242
3238
|
}
|
|
3243
3239
|
function y(z) {
|
|
@@ -3246,7 +3242,7 @@ function Qo(a, o, r) {
|
|
|
3246
3242
|
clearTimeout(z);
|
|
3247
3243
|
}
|
|
3248
3244
|
function C(z) {
|
|
3249
|
-
return u = z, s =
|
|
3245
|
+
return u = z, s = m(L, o), c ? g(z) : n;
|
|
3250
3246
|
}
|
|
3251
3247
|
function b(z) {
|
|
3252
3248
|
var ne = z - l, ue = z - u, ce = o - ne;
|
|
@@ -3260,7 +3256,7 @@ function Qo(a, o, r) {
|
|
|
3260
3256
|
var z = Date.now();
|
|
3261
3257
|
if (w(z))
|
|
3262
3258
|
return M(z);
|
|
3263
|
-
s =
|
|
3259
|
+
s = m(L, b(z));
|
|
3264
3260
|
}
|
|
3265
3261
|
function M(z) {
|
|
3266
3262
|
return s = void 0, d && t ? g(z) : (t = e = void 0, n);
|
|
@@ -3281,9 +3277,9 @@ function Qo(a, o, r) {
|
|
|
3281
3277
|
if (s === void 0)
|
|
3282
3278
|
return C(l);
|
|
3283
3279
|
if (h)
|
|
3284
|
-
return s =
|
|
3280
|
+
return s = m(L, o), g(l);
|
|
3285
3281
|
}
|
|
3286
|
-
return s === void 0 && (s =
|
|
3282
|
+
return s === void 0 && (s = m(L, o)), n;
|
|
3287
3283
|
}
|
|
3288
3284
|
return J.cancel = U, J.flush = R, J.pending = te, J;
|
|
3289
3285
|
}
|
|
@@ -3460,12 +3456,12 @@ var Gi = {
|
|
|
3460
3456
|
g[b] = r.ext[b];
|
|
3461
3457
|
}), g;
|
|
3462
3458
|
} else if (arguments.length > 1) {
|
|
3463
|
-
for (var
|
|
3459
|
+
for (var m = {
|
|
3464
3460
|
playerVersion: ai,
|
|
3465
3461
|
domain: document.domain
|
|
3466
3462
|
}, y = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], C = 0; C < arguments.length; C++)
|
|
3467
|
-
|
|
3468
|
-
return
|
|
3463
|
+
m[y[C]] = arguments[C];
|
|
3464
|
+
return m.ex = t ? (t[arguments[0]] || {}).msg : "", m;
|
|
3469
3465
|
}
|
|
3470
3466
|
}
|
|
3471
3467
|
), de = "play", vi = "playing", $e = "ended", ot = "pause", pt = "error", Ot = "seeking", xe = "seeked", he = "timeupdate", vt = "waiting", Se = "canplay", ra = "canplaythrough", Ue = "durationchange", Dn = "volumechange", Ie = "loadeddata", sa = "loadedmetadata", On = "ratechange", Rn = "progress", mi = "loadstart", Ke = "emptied", oa = "stalled", aa = "suspend", la = "abort", ua = "bufferedChange", yi = "focus", Fn = "blur", _i = "ready", Mn = "urlNull", Ge = "autoplay_started", ki = "autoplay_was_prevented", Rt = "complete", Tt = "replay", Ci = "destroy", Ft = "urlchange", li = "download_speed_change", Nn = "leaveplayer", Bn = "enterplayer", Hn = "loading", be = "fullscreen_change", Et = "cssFullscreen_change", St = "mini_state_change", wi = "definition_change", ca = "before_definition_change", ui = "after_definition_change", fa = "SEI_PARSED", ha = "retry", Be = "video_resize", ci = "pip_change", Un = "rotate", zn = "screenShot", xt = "playnext", Vn = "shortcut", jn = "xglog", It = "user_action", Mt = "reset", Wn = "source_error", Gn = "source_success", da = "switch_subtitle", $n = ["play", "playing", "ended", "pause", "error", "seeking", "seeked", "timeupdate", "waiting", "canplay", "canplaythrough", "durationchange", "volumechange", "loadeddata", "loadedmetadata", "ratechange", "progress", "loadstart", "emptied", "stalled", "suspend", "abort", "lowdecode"], Kn = {
|
|
@@ -5135,8 +5131,8 @@ var Oa = function(o, r) {
|
|
|
5135
5131
|
o.config.plugins || (o.config.plugins = []), o.config.ignores || (o.config.ignores = []), (t = o.config.plugins).push.apply(t, ve(l)), (e = o.config.ignores).push.apply(e, ve(c)), Object.keys(d).map(function(y) {
|
|
5136
5132
|
o.config.icons[y] || (o.config.icons[y] = d[y]);
|
|
5137
5133
|
});
|
|
5138
|
-
var
|
|
5139
|
-
g.push.apply(g, ve(
|
|
5134
|
+
var m = o.config.i18n || [];
|
|
5135
|
+
g.push.apply(g, ve(m)), o.config.i18n = g;
|
|
5140
5136
|
}, Ra = /* @__PURE__ */ function(a) {
|
|
5141
5137
|
A(r, a);
|
|
5142
5138
|
var o = D(r);
|
|
@@ -5145,13 +5141,13 @@ var Oa = function(o, r) {
|
|
|
5145
5141
|
x(this, r);
|
|
5146
5142
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
5147
5143
|
i[n] = arguments[n];
|
|
5148
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
5149
|
-
var l =
|
|
5144
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onMouseEnter", function(s) {
|
|
5145
|
+
var l = v(t), u = l.player, c = l.playerConfig;
|
|
5150
5146
|
c.closeControlsBlur && u.focus({
|
|
5151
5147
|
autoHide: !1
|
|
5152
5148
|
});
|
|
5153
|
-
}), _(
|
|
5154
|
-
var l =
|
|
5149
|
+
}), _(v(t), "onMouseLeave", function(s) {
|
|
5150
|
+
var l = v(t), u = l.player;
|
|
5155
5151
|
u.focus();
|
|
5156
5152
|
}), t;
|
|
5157
5153
|
}
|
|
@@ -5553,14 +5549,14 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5553
5549
|
var e;
|
|
5554
5550
|
x(this, r);
|
|
5555
5551
|
var i = f.deepMerge(nn(), t);
|
|
5556
|
-
e = o.call(this, i), _(
|
|
5552
|
+
e = o.call(this, i), _(v(e), "canPlayFunc", function() {
|
|
5557
5553
|
if (e.config) {
|
|
5558
|
-
var g = e.config,
|
|
5559
|
-
H.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = y, (
|
|
5554
|
+
var g = e.config, m = g.autoplay, y = g.defaultPlaybackRate;
|
|
5555
|
+
H.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = y, (m || e._useAutoplay) && e.mediaPlay(), e.off(Se, e.canPlayFunc), e.removeClass(k.ENTER);
|
|
5560
5556
|
}
|
|
5561
|
-
}), _(
|
|
5557
|
+
}), _(v(e), "onFullscreenChange", function(g, m) {
|
|
5562
5558
|
var y = function() {
|
|
5563
|
-
f.setTimeout(
|
|
5559
|
+
f.setTimeout(v(e), function() {
|
|
5564
5560
|
e.resize();
|
|
5565
5561
|
}, 100);
|
|
5566
5562
|
}, C = f.getFullScreenEl();
|
|
@@ -5577,12 +5573,12 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5577
5573
|
}]
|
|
5578
5574
|
});
|
|
5579
5575
|
var b = ia(C, e.playerId, We);
|
|
5580
|
-
if (
|
|
5576
|
+
if (m || C && (C === e._fullscreenEl || b))
|
|
5581
5577
|
y(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, C, k.FULLSCREEN), e.emit(be, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
5582
5578
|
else if (e.fullscreen) {
|
|
5583
5579
|
y();
|
|
5584
|
-
var w =
|
|
5585
|
-
if (M.needFullscreenScroll ? (window.scrollTo(L.left, L.top), f.setTimeout(
|
|
5580
|
+
var w = v(e), L = w._fullScreenOffset, M = w.config;
|
|
5581
|
+
if (M.needFullscreenScroll ? (window.scrollTo(L.left, L.top), f.setTimeout(v(e), function() {
|
|
5586
5582
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
5587
5583
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
5588
5584
|
e.removeClass(k.FULLSCREEN);
|
|
@@ -5592,11 +5588,11 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5592
5588
|
}
|
|
5593
5589
|
e._fullscreenEl = null, e.emit(be, !1);
|
|
5594
5590
|
}
|
|
5595
|
-
}), _(
|
|
5591
|
+
}), _(v(e), "_onWebkitbeginfullscreen", function(g) {
|
|
5596
5592
|
e._fullscreenEl = e.media, e.onFullscreenChange(g, !0);
|
|
5597
|
-
}), _(
|
|
5593
|
+
}), _(v(e), "_onWebkitendfullscreen", function(g) {
|
|
5598
5594
|
e.onFullscreenChange(g, !1);
|
|
5599
|
-
}), Xn(
|
|
5595
|
+
}), Xn(v(e), Ha), e.config = i, e._pluginInfoId = f.generateSessionId(), qo(v(e));
|
|
5600
5596
|
var n = e.constructor.defaultPreset;
|
|
5601
5597
|
if (e.config.presets.length) {
|
|
5602
5598
|
var s = e.config.presets.indexOf("default");
|
|
@@ -5638,7 +5634,7 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5638
5634
|
});
|
|
5639
5635
|
p || (h.defaultDefinition = h.list[0].definition, p = h.list[0]), e.config.url = p.url, e.curDefinition = p;
|
|
5640
5636
|
}
|
|
5641
|
-
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), ie.onPluginsReady(
|
|
5637
|
+
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), ie.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(V.READY), f.setTimeout(v(e), function() {
|
|
5642
5638
|
e.emit(_i);
|
|
5643
5639
|
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < V.ATTACHED) && e.start(), e;
|
|
5644
5640
|
}
|
|
@@ -5674,13 +5670,13 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5674
5670
|
}
|
|
5675
5671
|
var p = this.config.isMobileSimulateMode === "mobile" ? "mobile" : B.device;
|
|
5676
5672
|
if (this.addClass("".concat(k.DEFAULT, " ").concat(k.INACTIVE, " xgplayer-").concat(p, " ").concat(this.config.controls ? "" : k.NO_CONTROLS)), this.config.autoplay ? this.addClass(k.ENTER) : this.addClass(k.NO_START), this.config.fluid) {
|
|
5677
|
-
var g = this.config,
|
|
5678
|
-
(typeof
|
|
5673
|
+
var g = this.config, m = g.width, y = g.height;
|
|
5674
|
+
(typeof m != "number" || typeof y != "number") && (m = 600, y = 337.5);
|
|
5679
5675
|
var C = {
|
|
5680
5676
|
width: "100%",
|
|
5681
5677
|
height: "0",
|
|
5682
5678
|
"max-width": "100%",
|
|
5683
|
-
"padding-top": "".concat(y * 100 /
|
|
5679
|
+
"padding-top": "".concat(y * 100 / m, "%")
|
|
5684
5680
|
};
|
|
5685
5681
|
Object.keys(C).forEach(function(R) {
|
|
5686
5682
|
i.root.style[R] = C[R];
|
|
@@ -5893,8 +5889,8 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
5893
5889
|
this.__startTime = l;
|
|
5894
5890
|
var u = this.paused && !this.isError;
|
|
5895
5891
|
return this.src = s, new Promise(function(c, h) {
|
|
5896
|
-
var d = function(
|
|
5897
|
-
n.off("timeupdate", p), n.off("canplay", p), h(
|
|
5892
|
+
var d = function(m) {
|
|
5893
|
+
n.off("timeupdate", p), n.off("canplay", p), h(m);
|
|
5898
5894
|
}, p = function() {
|
|
5899
5895
|
n.duration > 0 && n.__startTime > 0 && (n.currentTime = n.__startTime, n.__startTime = -1), u && n.pause(), n.off("error", d), c(!0);
|
|
5900
5896
|
};
|
|
@@ -6027,8 +6023,8 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
6027
6023
|
key: "resetState",
|
|
6028
6024
|
value: function() {
|
|
6029
6025
|
var e = this, i = k.NOT_ALLOW_AUTOPLAY, n = k.PLAYING, s = k.NO_START, l = k.PAUSED, u = k.REPLAY, c = k.ENTER, h = k.ENDED, d = k.ERROR, p = k.LOADING, g = [i, n, s, l, u, c, h, d, p];
|
|
6030
|
-
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, g.forEach(function(
|
|
6031
|
-
e.removeClass(
|
|
6026
|
+
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, g.forEach(function(m) {
|
|
6027
|
+
e.removeClass(m);
|
|
6032
6028
|
}), this.addClass(k.NO_START), this.emit(Mt);
|
|
6033
6029
|
}
|
|
6034
6030
|
}, {
|
|
@@ -6373,13 +6369,13 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
6373
6369
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
6374
6370
|
var h = {
|
|
6375
6371
|
rotate: u
|
|
6376
|
-
}, d = 0, p = 0, g = 1,
|
|
6377
|
-
if (
|
|
6378
|
-
g = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = g, d = i > 0 ? (100 - s) / 2 - i : 0, h.y =
|
|
6379
|
-
else if (
|
|
6372
|
+
}, d = 0, p = 0, g = 1, m = Math.abs(u / 90), y = this.root, C = this.innerContainer, b = y.offsetWidth, w = C ? C.offsetHeight : y.offsetHeight, L = w, M = b;
|
|
6373
|
+
if (m % 2 === 0)
|
|
6374
|
+
g = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = g, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, p = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - p : p, this.media.style.width = "".concat(M, "px"), this.media.style.height = "".concat(L, "px");
|
|
6375
|
+
else if (m % 2 === 1) {
|
|
6380
6376
|
M = w, L = b;
|
|
6381
6377
|
var U = w - b;
|
|
6382
|
-
p = -U / 2 / M * 100, h.x =
|
|
6378
|
+
p = -U / 2 / M * 100, h.x = m === 3 ? p + i / 2 : p - i / 2, d = U / 2 / L * 100, h.y = m === 3 ? d + n / 2 : d - n / 2, h.scale = g, this.media.style.width = "".concat(M, "px"), this.media.style.height = "".concat(L, "px");
|
|
6383
6379
|
}
|
|
6384
6380
|
var R = f.getTransformStyle(h, this.media.style.transform || this.media.style.webkitTransform);
|
|
6385
6381
|
this.media.style.transform = R, this.media.style.webkitTransform = R;
|
|
@@ -6430,12 +6426,12 @@ var Ha = ["play", "pause", "replay", "retry"], sn = 0, on = 0, De = null, Nt = /
|
|
|
6430
6426
|
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
6431
6427
|
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
6432
6428
|
this._videoHeight = l, this._videoWidth = s;
|
|
6433
|
-
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, p = i.width, g = i.height - d,
|
|
6434
|
-
c === "auto" && y >
|
|
6429
|
+
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, p = i.width, g = i.height - d, m = parseInt(s / l * 1e3, 10), y = parseInt(p / g * 1e3, 10), C = p, b = g, w = {};
|
|
6430
|
+
c === "auto" && y > m || c === "fixWidth" ? (b = p / m * 1e3, this.config.fluid ? w.paddingTop = "".concat(b * 100 / C, "%") : w.height = "".concat(b + d, "px")) : (c === "auto" && y < m || c === "fixHeight") && (C = m * g / 1e3, w.width = "".concat(C, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(w).forEach(function(M) {
|
|
6435
6431
|
e.root.style[M] = w[M];
|
|
6436
|
-
}), (h === "fillHeight" && y <
|
|
6432
|
+
}), (h === "fillHeight" && y < m || h === "fillWidth" && y > m) && this.setAttribute("data-xgfill", "cover");
|
|
6437
6433
|
var L = {
|
|
6438
|
-
videoScale:
|
|
6434
|
+
videoScale: m,
|
|
6439
6435
|
vWidth: C,
|
|
6440
6436
|
vHeight: b,
|
|
6441
6437
|
cWidth: C,
|
|
@@ -6760,43 +6756,43 @@ var Oe = {
|
|
|
6760
6756
|
x(this, r);
|
|
6761
6757
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
6762
6758
|
i[n] = arguments[n];
|
|
6763
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
6759
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "_onTimeupdate", function() {
|
|
6764
6760
|
t._state.isTimeUpdate = !0, t._state.autoplayStart && (H.logInfo("[xgLogger]".concat(t.player.playerId, " _onTimeupdate")), t._sendFF("onTimeupdate"));
|
|
6765
|
-
}), _(
|
|
6761
|
+
}), _(v(t), "_onAutoplayStart", function() {
|
|
6766
6762
|
H.logInfo("[xgLogger]".concat(t.player.playerId, " _onAutoplayStart")), t._state.autoplayStart = !0, t.vt && t._sendFF("onAutoplayStart");
|
|
6767
|
-
}), _(
|
|
6763
|
+
}), _(v(t), "_onReset", function() {
|
|
6768
6764
|
t._state = {
|
|
6769
6765
|
autoplayStart: !1,
|
|
6770
6766
|
isFFLoading: !1,
|
|
6771
6767
|
isTimeUpdate: !1,
|
|
6772
6768
|
isFFSend: !1,
|
|
6773
6769
|
isLs: !1
|
|
6774
|
-
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = re(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer && f.clearTimeout(
|
|
6775
|
-
}), _(
|
|
6770
|
+
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = re(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer && f.clearTimeout(v(t), t._waitTimer), t._waittTimer && f.clearTimeout(v(t), t._waittTimer), t._waitTimer = null, t._waittTimer = null, t._waitType = 0;
|
|
6771
|
+
}), _(v(t), "_onSeeking", function() {
|
|
6776
6772
|
t.seekingStart || (t.suspendWaitingStatus("seek"), t.seekingStart = re(), t.emitLog(Oe.SEEK_START, {
|
|
6777
6773
|
start: re()
|
|
6778
6774
|
}));
|
|
6779
|
-
}), _(
|
|
6775
|
+
}), _(v(t), "_onSeeked", function() {
|
|
6780
6776
|
t.suspendSeekingStatus("seeked");
|
|
6781
|
-
}), _(
|
|
6777
|
+
}), _(v(t), "_onWaitingLoadStart", function() {
|
|
6782
6778
|
t._isWaiting || t.vt || (t._isWaiting = !0, t.waitingStart = re(), t.fixedWaitingStart = re(), t._waitType = 1, t.emitLog(Oe.WAIT_START, {
|
|
6783
6779
|
fixedStart: t.fixedWaitingStart,
|
|
6784
6780
|
start: t.waitingStart,
|
|
6785
6781
|
type: 1,
|
|
6786
6782
|
endType: "loadstart"
|
|
6787
6783
|
}));
|
|
6788
|
-
}), _(
|
|
6789
|
-
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = re(), t._waitTimer = f.setTimeout(
|
|
6790
|
-
t._isWaiting && (t.waitingStart = re(), f.clearTimeout(
|
|
6784
|
+
}), _(v(t), "_onWaiting", function() {
|
|
6785
|
+
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = re(), t._waitTimer = f.setTimeout(v(t), function() {
|
|
6786
|
+
t._isWaiting && (t.waitingStart = re(), f.clearTimeout(v(t), t._waitTimer), t._waitTimer = null, t._startWaitTimeout(), t.emitLog(Oe.WAIT_START, {
|
|
6791
6787
|
fixedStart: t.fixedWaitingStart,
|
|
6792
6788
|
start: t.waitingStart,
|
|
6793
6789
|
type: t._waitType,
|
|
6794
6790
|
endType: t._waitType === 2 ? "seek" : "playing"
|
|
6795
6791
|
}));
|
|
6796
6792
|
}, 200));
|
|
6797
|
-
}), _(
|
|
6793
|
+
}), _(v(t), "_onError", function() {
|
|
6798
6794
|
t.suspendSeekingStatus("error"), t.suspendWaitingStatus("error");
|
|
6799
|
-
}), _(
|
|
6795
|
+
}), _(v(t), "_onPlaying", function() {
|
|
6800
6796
|
t._isWaiting && t.suspendWaitingStatus("playing");
|
|
6801
6797
|
}), t;
|
|
6802
6798
|
}
|
|
@@ -7140,11 +7136,11 @@ var Ga = /* @__PURE__ */ function(a) {
|
|
|
7140
7136
|
var o = D(r);
|
|
7141
7137
|
function r(t) {
|
|
7142
7138
|
var e;
|
|
7143
|
-
return x(this, r), e = o.call(this, t), _(
|
|
7139
|
+
return x(this, r), e = o.call(this, t), _(v(e), "onPlayerReset", function() {
|
|
7144
7140
|
e.autoPlayStart = !1;
|
|
7145
7141
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
7146
7142
|
e.setAttr("data-state", "play"), f.removeClass(e.root, i), e.show();
|
|
7147
|
-
}), _(
|
|
7143
|
+
}), _(v(e), "onAutoplayStart", function() {
|
|
7148
7144
|
if (!e.autoPlayStart) {
|
|
7149
7145
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
7150
7146
|
f.addClass(e.root, i), e.autoPlayStart = !0, e.onPlayPause("play");
|
|
@@ -7439,8 +7435,8 @@ function cn(a) {
|
|
|
7439
7435
|
var i = Si[e], n = o[i], s = parseFloat(n);
|
|
7440
7436
|
r[i] = Number.isNaN(s) ? 0 : s;
|
|
7441
7437
|
}
|
|
7442
|
-
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight, h = r.marginTop + r.marginBottom, d = r.borderLeftWidth + r.borderRightWidth, p = r.borderTopWidth + r.borderBottomWidth, g = t,
|
|
7443
|
-
|
|
7438
|
+
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight, h = r.marginTop + r.marginBottom, d = r.borderLeftWidth + r.borderRightWidth, p = r.borderTopWidth + r.borderBottomWidth, g = t, m = un(o.width);
|
|
7439
|
+
m !== !1 && (r.width = m + (g ? 0 : l + d));
|
|
7444
7440
|
var y = un(o.height);
|
|
7445
7441
|
return y !== !1 && (r.height = y + (g ? 0 : u + p)), r.innerWidth = r.width - (l + d), r.innerHeight = r.height - (u + p), r.outerWidth = r.width + c, r.outerHeight = r.height + h, r;
|
|
7446
7442
|
}
|
|
@@ -7675,18 +7671,18 @@ var Xt = {
|
|
|
7675
7671
|
var o = D(r);
|
|
7676
7672
|
function r(t) {
|
|
7677
7673
|
var e;
|
|
7678
|
-
x(this, r), e = o.call(this, t), _(
|
|
7674
|
+
x(this, r), e = o.call(this, t), _(v(e), "onCancelClick", function(s) {
|
|
7679
7675
|
e.exitMini(), e.isClose = !0;
|
|
7680
|
-
}), _(
|
|
7681
|
-
var l =
|
|
7676
|
+
}), _(v(e), "onCenterClick", function(s) {
|
|
7677
|
+
var l = v(e), u = l.player;
|
|
7682
7678
|
u.paused ? u.play() : u.pause();
|
|
7683
|
-
}), _(
|
|
7679
|
+
}), _(v(e), "onScroll", function(s) {
|
|
7684
7680
|
if (!(!window.scrollY && window.scrollY !== 0 || Math.abs(window.scrollY - e.pos.scrollY) < 50)) {
|
|
7685
7681
|
var l = parseInt(f.getCss(e.player.root, "height"));
|
|
7686
7682
|
l += e.config.scrollTop, e.pos.scrollY = window.scrollY, window.scrollY > l + 5 ? !e.isMini && !e.isClose && e.getMini() : window.scrollY <= l && (e.isMini && e.exitMini(), e.isClose = !1);
|
|
7687
7683
|
}
|
|
7688
7684
|
}), e.isMini = !1, e.isClose = !1;
|
|
7689
|
-
var i =
|
|
7685
|
+
var i = v(e), n = i.config;
|
|
7690
7686
|
return e.pos = {
|
|
7691
7687
|
left: n.left < 0 ? window.innerWidth - n.width - 20 : n.left,
|
|
7692
7688
|
top: n.top < 0 ? window.innerHeight - n.height - 20 : n.top,
|
|
@@ -7832,17 +7828,17 @@ var Xt = {
|
|
|
7832
7828
|
x(this, r);
|
|
7833
7829
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
7834
7830
|
i[n] = arguments[n];
|
|
7835
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
7836
|
-
var l =
|
|
7831
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onMouseMove", function(s) {
|
|
7832
|
+
var l = v(t), u = l.player, c = l.playerConfig;
|
|
7837
7833
|
u.isActive || (u.focus({
|
|
7838
7834
|
autoHide: !c.closeDelayBlur
|
|
7839
7835
|
}), !c.closeFocusVideoFocus && u.media.focus());
|
|
7840
|
-
}), _(
|
|
7841
|
-
var l =
|
|
7836
|
+
}), _(v(t), "onMouseEnter", function(s) {
|
|
7837
|
+
var l = v(t), u = l.playerConfig, c = l.player;
|
|
7842
7838
|
!u.closeFocusVideoFocus && c.media.focus(), u.closeDelayBlur ? c.focus({
|
|
7843
7839
|
autoHide: !1
|
|
7844
7840
|
}) : c.focus(), t.emit(Bn);
|
|
7845
|
-
}), _(
|
|
7841
|
+
}), _(v(t), "onMouseLeave", function(s) {
|
|
7846
7842
|
var l = t.playerConfig, u = l.closePlayerBlur, c = l.leavePlayerTime, h = l.closeDelayBlur;
|
|
7847
7843
|
!u && !h && (c ? t.player.focus({
|
|
7848
7844
|
autoHide: !0,
|
|
@@ -7850,24 +7846,24 @@ var Xt = {
|
|
|
7850
7846
|
}) : t.player.blur({
|
|
7851
7847
|
ignorePaused: !0
|
|
7852
7848
|
})), t.emit(Nn);
|
|
7853
|
-
}), _(
|
|
7854
|
-
var l =
|
|
7849
|
+
}), _(v(t), "onVideoClick", function(s) {
|
|
7850
|
+
var l = v(t), u = l.player, c = l.playerConfig;
|
|
7855
7851
|
s.target && c.closeVideoClick || (s.target === u.root || s.target === u.media || s.target === u.innerContainer || s.target === u.media.__canvas) && (s.preventDefault(), c.closeVideoStopPropagation || s.stopPropagation(), t._clickCount++, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), t.clickTimer = setTimeout(function() {
|
|
7856
|
-
t._clickCount && (t._clickCount--, Te(
|
|
7852
|
+
t._clickCount && (t._clickCount--, Te(v(t), qt[0], function(h, d) {
|
|
7857
7853
|
t.switchPlayPause(d.e);
|
|
7858
7854
|
}, {
|
|
7859
7855
|
e: s,
|
|
7860
7856
|
paused: u.paused
|
|
7861
7857
|
}), clearTimeout(t.clickTimer), t.clickTimer = null);
|
|
7862
7858
|
}, 300));
|
|
7863
|
-
}), _(
|
|
7864
|
-
var l =
|
|
7859
|
+
}), _(v(t), "onVideoDblClick", function(s) {
|
|
7860
|
+
var l = v(t), u = l.player, c = l.playerConfig;
|
|
7865
7861
|
if (!(c.closeVideoDblclick || !s.target || s.target !== u.media && s.target !== u.media.__canvas)) {
|
|
7866
7862
|
if (!c.closeVideoClick && t._clickCount < 2) {
|
|
7867
7863
|
t._clickCount = 0;
|
|
7868
7864
|
return;
|
|
7869
7865
|
}
|
|
7870
|
-
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), Te(
|
|
7866
|
+
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), Te(v(t), qt[1], function(h, d) {
|
|
7871
7867
|
t.emitUserAction(d.e, "switch_fullscreen", {
|
|
7872
7868
|
props: "fullscreen",
|
|
7873
7869
|
from: u.fullscreen,
|
|
@@ -8085,8 +8081,8 @@ var Ze = {
|
|
|
8085
8081
|
var o = D(r);
|
|
8086
8082
|
function r(t) {
|
|
8087
8083
|
var e;
|
|
8088
|
-
return x(this, r), e = o.call(this, t), _(
|
|
8089
|
-
var n =
|
|
8084
|
+
return x(this, r), e = o.call(this, t), _(v(e), "onTouchStart", function(i) {
|
|
8085
|
+
var n = v(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = e.getTouche(i);
|
|
8090
8086
|
if (h && !l.disableGesture && e.duration > 0 && !s.ended) {
|
|
8091
8087
|
u.isStart = !0, e.timer && clearTimeout(e.timer), f.checkIsFunction(c.disableSwipeHandler) && c.disableSwipeHandler(), e.find(".xg-dur").innerHTML = f.format(e.duration);
|
|
8092
8088
|
var d = e.root.getBoundingClientRect();
|
|
@@ -8094,21 +8090,21 @@ var Ze = {
|
|
|
8094
8090
|
var p = parseInt(h.pageX - u.left, 10), g = parseInt(h.pageY - u.top, 10);
|
|
8095
8091
|
u.x = s.rotateDeg === 90 ? g : p, u.y = s.rotateDeg === 90 ? p : g, u.scopeL = l.scopeL * u.width, u.scopeR = (1 - l.scopeR) * u.width, u.scopeM1 = u.width * (1 - l.scopeM) / 2, u.scopeM2 = u.width - u.scopeM1;
|
|
8096
8092
|
}
|
|
8097
|
-
}), _(
|
|
8098
|
-
var n = e.getTouche(i), s =
|
|
8093
|
+
}), _(v(e), "onTouchMove", function(i) {
|
|
8094
|
+
var n = e.getTouche(i), s = v(e), l = s.pos, u = s.config, c = s.player;
|
|
8099
8095
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
8100
|
-
var h = u.miniMoveStep, d = u.hideControlsActive, p = parseInt(n.pageX - l.left, 10), g = parseInt(n.pageY - l.top, 10),
|
|
8101
|
-
if (Math.abs(
|
|
8102
|
-
var C =
|
|
8103
|
-
if (w === -1 && (w = e.checkScope(
|
|
8096
|
+
var h = u.miniMoveStep, d = u.hideControlsActive, p = parseInt(n.pageX - l.left, 10), g = parseInt(n.pageY - l.top, 10), m = c.rotateDeg === 90 ? g : p, y = c.rotateDeg === 90 ? p : g;
|
|
8097
|
+
if (Math.abs(m - l.x) > h || Math.abs(y - l.y) > h) {
|
|
8098
|
+
var C = m - l.x, b = y - l.y, w = l.scope;
|
|
8099
|
+
if (w === -1 && (w = e.checkScope(m, y, C, b, l), w === 0 && (d ? c.blur() : c.focus({
|
|
8104
8100
|
autoHide: !1
|
|
8105
8101
|
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = w), w === -1 || w > 0 && !u.gestureY || w === 0 && !u.gestureX)
|
|
8106
8102
|
return;
|
|
8107
|
-
e.executeMove(C, b, w, l.width, l.height), l.x =
|
|
8103
|
+
e.executeMove(C, b, w, l.width, l.height), l.x = m, l.y = y;
|
|
8108
8104
|
}
|
|
8109
8105
|
}
|
|
8110
|
-
}), _(
|
|
8111
|
-
var n =
|
|
8106
|
+
}), _(v(e), "onTouchEnd", function(i) {
|
|
8107
|
+
var n = v(e), s = n.player, l = n.pos, u = n.playerConfig;
|
|
8112
8108
|
if (setTimeout(function() {
|
|
8113
8109
|
s.getPlugin("progress") && s.getPlugin("progress").resetSeekState();
|
|
8114
8110
|
}, 10), !!l.isStart) {
|
|
@@ -8116,9 +8112,9 @@ var Ze = {
|
|
|
8116
8112
|
var c = e.config, h = c.disableGesture, d = c.gestureX;
|
|
8117
8113
|
!h && d ? e.endLastMove(l.scope) : l.time = 0, l.scope = -1, e.resetPos(), f.checkIsFunction(u.enableSwipeHandler) && u.enableSwipeHandler(), e.changeAction(Ze.AUTO);
|
|
8118
8114
|
}
|
|
8119
|
-
}), _(
|
|
8115
|
+
}), _(v(e), "onRootTouchMove", function(i) {
|
|
8120
8116
|
e.config.disableGesture || !e.config.gestureX || e.checkIsRootTarget(i) && (i.stopPropagation(), e.pos.isStart ? e.onTouchMove(i) : e.onTouchStart(i));
|
|
8121
|
-
}), _(
|
|
8117
|
+
}), _(v(e), "onRootTouchEnd", function(i) {
|
|
8122
8118
|
e.pos.scope > -1 && e.onTouchEnd(i);
|
|
8123
8119
|
}), e.pos = {
|
|
8124
8120
|
isStart: !1,
|
|
@@ -8524,20 +8520,20 @@ var gn = /* @__PURE__ */ function(a) {
|
|
|
8524
8520
|
x(this, r);
|
|
8525
8521
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
8526
8522
|
i[n] = arguments[n];
|
|
8527
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
8523
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onBodyKeyDown", function(s) {
|
|
8528
8524
|
if (t.player) {
|
|
8529
|
-
var l = s || window.event, u = l.keyCode, c =
|
|
8530
|
-
if (g ||
|
|
8525
|
+
var l = s || window.event, u = l.keyCode, c = v(t), h = c._keyState, d = c.player, p = t.config, g = p.disable, m = p.disableBodyTrigger, y = p.isIgnoreUserActive;
|
|
8526
|
+
if (g || m || !(d.isUserActive || y) || dn(l.target) || !t.checkIsVisible() || l.metaKey || l.altKey || l.ctrlKey) {
|
|
8531
8527
|
h.isBodyKeyDown = !1;
|
|
8532
8528
|
return;
|
|
8533
8529
|
}
|
|
8534
8530
|
!s.repeat && !h.isKeyDown && ((l.target === document.body || t.config.isGlobalTrigger && !dn(l.target)) && t.checkCode(u, !0) && (h.isBodyKeyDown = !0), document.addEventListener("keyup", t.onBodyKeyUp)), h.isBodyKeyDown && t.handleKeyDown(l);
|
|
8535
8531
|
}
|
|
8536
|
-
}), _(
|
|
8532
|
+
}), _(v(t), "onBodyKeyUp", function(s) {
|
|
8537
8533
|
t.player && (document.removeEventListener("keyup", t.onBodyKeyUp), t.handleKeyUp(s));
|
|
8538
|
-
}), _(
|
|
8534
|
+
}), _(v(t), "onKeydown", function(s) {
|
|
8539
8535
|
if (t.player) {
|
|
8540
|
-
var l = s || window.event, u =
|
|
8536
|
+
var l = s || window.event, u = v(t), c = u._keyState;
|
|
8541
8537
|
if (!l.repeat) {
|
|
8542
8538
|
if (t.config.disable || t.config.disableRootTrigger || l.metaKey || l.altKey || l.ctrlKey)
|
|
8543
8539
|
return;
|
|
@@ -8545,7 +8541,7 @@ var gn = /* @__PURE__ */ function(a) {
|
|
|
8545
8541
|
}
|
|
8546
8542
|
c.isKeyDown && t.handleKeyDown(l);
|
|
8547
8543
|
}
|
|
8548
|
-
}), _(
|
|
8544
|
+
}), _(v(t), "onKeyup", function(s) {
|
|
8549
8545
|
t.player && (t.player.root.removeEventListener("keyup", t.onKeyup), t.handleKeyUp(s));
|
|
8550
8546
|
}), t;
|
|
8551
8547
|
}
|
|
@@ -8674,14 +8670,14 @@ var gn = /* @__PURE__ */ function(a) {
|
|
|
8674
8670
|
value: function(e) {
|
|
8675
8671
|
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.duration, u = i.offsetDuration, c = i.timeSegments, h = s > -1 ? s : n, d = u || l, p = e.repeat && this.seekStep >= 4 ? parseInt(this.seekStep / 2, 10) : this.seekStep;
|
|
8676
8672
|
h + p <= d ? h = h + p : h = d;
|
|
8677
|
-
var g = f.getCurrentTimeByOffset(h, c),
|
|
8673
|
+
var g = f.getCurrentTimeByOffset(h, c), m = {
|
|
8678
8674
|
currentTime: {
|
|
8679
8675
|
from: n,
|
|
8680
8676
|
to: g
|
|
8681
8677
|
}
|
|
8682
8678
|
};
|
|
8683
8679
|
this.emitUserAction(e, "seek", {
|
|
8684
|
-
props:
|
|
8680
|
+
props: m
|
|
8685
8681
|
}), this.player.currentTime = g;
|
|
8686
8682
|
}
|
|
8687
8683
|
}, {
|
|
@@ -8751,8 +8747,8 @@ var gn = /* @__PURE__ */ function(a) {
|
|
|
8751
8747
|
var u = this.keyCodeMap[s[l]], c = u.action, h = u.keyCode, d = u.disable, p = u.pressAction, g = u.disablePress;
|
|
8752
8748
|
if (h === e) {
|
|
8753
8749
|
if (!d && !(n && g)) {
|
|
8754
|
-
var
|
|
8755
|
-
typeof
|
|
8750
|
+
var m = n && p || c;
|
|
8751
|
+
typeof m == "function" ? c(i, this.player, n) : typeof m == "string" && typeof this[m] == "function" && this[m](i, this.player, n), this.emit(Vn, q({
|
|
8756
8752
|
key: s[l],
|
|
8757
8753
|
target: i.target,
|
|
8758
8754
|
isPress: n
|
|
@@ -9061,8 +9057,8 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9061
9057
|
var o = D(r);
|
|
9062
9058
|
function r(t) {
|
|
9063
9059
|
var e;
|
|
9064
|
-
return x(this, r), e = o.call(this, t), _(
|
|
9065
|
-
var s =
|
|
9060
|
+
return x(this, r), e = o.call(this, t), _(v(e), "onMoveOnly", function(i, n) {
|
|
9061
|
+
var s = v(e), l = s.pos, u = s.config, c = s.player, h = n;
|
|
9066
9062
|
if (i) {
|
|
9067
9063
|
f.event(i);
|
|
9068
9064
|
var d = f.getEventPos(i, c.zoom), p = c.rotateDeg === 90 ? d.clientY : d.clientX;
|
|
@@ -9071,18 +9067,18 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9071
9067
|
l.moving = !0, l.x = p, h = e.computeTime(i, p);
|
|
9072
9068
|
}
|
|
9073
9069
|
e.triggerCallbacks("dragmove", h, i), e._updateInnerFocus(h);
|
|
9074
|
-
}), _(
|
|
9070
|
+
}), _(v(e), "onBodyClick", function(i) {
|
|
9075
9071
|
e.pos.isLocked && (e.pos.isLocked = !1, i.preventDefault(), i.stopPropagation());
|
|
9076
|
-
}), _(
|
|
9072
|
+
}), _(v(e), "_mouseDownHandler", function(i, n) {
|
|
9077
9073
|
e._state.time = n.currentTime, e.updateWidth(n.currentTime, n.seekTime, n.percent, 0), e._updateInnerFocus(n);
|
|
9078
|
-
}), _(
|
|
9079
|
-
var s =
|
|
9074
|
+
}), _(v(e), "_mouseUpHandler", function(i, n) {
|
|
9075
|
+
var s = v(e), l = s.pos;
|
|
9080
9076
|
l.moving && e.updateWidth(n.currentTime, n.seekTime, n.percent, 2);
|
|
9081
|
-
}), _(
|
|
9082
|
-
var s =
|
|
9077
|
+
}), _(v(e), "_mouseMoveHandler", function(i, n) {
|
|
9078
|
+
var s = v(e), l = s._state, u = s.pos, c = s.config, h = s.player;
|
|
9083
9079
|
l.time < n.currentTime ? n.forward = !0 : n.forward = !1, l.time = n.currentTime, u.isDown && !u.moving && (u.moving = !0, c.isPauseMoving && h.pause(), e.triggerCallbacks("dragstart", n, i), e.emitUserAction("drag", "dragstart", n)), e.updateWidth(n.currentTime, n.seekTime, n.percent, 1), e.triggerCallbacks("dragmove", n, i), e._updateInnerFocus(n);
|
|
9084
|
-
}), _(
|
|
9085
|
-
var n =
|
|
9080
|
+
}), _(v(e), "onMouseDown", function(i) {
|
|
9081
|
+
var n = v(e), s = n._state, l = n.player, u = n.pos, c = n.config, h = n.playerConfig, d = f.getEventPos(i, l.zoom), p = l.rotateDeg === 90 ? d.clientY : d.clientX;
|
|
9086
9082
|
if (!(l.isMini || c.closeMoveSeek || !h.allowSeekAfterEnded && l.ended)) {
|
|
9087
9083
|
if (!l.duration && !l.isPlaying) {
|
|
9088
9084
|
l.play();
|
|
@@ -9093,20 +9089,20 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9093
9089
|
}), e.isProgressMoving = !0, f.addClass(e.progressBtn, "active");
|
|
9094
9090
|
var g = e.computeTime(i, p);
|
|
9095
9091
|
g.prePlayTime = s.prePlayTime, e._mouseDownHandlerHook(i, g);
|
|
9096
|
-
var
|
|
9097
|
-
return
|
|
9092
|
+
var m = i.type;
|
|
9093
|
+
return m === "touchstart" ? (e.root.addEventListener("touchmove", e.onMouseMove), e.root.addEventListener("touchend", e.onMouseUp), e.root.addEventListener("touchcancel", e.onMouseUp)) : (e.unbind("mousemove", e.onMoveOnly), document.addEventListener("mousemove", e.onMouseMove, !1), document.addEventListener("mouseup", e.onMouseUp, !1)), !0;
|
|
9098
9094
|
}
|
|
9099
|
-
}), _(
|
|
9100
|
-
var n =
|
|
9095
|
+
}), _(v(e), "onMouseUp", function(i) {
|
|
9096
|
+
var n = v(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = n._state;
|
|
9101
9097
|
i.stopPropagation(), i.preventDefault(), f.checkIsFunction(c.enableSwipeHandler) && c.enableSwipeHandler(), f.checkIsFunction(l.onMoveEnd) && l.onMoveEnd(), f.event(i), f.removeClass(e.progressBtn, "active");
|
|
9102
9098
|
var d = e.computeTime(i, u.x);
|
|
9103
9099
|
d.prePlayTime = h.prePlayTime, u.moving ? (e.triggerCallbacks("dragend", d, i), e.emitUserAction("drag", "dragend", d)) : (e.triggerCallbacks("click", d, i), e.emitUserAction("click", "click", d)), e._mouseUpHandlerHook(i, d), u.moving = !1, u.isDown = !1, u.x = 0, u.y = 0, u.isLocked = !0, h.prePlayTime = 0, h.time = 0;
|
|
9104
9100
|
var p = i.type;
|
|
9105
|
-
p === "touchend" || p === "touchcancel" ? (e.root.removeEventListener("touchmove", e.onMouseMove), e.root.removeEventListener("touchend", e.onMouseUp), e.root.removeEventListener("touchcancel", e.onMouseUp), e.blur()) : (document.removeEventListener("mousemove", e.onMouseMove, !1), document.removeEventListener("mouseup", e.onMouseUp, !1), u.isEnter ? c.isMobileSimulateMode !== "mobile" && e.bind("mousemove", e.onMoveOnly) : e.onMouseLeave(i)), f.setTimeout(
|
|
9101
|
+
p === "touchend" || p === "touchcancel" ? (e.root.removeEventListener("touchmove", e.onMouseMove), e.root.removeEventListener("touchend", e.onMouseUp), e.root.removeEventListener("touchcancel", e.onMouseUp), e.blur()) : (document.removeEventListener("mousemove", e.onMouseMove, !1), document.removeEventListener("mouseup", e.onMouseUp, !1), u.isEnter ? c.isMobileSimulateMode !== "mobile" && e.bind("mousemove", e.onMoveOnly) : e.onMouseLeave(i)), f.setTimeout(v(e), function() {
|
|
9106
9102
|
e.resetSeekState();
|
|
9107
9103
|
}, 1), s.focus();
|
|
9108
|
-
}), _(
|
|
9109
|
-
var n =
|
|
9104
|
+
}), _(v(e), "onMouseMove", function(i) {
|
|
9105
|
+
var n = v(e), s = n._state, l = n.pos, u = n.player, c = n.config;
|
|
9110
9106
|
f.checkTouchSupport() && i.preventDefault(), f.event(i);
|
|
9111
9107
|
var h = f.getEventPos(i, u.zoom), d = u.rotateDeg === 90 ? h.clientY : h.clientX, p = Math.abs(l.x - d);
|
|
9112
9108
|
if (!(l.moving && p < c.miniMoveStep || !l.moving && p < c.miniStartStep)) {
|
|
@@ -9114,20 +9110,20 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9114
9110
|
var g = e.computeTime(i, d);
|
|
9115
9111
|
g.prePlayTime = s.prePlayTime, e._mouseMoveHandlerHook(i, g);
|
|
9116
9112
|
}
|
|
9117
|
-
}), _(
|
|
9113
|
+
}), _(v(e), "onMouseOut", function(i) {
|
|
9118
9114
|
e.triggerCallbacks("mouseout", null, i);
|
|
9119
|
-
}), _(
|
|
9115
|
+
}), _(v(e), "onMouseOver", function(i) {
|
|
9120
9116
|
e.triggerCallbacks("mouseover", null, i);
|
|
9121
|
-
}), _(
|
|
9122
|
-
var n =
|
|
9117
|
+
}), _(v(e), "onMouseEnter", function(i) {
|
|
9118
|
+
var n = v(e), s = n.player, l = n.pos;
|
|
9123
9119
|
if (!(l.isDown || l.isEnter || s.isMini || !s.config.allowSeekAfterEnded && s.ended)) {
|
|
9124
9120
|
l.isEnter = !0, e.bind("mousemove", e.onMoveOnly), e.bind("mouseleave", e.onMouseLeave), f.event(i);
|
|
9125
9121
|
var u = f.getEventPos(i, s.zoom), c = s.rotateDeg === 90 ? u.clientY : u.clientX, h = e.computeTime(i, c);
|
|
9126
9122
|
e.triggerCallbacks("mouseenter", h, i), e.focus();
|
|
9127
9123
|
}
|
|
9128
|
-
}), _(
|
|
9124
|
+
}), _(v(e), "onMouseLeave", function(i) {
|
|
9129
9125
|
e.triggerCallbacks("mouseleave", null, i), e.unlock(), e._updateInnerFocus(null);
|
|
9130
|
-
}), _(
|
|
9126
|
+
}), _(v(e), "onVideoResize", function() {
|
|
9131
9127
|
var i = e.pos, n = i.x, s = i.isDown, l = i.isEnter;
|
|
9132
9128
|
if (l && !s) {
|
|
9133
9129
|
var u = e.computeTime(null, n);
|
|
@@ -9327,16 +9323,16 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9327
9323
|
value: function(e, i) {
|
|
9328
9324
|
var n = this.player, s = this.root.getBoundingClientRect(), l = s.width, u = s.height, c = s.top, h = s.left, d, p, g = i;
|
|
9329
9325
|
n.rotateDeg === 90 ? (d = u, p = c) : (d = l, p = h);
|
|
9330
|
-
var
|
|
9331
|
-
|
|
9332
|
-
var y =
|
|
9326
|
+
var m = g - p;
|
|
9327
|
+
m = m > d ? d : m < 0 ? 0 : m;
|
|
9328
|
+
var y = m / d;
|
|
9333
9329
|
y = y < 0 ? 0 : y > 1 ? 1 : y;
|
|
9334
9330
|
var C = parseInt(y * this.offsetDuration * 1e3, 10) / 1e3, b = f.getCurrentTimeByOffset(C, n.timeSegments);
|
|
9335
9331
|
return {
|
|
9336
9332
|
percent: y,
|
|
9337
9333
|
currentTime: C,
|
|
9338
9334
|
seekTime: b,
|
|
9339
|
-
offset:
|
|
9335
|
+
offset: m,
|
|
9340
9336
|
width: d,
|
|
9341
9337
|
left: p,
|
|
9342
9338
|
e
|
|
@@ -9475,11 +9471,11 @@ var sl = /* @__PURE__ */ function(a) {
|
|
|
9475
9471
|
x(this, r);
|
|
9476
9472
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9477
9473
|
i[n] = arguments[n];
|
|
9478
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9474
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "_onMouseenter", function(s) {
|
|
9479
9475
|
t.emit("icon_mouseenter", {
|
|
9480
9476
|
pluginName: t.pluginName
|
|
9481
9477
|
});
|
|
9482
|
-
}), _(
|
|
9478
|
+
}), _(v(t), "_onMouseLeave", function(s) {
|
|
9483
9479
|
t.emit("icon_mouseleave", {
|
|
9484
9480
|
pluginName: t.pluginName
|
|
9485
9481
|
});
|
|
@@ -9672,7 +9668,7 @@ var gl = /* @__PURE__ */ function(a) {
|
|
|
9672
9668
|
x(this, r);
|
|
9673
9669
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9674
9670
|
i[n] = arguments[n];
|
|
9675
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9671
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "_onOrientationChange", function(s) {
|
|
9676
9672
|
t.player.fullscreen && t.config.rotateFullscreen && (window.orientation === 90 || window.orientation === -90 ? t.player.setRotateDeg(0) : t.player.setRotateDeg(90));
|
|
9677
9673
|
}), t;
|
|
9678
9674
|
}
|
|
@@ -9958,20 +9954,20 @@ var gl = /* @__PURE__ */ function(a) {
|
|
|
9958
9954
|
x(this, r);
|
|
9959
9955
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9960
9956
|
i[n] = arguments[n];
|
|
9961
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9957
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "_onDurationChange", function() {
|
|
9962
9958
|
t.updateSegments();
|
|
9963
9959
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9964
9960
|
if (t._checkIfEnabled(u)) {
|
|
9965
9961
|
var c = f.getIndexByTime(l, u), h = f.getOffsetCurrentTime(l, u, c);
|
|
9966
9962
|
t.player.offsetCurrentTime = h, t.changeIndex(c, u);
|
|
9967
9963
|
}
|
|
9968
|
-
}), _(
|
|
9964
|
+
}), _(v(t), "_onLoadedData", function() {
|
|
9969
9965
|
var s = t.player.timeSegments;
|
|
9970
9966
|
if (t._checkIfEnabled(s)) {
|
|
9971
9967
|
var l = f.getOffsetCurrentTime(0, s);
|
|
9972
9968
|
t.player.offsetCurrentTime = l, t.changeIndex(0, s), t.curPos.start > 0 && (t.player.currentTime = t.curPos.start);
|
|
9973
9969
|
}
|
|
9974
|
-
}), _(
|
|
9970
|
+
}), _(v(t), "_onTimeupdate", function() {
|
|
9975
9971
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9976
9972
|
if (t._checkIfEnabled(u)) {
|
|
9977
9973
|
var c = u.length;
|
|
@@ -9980,11 +9976,11 @@ var gl = /* @__PURE__ */ function(a) {
|
|
|
9980
9976
|
h !== t.curIndex && t.changeIndex(h, u);
|
|
9981
9977
|
var d = f.getOffsetCurrentTime(l, u, h);
|
|
9982
9978
|
if (t.player.offsetCurrentTime = d, !!t.curPos) {
|
|
9983
|
-
var p = t.curPos, g = p.start,
|
|
9984
|
-
l < g ? t.player.currentTime = g : l >
|
|
9979
|
+
var p = t.curPos, g = p.start, m = p.end;
|
|
9980
|
+
l < g ? t.player.currentTime = g : l > m && h >= c - 1 && t.player.pause();
|
|
9985
9981
|
}
|
|
9986
9982
|
}
|
|
9987
|
-
}), _(
|
|
9983
|
+
}), _(v(t), "_onSeeking", function() {
|
|
9988
9984
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9989
9985
|
if (t._checkIfEnabled(u))
|
|
9990
9986
|
if (l < u[0].start)
|
|
@@ -9998,7 +9994,7 @@ var gl = /* @__PURE__ */ function(a) {
|
|
|
9998
9994
|
h >= 0 && (t.player.currentTime = h);
|
|
9999
9995
|
}
|
|
10000
9996
|
}
|
|
10001
|
-
}), _(
|
|
9997
|
+
}), _(v(t), "_onPlay", function() {
|
|
10002
9998
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
10003
9999
|
t._checkIfEnabled(u) && l >= u[u.length - 1].end && (t.player.currentTime = u[0].start);
|
|
10004
10000
|
}), t;
|
|
@@ -10117,35 +10113,35 @@ var kl = /* @__PURE__ */ function(a) {
|
|
|
10117
10113
|
x(this, r);
|
|
10118
10114
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
10119
10115
|
i[n] = arguments[n];
|
|
10120
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
10121
|
-
var l =
|
|
10116
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onBarMousedown", function(s) {
|
|
10117
|
+
var l = v(t), u = l.player, c = t.find(".xgplayer-bar");
|
|
10122
10118
|
f.event(s);
|
|
10123
10119
|
var h = c.getBoundingClientRect(), d = f.getEventPos(s, u.zoom), p = h.height - (d.clientY - h.top);
|
|
10124
10120
|
if (d.h = p, d.barH = h.height, t.pos = d, !(p < -2))
|
|
10125
10121
|
return t.updateVolumePos(p, s), document.addEventListener("mouseup", t.onBarMouseUp), t._d.isStart = !0, !1;
|
|
10126
|
-
}), _(
|
|
10127
|
-
var l =
|
|
10122
|
+
}), _(v(t), "onBarMouseMove", function(s) {
|
|
10123
|
+
var l = v(t), u = l._d;
|
|
10128
10124
|
if (u.isStart) {
|
|
10129
|
-
var c =
|
|
10125
|
+
var c = v(t), h = c.pos, d = c.player;
|
|
10130
10126
|
s.preventDefault(), s.stopPropagation(), f.event(s);
|
|
10131
10127
|
var p = f.getEventPos(s, d.zoom);
|
|
10132
10128
|
u.isMoving = !0;
|
|
10133
10129
|
var g = h.h - p.clientY + h.clientY;
|
|
10134
10130
|
g > h.barH || t.updateVolumePos(g, s);
|
|
10135
10131
|
}
|
|
10136
|
-
}), _(
|
|
10132
|
+
}), _(v(t), "onBarMouseUp", function(s) {
|
|
10137
10133
|
f.event(s), document.removeEventListener("mouseup", t.onBarMouseUp);
|
|
10138
|
-
var l =
|
|
10134
|
+
var l = v(t), u = l._d;
|
|
10139
10135
|
u.isStart = !1, u.isMoving = !1;
|
|
10140
|
-
}), _(
|
|
10136
|
+
}), _(v(t), "onMouseenter", function(s) {
|
|
10141
10137
|
t._d.isActive = !0, t.focus(), t.emit("icon_mouseenter", {
|
|
10142
10138
|
pluginName: t.pluginName
|
|
10143
10139
|
});
|
|
10144
|
-
}), _(
|
|
10140
|
+
}), _(v(t), "onMouseleave", function(s) {
|
|
10145
10141
|
t._d.isActive = !1, t.unFocus(100, !1, s), t.emit("icon_mouseleave", {
|
|
10146
10142
|
pluginName: t.pluginName
|
|
10147
10143
|
});
|
|
10148
|
-
}), _(
|
|
10144
|
+
}), _(v(t), "onVolumeChange", function(s) {
|
|
10149
10145
|
if (t.player) {
|
|
10150
10146
|
var l = t.player, u = l.muted, c = l.volume;
|
|
10151
10147
|
t._d.isMoving || (t.find(".xgplayer-drag").style.height = u || c === 0 ? "4px" : "".concat(c * 100, "%"), t.config.showValueLabel && t.updateVolumeValue()), t.animate(u, c);
|
|
@@ -10356,13 +10352,13 @@ var wl = /* @__PURE__ */ function(a) {
|
|
|
10356
10352
|
this.player.videoRotateDeg = e;
|
|
10357
10353
|
return;
|
|
10358
10354
|
}
|
|
10359
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, p = c && i ? c.offsetHeight : u.offsetHeight, g = s,
|
|
10360
|
-
(e === 0.75 || e === 0.25) && (g = "".concat(p, "px"),
|
|
10355
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, p = c && i ? c.offsetHeight : u.offsetHeight, g = s, m = l, y = 0, C = 0;
|
|
10356
|
+
(e === 0.75 || e === 0.25) && (g = "".concat(p, "px"), m = "".concat(d, "px"), y = -(p - d) / 2, C = -(d - p) / 2);
|
|
10361
10357
|
var b = "translate(".concat(y, "px,").concat(C, "px) rotate(").concat(e, "turn)"), w = {
|
|
10362
10358
|
transformOrigin: "center center",
|
|
10363
10359
|
transform: b,
|
|
10364
10360
|
webKitTransform: b,
|
|
10365
|
-
height:
|
|
10361
|
+
height: m,
|
|
10366
10362
|
width: g
|
|
10367
10363
|
}, L = i ? h : u, M = i ? n.getPlugin("poster") : null;
|
|
10368
10364
|
Object.keys(w).map(function(U) {
|
|
@@ -10443,7 +10439,7 @@ var Je = {
|
|
|
10443
10439
|
x(this, r);
|
|
10444
10440
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
10445
10441
|
i[n] = arguments[n];
|
|
10446
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
10442
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "switchPIP", function(s) {
|
|
10447
10443
|
if (!t.isPIPAvailable())
|
|
10448
10444
|
return !1;
|
|
10449
10445
|
s.stopPropagation && s.stopPropagation(), t.isPip ? (t.exitPIP(), t.emitUserAction(s, "change_pip", {
|
|
@@ -10541,7 +10537,7 @@ var Je = {
|
|
|
10541
10537
|
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
10542
10538
|
var d = s.docPiPNode, p = s.docPiPStyle;
|
|
10543
10539
|
e.enterPIPCallback();
|
|
10544
|
-
var g = d || i.root,
|
|
10540
|
+
var g = d || i.root, m = g.parentElement, y = g.previousSibling, C = g.nextSibling;
|
|
10545
10541
|
e.copyStyleIntoPiPWindow(h);
|
|
10546
10542
|
var b = document.createElement("style");
|
|
10547
10543
|
if (b.append("body{padding:0; margin:0;}"), p) {
|
|
@@ -10552,7 +10548,7 @@ var Je = {
|
|
|
10552
10548
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
10553
10549
|
`);
|
|
10554
10550
|
h.document.head.append(b), h.document.body.append(g), h.addEventListener("pagehide", function(L) {
|
|
10555
|
-
|
|
10551
|
+
m && (C ? m.insertBefore(g, C) : y ? m.insertBefore(g, y.nextSibling) : m.appendChild(g)), e.leavePIPCallback();
|
|
10556
10552
|
}, {
|
|
10557
10553
|
once: !0
|
|
10558
10554
|
});
|
|
@@ -10649,8 +10645,8 @@ var xl = /* @__PURE__ */ function(a) {
|
|
|
10649
10645
|
var o = D(r);
|
|
10650
10646
|
function r(t) {
|
|
10651
10647
|
var e;
|
|
10652
|
-
return x(this, r), e = o.call(this, t), _(
|
|
10653
|
-
var n =
|
|
10648
|
+
return x(this, r), e = o.call(this, t), _(v(e), "playNext", function(i) {
|
|
10649
|
+
var n = v(e), s = n.player;
|
|
10654
10650
|
i.preventDefault(), i.stopPropagation(), e.idx + 1 < e.config.urlList.length ? (e.idx++, e.nextHandler(e.config.urlList[e.idx], e.idx), s.emit(xt, e.idx + 1)) : (e.nextHandler(), s.emit(xt));
|
|
10655
10651
|
}), e.idx = -1, e;
|
|
10656
10652
|
}
|
|
@@ -10720,7 +10716,7 @@ var xl = /* @__PURE__ */ function(a) {
|
|
|
10720
10716
|
return function r(t, e, i) {
|
|
10721
10717
|
var n = window, s = "application/octet-stream", l = i || s, u = t, c = !e && !i && u, h = document.createElement("a"), d = function(R) {
|
|
10722
10718
|
return String(R);
|
|
10723
|
-
}, p = n.Blob || n.MozBlob || n.WebKitBlob || d, g = e || "download",
|
|
10719
|
+
}, p = n.Blob || n.MozBlob || n.WebKitBlob || d, g = e || "download", m, y;
|
|
10724
10720
|
if (p = p.call ? p.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (g = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
10725
10721
|
var C = new XMLHttpRequest();
|
|
10726
10722
|
return C.open("GET", c, !0), C.responseType = "blob", C.onload = function(R) {
|
|
@@ -10743,7 +10739,7 @@ var xl = /* @__PURE__ */ function(a) {
|
|
|
10743
10739
|
w[b] = u.charCodeAt(b);
|
|
10744
10740
|
u = new p([w], { type: l });
|
|
10745
10741
|
}
|
|
10746
|
-
|
|
10742
|
+
m = u instanceof p ? u : new p([u], { type: l });
|
|
10747
10743
|
function M(R) {
|
|
10748
10744
|
var te = R.split(/[:;,]/), J = te[1], z = te[2] == "base64" ? atob : decodeURIComponent, ne = z(te.pop()), ue = ne.length, ce = 0, we = new Uint8Array(ue);
|
|
10749
10745
|
for (ce; ce < ue; ++ce)
|
|
@@ -10767,19 +10763,19 @@ Use Save As... to download, then click back to return to this page.`) && (locati
|
|
|
10767
10763
|
}, 333);
|
|
10768
10764
|
}
|
|
10769
10765
|
if (navigator.msSaveBlob)
|
|
10770
|
-
return navigator.msSaveBlob(
|
|
10766
|
+
return navigator.msSaveBlob(m, g);
|
|
10771
10767
|
if (n.URL)
|
|
10772
|
-
U(n.URL.createObjectURL(
|
|
10768
|
+
U(n.URL.createObjectURL(m), !0);
|
|
10773
10769
|
else {
|
|
10774
|
-
if (typeof
|
|
10770
|
+
if (typeof m == "string" || m.constructor === d)
|
|
10775
10771
|
try {
|
|
10776
|
-
return U("data:" + l + ";base64," + n.btoa(
|
|
10772
|
+
return U("data:" + l + ";base64," + n.btoa(m));
|
|
10777
10773
|
} catch {
|
|
10778
|
-
return U("data:" + l + "," + encodeURIComponent(
|
|
10774
|
+
return U("data:" + l + "," + encodeURIComponent(m));
|
|
10779
10775
|
}
|
|
10780
10776
|
y = new FileReader(), y.onload = function(R) {
|
|
10781
10777
|
U(this.result);
|
|
10782
|
-
}, y.readAsDataURL(
|
|
10778
|
+
}, y.readAsDataURL(m);
|
|
10783
10779
|
}
|
|
10784
10780
|
return !0;
|
|
10785
10781
|
};
|
|
@@ -10809,7 +10805,7 @@ var Al = /* @__PURE__ */ function(a) {
|
|
|
10809
10805
|
var o = D(r);
|
|
10810
10806
|
function r(t) {
|
|
10811
10807
|
var e;
|
|
10812
|
-
return x(this, r), e = o.call(this, t), _(
|
|
10808
|
+
return x(this, r), e = o.call(this, t), _(v(e), "download", function(i) {
|
|
10813
10809
|
if (!e.isLock) {
|
|
10814
10810
|
e.emitUserAction(i, "download");
|
|
10815
10811
|
var n = e.playerConfig.url, s = "";
|
|
@@ -10942,13 +10938,13 @@ var Al = /* @__PURE__ */ function(a) {
|
|
|
10942
10938
|
type: "image/png"
|
|
10943
10939
|
}, l = this.config, u = this.player, c = s.quality || l.quality, h = s.type || l.type;
|
|
10944
10940
|
return new Promise(function(d, p) {
|
|
10945
|
-
var g = null,
|
|
10941
|
+
var g = null, m;
|
|
10946
10942
|
if (u.media.canvas)
|
|
10947
10943
|
g = u.media.canvas;
|
|
10948
10944
|
else {
|
|
10949
|
-
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), g = n.canvas,
|
|
10945
|
+
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), g = n.canvas, m = n.canvasCtx;
|
|
10950
10946
|
var y = u.media.videoWidth / u.media.videoHeight, C = g.width / g.height, b = 0, w = 0, L = u.media.videoWidth, M = u.media.videoHeight, U, R, te, J;
|
|
10951
|
-
y > C ? (te = g.width, J = g.width / y, U = 0, R = Math.round((g.height - J) / 2)) : y === C ? (te = g.width, J = g.height, U = 0, R = 0) : y < C && (te = g.height * y, J = g.height, U = Math.round((g.width - te) / 2), R = 0),
|
|
10947
|
+
y > C ? (te = g.width, J = g.width / y, U = 0, R = Math.round((g.height - J) / 2)) : y === C ? (te = g.width, J = g.height, U = 0, R = 0) : y < C && (te = g.height * y, J = g.height, U = Math.round((g.width - te) / 2), R = 0), m.drawImage(u.media, b, w, L, M, U, R, te, J);
|
|
10952
10948
|
}
|
|
10953
10949
|
var z = g.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
10954
10950
|
z = z.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), d(z);
|
|
@@ -11090,21 +11086,21 @@ var je = B.device === "mobile", Dt = /* @__PURE__ */ function(a) {
|
|
|
11090
11086
|
var o = D(r);
|
|
11091
11087
|
function r(t) {
|
|
11092
11088
|
var e;
|
|
11093
|
-
return x(this, r), e = o.call(this, t), _(
|
|
11089
|
+
return x(this, r), e = o.call(this, t), _(v(e), "onEnter", function(i) {
|
|
11094
11090
|
i.stopPropagation(), e.emit("icon_mouseenter", {
|
|
11095
11091
|
pluginName: e.pluginName
|
|
11096
11092
|
}), e.switchActiveState(i);
|
|
11097
|
-
}), _(
|
|
11093
|
+
}), _(v(e), "switchActiveState", function(i) {
|
|
11098
11094
|
i.stopPropagation();
|
|
11099
11095
|
var n = e.config.toggleMode;
|
|
11100
11096
|
n === Qe.CLICK ? e.toggle(!e.isActive) : e.toggle(!0);
|
|
11101
|
-
}), _(
|
|
11097
|
+
}), _(v(e), "onLeave", function(i) {
|
|
11102
11098
|
i.stopPropagation(), e.emit("icon_mouseleave", {
|
|
11103
11099
|
pluginName: e.pluginName
|
|
11104
11100
|
}), e.config.listType !== ke.SIDE && e.isActive && e.toggle(!1);
|
|
11105
|
-
}), _(
|
|
11101
|
+
}), _(v(e), "onListEnter", function(i) {
|
|
11106
11102
|
e.enterType = 2;
|
|
11107
|
-
}), _(
|
|
11103
|
+
}), _(v(e), "onListLeave", function(i) {
|
|
11108
11104
|
e.enterType = 0, e.isActive && e.toggle(!1);
|
|
11109
11105
|
}), e.isIcons = !1, e.isActive = !1, e.curValue = null, e.curIndex = 0, e;
|
|
11110
11106
|
}
|
|
@@ -11197,8 +11193,8 @@ var je = B.device === "mobile", Dt = /* @__PURE__ */ function(a) {
|
|
|
11197
11193
|
config: {
|
|
11198
11194
|
data: e || [],
|
|
11199
11195
|
className: Rl(s.listType, s.position),
|
|
11200
|
-
onItemClick: function(
|
|
11201
|
-
n.onItemClick(
|
|
11196
|
+
onItemClick: function(m, y) {
|
|
11197
|
+
n.onItemClick(m, y);
|
|
11202
11198
|
},
|
|
11203
11199
|
domEventType: je ? "touch" : "mouse"
|
|
11204
11200
|
},
|
|
@@ -11877,7 +11873,7 @@ var et = {
|
|
|
11877
11873
|
var o = D(r);
|
|
11878
11874
|
function r(t) {
|
|
11879
11875
|
var e;
|
|
11880
|
-
return x(this, r), e = o.call(this, t), _(
|
|
11876
|
+
return x(this, r), e = o.call(this, t), _(v(e), "onMousemove", function(i) {
|
|
11881
11877
|
if (!e.config.disable) {
|
|
11882
11878
|
if (f.hasClass(i.target, "xg-spot-content") && e.config.isHideThumbnailHover) {
|
|
11883
11879
|
e.player.plugins.progress.onMouseLeave(i);
|
|
@@ -11885,20 +11881,20 @@ var et = {
|
|
|
11885
11881
|
}
|
|
11886
11882
|
(e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11887
11883
|
}
|
|
11888
|
-
}), _(
|
|
11884
|
+
}), _(v(e), "onMousedown", function(i) {
|
|
11889
11885
|
e.config.disable || (e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11890
|
-
}), _(
|
|
11886
|
+
}), _(v(e), "onMouseup", function(i) {
|
|
11891
11887
|
if (e.isDrag) {
|
|
11892
11888
|
var n = e.player.plugins.progress;
|
|
11893
11889
|
n && n.pos && (n.onMouseUp(i), !n.pos.isEnter && n.onMouseLeave(i));
|
|
11894
11890
|
}
|
|
11895
|
-
}), _(
|
|
11891
|
+
}), _(v(e), "onDotMouseLeave", function(i) {
|
|
11896
11892
|
if (!e.config.disable) {
|
|
11897
11893
|
e._curDot.removeEventListener("mouseleave", e.onDotMouseLeave), e.blurDot(i.target), e._curDot = null;
|
|
11898
11894
|
var n = e.player.plugins.progress;
|
|
11899
11895
|
n && n.enableBlur(), e.show();
|
|
11900
11896
|
}
|
|
11901
|
-
}), _(
|
|
11897
|
+
}), _(v(e), "onProgressMouseOver", function(i, n) {
|
|
11902
11898
|
if (!e.config.disable && f.hasClass(n.target, "xgplayer-spot") && !e._curDot) {
|
|
11903
11899
|
e._curDot = n.target, e.focusDot(n.target), e._curDot.children.length > 0 && e.hide();
|
|
11904
11900
|
var s = e.player.plugins.progress;
|
|
@@ -12211,7 +12207,7 @@ var et = {
|
|
|
12211
12207
|
this.interval = Math.round(this.player.duration / l);
|
|
12212
12208
|
var p = Math.ceil(e / this.interval);
|
|
12213
12209
|
p = p > l ? l : p;
|
|
12214
|
-
var g = p < u * c ? 0 : Math.ceil(p / (u * c)) - 1,
|
|
12210
|
+
var g = p < u * c ? 0 : Math.ceil(p / (u * c)) - 1, m = p - g * (c * u), y = m > 0 ? Math.ceil(m / c) - 1 : 0, C = m > 0 ? m - y * c - 1 : 0, b = 0, w = 0;
|
|
12215
12211
|
if (i && n) {
|
|
12216
12212
|
var L = i / n;
|
|
12217
12213
|
L < h / d ? (w = n, b = w * (h / d)) : (b = i, w = b / (h / d));
|
|
@@ -12293,8 +12289,8 @@ var Wl = /* @__PURE__ */ function(a) {
|
|
|
12293
12289
|
x(this, r);
|
|
12294
12290
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12295
12291
|
i[n] = arguments[n];
|
|
12296
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12297
|
-
var s = t.player.ended, l =
|
|
12292
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onTimeupdate", function() {
|
|
12293
|
+
var s = t.player.ended, l = v(t), u = l.offsetDuration, c = t.currentTime;
|
|
12298
12294
|
c = f.adjustTimeByDuration(c, u, s), t.update({
|
|
12299
12295
|
played: c
|
|
12300
12296
|
}, u);
|
|
@@ -12396,11 +12392,11 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12396
12392
|
x(this, r);
|
|
12397
12393
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12398
12394
|
i[n] = arguments[n];
|
|
12399
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12395
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onLoadedData", function(s) {
|
|
12400
12396
|
t.player && (t._frameCount = t.config.startFrameCount, t.stop(), t.renderOnTimeupdate(s), t.off(he, t.renderOnTimeupdate), t.on(he, t.renderOnTimeupdate));
|
|
12401
|
-
}), _(
|
|
12397
|
+
}), _(v(t), "onVisibilitychange", function(s) {
|
|
12402
12398
|
document.visibilityState === "visible" ? t._checkIfCanStart() && t.start() : document.visibilityState === "hidden" && t.stop();
|
|
12403
|
-
}), _(
|
|
12399
|
+
}), _(v(t), "renderOnTimeupdate", function(s) {
|
|
12404
12400
|
if (t._frameCount > 0)
|
|
12405
12401
|
t.renderOnce(), t._frameCount--;
|
|
12406
12402
|
else {
|
|
@@ -12408,11 +12404,11 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12408
12404
|
var l = t.config.startInterval;
|
|
12409
12405
|
!t.player.paused && t._checkIfCanStart() && t.start(0, l);
|
|
12410
12406
|
}
|
|
12411
|
-
}), _(
|
|
12407
|
+
}), _(v(t), "start", function(s, l) {
|
|
12412
12408
|
var u = t.player.video, c = Gl(), h = t.checkVideoIsSupport(u);
|
|
12413
|
-
!h || !t.canvasCtx || (l || (l = t.interval), t.stop(), u.videoWidth && u.videoHeight && (t.videoPI = u.videoHeight > 0 ? parseInt(u.videoWidth / u.videoHeight * 100, 10) : 0, (t.config.mode === tt.REAL_TIME || c - t.preTime >= l) && (u && u.videoWidth && t.update(h, t.videoPI), t.preTime = c)), t.frameId = t._loopType === "timer" ? f.setTimeout(
|
|
12414
|
-
}), _(
|
|
12415
|
-
t.frameId && (t._loopType === "timer" ? f.clearTimeout(
|
|
12409
|
+
!h || !t.canvasCtx || (l || (l = t.interval), t.stop(), u.videoWidth && u.videoHeight && (t.videoPI = u.videoHeight > 0 ? parseInt(u.videoWidth / u.videoHeight * 100, 10) : 0, (t.config.mode === tt.REAL_TIME || c - t.preTime >= l) && (u && u.videoWidth && t.update(h, t.videoPI), t.preTime = c)), t.frameId = t._loopType === "timer" ? f.setTimeout(v(t), t.start, l) : f.requestAnimationFrame(t.start));
|
|
12410
|
+
}), _(v(t), "stop", function() {
|
|
12411
|
+
t.frameId && (t._loopType === "timer" ? f.clearTimeout(v(t), t.frameId) : f.cancelAnimationFrame(t.frameId), t.frameId = null);
|
|
12416
12412
|
}), t;
|
|
12417
12413
|
}
|
|
12418
12414
|
return I(r, [{
|
|
@@ -12673,7 +12669,7 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12673
12669
|
x(this, r);
|
|
12674
12670
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12675
12671
|
i[n] = arguments[n];
|
|
12676
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12672
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "_recordUserActions", function(s) {
|
|
12677
12673
|
var l = t._getTime(), u = Object.assign({}, s, {
|
|
12678
12674
|
msg: s.msg || s.action
|
|
12679
12675
|
});
|
|
@@ -12682,11 +12678,11 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12682
12678
|
}, l), {}, {
|
|
12683
12679
|
payload: u
|
|
12684
12680
|
}));
|
|
12685
|
-
}), _(
|
|
12681
|
+
}), _(v(t), "_onReset", function() {
|
|
12686
12682
|
t.reset();
|
|
12687
|
-
}), _(
|
|
12683
|
+
}), _(v(t), "_recordInfo", function(s) {
|
|
12688
12684
|
t.info(s);
|
|
12689
|
-
}), _(
|
|
12685
|
+
}), _(v(t), "_downloadStats", function() {
|
|
12690
12686
|
var s = t.getStats(), l = new Blob([JSON.stringify(s)], {
|
|
12691
12687
|
type: "application/json"
|
|
12692
12688
|
}), u = window.URL.createObjectURL(l), c = document.createElement("a");
|
|
@@ -12817,8 +12813,8 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12817
12813
|
x(this, r);
|
|
12818
12814
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12819
12815
|
i[n] = arguments[n];
|
|
12820
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12821
|
-
var s =
|
|
12816
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onGapJump", function() {
|
|
12817
|
+
var s = v(t), l = s.player, u = s.config;
|
|
12822
12818
|
if (l.media.readyState !== HTMLMediaElement.HAVE_NOTHING) {
|
|
12823
12819
|
if (l.media.seeking) {
|
|
12824
12820
|
if (!t.seekingEventReceived)
|
|
@@ -12829,15 +12825,15 @@ var kt = null, Kl = /* @__PURE__ */ function(a) {
|
|
|
12829
12825
|
var c = l.media.buffered, h = u.smallGapLimit || 0.5, d = u.gapDetectionThreshold || 0.3, p = l.media.currentTime, g = t._getIndex(c, p, d);
|
|
12830
12826
|
if (!(g === null || g === 0)) {
|
|
12831
12827
|
console.log("GapJump bufferRange ", c.start(g), c.end(g));
|
|
12832
|
-
var
|
|
12833
|
-
if (!(
|
|
12834
|
-
var C =
|
|
12835
|
-
C < r.BROWSER_GAP_TOLERANCE || b && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ?
|
|
12828
|
+
var m = c.start(g) + 0.1, y = l.media.duration;
|
|
12829
|
+
if (!(m > y)) {
|
|
12830
|
+
var C = m - p, b = C <= h;
|
|
12831
|
+
C < r.BROWSER_GAP_TOLERANCE || b && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? m + 0.1 : m), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", g, " isGapSamll:", b, " currentTime:", l.media.currentTime, " jumpSize:", p - l.media.currentTime), m !== 0.08 && l && l.emit("log", {
|
|
12836
12832
|
type: "oneevent",
|
|
12837
12833
|
end_type: "gap",
|
|
12838
12834
|
vid: l.config.vid,
|
|
12839
12835
|
ext: {
|
|
12840
|
-
video_postion: Math.floor(
|
|
12836
|
+
video_postion: Math.floor(m * 1e3)
|
|
12841
12837
|
}
|
|
12842
12838
|
}));
|
|
12843
12839
|
}
|
|
@@ -12907,11 +12903,11 @@ var ql = /* @__PURE__ */ function(a) {
|
|
|
12907
12903
|
x(this, r);
|
|
12908
12904
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12909
12905
|
i[n] = arguments[n];
|
|
12910
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12911
|
-
var s =
|
|
12906
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "onWaiting", function() {
|
|
12907
|
+
var s = v(t), l = s.config;
|
|
12912
12908
|
t.jumpCnt > l.jumpCntMax || t.timer || l.useWaitingTimeoutJump === !1 || (t.timer = setTimeout(t.onJump, l.waitingTime * 1e3));
|
|
12913
|
-
}), _(
|
|
12914
|
-
var s =
|
|
12909
|
+
}), _(v(t), "onJump", function() {
|
|
12910
|
+
var s = v(t), l = s.player, u = s.config;
|
|
12915
12911
|
if (clearTimeout(t.timer), t.timer = null, !(t.jumpCnt > u.jumpCntMax || u.useWaitingTimeoutJump === !1) && !(l.media.paused && l.media.currentTime !== 0 && t.hasPlayed)) {
|
|
12916
12912
|
t.jumpSize = u.jumpSize * (t.jumpCnt + 1), t.jumpCnt === u.jumpSize && t.jumpSize < 6 && (t.jumpSize = 6);
|
|
12917
12913
|
var c = l.currentTime + t.jumpSize, h = l.media.duration;
|
|
@@ -12953,7 +12949,7 @@ var ql = /* @__PURE__ */ function(a) {
|
|
|
12953
12949
|
x(this, r);
|
|
12954
12950
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12955
12951
|
i[n] = arguments[n];
|
|
12956
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12952
|
+
return t = o.call.apply(o, [this].concat(i)), _(v(t), "getSpeed", function() {
|
|
12957
12953
|
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it;
|
|
12958
12954
|
if (!t.speedListCache || !t.speedListCache[s] || t.speedListCache[s].length <= 0)
|
|
12959
12955
|
return 0;
|
|
@@ -12961,47 +12957,47 @@ var ql = /* @__PURE__ */ function(a) {
|
|
|
12961
12957
|
return t.speedListCache[s].map(function(u) {
|
|
12962
12958
|
l += u;
|
|
12963
12959
|
}), Math.floor(l / t.speedListCache[s].length);
|
|
12964
|
-
}), _(
|
|
12960
|
+
}), _(v(t), "startTimer", function() {
|
|
12965
12961
|
f.isMSE(t.player.video) || (t.initSpeedList(), t.cnt = 0, t.timer = setTimeout(t.testSpeed, t.config.testTimeStep));
|
|
12966
|
-
}), _(
|
|
12962
|
+
}), _(v(t), "initSpeedList", function() {
|
|
12967
12963
|
t.speedListCache = {}, Ct.forEach(function(s) {
|
|
12968
12964
|
t.speedListCache[s] = [];
|
|
12969
12965
|
});
|
|
12970
|
-
}), _(
|
|
12966
|
+
}), _(v(t), "_onRealSpeedChange", function(s) {
|
|
12971
12967
|
s.speed && t.appendList(s.speed, s.type || it);
|
|
12972
|
-
}), _(
|
|
12968
|
+
}), _(v(t), "testSpeed", function() {
|
|
12973
12969
|
if (clearTimeout(t.timer), t.timer = null, !(!t.player || !t.config.openSpeed)) {
|
|
12974
12970
|
var s = t.config, l = s.url, u = s.loadSize, c = s.testCnt, h = s.testTimeStep, d = l + (l.indexOf("?") < 0 ? "?testst=" : "&testst=") + Date.now();
|
|
12975
12971
|
if (!(t.cnt >= c)) {
|
|
12976
12972
|
t.cnt++;
|
|
12977
12973
|
try {
|
|
12978
|
-
var p = (/* @__PURE__ */ new Date()).getTime(), g = null,
|
|
12979
|
-
t.xhr =
|
|
12974
|
+
var p = (/* @__PURE__ */ new Date()).getTime(), g = null, m = new XMLHttpRequest();
|
|
12975
|
+
t.xhr = m, m.open("GET", d);
|
|
12980
12976
|
var y = {}, C = Math.floor(Math.random() * 10);
|
|
12981
12977
|
y.Range = "bytes=" + C + "-" + (u + C), y && Object.keys(y).forEach(function(b) {
|
|
12982
|
-
|
|
12983
|
-
}),
|
|
12984
|
-
if (
|
|
12978
|
+
m.setRequestHeader(b, y[b]);
|
|
12979
|
+
}), m.onreadystatechange = function() {
|
|
12980
|
+
if (m.readyState === 4) {
|
|
12985
12981
|
t.xhr = null, g = (/* @__PURE__ */ new Date()).getTime();
|
|
12986
|
-
var b =
|
|
12982
|
+
var b = m.getResponseHeader("Content-Length") / 1024 * 8, w = Math.round(b * 1e3 / (g - p));
|
|
12987
12983
|
t.appendList(w), t.timer = setTimeout(t.testSpeed, h);
|
|
12988
12984
|
}
|
|
12989
|
-
},
|
|
12985
|
+
}, m.send();
|
|
12990
12986
|
} catch (b) {
|
|
12991
12987
|
console.error(b);
|
|
12992
12988
|
}
|
|
12993
12989
|
}
|
|
12994
12990
|
}
|
|
12995
|
-
}), _(
|
|
12991
|
+
}), _(v(t), "appendList", function(s) {
|
|
12996
12992
|
var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : it;
|
|
12997
12993
|
if (!(!t.speedListCache || !t.speedListCache[l])) {
|
|
12998
12994
|
var u = t.config.saveSpeedMax;
|
|
12999
12995
|
t.speedListCache[l].length >= u && t.speedListCache[l].shift(), t.speedListCache[l].push(s);
|
|
13000
|
-
var c =
|
|
12996
|
+
var c = v(t), h = c.player;
|
|
13001
12997
|
h && (l === it ? h.realTimeSpeed = s : h[t.getSpeedName("realTime", l)] = s), t.updateSpeed(l);
|
|
13002
12998
|
}
|
|
13003
|
-
}), _(
|
|
13004
|
-
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it, l = t.getSpeed(s), u =
|
|
12999
|
+
}), _(v(t), "updateSpeed", function() {
|
|
13000
|
+
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it, l = t.getSpeed(s), u = v(t), c = u.player;
|
|
13005
13001
|
if (c)
|
|
13006
13002
|
if (s === it)
|
|
13007
13003
|
(!c.avgSpeed || l !== c.avgSpeed) && (c.avgSpeed = l, c.emit(li, {
|
|
@@ -13130,8 +13126,8 @@ var ql = /* @__PURE__ */ function(a) {
|
|
|
13130
13126
|
value: function(e, i, n, s) {
|
|
13131
13127
|
var l = this.player.media || this.player.video, u = document.hidden, c = l.paused, h = l.readyState, d = l.currentTime, p = l.buffered;
|
|
13132
13128
|
if (!(u || c || h < 4)) {
|
|
13133
|
-
var g = this._checkBuffer(d, p),
|
|
13134
|
-
|
|
13129
|
+
var g = this._checkBuffer(d, p), m = g.enoughBuffer, y = g.buffers;
|
|
13130
|
+
m && (e <= this.config.reportFrame ? (this._currentStuckCount++, this._payload.push({
|
|
13135
13131
|
currentTime: d,
|
|
13136
13132
|
buffers: y,
|
|
13137
13133
|
curDecodedFrames: e,
|
|
@@ -13280,7 +13276,7 @@ const eu = ["id"], tu = /* @__PURE__ */ Z({
|
|
|
13280
13276
|
});
|
|
13281
13277
|
});
|
|
13282
13278
|
}), (p, g) => {
|
|
13283
|
-
const
|
|
13279
|
+
const m = rt("el-icon");
|
|
13284
13280
|
return u.value ? (E(), pe(_n, {
|
|
13285
13281
|
key: 0,
|
|
13286
13282
|
to: "body"
|
|
@@ -13324,7 +13320,7 @@ const eu = ["id"], tu = /* @__PURE__ */ Z({
|
|
|
13324
13320
|
onClick: d
|
|
13325
13321
|
},
|
|
13326
13322
|
[
|
|
13327
|
-
j(
|
|
13323
|
+
j(m, { onClick: d }, {
|
|
13328
13324
|
default: Q(() => [
|
|
13329
13325
|
j(S(bn))
|
|
13330
13326
|
]),
|
|
@@ -13429,10 +13425,10 @@ const iu = /* @__PURE__ */ gt(tu, [["__scopeId", "data-v-b301aa7d"]]), nu = Pe(i
|
|
|
13429
13425
|
(E(!0), P(
|
|
13430
13426
|
Ee,
|
|
13431
13427
|
null,
|
|
13432
|
-
ft(r.value, (g,
|
|
13428
|
+
ft(r.value, (g, m) => (E(), P(
|
|
13433
13429
|
"div",
|
|
13434
13430
|
{
|
|
13435
|
-
key:
|
|
13431
|
+
key: m,
|
|
13436
13432
|
class: "files-item",
|
|
13437
13433
|
style: oe({
|
|
13438
13434
|
width: o.fileWidth,
|
|
@@ -13481,8 +13477,8 @@ const iu = /* @__PURE__ */ gt(tu, [["__scopeId", "data-v-b301aa7d"]]), nu = Pe(i
|
|
|
13481
13477
|
(E(!0), P(
|
|
13482
13478
|
Ee,
|
|
13483
13479
|
null,
|
|
13484
|
-
ft(r.value, (g,
|
|
13485
|
-
key:
|
|
13480
|
+
ft(r.value, (g, m) => (E(), P("div", {
|
|
13481
|
+
key: m,
|
|
13486
13482
|
class: "preview-img"
|
|
13487
13483
|
}, [
|
|
13488
13484
|
j(h, {
|