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