iking-web-ui-pro 0.2.27 → 0.2.28
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 +262 -261
- package/dist/IKPreviewFile/ik.index.umd.js +44 -44
- package/dist/IkApprovalProcessDetail/ik.index.es.js +845 -844
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +38 -38
- package/dist/IkDescription/ik.index.es.js +295 -294
- package/dist/IkDescription/ik.index.umd.js +45 -45
- package/dist/IkDetailPreviewFiles/ik.index.es.js +898 -897
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +39 -39
- package/dist/IkUploadFile/ik.index.es.js +5 -5
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/index.es.js +4396 -4395
- package/dist/index.umd.js +64 -64
- package/dist/src/components/IKPreviewFile/index.d.ts +16 -4
- package/dist/src/components/IKPreviewFile/src/IkPreviewFile.vue.d.ts +6 -2
- package/dist/src/components/IkUploadFile/index.d.ts +6 -0
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -845,55 +845,56 @@ const nt = (a, o) => {
|
|
|
845
845
|
default: !1
|
|
846
846
|
}
|
|
847
847
|
},
|
|
848
|
-
|
|
849
|
-
|
|
848
|
+
emits: ["handPreview"],
|
|
849
|
+
setup(a, { emit: o }) {
|
|
850
|
+
const r = a, { cLoadUrl: t, cOnlyofficeConfig: e } = qt(r), i = o, n = ee(() => ({
|
|
850
851
|
name: "name",
|
|
851
852
|
url: "url",
|
|
852
853
|
suffix: "suffix",
|
|
853
854
|
size: "size",
|
|
854
|
-
...
|
|
855
|
-
})),
|
|
856
|
-
var
|
|
857
|
-
|
|
858
|
-
...
|
|
859
|
-
name:
|
|
855
|
+
...r.field
|
|
856
|
+
})), s = qe({}), l = qe(!1), u = (p) => {
|
|
857
|
+
var d, v;
|
|
858
|
+
s.value = {
|
|
859
|
+
...p,
|
|
860
|
+
name: p.name,
|
|
860
861
|
url: Je(
|
|
861
|
-
|
|
862
|
-
|
|
862
|
+
t.value,
|
|
863
|
+
p.url || ((v = (d = p == null ? void 0 : p.response) == null ? void 0 : d.data) == null ? void 0 : v.id) || (p == null ? void 0 : p.id)
|
|
863
864
|
)
|
|
864
|
-
},
|
|
865
|
-
},
|
|
865
|
+
}, r.isOnlyOfficePreview && (l.value = !0), i("handPreview", s.value);
|
|
866
|
+
}, c = (p) => {
|
|
866
867
|
Dn.downloadFile(
|
|
867
868
|
Je(
|
|
868
|
-
|
|
869
|
-
|
|
869
|
+
t.value,
|
|
870
|
+
p[n.value.url] || p.attachmentId || p.id
|
|
870
871
|
),
|
|
871
|
-
|
|
872
|
+
p[n.value.name] || p.attachmentName
|
|
872
873
|
);
|
|
873
|
-
},
|
|
874
|
-
...
|
|
875
|
-
name:
|
|
876
|
-
size:
|
|
877
|
-
suffix:
|
|
874
|
+
}, h = ee(() => Ln.isNumber(r.width) ? `${r.width}px` : r.width), g = ee(() => r.list.map((p) => ({
|
|
875
|
+
...p,
|
|
876
|
+
name: p[n.value.name] || p.attachmentName,
|
|
877
|
+
size: p[n.value.size] || p.fileSize || p.attachmentSize,
|
|
878
|
+
suffix: p[n.value.suffix] || p.attachmentSuffix
|
|
878
879
|
})));
|
|
879
|
-
return (
|
|
880
|
-
var
|
|
881
|
-
const
|
|
880
|
+
return (p, d) => {
|
|
881
|
+
var y, C, w;
|
|
882
|
+
const v = Te("tmplate");
|
|
882
883
|
return T(), E(
|
|
883
884
|
le,
|
|
884
885
|
null,
|
|
885
886
|
[
|
|
886
|
-
(
|
|
887
|
+
(y = a.list) != null && y.length ? (T(), E(
|
|
887
888
|
le,
|
|
888
889
|
{ key: 0 },
|
|
889
890
|
[
|
|
890
891
|
a.simple ? (T(!0), E(
|
|
891
892
|
le,
|
|
892
893
|
{ key: 0 },
|
|
893
|
-
Re(
|
|
894
|
+
Re(g.value, (k, N) => (T(), E("div", {
|
|
894
895
|
class: "iking-privew-annex simple",
|
|
895
|
-
onClick: (
|
|
896
|
-
style: re({ width:
|
|
896
|
+
onClick: (R) => u(k),
|
|
897
|
+
style: re({ width: h.value })
|
|
897
898
|
}, [
|
|
898
899
|
S(
|
|
899
900
|
"div",
|
|
@@ -910,7 +911,7 @@ const nt = (a, o) => {
|
|
|
910
911
|
[
|
|
911
912
|
Z(j(Ye), {
|
|
912
913
|
name: "iksvg_daochu",
|
|
913
|
-
onClick: hi((
|
|
914
|
+
onClick: hi((R) => c(k), ["stop"]),
|
|
914
915
|
size: 20,
|
|
915
916
|
active: ""
|
|
916
917
|
}, null, 8, ["onClick"]),
|
|
@@ -919,8 +920,8 @@ const nt = (a, o) => {
|
|
|
919
920
|
size: 20,
|
|
920
921
|
active: ""
|
|
921
922
|
}),
|
|
922
|
-
Fe(
|
|
923
|
-
data: { ...k, findex:
|
|
923
|
+
Fe(p.$slots, "operation", {
|
|
924
|
+
data: { ...k, findex: N }
|
|
924
925
|
})
|
|
925
926
|
],
|
|
926
927
|
2
|
|
@@ -929,33 +930,33 @@ const nt = (a, o) => {
|
|
|
929
930
|
], 12, Gr))),
|
|
930
931
|
256
|
|
931
932
|
/* UNKEYED_FRAGMENT */
|
|
932
|
-
)) : (T(), Ee(
|
|
933
|
+
)) : (T(), Ee(v, { key: 1 }, {
|
|
933
934
|
default: pe(() => [
|
|
934
935
|
(T(!0), E(
|
|
935
936
|
le,
|
|
936
937
|
null,
|
|
937
|
-
Re(
|
|
938
|
-
var
|
|
938
|
+
Re(g.value, (k, N) => {
|
|
939
|
+
var R;
|
|
939
940
|
return T(), E(
|
|
940
941
|
"div",
|
|
941
942
|
{
|
|
942
943
|
class: J(["iking-privew-annex", { "is-bg": a.showBg }]),
|
|
943
|
-
key:
|
|
944
|
+
key: N,
|
|
944
945
|
style: re({
|
|
945
|
-
marginBottom:
|
|
946
|
-
width:
|
|
946
|
+
marginBottom: N == ((R = a.list) == null ? void 0 : R.length) - 1 ? "0" : "10px",
|
|
947
|
+
width: h.value
|
|
947
948
|
})
|
|
948
949
|
},
|
|
949
950
|
[
|
|
950
951
|
S("div", {
|
|
951
952
|
class: "file-card",
|
|
952
|
-
onClick: (
|
|
953
|
+
onClick: (z) => u(k)
|
|
953
954
|
}, [
|
|
954
955
|
Z(j(Ur), {
|
|
955
956
|
file: k,
|
|
956
957
|
style: re({ height: `${a.iconSize}px` }),
|
|
957
958
|
class: "ikui-w-auto",
|
|
958
|
-
fields:
|
|
959
|
+
fields: n.value
|
|
959
960
|
}, null, 8, ["file", "style", "fields"]),
|
|
960
961
|
S("div", Xr, [
|
|
961
962
|
S(
|
|
@@ -981,7 +982,7 @@ const nt = (a, o) => {
|
|
|
981
982
|
[
|
|
982
983
|
Z(j(Ye), {
|
|
983
984
|
name: "iksvg_daochu",
|
|
984
|
-
onClick: hi((
|
|
985
|
+
onClick: hi((z) => c(k), ["stop"]),
|
|
985
986
|
bg: a.showBg,
|
|
986
987
|
size: a.showBg ? "default" : 20,
|
|
987
988
|
title: "下载"
|
|
@@ -992,8 +993,8 @@ const nt = (a, o) => {
|
|
|
992
993
|
size: a.showBg ? "default" : 20,
|
|
993
994
|
title: "预览"
|
|
994
995
|
}, null, 8, ["bg", "size"]),
|
|
995
|
-
Fe(
|
|
996
|
-
data: { ...k, findex:
|
|
996
|
+
Fe(p.$slots, "operation", {
|
|
997
|
+
data: { ...k, findex: N }
|
|
997
998
|
})
|
|
998
999
|
],
|
|
999
1000
|
2
|
|
@@ -1017,13 +1018,13 @@ const nt = (a, o) => {
|
|
|
1017
1018
|
/* STABLE_FRAGMENT */
|
|
1018
1019
|
)) : A("v-if", !0),
|
|
1019
1020
|
Z(j(ts), {
|
|
1020
|
-
show:
|
|
1021
|
-
"onUpdate:show":
|
|
1022
|
-
loadUrl: j(
|
|
1023
|
-
file:
|
|
1024
|
-
onlyofficeServer: ((
|
|
1025
|
-
onlyOfficeConfig: j(
|
|
1026
|
-
onlyOfficeAccept: ((
|
|
1021
|
+
show: l.value,
|
|
1022
|
+
"onUpdate:show": d[0] || (d[0] = (k) => l.value = k),
|
|
1023
|
+
loadUrl: j(t),
|
|
1024
|
+
file: s.value,
|
|
1025
|
+
onlyofficeServer: ((C = j(e)) == null ? void 0 : C.serverUrl) || a.onlyofficeServer,
|
|
1026
|
+
onlyOfficeConfig: j(e),
|
|
1027
|
+
onlyOfficeAccept: ((w = j(e)) == null ? void 0 : w.accept) || a.onlyOfficeAccept
|
|
1027
1028
|
}, null, 8, ["show", "loadUrl", "file", "onlyofficeServer", "onlyOfficeConfig", "onlyOfficeAccept"])
|
|
1028
1029
|
],
|
|
1029
1030
|
64
|
|
@@ -1080,20 +1081,20 @@ const Qr = Ie(Zr), es = /* @__PURE__ */ ue({
|
|
|
1080
1081
|
office: !1,
|
|
1081
1082
|
video: !1
|
|
1082
1083
|
}), s = (u) => {
|
|
1083
|
-
var c,
|
|
1084
|
+
var c, h, g, p, d, v, y;
|
|
1084
1085
|
try {
|
|
1085
|
-
const
|
|
1086
|
+
const C = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, w = C[t.value.url] || (C == null ? void 0 : C.id) || C.attachmentId, k = (h = C[t.value.suffix] || C.attachmentSuffix) == null ? void 0 : h.toLowerCase(), N = C[t.value.name] || (C == null ? void 0 : C.attachmentName) || (C == null ? void 0 : C.originName);
|
|
1086
1087
|
if (i.value = {
|
|
1087
1088
|
...u,
|
|
1088
1089
|
name: u[t.value.name],
|
|
1089
|
-
url: Je(o.loadUrl,
|
|
1090
|
+
url: Je(o.loadUrl, w)
|
|
1090
1091
|
}, u && zt(u, t.value) === "image") {
|
|
1091
1092
|
n.image = !0;
|
|
1092
1093
|
return;
|
|
1093
1094
|
} else if (u && zt(u, t.value) === "video") {
|
|
1094
1095
|
n.video = !0;
|
|
1095
1096
|
return;
|
|
1096
|
-
} else if ((((g = o.onlyOfficeConfig) == null ? void 0 : g.accept) || o.onlyOfficeAccept).includes(
|
|
1097
|
+
} else if ((((g = o.onlyOfficeConfig) == null ? void 0 : g.accept) || o.onlyOfficeAccept).includes(k)) {
|
|
1097
1098
|
n.office = !0, e.value = {
|
|
1098
1099
|
...o.onlyOfficeConfig,
|
|
1099
1100
|
editorConfig: {
|
|
@@ -1107,17 +1108,17 @@ const Qr = Ie(Zr), es = /* @__PURE__ */ ue({
|
|
|
1107
1108
|
},
|
|
1108
1109
|
document: {
|
|
1109
1110
|
key: Gi(),
|
|
1110
|
-
title:
|
|
1111
|
-
url: Je(o.loadUrl,
|
|
1112
|
-
fileType:
|
|
1111
|
+
title: N,
|
|
1112
|
+
url: Je(o.loadUrl, w),
|
|
1113
|
+
fileType: k,
|
|
1113
1114
|
...((y = o.onlyOfficeConfig) == null ? void 0 : y.document) || {}
|
|
1114
1115
|
},
|
|
1115
|
-
documentType: Nn(
|
|
1116
|
+
documentType: Nn(k)
|
|
1116
1117
|
};
|
|
1117
1118
|
return;
|
|
1118
1119
|
}
|
|
1119
|
-
} catch (
|
|
1120
|
-
console.info("预览错误: ",
|
|
1120
|
+
} catch (C) {
|
|
1121
|
+
console.info("预览错误: ", C);
|
|
1121
1122
|
}
|
|
1122
1123
|
};
|
|
1123
1124
|
Xt([r, o.file], ([u, c]) => {
|
|
@@ -1130,12 +1131,12 @@ const Qr = Ie(Zr), es = /* @__PURE__ */ ue({
|
|
|
1130
1131
|
};
|
|
1131
1132
|
return (u, c) => {
|
|
1132
1133
|
var g, p, d;
|
|
1133
|
-
const
|
|
1134
|
+
const h = Te("el-image-viewer");
|
|
1134
1135
|
return r.value ? (T(), E(
|
|
1135
1136
|
le,
|
|
1136
1137
|
{ key: 0 },
|
|
1137
1138
|
[
|
|
1138
|
-
(g = i.value) != null && g.url && n.image ? (T(), Ee(
|
|
1139
|
+
(g = i.value) != null && g.url && n.image ? (T(), Ee(h, {
|
|
1139
1140
|
key: 0,
|
|
1140
1141
|
onClose: c[0] || (c[0] = (v) => l()),
|
|
1141
1142
|
ref: "previewImgRef",
|
|
@@ -1518,15 +1519,15 @@ function ms(a, o, r, t) {
|
|
|
1518
1519
|
function s(c) {
|
|
1519
1520
|
try {
|
|
1520
1521
|
u(t.next(c));
|
|
1521
|
-
} catch (
|
|
1522
|
-
n(
|
|
1522
|
+
} catch (h) {
|
|
1523
|
+
n(h);
|
|
1523
1524
|
}
|
|
1524
1525
|
}
|
|
1525
1526
|
function l(c) {
|
|
1526
1527
|
try {
|
|
1527
1528
|
u(t.throw(c));
|
|
1528
|
-
} catch (
|
|
1529
|
-
n(
|
|
1529
|
+
} catch (h) {
|
|
1530
|
+
n(h);
|
|
1530
1531
|
}
|
|
1531
1532
|
}
|
|
1532
1533
|
function u(c) {
|
|
@@ -1975,14 +1976,14 @@ function Ss(a, o) {
|
|
|
1975
1976
|
;
|
|
1976
1977
|
return a;
|
|
1977
1978
|
}
|
|
1978
|
-
function
|
|
1979
|
-
return typeof Reflect < "u" && Reflect.get ?
|
|
1979
|
+
function M() {
|
|
1980
|
+
return typeof Reflect < "u" && Reflect.get ? M = Reflect.get.bind() : M = function(o, r, t) {
|
|
1980
1981
|
var e = Ss(o, r);
|
|
1981
1982
|
if (e) {
|
|
1982
1983
|
var i = Object.getOwnPropertyDescriptor(e, r);
|
|
1983
1984
|
return i.get ? i.get.call(arguments.length < 3 ? o : t) : i.value;
|
|
1984
1985
|
}
|
|
1985
|
-
},
|
|
1986
|
+
}, M.apply(this, arguments);
|
|
1986
1987
|
}
|
|
1987
1988
|
function fe(a) {
|
|
1988
1989
|
return xs(a) || Is(a) || Ps(a) || As();
|
|
@@ -2041,10 +2042,10 @@ var Yi = { exports: {} };
|
|
|
2041
2042
|
function e(l, u, c) {
|
|
2042
2043
|
this.fn = l, this.context = u, this.once = c || !1;
|
|
2043
2044
|
}
|
|
2044
|
-
function i(l, u, c,
|
|
2045
|
+
function i(l, u, c, h, g) {
|
|
2045
2046
|
if (typeof c != "function")
|
|
2046
2047
|
throw new TypeError("The listener must be a function");
|
|
2047
|
-
var p = new e(c,
|
|
2048
|
+
var p = new e(c, h || l, g), d = r ? r + u : u;
|
|
2048
2049
|
return l._events[d] ? l._events[d].fn ? l._events[d] = [l._events[d], p] : l._events[d].push(p) : (l._events[d] = p, l._eventsCount++), l;
|
|
2049
2050
|
}
|
|
2050
2051
|
function n(l, u) {
|
|
@@ -2054,76 +2055,76 @@ var Yi = { exports: {} };
|
|
|
2054
2055
|
this._events = new t(), this._eventsCount = 0;
|
|
2055
2056
|
}
|
|
2056
2057
|
s.prototype.eventNames = function() {
|
|
2057
|
-
var u = [], c,
|
|
2058
|
+
var u = [], c, h;
|
|
2058
2059
|
if (this._eventsCount === 0)
|
|
2059
2060
|
return u;
|
|
2060
|
-
for (
|
|
2061
|
-
o.call(c,
|
|
2061
|
+
for (h in c = this._events)
|
|
2062
|
+
o.call(c, h) && u.push(r ? h.slice(1) : h);
|
|
2062
2063
|
return Object.getOwnPropertySymbols ? u.concat(Object.getOwnPropertySymbols(c)) : u;
|
|
2063
2064
|
}, s.prototype.listeners = function(u) {
|
|
2064
|
-
var c = r ? r + u : u,
|
|
2065
|
-
if (!
|
|
2065
|
+
var c = r ? r + u : u, h = this._events[c];
|
|
2066
|
+
if (!h)
|
|
2066
2067
|
return [];
|
|
2067
|
-
if (
|
|
2068
|
-
return [
|
|
2069
|
-
for (var g = 0, p =
|
|
2070
|
-
d[g] =
|
|
2068
|
+
if (h.fn)
|
|
2069
|
+
return [h.fn];
|
|
2070
|
+
for (var g = 0, p = h.length, d = new Array(p); g < p; g++)
|
|
2071
|
+
d[g] = h[g].fn;
|
|
2071
2072
|
return d;
|
|
2072
2073
|
}, s.prototype.listenerCount = function(u) {
|
|
2073
|
-
var c = r ? r + u : u,
|
|
2074
|
-
return
|
|
2075
|
-
}, s.prototype.emit = function(u, c,
|
|
2074
|
+
var c = r ? r + u : u, h = this._events[c];
|
|
2075
|
+
return h ? h.fn ? 1 : h.length : 0;
|
|
2076
|
+
}, s.prototype.emit = function(u, c, h, g, p, d) {
|
|
2076
2077
|
var v = r ? r + u : u;
|
|
2077
2078
|
if (!this._events[v])
|
|
2078
2079
|
return !1;
|
|
2079
|
-
var y = this._events[v],
|
|
2080
|
+
var y = this._events[v], C = arguments.length, w, k;
|
|
2080
2081
|
if (y.fn) {
|
|
2081
|
-
switch (y.once && this.removeListener(u, y.fn, void 0, !0),
|
|
2082
|
+
switch (y.once && this.removeListener(u, y.fn, void 0, !0), C) {
|
|
2082
2083
|
case 1:
|
|
2083
2084
|
return y.fn.call(y.context), !0;
|
|
2084
2085
|
case 2:
|
|
2085
2086
|
return y.fn.call(y.context, c), !0;
|
|
2086
2087
|
case 3:
|
|
2087
|
-
return y.fn.call(y.context, c,
|
|
2088
|
+
return y.fn.call(y.context, c, h), !0;
|
|
2088
2089
|
case 4:
|
|
2089
|
-
return y.fn.call(y.context, c,
|
|
2090
|
+
return y.fn.call(y.context, c, h, g), !0;
|
|
2090
2091
|
case 5:
|
|
2091
|
-
return y.fn.call(y.context, c,
|
|
2092
|
+
return y.fn.call(y.context, c, h, g, p), !0;
|
|
2092
2093
|
case 6:
|
|
2093
|
-
return y.fn.call(y.context, c,
|
|
2094
|
+
return y.fn.call(y.context, c, h, g, p, d), !0;
|
|
2094
2095
|
}
|
|
2095
|
-
for (
|
|
2096
|
-
|
|
2097
|
-
y.fn.apply(y.context,
|
|
2096
|
+
for (k = 1, w = new Array(C - 1); k < C; k++)
|
|
2097
|
+
w[k - 1] = arguments[k];
|
|
2098
|
+
y.fn.apply(y.context, w);
|
|
2098
2099
|
} else {
|
|
2099
|
-
var
|
|
2100
|
-
for (
|
|
2101
|
-
switch (y[
|
|
2100
|
+
var N = y.length, R;
|
|
2101
|
+
for (k = 0; k < N; k++)
|
|
2102
|
+
switch (y[k].once && this.removeListener(u, y[k].fn, void 0, !0), C) {
|
|
2102
2103
|
case 1:
|
|
2103
|
-
y[
|
|
2104
|
+
y[k].fn.call(y[k].context);
|
|
2104
2105
|
break;
|
|
2105
2106
|
case 2:
|
|
2106
|
-
y[
|
|
2107
|
+
y[k].fn.call(y[k].context, c);
|
|
2107
2108
|
break;
|
|
2108
2109
|
case 3:
|
|
2109
|
-
y[
|
|
2110
|
+
y[k].fn.call(y[k].context, c, h);
|
|
2110
2111
|
break;
|
|
2111
2112
|
case 4:
|
|
2112
|
-
y[
|
|
2113
|
+
y[k].fn.call(y[k].context, c, h, g);
|
|
2113
2114
|
break;
|
|
2114
2115
|
default:
|
|
2115
|
-
if (!
|
|
2116
|
-
for (
|
|
2117
|
-
|
|
2118
|
-
y[
|
|
2116
|
+
if (!w)
|
|
2117
|
+
for (R = 1, w = new Array(C - 1); R < C; R++)
|
|
2118
|
+
w[R - 1] = arguments[R];
|
|
2119
|
+
y[k].fn.apply(y[k].context, w);
|
|
2119
2120
|
}
|
|
2120
2121
|
}
|
|
2121
2122
|
return !0;
|
|
2122
|
-
}, s.prototype.on = function(u, c,
|
|
2123
|
-
return i(this, u, c,
|
|
2124
|
-
}, s.prototype.once = function(u, c,
|
|
2125
|
-
return i(this, u, c,
|
|
2126
|
-
}, s.prototype.removeListener = function(u, c,
|
|
2123
|
+
}, s.prototype.on = function(u, c, h) {
|
|
2124
|
+
return i(this, u, c, h, !1);
|
|
2125
|
+
}, s.prototype.once = function(u, c, h) {
|
|
2126
|
+
return i(this, u, c, h, !0);
|
|
2127
|
+
}, s.prototype.removeListener = function(u, c, h, g) {
|
|
2127
2128
|
var p = r ? r + u : u;
|
|
2128
2129
|
if (!this._events[p])
|
|
2129
2130
|
return this;
|
|
@@ -2131,10 +2132,10 @@ var Yi = { exports: {} };
|
|
|
2131
2132
|
return n(this, p), this;
|
|
2132
2133
|
var d = this._events[p];
|
|
2133
2134
|
if (d.fn)
|
|
2134
|
-
d.fn === c && (!g || d.once) && (!
|
|
2135
|
+
d.fn === c && (!g || d.once) && (!h || d.context === h) && n(this, p);
|
|
2135
2136
|
else {
|
|
2136
|
-
for (var v = 0, y = [],
|
|
2137
|
-
(d[v].fn !== c || g && !d[v].once ||
|
|
2137
|
+
for (var v = 0, y = [], C = d.length; v < C; v++)
|
|
2138
|
+
(d[v].fn !== c || g && !d[v].once || h && d[v].context !== h) && y.push(d[v]);
|
|
2138
2139
|
y.length ? this._events[p] = y.length === 1 ? y[0] : y : n(this, p);
|
|
2139
2140
|
}
|
|
2140
2141
|
return this;
|
|
@@ -2195,28 +2196,28 @@ var Rs = /* @__PURE__ */ function() {
|
|
|
2195
2196
|
return this.bufferedList.length;
|
|
2196
2197
|
}
|
|
2197
2198
|
}]), a;
|
|
2198
|
-
}(),
|
|
2199
|
-
|
|
2199
|
+
}(), f = {};
|
|
2200
|
+
f.createDom = function() {
|
|
2200
2201
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "div", o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, t = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "", e = document.createElement(a);
|
|
2201
2202
|
return e.className = t, e.innerHTML = o, Object.keys(r).forEach(function(i) {
|
|
2202
2203
|
var n = i, s = r[i];
|
|
2203
2204
|
a === "video" || a === "audio" || a === "live-video" ? s && e.setAttribute(n, s) : e.setAttribute(n, s);
|
|
2204
2205
|
}), e;
|
|
2205
2206
|
};
|
|
2206
|
-
|
|
2207
|
+
f.createDomFromHtml = function(a) {
|
|
2207
2208
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
2208
2209
|
try {
|
|
2209
2210
|
var t = document.createElement("div");
|
|
2210
2211
|
t.innerHTML = a;
|
|
2211
2212
|
var e = t.children;
|
|
2212
|
-
return t = null, e.length > 0 ? (e = e[0], r &&
|
|
2213
|
+
return t = null, e.length > 0 ? (e = e[0], r && f.addClass(e, r), o && Object.keys(o).forEach(function(i) {
|
|
2213
2214
|
e.setAttribute(i, o[i]);
|
|
2214
2215
|
}), e) : null;
|
|
2215
2216
|
} catch (i) {
|
|
2216
2217
|
return H.logError("util.createDomFromHtml", i), null;
|
|
2217
2218
|
}
|
|
2218
2219
|
};
|
|
2219
|
-
|
|
2220
|
+
f.hasClass = function(a, o) {
|
|
2220
2221
|
if (!a || !o)
|
|
2221
2222
|
return !1;
|
|
2222
2223
|
try {
|
|
@@ -2228,44 +2229,44 @@ h.hasClass = function(a, o) {
|
|
|
2228
2229
|
return r && !!r.match(new RegExp("(\\s|^)" + o + "(\\s|$)"));
|
|
2229
2230
|
}
|
|
2230
2231
|
};
|
|
2231
|
-
|
|
2232
|
+
f.addClass = function(a, o) {
|
|
2232
2233
|
if (!(!a || !o))
|
|
2233
2234
|
try {
|
|
2234
2235
|
o.replace(/(^\s+|\s+$)/g, "").split(/\s+/g).forEach(function(r) {
|
|
2235
2236
|
r && a.classList.add(r);
|
|
2236
2237
|
});
|
|
2237
2238
|
} catch {
|
|
2238
|
-
|
|
2239
|
+
f.hasClass(a, o) || (a.className && te(a.className) === "object" ? a.setAttribute("class", a.getAttribute("class") + " " + o) : a.className += " " + o);
|
|
2239
2240
|
}
|
|
2240
2241
|
};
|
|
2241
|
-
|
|
2242
|
+
f.removeClass = function(a, o) {
|
|
2242
2243
|
if (!(!a || !o))
|
|
2243
2244
|
try {
|
|
2244
2245
|
o.replace(/(^\s+|\s+$)/g, "").split(/\s+/g).forEach(function(r) {
|
|
2245
2246
|
r && a.classList.remove(r);
|
|
2246
2247
|
});
|
|
2247
2248
|
} catch {
|
|
2248
|
-
|
|
2249
|
+
f.hasClass(a, o) && o.split(/\s+/g).forEach(function(t) {
|
|
2249
2250
|
var e = new RegExp("(\\s|^)" + t + "(\\s|$)");
|
|
2250
2251
|
a.className && te(a.className) === "object" ? a.setAttribute("class", a.getAttribute("class").replace(e, " ")) : a.className = a.className.replace(e, " ");
|
|
2251
2252
|
});
|
|
2252
2253
|
}
|
|
2253
2254
|
};
|
|
2254
|
-
|
|
2255
|
+
f.toggleClass = function(a, o) {
|
|
2255
2256
|
a && o.split(/\s+/g).forEach(function(r) {
|
|
2256
|
-
|
|
2257
|
+
f.hasClass(a, r) ? f.removeClass(a, r) : f.addClass(a, r);
|
|
2257
2258
|
});
|
|
2258
2259
|
};
|
|
2259
|
-
|
|
2260
|
+
f.classNames = function() {
|
|
2260
2261
|
for (var a = arguments, o = [], r = function(i) {
|
|
2261
|
-
|
|
2262
|
+
f.typeOf(a[i]) === "String" ? o.push(a[i]) : f.typeOf(a[i]) === "Object" && Object.keys(a[i]).map(function(n) {
|
|
2262
2263
|
a[i][n] && o.push(n);
|
|
2263
2264
|
});
|
|
2264
2265
|
}, t = 0; t < arguments.length; t++)
|
|
2265
2266
|
r(t);
|
|
2266
2267
|
return o.join(" ");
|
|
2267
2268
|
};
|
|
2268
|
-
|
|
2269
|
+
f.findDom = function() {
|
|
2269
2270
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document, o = arguments.length > 1 ? arguments[1] : void 0, r;
|
|
2270
2271
|
try {
|
|
2271
2272
|
r = a.querySelector(o);
|
|
@@ -2274,56 +2275,56 @@ h.findDom = function() {
|
|
|
2274
2275
|
}
|
|
2275
2276
|
return r;
|
|
2276
2277
|
};
|
|
2277
|
-
|
|
2278
|
+
f.getCss = function(a, o) {
|
|
2278
2279
|
return a.currentStyle ? a.currentStyle[o] : document.defaultView.getComputedStyle(a, !1)[o];
|
|
2279
2280
|
};
|
|
2280
|
-
|
|
2281
|
+
f.padStart = function(a, o, r) {
|
|
2281
2282
|
for (var t = String(r), e = o >> 0, i = Math.ceil(e / t.length), n = [], s = String(a); i--; )
|
|
2282
2283
|
n.push(t);
|
|
2283
2284
|
return n.join("").substring(0, e - s.length) + s;
|
|
2284
2285
|
};
|
|
2285
|
-
|
|
2286
|
+
f.format = function(a) {
|
|
2286
2287
|
if (window.isNaN(a))
|
|
2287
2288
|
return "";
|
|
2288
2289
|
a = Math.round(a);
|
|
2289
|
-
var o =
|
|
2290
|
+
var o = f.padStart(Math.floor(a / 3600), 2, 0), r = f.padStart(Math.floor((a - o * 3600) / 60), 2, 0), t = f.padStart(Math.floor(a - o * 3600 - r * 60), 2, 0);
|
|
2290
2291
|
return (o === "00" ? [r, t] : [o, r, t]).join(":");
|
|
2291
2292
|
};
|
|
2292
|
-
|
|
2293
|
+
f.event = function(a) {
|
|
2293
2294
|
if (a.touches) {
|
|
2294
2295
|
var o = a.touches[0] || a.changedTouches[0];
|
|
2295
2296
|
a.clientX = o.clientX || 0, a.clientY = o.clientY || 0, a.offsetX = o.pageX - o.target.offsetLeft, a.offsetY = o.pageY - o.target.offsetTop;
|
|
2296
2297
|
}
|
|
2297
2298
|
a._target = a.target || a.srcElement;
|
|
2298
2299
|
};
|
|
2299
|
-
|
|
2300
|
+
f.typeOf = function(a) {
|
|
2300
2301
|
return Object.prototype.toString.call(a).match(/([^\s.*]+)(?=]$)/g)[0];
|
|
2301
2302
|
};
|
|
2302
|
-
|
|
2303
|
-
if (
|
|
2303
|
+
f.deepCopy = function(a, o) {
|
|
2304
|
+
if (f.typeOf(o) === "Object" && f.typeOf(a) === "Object")
|
|
2304
2305
|
return Object.keys(o).forEach(function(r) {
|
|
2305
|
-
|
|
2306
|
+
f.typeOf(o[r]) === "Object" && !(o[r] instanceof Node) ? a[r] === void 0 || a[r] === void 0 ? a[r] = o[r] : f.deepCopy(a[r], o[r]) : f.typeOf(o[r]) === "Array" ? a[r] = f.typeOf(a[r]) === "Array" ? a[r].concat(o[r]) : o[r] : a[r] = o[r];
|
|
2306
2307
|
}), a;
|
|
2307
2308
|
};
|
|
2308
|
-
|
|
2309
|
+
f.deepMerge = function(a, o) {
|
|
2309
2310
|
return Object.keys(o).map(function(r) {
|
|
2310
|
-
if (
|
|
2311
|
-
if (
|
|
2311
|
+
if (f.typeOf(o[r]) === "Array" && f.typeOf(a[r]) === "Array") {
|
|
2312
|
+
if (f.typeOf(a[r]) === "Array") {
|
|
2312
2313
|
var t;
|
|
2313
2314
|
(t = a[r]).push.apply(t, fe(o[r]));
|
|
2314
2315
|
}
|
|
2315
2316
|
} else
|
|
2316
|
-
|
|
2317
|
+
f.typeOf(a[r]) === f.typeOf(o[r]) && a[r] !== null && f.typeOf(a[r]) === "Object" && !(o[r] instanceof window.Node) ? f.deepMerge(a[r], o[r]) : o[r] !== null && (a[r] = o[r]);
|
|
2317
2318
|
}), a;
|
|
2318
2319
|
};
|
|
2319
|
-
|
|
2320
|
+
f.getBgImage = function(a) {
|
|
2320
2321
|
var o = (a.currentStyle || window.getComputedStyle(a, null)).backgroundImage;
|
|
2321
2322
|
if (!o || o === "none")
|
|
2322
2323
|
return "";
|
|
2323
2324
|
var r = document.createElement("a");
|
|
2324
2325
|
return r.href = o.replace(/url\("|"\)/g, ""), r.href;
|
|
2325
2326
|
};
|
|
2326
|
-
|
|
2327
|
+
f.copyDom = function(a) {
|
|
2327
2328
|
if (a && a.nodeType === 1) {
|
|
2328
2329
|
var o = document.createElement(a.tagName);
|
|
2329
2330
|
return Array.prototype.forEach.call(a.attributes, function(r) {
|
|
@@ -2332,22 +2333,22 @@ h.copyDom = function(a) {
|
|
|
2332
2333
|
} else
|
|
2333
2334
|
return "";
|
|
2334
2335
|
};
|
|
2335
|
-
|
|
2336
|
+
f.setInterval = function(a, o, r, t) {
|
|
2336
2337
|
a._interval[o] || (a._interval[o] = window.setInterval(r.bind(a), t));
|
|
2337
2338
|
};
|
|
2338
|
-
|
|
2339
|
+
f.clearInterval = function(a, o) {
|
|
2339
2340
|
clearInterval(a._interval[o]), a._interval[o] = null;
|
|
2340
2341
|
};
|
|
2341
|
-
|
|
2342
|
+
f.setTimeout = function(a, o, r) {
|
|
2342
2343
|
a._timers || (a._timers = []);
|
|
2343
2344
|
var t = setTimeout(function() {
|
|
2344
|
-
o(),
|
|
2345
|
+
o(), f.clearTimeout(a, t);
|
|
2345
2346
|
}, r);
|
|
2346
2347
|
return a._timers.push(t), t;
|
|
2347
2348
|
};
|
|
2348
|
-
|
|
2349
|
+
f.clearTimeout = function(a, o) {
|
|
2349
2350
|
var r = a._timers;
|
|
2350
|
-
if (
|
|
2351
|
+
if (f.typeOf(r) === "Array") {
|
|
2351
2352
|
for (var t = 0; t < r.length; t++)
|
|
2352
2353
|
if (r[t] === o) {
|
|
2353
2354
|
r.splice(t, 1), clearTimeout(o);
|
|
@@ -2356,14 +2357,14 @@ h.clearTimeout = function(a, o) {
|
|
|
2356
2357
|
} else
|
|
2357
2358
|
clearTimeout(o);
|
|
2358
2359
|
};
|
|
2359
|
-
|
|
2360
|
+
f.clearAllTimers = function(a) {
|
|
2360
2361
|
var o = a._timers;
|
|
2361
|
-
|
|
2362
|
+
f.typeOf(o) === "Array" && (o.map(function(r) {
|
|
2362
2363
|
clearTimeout(r);
|
|
2363
2364
|
}), a._timerIds = []);
|
|
2364
2365
|
};
|
|
2365
|
-
|
|
2366
|
-
var e =
|
|
2366
|
+
f.createImgBtn = function(a, o, r, t) {
|
|
2367
|
+
var e = f.createDom("xg-".concat(a), "", {}, "xgplayer-".concat(a, "-img"));
|
|
2367
2368
|
if (e.style.backgroundImage = 'url("'.concat(o, '")'), r && t) {
|
|
2368
2369
|
var i, n, s;
|
|
2369
2370
|
["px", "rem", "em", "pt", "dp", "vw", "vh", "vm", "%"].every(function(l) {
|
|
@@ -2372,7 +2373,7 @@ h.createImgBtn = function(a, o, r, t) {
|
|
|
2372
2373
|
}
|
|
2373
2374
|
return e;
|
|
2374
2375
|
};
|
|
2375
|
-
|
|
2376
|
+
f.Hex2RGBA = function(a, o) {
|
|
2376
2377
|
var r = [];
|
|
2377
2378
|
if (/^\#[0-9A-F]{3}$/i.test(a)) {
|
|
2378
2379
|
var t = "#";
|
|
@@ -2384,31 +2385,31 @@ h.Hex2RGBA = function(a, o) {
|
|
|
2384
2385
|
r.push(parseInt(e, 16));
|
|
2385
2386
|
}), "rgba(".concat(r.join(","), ", ").concat(o, ")")) : "rgba(255, 255, 255, 0.1)";
|
|
2386
2387
|
};
|
|
2387
|
-
|
|
2388
|
+
f.getFullScreenEl = function() {
|
|
2388
2389
|
return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;
|
|
2389
2390
|
};
|
|
2390
|
-
|
|
2391
|
+
f.checkIsFunction = function(a) {
|
|
2391
2392
|
return a && typeof a == "function";
|
|
2392
2393
|
};
|
|
2393
|
-
|
|
2394
|
+
f.checkIsObject = function(a) {
|
|
2394
2395
|
return a !== null && te(a) === "object";
|
|
2395
2396
|
};
|
|
2396
|
-
|
|
2397
|
+
f.hide = function(a) {
|
|
2397
2398
|
a.style.display = "none";
|
|
2398
2399
|
};
|
|
2399
|
-
|
|
2400
|
+
f.show = function(a, o) {
|
|
2400
2401
|
a.style.display = o || "block";
|
|
2401
2402
|
};
|
|
2402
|
-
|
|
2403
|
+
f.isUndefined = function(a) {
|
|
2403
2404
|
if (typeof a > "u" || a === null)
|
|
2404
2405
|
return !0;
|
|
2405
2406
|
};
|
|
2406
|
-
|
|
2407
|
+
f.isNotNull = function(a) {
|
|
2407
2408
|
return a != null;
|
|
2408
2409
|
};
|
|
2409
|
-
|
|
2410
|
+
f.setStyleFromCsstext = function(a, o) {
|
|
2410
2411
|
if (o)
|
|
2411
|
-
if (
|
|
2412
|
+
if (f.typeOf(o) === "String") {
|
|
2412
2413
|
var r = o.replace(/\s+/g, "").split(";");
|
|
2413
2414
|
r.map(function(t) {
|
|
2414
2415
|
if (t) {
|
|
@@ -2427,7 +2428,7 @@ function Fs(a, o) {
|
|
|
2427
2428
|
return !0;
|
|
2428
2429
|
return !1;
|
|
2429
2430
|
}
|
|
2430
|
-
|
|
2431
|
+
f.filterStyleFromText = function(a) {
|
|
2431
2432
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["width", "height", "top", "left", "bottom", "right", "position", "z-index", "padding", "margin", "transform"], r = a.style.cssText;
|
|
2432
2433
|
if (!r)
|
|
2433
2434
|
return {};
|
|
@@ -2441,7 +2442,7 @@ h.filterStyleFromText = function(a) {
|
|
|
2441
2442
|
a.style[n] = i[n];
|
|
2442
2443
|
}), e;
|
|
2443
2444
|
};
|
|
2444
|
-
|
|
2445
|
+
f.getStyleFromCsstext = function(a) {
|
|
2445
2446
|
var o = a.style.cssText;
|
|
2446
2447
|
if (!o)
|
|
2447
2448
|
return {};
|
|
@@ -2453,7 +2454,7 @@ h.getStyleFromCsstext = function(a) {
|
|
|
2453
2454
|
}
|
|
2454
2455
|
}), t;
|
|
2455
2456
|
};
|
|
2456
|
-
|
|
2457
|
+
f.preloadImg = function(a) {
|
|
2457
2458
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
|
|
2458
2459
|
}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
|
|
2459
2460
|
};
|
|
@@ -2466,19 +2467,19 @@ h.preloadImg = function(a) {
|
|
|
2466
2467
|
}, t.src = a;
|
|
2467
2468
|
}
|
|
2468
2469
|
};
|
|
2469
|
-
|
|
2470
|
+
f.stopPropagation = function(a) {
|
|
2470
2471
|
a && a.stopPropagation();
|
|
2471
2472
|
};
|
|
2472
|
-
|
|
2473
|
+
f.scrollTop = function() {
|
|
2473
2474
|
return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
2474
2475
|
};
|
|
2475
|
-
|
|
2476
|
+
f.scrollLeft = function() {
|
|
2476
2477
|
return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
2477
2478
|
};
|
|
2478
|
-
|
|
2479
|
+
f.checkTouchSupport = function() {
|
|
2479
2480
|
return "ontouchstart" in window;
|
|
2480
2481
|
};
|
|
2481
|
-
|
|
2482
|
+
f.getBuffered2 = function(a) {
|
|
2482
2483
|
for (var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.5, r = [], t = 0; t < a.length; t++)
|
|
2483
2484
|
r.push({
|
|
2484
2485
|
start: a.start(t) < 0.5 ? 0 : a.start(t),
|
|
@@ -2502,7 +2503,7 @@ h.getBuffered2 = function(a) {
|
|
|
2502
2503
|
e = r;
|
|
2503
2504
|
return new Rs(e);
|
|
2504
2505
|
};
|
|
2505
|
-
|
|
2506
|
+
f.getEventPos = function(a) {
|
|
2506
2507
|
var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
2507
2508
|
return a.touches && a.touches.length > 0 && (a = a.touches[0]), {
|
|
2508
2509
|
x: a.x / o,
|
|
@@ -2515,28 +2516,28 @@ h.getEventPos = function(a) {
|
|
|
2515
2516
|
pageY: a.pageY / o
|
|
2516
2517
|
};
|
|
2517
2518
|
};
|
|
2518
|
-
|
|
2519
|
+
f.requestAnimationFrame = function(a) {
|
|
2519
2520
|
var o = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
|
|
2520
2521
|
if (o)
|
|
2521
2522
|
return o(a);
|
|
2522
2523
|
};
|
|
2523
|
-
|
|
2524
|
-
if (
|
|
2524
|
+
f.getHostFromUrl = function(a) {
|
|
2525
|
+
if (f.typeOf(a) !== "String")
|
|
2525
2526
|
return "";
|
|
2526
2527
|
var o = a.split("/"), r = "";
|
|
2527
2528
|
return o.length > 3 && o[2] && (r = o[2]), r;
|
|
2528
2529
|
};
|
|
2529
|
-
|
|
2530
|
+
f.cancelAnimationFrame = function(a) {
|
|
2530
2531
|
var o = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.cancelRequestAnimationFrame;
|
|
2531
2532
|
o && o(a);
|
|
2532
2533
|
};
|
|
2533
|
-
|
|
2534
|
+
f.isMSE = function(a) {
|
|
2534
2535
|
return a.media && (a = a.media), !a || !(a instanceof HTMLMediaElement) ? !1 : /^blob/.test(a.currentSrc) || /^blob/.test(a.src);
|
|
2535
2536
|
};
|
|
2536
|
-
|
|
2537
|
+
f.isBlob = function(a) {
|
|
2537
2538
|
return typeof a == "string" && /^blob/.test(a);
|
|
2538
2539
|
};
|
|
2539
|
-
|
|
2540
|
+
f.generateSessionId = function() {
|
|
2540
2541
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, o = (/* @__PURE__ */ new Date()).getTime();
|
|
2541
2542
|
try {
|
|
2542
2543
|
a = parseInt(a);
|
|
@@ -2550,20 +2551,20 @@ h.generateSessionId = function() {
|
|
|
2550
2551
|
});
|
|
2551
2552
|
return r;
|
|
2552
2553
|
};
|
|
2553
|
-
|
|
2554
|
+
f.createEvent = function(a) {
|
|
2554
2555
|
var o;
|
|
2555
2556
|
return typeof window.Event == "function" ? o = new Event(a) : (o = document.createEvent("Event"), o.initEvent(a, !0, !0)), o;
|
|
2556
2557
|
};
|
|
2557
|
-
|
|
2558
|
+
f.adjustTimeByDuration = function(a, o, r) {
|
|
2558
2559
|
return !o || !a ? a : a > o || r && a < o ? o : a;
|
|
2559
2560
|
};
|
|
2560
|
-
|
|
2561
|
-
var r =
|
|
2561
|
+
f.createPositionBar = function(a, o) {
|
|
2562
|
+
var r = f.createDom("xg-bar", "", {
|
|
2562
2563
|
"data-index": -1
|
|
2563
2564
|
}, a);
|
|
2564
2565
|
return o.appendChild(r), r;
|
|
2565
2566
|
};
|
|
2566
|
-
|
|
2567
|
+
f.getTransformStyle = function() {
|
|
2567
2568
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
2568
2569
|
x: 0,
|
|
2569
2570
|
y: 0,
|
|
@@ -2579,10 +2580,10 @@ h.getTransformStyle = function() {
|
|
|
2579
2580
|
i.test(o) ? (i.lastIndex = -1, o = o.replace(i, n)) : o += "".concat(n, " ");
|
|
2580
2581
|
}), o;
|
|
2581
2582
|
};
|
|
2582
|
-
|
|
2583
|
+
f.convertDeg = function(a) {
|
|
2583
2584
|
return Math.abs(a) <= 1 ? a * 360 : a % 360;
|
|
2584
2585
|
};
|
|
2585
|
-
|
|
2586
|
+
f.getIndexByTime = function(a, o) {
|
|
2586
2587
|
var r = o.length, t = -1;
|
|
2587
2588
|
if (r < 1)
|
|
2588
2589
|
return t;
|
|
@@ -2598,14 +2599,14 @@ h.getIndexByTime = function(a, o) {
|
|
|
2598
2599
|
}
|
|
2599
2600
|
return t;
|
|
2600
2601
|
};
|
|
2601
|
-
|
|
2602
|
+
f.getOffsetCurrentTime = function(a, o) {
|
|
2602
2603
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1, t = -1;
|
|
2603
|
-
if (r >= 0 && r < o.length ? t = r : t =
|
|
2604
|
+
if (r >= 0 && r < o.length ? t = r : t = f.getIndexByTime(a, o), t < 0)
|
|
2604
2605
|
return -1;
|
|
2605
2606
|
var e = o.length, i = o[t], n = i.start, s = i.end, l = i.cTime, u = i.offset;
|
|
2606
2607
|
return a < n ? l : a >= n && a <= s ? a - u : a > s && t >= e - 1 ? s : -1;
|
|
2607
2608
|
};
|
|
2608
|
-
|
|
2609
|
+
f.getCurrentTimeByOffset = function(a, o) {
|
|
2609
2610
|
var r = -1;
|
|
2610
2611
|
if (!o || o.length < 0)
|
|
2611
2612
|
return a;
|
|
@@ -2625,10 +2626,10 @@ function Ji(a) {
|
|
|
2625
2626
|
return a !== null && (o === "object" || o === "function");
|
|
2626
2627
|
}
|
|
2627
2628
|
function Ms(a, o, r) {
|
|
2628
|
-
var t, e, i, n, s, l, u = 0, c = !1,
|
|
2629
|
+
var t, e, i, n, s, l, u = 0, c = !1, h = !1, g = !0, p = !o && o !== 0 && typeof window.requestAnimationFrame == "function";
|
|
2629
2630
|
if (typeof a != "function")
|
|
2630
2631
|
throw new TypeError("Expected a function");
|
|
2631
|
-
o = +o || 0, Ji(r) && (c = !!r.leading,
|
|
2632
|
+
o = +o || 0, Ji(r) && (c = !!r.leading, h = "maxWait" in r, i = h ? Math.max(+r.maxWait || 0, o) : i, g = "trailing" in r ? !!r.trailing : g);
|
|
2632
2633
|
function d(P) {
|
|
2633
2634
|
var X = t, ne = e;
|
|
2634
2635
|
return t = e = void 0, u = P, n = a.apply(ne, X), n;
|
|
@@ -2641,47 +2642,47 @@ function Ms(a, o, r) {
|
|
|
2641
2642
|
return window.cancelAnimationFrame(P);
|
|
2642
2643
|
clearTimeout(P);
|
|
2643
2644
|
}
|
|
2644
|
-
function
|
|
2645
|
-
return u = P, s = v(
|
|
2645
|
+
function C(P) {
|
|
2646
|
+
return u = P, s = v(N, o), c ? d(P) : n;
|
|
2646
2647
|
}
|
|
2647
|
-
function
|
|
2648
|
+
function w(P) {
|
|
2648
2649
|
var X = P - l, ne = P - u, ce = o - X;
|
|
2649
|
-
return
|
|
2650
|
+
return h ? Math.min(ce, i - ne) : ce;
|
|
2650
2651
|
}
|
|
2651
|
-
function
|
|
2652
|
+
function k(P) {
|
|
2652
2653
|
var X = P - l, ne = P - u;
|
|
2653
|
-
return l === void 0 || X >= o || X < 0 ||
|
|
2654
|
+
return l === void 0 || X >= o || X < 0 || h && ne >= i;
|
|
2654
2655
|
}
|
|
2655
|
-
function
|
|
2656
|
+
function N() {
|
|
2656
2657
|
var P = Date.now();
|
|
2657
|
-
if (
|
|
2658
|
-
return
|
|
2659
|
-
s = v(
|
|
2658
|
+
if (k(P))
|
|
2659
|
+
return R(P);
|
|
2660
|
+
s = v(N, w(P));
|
|
2660
2661
|
}
|
|
2661
|
-
function
|
|
2662
|
+
function R(P) {
|
|
2662
2663
|
return s = void 0, g && t ? d(P) : (t = e = void 0, n);
|
|
2663
2664
|
}
|
|
2664
|
-
function
|
|
2665
|
+
function z() {
|
|
2665
2666
|
s !== void 0 && y(s), u = 0, t = l = e = s = void 0;
|
|
2666
2667
|
}
|
|
2667
|
-
function
|
|
2668
|
-
return s === void 0 ? n :
|
|
2668
|
+
function F() {
|
|
2669
|
+
return s === void 0 ? n : R(Date.now());
|
|
2669
2670
|
}
|
|
2670
2671
|
function Y() {
|
|
2671
2672
|
return s !== void 0;
|
|
2672
2673
|
}
|
|
2673
2674
|
function K() {
|
|
2674
|
-
for (var P = Date.now(), X =
|
|
2675
|
+
for (var P = Date.now(), X = k(P), ne = arguments.length, ce = new Array(ne), Le = 0; Le < ne; Le++)
|
|
2675
2676
|
ce[Le] = arguments[Le];
|
|
2676
2677
|
if (t = ce, e = this, l = P, X) {
|
|
2677
2678
|
if (s === void 0)
|
|
2678
|
-
return
|
|
2679
|
-
if (
|
|
2680
|
-
return s = v(
|
|
2679
|
+
return C(l);
|
|
2680
|
+
if (h)
|
|
2681
|
+
return s = v(N, o), d(l);
|
|
2681
2682
|
}
|
|
2682
|
-
return s === void 0 && (s = v(
|
|
2683
|
+
return s === void 0 && (s = v(N, o)), n;
|
|
2683
2684
|
}
|
|
2684
|
-
return K.cancel =
|
|
2685
|
+
return K.cancel = z, K.flush = F, K.pending = Y, K;
|
|
2685
2686
|
}
|
|
2686
2687
|
function Ns(a, o, r) {
|
|
2687
2688
|
var t = !0, e = !0;
|
|
@@ -2706,9 +2707,9 @@ function Hs(a, o, r) {
|
|
|
2706
2707
|
var mi = {
|
|
2707
2708
|
android: /(Android)\s([\d.]+)/,
|
|
2708
2709
|
ios: /(Version)\/([\d.]+)/
|
|
2709
|
-
}, Us = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"],
|
|
2710
|
+
}, Us = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"], B = {
|
|
2710
2711
|
get device() {
|
|
2711
|
-
var a =
|
|
2712
|
+
var a = B.os;
|
|
2712
2713
|
return a.isPc ? "pc" : "mobile";
|
|
2713
2714
|
},
|
|
2714
2715
|
get browser() {
|
|
@@ -2835,14 +2836,14 @@ var mi = {
|
|
|
2835
2836
|
x(this, a);
|
|
2836
2837
|
var t = o && o.i18n ? o.i18n.ERROR_TYPES : null;
|
|
2837
2838
|
if (o.media) {
|
|
2838
|
-
var e = r.mediaError ? r.mediaError : o.media.error || {}, i = o.duration, n = o.currentTime, s = o.ended, l = o.src, u = o.currentSrc, c = o.media,
|
|
2839
|
+
var e = r.mediaError ? r.mediaError : o.media.error || {}, i = o.duration, n = o.currentTime, s = o.ended, l = o.src, u = o.currentSrc, c = o.media, h = c.readyState, g = c.networkState, p = r.errorCode || e.code;
|
|
2839
2840
|
_i[p] && (p = _i[p]);
|
|
2840
2841
|
var d = {
|
|
2841
2842
|
playerVersion: Wt,
|
|
2842
2843
|
currentTime: n,
|
|
2843
2844
|
duration: i,
|
|
2844
2845
|
ended: s,
|
|
2845
|
-
readyState:
|
|
2846
|
+
readyState: h,
|
|
2846
2847
|
networkState: g,
|
|
2847
2848
|
src: l || u,
|
|
2848
2849
|
errorType: r.errorType,
|
|
@@ -2850,17 +2851,17 @@ var mi = {
|
|
|
2850
2851
|
message: r.errorMessage || e.message,
|
|
2851
2852
|
mediaError: e,
|
|
2852
2853
|
originError: r.originError ? r.originError.stack : "",
|
|
2853
|
-
host:
|
|
2854
|
+
host: f.getHostFromUrl(l || u)
|
|
2854
2855
|
};
|
|
2855
|
-
return r.ext && Object.keys(r.ext).map(function(
|
|
2856
|
-
d[
|
|
2856
|
+
return r.ext && Object.keys(r.ext).map(function(w) {
|
|
2857
|
+
d[w] = r.ext[w];
|
|
2857
2858
|
}), d;
|
|
2858
2859
|
} else if (arguments.length > 1) {
|
|
2859
2860
|
for (var v = {
|
|
2860
2861
|
playerVersion: Wt,
|
|
2861
2862
|
domain: document.domain
|
|
2862
|
-
}, y = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"],
|
|
2863
|
-
v[y[
|
|
2863
|
+
}, y = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], C = 0; C < arguments.length; C++)
|
|
2864
|
+
v[y[C]] = arguments[C];
|
|
2864
2865
|
return v.ex = t ? (t[arguments[0]] || {}).msg : "", v;
|
|
2865
2866
|
}
|
|
2866
2867
|
}
|
|
@@ -2950,7 +2951,7 @@ function Zs(a, o) {
|
|
|
2950
2951
|
isInternalOp: !!o._internalOp[r.type],
|
|
2951
2952
|
muted: o.muted,
|
|
2952
2953
|
volume: o.volume,
|
|
2953
|
-
host:
|
|
2954
|
+
host: f.getHostFromUrl(o.currentSrc),
|
|
2954
2955
|
vtype: o.vtype
|
|
2955
2956
|
};
|
|
2956
2957
|
if (o.removeInnerOP(r.type), a === "timeupdate" && (o._currentTime = o.media && o.media.currentTime), a === "ratechange") {
|
|
@@ -2990,7 +2991,7 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
2990
2991
|
"data-index": -1
|
|
2991
2992
|
}, t.videoConfig, t.videoAttributes);
|
|
2992
2993
|
var i = t["x5-video-player-type"] || t.x5VideoPlayerType;
|
|
2993
|
-
return
|
|
2994
|
+
return B.isWeixin && B.os.isAndroid && i && (e.mediaConfig["x5-video-player-type"] = i, delete e.mediaConfig.playsinline, delete e.mediaConfig["webkit-playsinline"], delete e.mediaConfig["x5-playsinline"]), t.loop && (e.mediaConfig.loop = "loop"), t.autoplayMuted && !Object.prototype.hasOwnProperty.call(e.mediaConfig, "muted") && (e.mediaConfig.muted = !0), e.media = f.createDom(e.mediaConfig.mediaType, "", e.mediaConfig, ""), t.defaultPlaybackRate && (e.media.defaultPlaybackRate = e.media.playbackRate = t.defaultPlaybackRate), f.typeOf(t.volume) === "Number" && (e.volume = t.volume), t.autoplayMuted && (e.media.muted = !0, e._lastMuted = !0), t.autoplay && (e.media.autoplay = !0), e._interval = {}, e.mediaEventMiddleware = {}, e.attachVideoEvents(), e;
|
|
2994
2995
|
}
|
|
2995
2996
|
return I(r, [{
|
|
2996
2997
|
key: "setEventsMiddleware",
|
|
@@ -3036,19 +3037,19 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3036
3037
|
key: "_attachSourceEvents",
|
|
3037
3038
|
value: function(e, i) {
|
|
3038
3039
|
var n = this;
|
|
3039
|
-
e.removeAttribute("src"), e.load(), i.forEach(function(
|
|
3040
|
-
n.media.appendChild(
|
|
3041
|
-
src: "".concat(
|
|
3042
|
-
type: "".concat(
|
|
3040
|
+
e.removeAttribute("src"), e.load(), i.forEach(function(h, g) {
|
|
3041
|
+
n.media.appendChild(f.createDom("source", "", {
|
|
3042
|
+
src: "".concat(h.src),
|
|
3043
|
+
type: "".concat(h.type || ""),
|
|
3043
3044
|
"data-index": g + 1
|
|
3044
3045
|
}));
|
|
3045
3046
|
});
|
|
3046
3047
|
var s = e.children;
|
|
3047
3048
|
if (s) {
|
|
3048
|
-
this._videoSourceCount = s.length, this._videoSourceIndex = s.length, this._vLoadeddata = function(
|
|
3049
|
+
this._videoSourceCount = s.length, this._videoSourceIndex = s.length, this._vLoadeddata = function(h) {
|
|
3049
3050
|
n.emit(hn, {
|
|
3050
|
-
src:
|
|
3051
|
-
host:
|
|
3051
|
+
src: h.target.currentSrc,
|
|
3052
|
+
host: f.getHostFromUrl(h.target.currentSrc)
|
|
3052
3053
|
});
|
|
3053
3054
|
};
|
|
3054
3055
|
for (var l = null, u = 0; u < this._evHandlers.length; u++)
|
|
@@ -3056,14 +3057,14 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3056
3057
|
l = this._evHandlers[u];
|
|
3057
3058
|
break;
|
|
3058
3059
|
}
|
|
3059
|
-
!this._sourceError && (this._sourceError = function(
|
|
3060
|
-
var g = parseInt(
|
|
3060
|
+
!this._sourceError && (this._sourceError = function(h) {
|
|
3061
|
+
var g = parseInt(h.target.getAttribute("data-index"), 10);
|
|
3061
3062
|
if (n._videoSourceIndex--, n._videoSourceIndex === 0 || g >= n._videoSourceCount) {
|
|
3062
3063
|
var p = {
|
|
3063
3064
|
code: 4,
|
|
3064
3065
|
message: "sources_load_error"
|
|
3065
3066
|
};
|
|
3066
|
-
l ? l.error(
|
|
3067
|
+
l ? l.error(h, p) : n.errorHandler("error", p);
|
|
3067
3068
|
}
|
|
3068
3069
|
var d = yi[4];
|
|
3069
3070
|
n.emit(fn, new ht(n, {
|
|
@@ -3074,7 +3075,7 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3074
3075
|
code: 4,
|
|
3075
3076
|
message: "sources_load_error"
|
|
3076
3077
|
},
|
|
3077
|
-
src:
|
|
3078
|
+
src: h.target.src
|
|
3078
3079
|
}));
|
|
3079
3080
|
});
|
|
3080
3081
|
for (var c = 0; c < s.length; c++)
|
|
@@ -3177,7 +3178,7 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3177
3178
|
}, {
|
|
3178
3179
|
key: "buffered2",
|
|
3179
3180
|
get: function() {
|
|
3180
|
-
return this.media && this.media.buffered ?
|
|
3181
|
+
return this.media && this.media.buffered ? f.getBuffered2(this.media.buffered) : null;
|
|
3181
3182
|
}
|
|
3182
3183
|
}, {
|
|
3183
3184
|
key: "bufferedPoint",
|
|
@@ -3324,11 +3325,11 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3324
3325
|
},
|
|
3325
3326
|
set: function(e) {
|
|
3326
3327
|
if (this.media) {
|
|
3327
|
-
if (this.emit(Tt, e), this.emit(st), this._currentTime = 0, this._duration = 0,
|
|
3328
|
+
if (this.emit(Tt, e), this.emit(st), this._currentTime = 0, this._duration = 0, f.isMSE(this.media)) {
|
|
3328
3329
|
this.onWaiting();
|
|
3329
3330
|
return;
|
|
3330
3331
|
}
|
|
3331
|
-
this._detachSourceEvents(this.media),
|
|
3332
|
+
this._detachSourceEvents(this.media), f.typeOf(e) === "Array" ? this._attachSourceEvents(this.media, e) : e ? this.media.src = e : this.media.removeAttribute("src"), this.load();
|
|
3332
3333
|
}
|
|
3333
3334
|
}
|
|
3334
3335
|
}, {
|
|
@@ -3359,33 +3360,33 @@ var Qs = /* @__PURE__ */ function(a) {
|
|
|
3359
3360
|
value: function(e, i) {
|
|
3360
3361
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3361
3362
|
l[u - 2] = arguments[u];
|
|
3362
|
-
(n =
|
|
3363
|
+
(n = M(O(r.prototype), "emit", this)).call.apply(n, [this, e, i].concat(l));
|
|
3363
3364
|
}
|
|
3364
3365
|
}, {
|
|
3365
3366
|
key: "on",
|
|
3366
3367
|
value: function(e, i) {
|
|
3367
3368
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3368
3369
|
l[u - 2] = arguments[u];
|
|
3369
|
-
(n =
|
|
3370
|
+
(n = M(O(r.prototype), "on", this)).call.apply(n, [this, e, i].concat(l));
|
|
3370
3371
|
}
|
|
3371
3372
|
}, {
|
|
3372
3373
|
key: "once",
|
|
3373
3374
|
value: function(e, i) {
|
|
3374
3375
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3375
3376
|
l[u - 2] = arguments[u];
|
|
3376
|
-
(n =
|
|
3377
|
+
(n = M(O(r.prototype), "once", this)).call.apply(n, [this, e, i].concat(l));
|
|
3377
3378
|
}
|
|
3378
3379
|
}, {
|
|
3379
3380
|
key: "off",
|
|
3380
3381
|
value: function(e, i) {
|
|
3381
3382
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3382
3383
|
l[u - 2] = arguments[u];
|
|
3383
|
-
(n =
|
|
3384
|
+
(n = M(O(r.prototype), "off", this)).call.apply(n, [this, e, i].concat(l));
|
|
3384
3385
|
}
|
|
3385
3386
|
}, {
|
|
3386
3387
|
key: "offAll",
|
|
3387
3388
|
value: function() {
|
|
3388
|
-
|
|
3389
|
+
M(O(r.prototype), "removeAllListeners", this).call(this);
|
|
3389
3390
|
}
|
|
3390
3391
|
}]), r;
|
|
3391
3392
|
}(qi), eo = /* @__PURE__ */ function() {
|
|
@@ -3569,7 +3570,7 @@ function At(a, o) {
|
|
|
3569
3570
|
}
|
|
3570
3571
|
var xe = /* @__PURE__ */ function() {
|
|
3571
3572
|
function a(o) {
|
|
3572
|
-
x(this, a),
|
|
3573
|
+
x(this, a), f.checkIsFunction(this.beforeCreate) && this.beforeCreate(o), vn(this), this.__args = o, this.__events = {}, this.__onceEvents = {}, this.config = o.config || {}, this.player = null, this.playerConfig = {}, this.pluginName = "", this.__init(o);
|
|
3573
3574
|
}
|
|
3574
3575
|
return I(a, [{
|
|
3575
3576
|
key: "beforeCreate",
|
|
@@ -3623,7 +3624,7 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3623
3624
|
}, {
|
|
3624
3625
|
key: "domEventType",
|
|
3625
3626
|
get: function() {
|
|
3626
|
-
var r =
|
|
3627
|
+
var r = f.checkTouchSupport() ? "touch" : "mouse";
|
|
3627
3628
|
return this.playerConfig && (this.playerConfig.domEventType === "touch" || this.playerConfig.domEventType === "mouse") && (r = this.playerConfig.domEventType), r;
|
|
3628
3629
|
}
|
|
3629
3630
|
}, {
|
|
@@ -3731,7 +3732,7 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3731
3732
|
key: "__destroy",
|
|
3732
3733
|
value: function() {
|
|
3733
3734
|
var r = this, t = this.player, e = this.pluginName;
|
|
3734
|
-
this.offAll(),
|
|
3735
|
+
this.offAll(), f.clearAllTimers(this), f.checkIsFunction(this.destroy) && this.destroy(), ["player", "playerConfig", "pluginName", "logger", "__args", "__hooks"].map(function(i) {
|
|
3735
3736
|
r[i] = null;
|
|
3736
3737
|
}), t.unRegisterPlugin(e), mn(this);
|
|
3737
3738
|
}
|
|
@@ -3816,20 +3817,20 @@ function co(a, o) {
|
|
|
3816
3817
|
function xi(a, o) {
|
|
3817
3818
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "", t = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, e = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", i = null;
|
|
3818
3819
|
if (a instanceof window.Element)
|
|
3819
|
-
return
|
|
3820
|
+
return f.addClass(a, r), Object.keys(t).map(function(n) {
|
|
3820
3821
|
a.setAttribute(n, t[n]);
|
|
3821
3822
|
}), a;
|
|
3822
3823
|
if (Dt(a) || Dt(a.url))
|
|
3823
|
-
return t.src = Dt(a) ? a : a.url || "", i =
|
|
3824
|
+
return t.src = Dt(a) ? a : a.url || "", i = f.createDom(a.tag || "img", "", t, "xg-img ".concat(r)), i;
|
|
3824
3825
|
if (typeof a == "function")
|
|
3825
3826
|
try {
|
|
3826
|
-
return i = a(), i instanceof window.Element ? (
|
|
3827
|
+
return i = a(), i instanceof window.Element ? (f.addClass(i, r), Object.keys(t).map(function(n) {
|
|
3827
3828
|
i.setAttribute(n, t[n]);
|
|
3828
3829
|
}), i) : (H.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is a function mast return an Element Object")), null);
|
|
3829
3830
|
} catch (n) {
|
|
3830
3831
|
return H.logError("Plugin named [".concat(e, "]:createIcon"), n), null;
|
|
3831
3832
|
}
|
|
3832
|
-
return typeof a == "string" ?
|
|
3833
|
+
return typeof a == "string" ? f.createDomFromHtml(a, t, r) : (H.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is invalid")), null);
|
|
3833
3834
|
}
|
|
3834
3835
|
function fo(a, o) {
|
|
3835
3836
|
var r = o.config.icons || o.playerConfig.icons;
|
|
@@ -3848,7 +3849,7 @@ function ho(a, o) {
|
|
|
3848
3849
|
});
|
|
3849
3850
|
});
|
|
3850
3851
|
}
|
|
3851
|
-
var
|
|
3852
|
+
var V = /* @__PURE__ */ function(a) {
|
|
3852
3853
|
L(r, a);
|
|
3853
3854
|
var o = D(r);
|
|
3854
3855
|
function r() {
|
|
@@ -3858,7 +3859,7 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3858
3859
|
return I(r, [{
|
|
3859
3860
|
key: "__init",
|
|
3860
3861
|
value: function(e) {
|
|
3861
|
-
if (
|
|
3862
|
+
if (M(O(r.prototype), "__init", this).call(this, e), !!e.root) {
|
|
3862
3863
|
var i = e.root, n = null;
|
|
3863
3864
|
this.icons = {}, this.root = null, this.parent = null;
|
|
3864
3865
|
var s = this.registerIcons() || {};
|
|
@@ -3874,12 +3875,12 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3874
3875
|
if (u)
|
|
3875
3876
|
n = r.insert(u, i, e.index), n.setAttribute("data-index", e.index);
|
|
3876
3877
|
else if (e.tag)
|
|
3877
|
-
n =
|
|
3878
|
+
n = f.createDom(e.tag, "", e.attr, e.name), n.setAttribute("data-index", e.index), i.appendChild(n);
|
|
3878
3879
|
else
|
|
3879
3880
|
return;
|
|
3880
3881
|
this.root = n, this.parent = i;
|
|
3881
|
-
var c = this.config.attr || {},
|
|
3882
|
-
this.setAttr(c), this.setStyle(
|
|
3882
|
+
var c = this.config.attr || {}, h = this.config.style || {};
|
|
3883
|
+
this.setAttr(c), this.setStyle(h), this.config.index && this.root.setAttribute("data-index", this.config.index), this.__registerChildren();
|
|
3883
3884
|
}
|
|
3884
3885
|
}
|
|
3885
3886
|
}, {
|
|
@@ -3892,8 +3893,8 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3892
3893
|
i && te(i) === "object" && Object.keys(i).length > 0 && Object.keys(i).map(function(n) {
|
|
3893
3894
|
var s = n, l = i[s], u = {
|
|
3894
3895
|
root: e.root
|
|
3895
|
-
}, c,
|
|
3896
|
-
typeof l == "function" ? (c = e.config[s] || {},
|
|
3896
|
+
}, c, h;
|
|
3897
|
+
typeof l == "function" ? (c = e.config[s] || {}, h = l) : te(l) === "object" && typeof l.plugin == "function" && (c = l.options ? f.deepCopy(e.config[s] || {}, l.options) : e.config[s] || {}, h = l.plugin), u.config = c, c.index !== void 0 && (u.index = c.index), c.root && (u.root = c.root), e.registerPlugin(h, u, s);
|
|
3897
3898
|
});
|
|
3898
3899
|
}
|
|
3899
3900
|
}
|
|
@@ -3902,15 +3903,15 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3902
3903
|
value: function(e) {
|
|
3903
3904
|
e || (e = this.lang);
|
|
3904
3905
|
function i(u, c) {
|
|
3905
|
-
for (var
|
|
3906
|
-
u.children[
|
|
3906
|
+
for (var h = 0; h < u.children.length; h++)
|
|
3907
|
+
u.children[h].children.length > 0 ? i(u.children[h], c) : c(u.children[h]);
|
|
3907
3908
|
}
|
|
3908
3909
|
var n = this.root, s = this.i18n, l = this.langText;
|
|
3909
3910
|
n && i(n, function(u) {
|
|
3910
3911
|
var c = u.getAttribute && u.getAttribute("lang-key");
|
|
3911
3912
|
if (c) {
|
|
3912
|
-
var
|
|
3913
|
-
|
|
3913
|
+
var h = s[c.toUpperCase()] || l[c];
|
|
3914
|
+
h && (u.innerHTML = typeof h == "function" ? h(e) : h);
|
|
3914
3915
|
}
|
|
3915
3916
|
});
|
|
3916
3917
|
}
|
|
@@ -3935,12 +3936,12 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3935
3936
|
}, {
|
|
3936
3937
|
key: "disable",
|
|
3937
3938
|
value: function() {
|
|
3938
|
-
this.config.disable = !0,
|
|
3939
|
+
this.config.disable = !0, f.addClass(this.find(".xgplayer-icon"), Si.ICON_DISABLE);
|
|
3939
3940
|
}
|
|
3940
3941
|
}, {
|
|
3941
3942
|
key: "enable",
|
|
3942
3943
|
value: function() {
|
|
3943
|
-
this.config.disable = !1,
|
|
3944
|
+
this.config.disable = !1, f.removeClass(this.find(".xgplayer-icon"), Si.ICON_DISABLE);
|
|
3944
3945
|
}
|
|
3945
3946
|
}, {
|
|
3946
3947
|
key: "children",
|
|
@@ -3952,7 +3953,7 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
3952
3953
|
value: function(e) {
|
|
3953
3954
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
3954
3955
|
i.root = i.root || this.root;
|
|
3955
|
-
var s =
|
|
3956
|
+
var s = M(O(r.prototype), "registerPlugin", this).call(this, e, i, n);
|
|
3956
3957
|
return this._children.push(s), s;
|
|
3957
3958
|
}
|
|
3958
3959
|
}, {
|
|
@@ -4004,9 +4005,9 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
4004
4005
|
value: function(e, i) {
|
|
4005
4006
|
var n = this;
|
|
4006
4007
|
if (this.root) {
|
|
4007
|
-
if (
|
|
4008
|
+
if (f.typeOf(e) === "String")
|
|
4008
4009
|
return this.root.style[e] = i;
|
|
4009
|
-
|
|
4010
|
+
f.typeOf(e) === "Object" && Object.keys(e).map(function(s) {
|
|
4010
4011
|
n.root.style[s] = e[s];
|
|
4011
4012
|
});
|
|
4012
4013
|
}
|
|
@@ -4016,9 +4017,9 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
4016
4017
|
value: function(e, i) {
|
|
4017
4018
|
var n = this;
|
|
4018
4019
|
if (this.root) {
|
|
4019
|
-
if (
|
|
4020
|
+
if (f.typeOf(e) === "String")
|
|
4020
4021
|
return this.root.setAttribute(e, i);
|
|
4021
|
-
|
|
4022
|
+
f.typeOf(e) === "Object" && Object.keys(e).map(function(s) {
|
|
4022
4023
|
n.root.setAttribute(s, e[s]);
|
|
4023
4024
|
});
|
|
4024
4025
|
}
|
|
@@ -4087,7 +4088,7 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
4087
4088
|
n.destroy();
|
|
4088
4089
|
}), this.__delegates = [], this._children instanceof Array && (this._children.map(function(n) {
|
|
4089
4090
|
i.unRegisterPlugin(n.pluginName);
|
|
4090
|
-
}), this._children = null), this.root && (this.root.hasOwnProperty("remove") ? this.root.remove() : this.root.parentNode && this.root.parentNode.removeChild(this.root)),
|
|
4091
|
+
}), this._children = null), this.root && (this.root.hasOwnProperty("remove") ? this.root.remove() : this.root.parentNode && this.root.parentNode.removeChild(this.root)), M(O(r.prototype), "__destroy", this).call(this), this.icons = {}, ["root", "parent"].map(function(n) {
|
|
4091
4092
|
e[n] = null;
|
|
4092
4093
|
});
|
|
4093
4094
|
}
|
|
@@ -4096,16 +4097,16 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
4096
4097
|
value: function(e, i) {
|
|
4097
4098
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = i.children.length, l = Number(n), u = e instanceof window.Node;
|
|
4098
4099
|
if (s) {
|
|
4099
|
-
for (var c = 0,
|
|
4100
|
-
|
|
4101
|
-
var p = Number(
|
|
4100
|
+
for (var c = 0, h = null, g = ""; c < s; c++) {
|
|
4101
|
+
h = i.children[c];
|
|
4102
|
+
var p = Number(h.getAttribute("data-index"));
|
|
4102
4103
|
if (p >= l) {
|
|
4103
4104
|
g = "beforebegin";
|
|
4104
4105
|
break;
|
|
4105
4106
|
} else
|
|
4106
4107
|
p < l && (g = "afterend");
|
|
4107
4108
|
}
|
|
4108
|
-
return u ? g === "afterend" ? i.appendChild(e) : i.insertBefore(e,
|
|
4109
|
+
return u ? g === "afterend" ? i.appendChild(e) : i.insertBefore(e, h) : h.insertAdjacentHTML(g, e), g === "afterend" ? i.children[i.children.length - 1] : i.children[c];
|
|
4109
4110
|
} else
|
|
4110
4111
|
return u ? i.appendChild(e) : i.insertAdjacentHTML("beforeend", e), i.children[i.children.length - 1];
|
|
4111
4112
|
}
|
|
@@ -4120,9 +4121,9 @@ var z = /* @__PURE__ */ function(a) {
|
|
|
4120
4121
|
var l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, u = [];
|
|
4121
4122
|
if (e instanceof window.Node && typeof s == "function")
|
|
4122
4123
|
if (Array.isArray(n))
|
|
4123
|
-
n.forEach(function(
|
|
4124
|
-
var g = Ei(e, i,
|
|
4125
|
-
g.key = "".concat(i, "_").concat(
|
|
4124
|
+
n.forEach(function(h) {
|
|
4125
|
+
var g = Ei(e, i, h, s, l);
|
|
4126
|
+
g.key = "".concat(i, "_").concat(h), u.push(g);
|
|
4126
4127
|
});
|
|
4127
4128
|
else {
|
|
4128
4129
|
var c = Ei(e, i, n, s, l);
|
|
@@ -4242,7 +4243,7 @@ var q = {
|
|
|
4242
4243
|
e = r[t[i]];
|
|
4243
4244
|
break;
|
|
4244
4245
|
}
|
|
4245
|
-
return
|
|
4246
|
+
return f.typeOf(e) === "Object" ? {
|
|
4246
4247
|
root: e.root,
|
|
4247
4248
|
position: e.position
|
|
4248
4249
|
} : {};
|
|
@@ -4277,7 +4278,7 @@ var q = {
|
|
|
4277
4278
|
for (var l = Object.keys(n), u = 0; u < l.length; u++)
|
|
4278
4279
|
if (s.toLowerCase() === l[u].toLowerCase()) {
|
|
4279
4280
|
var c = n[l[u]];
|
|
4280
|
-
|
|
4281
|
+
f.typeOf(c) === "Object" ? t.config = Object.assign({}, t.config, n[l[u]]) : f.typeOf(c) === "Boolean" && (t.config.disable = !c);
|
|
4281
4282
|
break;
|
|
4282
4283
|
}
|
|
4283
4284
|
r.defaultConfig && Object.keys(r.defaultConfig).forEach(function(g) {
|
|
@@ -4285,8 +4286,8 @@ var q = {
|
|
|
4285
4286
|
}), t.root ? typeof t.root == "string" && (t.root = o[t.root]) : t.root = o.root, t.index = t.config.index || 0;
|
|
4286
4287
|
try {
|
|
4287
4288
|
i[s.toLowerCase()] && (this.unRegister(e, s.toLowerCase()), console.warn("the is one plugin with same pluginName [".concat(s, "] exist, destroy the old instance")));
|
|
4288
|
-
var
|
|
4289
|
-
return i[s.toLowerCase()] =
|
|
4289
|
+
var h = new r(t);
|
|
4290
|
+
return i[s.toLowerCase()] = h, i[s.toLowerCase()].func = r, h && typeof h.afterCreate == "function" && h.afterCreate(), h;
|
|
4290
4291
|
} catch (g) {
|
|
4291
4292
|
throw console.error(g), g;
|
|
4292
4293
|
}
|
|
@@ -4339,8 +4340,8 @@ var q = {
|
|
|
4339
4340
|
try {
|
|
4340
4341
|
var c = s[u].beforePlayerInit();
|
|
4341
4342
|
l.push(t(c));
|
|
4342
|
-
} catch (
|
|
4343
|
-
throw l.push(t(null)),
|
|
4343
|
+
} catch (h) {
|
|
4344
|
+
throw l.push(t(null)), h;
|
|
4344
4345
|
}
|
|
4345
4346
|
}), Promise.all([].concat(l)).then(function() {
|
|
4346
4347
|
e();
|
|
@@ -4410,7 +4411,7 @@ var q = {
|
|
|
4410
4411
|
delete this.pluginGroup[r], delete o._pluginInfoId;
|
|
4411
4412
|
}
|
|
4412
4413
|
}
|
|
4413
|
-
},
|
|
4414
|
+
}, b = {
|
|
4414
4415
|
DEFAULT: "xgplayer",
|
|
4415
4416
|
DEFAULT_SKIN: "xgplayer-skin-default",
|
|
4416
4417
|
ENTER: "xgplayer-is-enter",
|
|
@@ -4527,7 +4528,7 @@ function Ii() {
|
|
|
4527
4528
|
var mo = function(o, r) {
|
|
4528
4529
|
var t, e, i;
|
|
4529
4530
|
r.preset && r.options ? i = new r.preset(r.options, o.config) : i = new r({}, o.config);
|
|
4530
|
-
var n = i, s = n.plugins, l = s === void 0 ? [] : s, u = n.ignores, c = u === void 0 ? [] : u,
|
|
4531
|
+
var n = i, s = n.plugins, l = s === void 0 ? [] : s, u = n.ignores, c = u === void 0 ? [] : u, h = n.icons, g = h === void 0 ? {} : h, p = n.i18n, d = p === void 0 ? [] : p;
|
|
4531
4532
|
o.config.plugins || (o.config.plugins = []), o.config.ignores || (o.config.ignores = []), (t = o.config.plugins).push.apply(t, fe(l)), (e = o.config.ignores).push.apply(e, fe(c)), Object.keys(g).map(function(y) {
|
|
4532
4533
|
o.config.icons[y] || (o.config.icons[y] = g[y]);
|
|
4533
4534
|
});
|
|
@@ -4554,24 +4555,24 @@ var mo = function(o, r) {
|
|
|
4554
4555
|
return I(r, [{
|
|
4555
4556
|
key: "beforeCreate",
|
|
4556
4557
|
value: function(e) {
|
|
4557
|
-
!e.config.mode &&
|
|
4558
|
+
!e.config.mode && B.device === "mobile" && (e.config.mode = "flex"), e.player.config.marginControls && (e.config.autoHide = !1);
|
|
4558
4559
|
}
|
|
4559
4560
|
}, {
|
|
4560
4561
|
key: "afterCreate",
|
|
4561
4562
|
value: function() {
|
|
4562
4563
|
var e = this, i = this.config, n = i.disable, s = i.height, l = i.mode;
|
|
4563
4564
|
if (!n) {
|
|
4564
|
-
l === "flex" && this.player.addClass(
|
|
4565
|
+
l === "flex" && this.player.addClass(b.FLEX_CONTROLS);
|
|
4565
4566
|
var u = {
|
|
4566
4567
|
height: "".concat(s, "px")
|
|
4567
4568
|
};
|
|
4568
|
-
Object.keys(u).map(function(
|
|
4569
|
-
e.root.style[
|
|
4570
|
-
}), this.left = this.find("xg-left-grid"), this.center = this.find("xg-center-grid"), this.right = this.find("xg-right-grid"), this.innerRoot = this.find("xg-inner-controls"), this.on(pt, function(
|
|
4571
|
-
|
|
4569
|
+
Object.keys(u).map(function(h) {
|
|
4570
|
+
e.root.style[h] = u[h];
|
|
4571
|
+
}), this.left = this.find("xg-left-grid"), this.center = this.find("xg-center-grid"), this.right = this.find("xg-right-grid"), this.innerRoot = this.find("xg-inner-controls"), this.on(pt, function(h) {
|
|
4572
|
+
h ? f.addClass(e.root, "mini-controls") : f.removeClass(e.root, "mini-controls");
|
|
4572
4573
|
});
|
|
4573
4574
|
var c = this.playerConfig.isMobileSimulateMode;
|
|
4574
|
-
|
|
4575
|
+
B.device !== "mobile" && c !== "mobile" && (this.bind("mouseenter", this.onMouseEnter), this.bind("mouseleave", this.onMouseLeave));
|
|
4575
4576
|
}
|
|
4576
4577
|
}
|
|
4577
4578
|
}, {
|
|
@@ -4598,12 +4599,12 @@ var mo = function(o, r) {
|
|
|
4598
4599
|
}, {
|
|
4599
4600
|
key: "recoverAutoHide",
|
|
4600
4601
|
value: function() {
|
|
4601
|
-
this.config.autoHide &&
|
|
4602
|
+
this.config.autoHide && f.addClass(this.root, b.CONTROLS_AUTOHIDE);
|
|
4602
4603
|
}
|
|
4603
4604
|
}, {
|
|
4604
4605
|
key: "pauseAutoHide",
|
|
4605
4606
|
value: function() {
|
|
4606
|
-
|
|
4607
|
+
f.removeClass(this.root, b.CONTROLS_AUTOHIDE);
|
|
4607
4608
|
}
|
|
4608
4609
|
}, {
|
|
4609
4610
|
key: "show",
|
|
@@ -4644,27 +4645,27 @@ var mo = function(o, r) {
|
|
|
4644
4645
|
default:
|
|
4645
4646
|
i.root = this.left;
|
|
4646
4647
|
}
|
|
4647
|
-
return
|
|
4648
|
+
return M(O(r.prototype), "registerPlugin", this).call(this, e, i, n);
|
|
4648
4649
|
}
|
|
4649
4650
|
}
|
|
4650
4651
|
}
|
|
4651
4652
|
}, {
|
|
4652
4653
|
key: "destroy",
|
|
4653
4654
|
value: function() {
|
|
4654
|
-
|
|
4655
|
+
B.device !== "mobile" && (this.unbind("mouseenter", this.onMouseEnter), this.unbind("mouseleave", this.onMouseLeave));
|
|
4655
4656
|
}
|
|
4656
4657
|
}, {
|
|
4657
4658
|
key: "render",
|
|
4658
4659
|
value: function() {
|
|
4659
4660
|
var e = this.config, i = e.mode, n = e.autoHide, s = e.initShow, l = e.disable;
|
|
4660
4661
|
if (!l) {
|
|
4661
|
-
var u =
|
|
4662
|
+
var u = f.classNames({
|
|
4662
4663
|
"xgplayer-controls": !0
|
|
4663
4664
|
}, {
|
|
4664
4665
|
"flex-controls": i === "flex"
|
|
4665
4666
|
}, {
|
|
4666
4667
|
"bottom-controls": i === "bottom"
|
|
4667
|
-
}, _({},
|
|
4668
|
+
}, _({}, b.CONTROLS_AUTOHIDE, n), {
|
|
4668
4669
|
"xgplayer-controls-initshow": s || !n
|
|
4669
4670
|
});
|
|
4670
4671
|
return '<xg-controls class="'.concat(u, `" unselectable="on">
|
|
@@ -4694,7 +4695,7 @@ var mo = function(o, r) {
|
|
|
4694
4695
|
};
|
|
4695
4696
|
}
|
|
4696
4697
|
}]), r;
|
|
4697
|
-
}(
|
|
4698
|
+
}(V), _o = {
|
|
4698
4699
|
LANG: "en",
|
|
4699
4700
|
TEXT: {
|
|
4700
4701
|
ERROR_TYPES: {
|
|
@@ -4776,7 +4777,7 @@ var mo = function(o, r) {
|
|
|
4776
4777
|
};
|
|
4777
4778
|
function it(a, o) {
|
|
4778
4779
|
return Object.keys(o).forEach(function(r) {
|
|
4779
|
-
var t =
|
|
4780
|
+
var t = f.typeOf(o[r]), e = f.typeOf(a[r]);
|
|
4780
4781
|
if (t === "Array") {
|
|
4781
4782
|
var i;
|
|
4782
4783
|
e !== "Array" && (a[r] = []), (i = a[r]).push.apply(i, fe(o[r]));
|
|
@@ -4792,7 +4793,7 @@ function yn() {
|
|
|
4792
4793
|
function ko(a, o) {
|
|
4793
4794
|
var r = [];
|
|
4794
4795
|
if (o || (o = se), !!o.lang) {
|
|
4795
|
-
|
|
4796
|
+
f.typeOf(a) !== "Array" ? r = Object.keys(a).map(function(i) {
|
|
4796
4797
|
var n = i === "zh" ? "zh-cn" : i;
|
|
4797
4798
|
return {
|
|
4798
4799
|
LANG: n,
|
|
@@ -4948,18 +4949,18 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
4948
4949
|
function r(t) {
|
|
4949
4950
|
var e;
|
|
4950
4951
|
x(this, r);
|
|
4951
|
-
var i =
|
|
4952
|
+
var i = f.deepMerge(Ii(), t);
|
|
4952
4953
|
e = o.call(this, i), _(m(e), "canPlayFunc", function() {
|
|
4953
4954
|
if (e.config) {
|
|
4954
4955
|
var d = e.config, v = d.autoplay, y = d.defaultPlaybackRate;
|
|
4955
|
-
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(ye, e.canPlayFunc), e.removeClass(
|
|
4956
|
+
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(ye, e.canPlayFunc), e.removeClass(b.ENTER);
|
|
4956
4957
|
}
|
|
4957
4958
|
}), _(m(e), "onFullscreenChange", function(d, v) {
|
|
4958
4959
|
var y = function() {
|
|
4959
|
-
|
|
4960
|
+
f.setTimeout(m(e), function() {
|
|
4960
4961
|
e.resize();
|
|
4961
4962
|
}, 100);
|
|
4962
|
-
},
|
|
4963
|
+
}, C = f.getFullScreenEl();
|
|
4963
4964
|
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(mt, {
|
|
4964
4965
|
eventType: "system",
|
|
4965
4966
|
action: "switch_fullscreen",
|
|
@@ -4972,19 +4973,19 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
4972
4973
|
to: !1
|
|
4973
4974
|
}]
|
|
4974
4975
|
});
|
|
4975
|
-
var
|
|
4976
|
-
if (v ||
|
|
4977
|
-
y(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root,
|
|
4976
|
+
var w = Hs(C, e.playerId, Oe);
|
|
4977
|
+
if (v || C && (C === e._fullscreenEl || w))
|
|
4978
|
+
y(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, C, b.FULLSCREEN), e.emit(ve, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
4978
4979
|
else if (e.fullscreen) {
|
|
4979
4980
|
y();
|
|
4980
|
-
var
|
|
4981
|
-
if (
|
|
4981
|
+
var k = m(e), N = k._fullScreenOffset, R = k.config;
|
|
4982
|
+
if (R.needFullscreenScroll ? (window.scrollTo(N.left, N.top), f.setTimeout(m(e), function() {
|
|
4982
4983
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
4983
4984
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
4984
|
-
e.removeClass(
|
|
4985
|
+
e.removeClass(b.FULLSCREEN);
|
|
4985
4986
|
else {
|
|
4986
|
-
var
|
|
4987
|
-
!
|
|
4987
|
+
var z = e._fullscreenEl;
|
|
4988
|
+
!z && (e.root.contains(d.target) || d.target === e.root) && (z = d.target), e.recoverFullStyle(e.root, z, b.FULLSCREEN);
|
|
4988
4989
|
}
|
|
4989
4990
|
e._fullscreenEl = null, e.emit(ve, !1);
|
|
4990
4991
|
}
|
|
@@ -4992,7 +4993,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
4992
4993
|
e._fullscreenEl = e.media, e.onFullscreenChange(d, !0);
|
|
4993
4994
|
}), _(m(e), "_onWebkitendfullscreen", function(d) {
|
|
4994
4995
|
e.onFullscreenChange(d, !1);
|
|
4995
|
-
}), vn(m(e), wo), e.config = i, e._pluginInfoId =
|
|
4996
|
+
}), vn(m(e), wo), e.config = i, e._pluginInfoId = f.generateSessionId(), Os(m(e));
|
|
4996
4997
|
var n = e.constructor.defaultPreset;
|
|
4997
4998
|
if (e.config.presets.length) {
|
|
4998
4999
|
var s = e.config.presets.indexOf("default");
|
|
@@ -5021,20 +5022,20 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5021
5022
|
}, e._offsetInfo = {
|
|
5022
5023
|
currentTime: -1,
|
|
5023
5024
|
duration: 0
|
|
5024
|
-
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Xe.init(e._pluginInfoId),
|
|
5025
|
+
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Xe.init(e._pluginInfoId), B.os.isAndroid && B.osVersion > 0 && B.osVersion < 6 && (e.config.autoplay = !1), e.database = new eo(), e.isUserActive = !1, e._onceSeekCanplay = null, e._isPauseBeforeSeek = 0, e.innerStates = {
|
|
5025
5026
|
isActiveLocked: !1
|
|
5026
5027
|
}, e.instManager = Ce;
|
|
5027
5028
|
var l = e._initDOM();
|
|
5028
5029
|
if (!l)
|
|
5029
5030
|
return console.error(new Error("can't find the dom which id is ".concat(e.config.id, " or this.config.el does not exist"))), Qt(e);
|
|
5030
|
-
var u = e.config, c = u.definition,
|
|
5031
|
-
if (!g &&
|
|
5032
|
-
var p =
|
|
5033
|
-
return d.definition && d.definition ===
|
|
5031
|
+
var u = e.config, c = u.definition, h = c === void 0 ? {} : c, g = u.url;
|
|
5032
|
+
if (!g && h.list && h.list.length > 0) {
|
|
5033
|
+
var p = h.list.find(function(d) {
|
|
5034
|
+
return d.definition && d.definition === h.defaultDefinition;
|
|
5034
5035
|
});
|
|
5035
|
-
p || (
|
|
5036
|
+
p || (h.defaultDefinition = h.list[0].definition, p = h.list[0]), e.config.url = p.url, e.curDefinition = p;
|
|
5036
5037
|
}
|
|
5037
|
-
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), q.onPluginsReady(m(e)), e.getInitDefinition(), e.setState(U.READY),
|
|
5038
|
+
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), q.onPluginsReady(m(e)), e.getInitDefinition(), e.setState(U.READY), f.setTimeout(m(e), function() {
|
|
5038
5039
|
e.emit(ni);
|
|
5039
5040
|
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < U.ATTACHED) && e.start(), e;
|
|
5040
5041
|
}
|
|
@@ -5063,35 +5064,35 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5063
5064
|
this.attachVideoEvents(c), this.media = c;
|
|
5064
5065
|
}
|
|
5065
5066
|
if (this.media.setAttribute(Oe, this.playerId), this.config.controls) {
|
|
5066
|
-
var
|
|
5067
|
-
root:
|
|
5067
|
+
var h = this.config.controls.root || null, g = q.register(this, yo, {
|
|
5068
|
+
root: h
|
|
5068
5069
|
});
|
|
5069
5070
|
this.controls = g;
|
|
5070
5071
|
}
|
|
5071
|
-
var p = this.config.isMobileSimulateMode === "mobile" ? "mobile" :
|
|
5072
|
-
if (this.addClass("".concat(
|
|
5072
|
+
var p = this.config.isMobileSimulateMode === "mobile" ? "mobile" : B.device;
|
|
5073
|
+
if (this.addClass("".concat(b.DEFAULT, " ").concat(b.INACTIVE, " xgplayer-").concat(p, " ").concat(this.config.controls ? "" : b.NO_CONTROLS)), this.config.autoplay ? this.addClass(b.ENTER) : this.addClass(b.NO_START), this.config.fluid) {
|
|
5073
5074
|
var d = this.config, v = d.width, y = d.height;
|
|
5074
5075
|
(typeof v != "number" || typeof y != "number") && (v = 600, y = 337.5);
|
|
5075
|
-
var
|
|
5076
|
+
var C = {
|
|
5076
5077
|
width: "100%",
|
|
5077
5078
|
height: "0",
|
|
5078
5079
|
"max-width": "100%",
|
|
5079
5080
|
"padding-top": "".concat(y * 100 / v, "%")
|
|
5080
5081
|
};
|
|
5081
|
-
Object.keys(
|
|
5082
|
-
i.root.style[
|
|
5082
|
+
Object.keys(C).forEach(function(F) {
|
|
5083
|
+
i.root.style[F] = C[F];
|
|
5083
5084
|
});
|
|
5084
5085
|
} else
|
|
5085
|
-
["width", "height"].forEach(function(
|
|
5086
|
-
i.config[
|
|
5086
|
+
["width", "height"].forEach(function(F) {
|
|
5087
|
+
i.config[F] && (typeof i.config[F] != "number" ? i.root.style[F] = i.config[F] : i.root.style[F] = "".concat(i.config[F], "px"));
|
|
5087
5088
|
});
|
|
5088
|
-
var
|
|
5089
|
-
return this.sizeInfo.width =
|
|
5089
|
+
var w = this.root.getBoundingClientRect(), k = w.width, N = w.height, R = w.left, z = w.top;
|
|
5090
|
+
return this.sizeInfo.width = k, this.sizeInfo.height = N, this.sizeInfo.left = R, this.sizeInfo.top = z, !0;
|
|
5090
5091
|
}
|
|
5091
5092
|
}, {
|
|
5092
5093
|
key: "_initBaseDoms",
|
|
5093
5094
|
value: function() {
|
|
5094
|
-
this.topBar = null, this.leftBar = null, this.rightBar = null, this.config.marginControls && (this.innerContainer =
|
|
5095
|
+
this.topBar = null, this.leftBar = null, this.rightBar = null, this.config.marginControls && (this.innerContainer = f.createDom("xg-video-container", "", {
|
|
5095
5096
|
"data-index": -1
|
|
5096
5097
|
}, "xg-video-container"), this.root.appendChild(this.innerContainer));
|
|
5097
5098
|
}
|
|
@@ -5103,7 +5104,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5103
5104
|
e.on(i, e["on" + i.charAt(0).toUpperCase() + i.slice(1)]);
|
|
5104
5105
|
}), ki.forEach(function(i) {
|
|
5105
5106
|
document && document.addEventListener(i, e.onFullscreenChange);
|
|
5106
|
-
}),
|
|
5107
|
+
}), B.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(ke, this.resize), this.playFunc = function() {
|
|
5107
5108
|
e.config.closeFocusVideoFocus || e.media.focus();
|
|
5108
5109
|
}, this.once(ae, this.playFunc);
|
|
5109
5110
|
}
|
|
@@ -5118,20 +5119,20 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5118
5119
|
}, {
|
|
5119
5120
|
key: "_clearUserTimer",
|
|
5120
5121
|
value: function() {
|
|
5121
|
-
this.userTimer && (
|
|
5122
|
+
this.userTimer && (f.clearTimeout(this, this.userTimer), this.userTimer = null);
|
|
5122
5123
|
}
|
|
5123
5124
|
}, {
|
|
5124
5125
|
key: "_startInit",
|
|
5125
5126
|
value: function(e) {
|
|
5126
5127
|
var i = this;
|
|
5127
|
-
if (this.media && !((!e || e === "" ||
|
|
5128
|
-
this.handleSource && (this._detachSourceEvents(this.media),
|
|
5128
|
+
if (this.media && !((!e || e === "" || f.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(nn), H.logWarn("config.url is null, please get url and run player._startInit(url)"), this.config.nullUrlStart))) {
|
|
5129
|
+
this.handleSource && (this._detachSourceEvents(this.media), f.typeOf(e) === "Array" && e.length > 0 ? this._attachSourceEvents(this.media, e) : !this.media.src || this.media.src !== e ? this.media.src = e : e || this.media.removeAttribute("src")), f.typeOf(this.config.volume) === "Number" && (this.volume = this.config.volume);
|
|
5129
5130
|
var n = this.innerContainer ? this.innerContainer : this.root;
|
|
5130
5131
|
this.media instanceof window.Element && !n.contains(this.media) && n.insertBefore(this.media, n.firstChild);
|
|
5131
5132
|
var s = this.media.readyState;
|
|
5132
|
-
H.logInfo("_startInit readyState", s), this.config.autoplay && (!
|
|
5133
|
+
H.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (B.os.isIpad || B.os.isPhone) && this.mediaPlay());
|
|
5133
5134
|
var l = this.config.startTime;
|
|
5134
|
-
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ye, this.canPlayFunc), (!this.hasStart || this.state < U.ATTACHED) && q.afterInit(this), this.hasStart = !0, this.setState(U.ATTACHED),
|
|
5135
|
+
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ye, this.canPlayFunc), (!this.hasStart || this.state < U.ATTACHED) && q.afterInit(this), this.hasStart = !0, this.setState(U.ATTACHED), f.setTimeout(this, function() {
|
|
5135
5136
|
i.emit(wt);
|
|
5136
5137
|
}, 0);
|
|
5137
5138
|
}
|
|
@@ -5144,23 +5145,23 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5144
5145
|
var n = this.config.ignores || [], s = this.config.plugins || [], l = this.config.i18n || [];
|
|
5145
5146
|
i && Xe.extend(l, this.__i18n);
|
|
5146
5147
|
var u = n.join("||").toLowerCase().split("||"), c = this.plugins;
|
|
5147
|
-
s.forEach(function(
|
|
5148
|
+
s.forEach(function(h) {
|
|
5148
5149
|
try {
|
|
5149
|
-
var g =
|
|
5150
|
+
var g = h.plugin ? h.plugin.pluginName : h.pluginName;
|
|
5150
5151
|
if (g && u.indexOf(g.toLowerCase()) > -1)
|
|
5151
5152
|
return null;
|
|
5152
5153
|
if (!i && c[g.toLowerCase()])
|
|
5153
5154
|
return;
|
|
5154
|
-
if (
|
|
5155
|
-
var p = q.lazyRegister(e,
|
|
5156
|
-
|
|
5155
|
+
if (h.lazy && h.loader) {
|
|
5156
|
+
var p = q.lazyRegister(e, h);
|
|
5157
|
+
h.forceBeforeInit && (p.then(function() {
|
|
5157
5158
|
e._loadingPlugins.splice(e._loadingPlugins.indexOf(p), 1);
|
|
5158
5159
|
}).catch(function(d) {
|
|
5159
5160
|
H.logError("_registerPlugins:loadingPlugin", d), e._loadingPlugins.splice(e._loadingPlugins.indexOf(p), 1);
|
|
5160
5161
|
}), e._loadingPlugins.push(p));
|
|
5161
5162
|
return;
|
|
5162
5163
|
}
|
|
5163
|
-
return e.registerPlugin(
|
|
5164
|
+
return e.registerPlugin(h);
|
|
5164
5165
|
} catch (d) {
|
|
5165
5166
|
H.logError("_registerPlugins:", d);
|
|
5166
5167
|
}
|
|
@@ -5180,13 +5181,13 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5180
5181
|
var i = null;
|
|
5181
5182
|
switch (e) {
|
|
5182
5183
|
case W.ROOT_RIGHT:
|
|
5183
|
-
this.rightBar || (this.rightBar =
|
|
5184
|
+
this.rightBar || (this.rightBar = f.createPositionBar("xg-right-bar", this.root)), i = this.rightBar;
|
|
5184
5185
|
break;
|
|
5185
5186
|
case W.ROOT_LEFT:
|
|
5186
|
-
this.leftBar || (this.leftBar =
|
|
5187
|
+
this.leftBar || (this.leftBar = f.createPositionBar("xg-left-bar", this.root)), i = this.leftBar;
|
|
5187
5188
|
break;
|
|
5188
5189
|
case W.ROOT_TOP:
|
|
5189
|
-
this.topBar || (this.topBar =
|
|
5190
|
+
this.topBar || (this.topBar = f.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && f.addClass(this.topBar, b.TOP_BAR_AUTOHIDE)), i = this.topBar;
|
|
5190
5191
|
break;
|
|
5191
5192
|
default:
|
|
5192
5193
|
i = this.innerContainer || this.root;
|
|
@@ -5199,8 +5200,8 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5199
5200
|
value: function(e, i) {
|
|
5200
5201
|
var n = q.formatPluginInfo(e, i), s = n.PLUFGIN, l = n.options, u = this.config.plugins, c = q.checkPluginIfExits(s.pluginName, u);
|
|
5201
5202
|
!c && u.push(s);
|
|
5202
|
-
var
|
|
5203
|
-
|
|
5203
|
+
var h = q.getRootByConfig(s.pluginName, this.config);
|
|
5204
|
+
h.root && (l.root = h.root), h.position && (l.position = h.position);
|
|
5204
5205
|
var g = l.position ? l.position : l.config && l.config.position || s.defaultConfig && s.defaultConfig.position;
|
|
5205
5206
|
return !l.root && typeof g == "string" && g.indexOf("controls") > -1 ? this.controls && this.controls.registerPlugin(s, l, s.pluginName) : (l.root || (l.root = this._getRootByPosition(g)), q.register(this, s, l));
|
|
5206
5207
|
}
|
|
@@ -5242,18 +5243,18 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5242
5243
|
}, {
|
|
5243
5244
|
key: "addClass",
|
|
5244
5245
|
value: function(e) {
|
|
5245
|
-
this.root && (
|
|
5246
|
+
this.root && (f.hasClass(this.root, e) || f.addClass(this.root, e));
|
|
5246
5247
|
}
|
|
5247
5248
|
}, {
|
|
5248
5249
|
key: "removeClass",
|
|
5249
5250
|
value: function(e) {
|
|
5250
|
-
this.root &&
|
|
5251
|
+
this.root && f.removeClass(this.root, e);
|
|
5251
5252
|
}
|
|
5252
5253
|
}, {
|
|
5253
5254
|
key: "hasClass",
|
|
5254
5255
|
value: function(e) {
|
|
5255
5256
|
if (this.root)
|
|
5256
|
-
return
|
|
5257
|
+
return f.hasClass(this.root, e);
|
|
5257
5258
|
}
|
|
5258
5259
|
}, {
|
|
5259
5260
|
key: "setAttribute",
|
|
@@ -5284,13 +5285,13 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5284
5285
|
key: "switchURL",
|
|
5285
5286
|
value: function(e, i) {
|
|
5286
5287
|
var n = this, s = e;
|
|
5287
|
-
|
|
5288
|
+
f.typeOf(e) === "Object" && (s = e.url), s = this._preProcessUrl(s).url;
|
|
5288
5289
|
var l = this.currentTime;
|
|
5289
5290
|
this.__startTime = l;
|
|
5290
5291
|
var u = this.paused && !this.isError;
|
|
5291
|
-
return this.src = s, new Promise(function(c,
|
|
5292
|
+
return this.src = s, new Promise(function(c, h) {
|
|
5292
5293
|
var g = function(v) {
|
|
5293
|
-
n.off("timeupdate", p), n.off("canplay", p),
|
|
5294
|
+
n.off("timeupdate", p), n.off("canplay", p), h(v);
|
|
5294
5295
|
}, p = function() {
|
|
5295
5296
|
n.duration > 0 && n.__startTime > 0 && (n.currentTime = n.__startTime, n.__startTime = -1), u && n.pause(), n.off("error", g), c(!0);
|
|
5296
5297
|
};
|
|
@@ -5301,7 +5302,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5301
5302
|
});
|
|
5302
5303
|
return;
|
|
5303
5304
|
}
|
|
5304
|
-
|
|
5305
|
+
B.os.isAndroid ? n.once("timeupdate", p) : n.once("canplay", p), n.play();
|
|
5305
5306
|
});
|
|
5306
5307
|
}
|
|
5307
5308
|
}, {
|
|
@@ -5314,38 +5315,38 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5314
5315
|
value: function() {
|
|
5315
5316
|
var e = this;
|
|
5316
5317
|
if (!this.hasStart && this.state < U.ATTACHED) {
|
|
5317
|
-
this.removeClass(
|
|
5318
|
+
this.removeClass(b.NO_START), this.addClass(b.ENTER), this.start(), this._useAutoplay = !0;
|
|
5318
5319
|
return;
|
|
5319
5320
|
}
|
|
5320
|
-
this.state < U.RUNNING && (this.removeClass(
|
|
5321
|
-
var i =
|
|
5321
|
+
this.state < U.RUNNING && (this.removeClass(b.NO_START), !this.isCanplay && this.addClass(b.ENTER));
|
|
5322
|
+
var i = M(O(r.prototype), "play", this).call(this);
|
|
5322
5323
|
return i !== void 0 && i && i.then ? i.then(function() {
|
|
5323
|
-
e.removeClass(
|
|
5324
|
+
e.removeClass(b.NOT_ALLOW_AUTOPLAY), e.addClass(b.PLAYING), e.state < U.RUNNING && (H.logInfo(">>>>playPromise.then"), e.setState(U.RUNNING), e.emit(Ne));
|
|
5324
5325
|
}).catch(function(n) {
|
|
5325
5326
|
if (H.logWarn(">>>>playPromise.catch", n.name), e.media && e.media.error) {
|
|
5326
|
-
e.onError(), e.removeClass(
|
|
5327
|
+
e.onError(), e.removeClass(b.ENTER);
|
|
5327
5328
|
return;
|
|
5328
5329
|
}
|
|
5329
|
-
n.name === "NotAllowedError" && (e._errorTimer =
|
|
5330
|
-
e._errorTimer = null, e.emit(ri), e.addClass(
|
|
5330
|
+
n.name === "NotAllowedError" && (e._errorTimer = f.setTimeout(e, function() {
|
|
5331
|
+
e._errorTimer = null, e.emit(ri), e.addClass(b.NOT_ALLOW_AUTOPLAY), e.removeClass(b.ENTER), e.pause(), e.setState(U.NOTALLOW);
|
|
5331
5332
|
}, 0));
|
|
5332
|
-
}) : (H.logWarn("video.play not return promise"), this.state < U.RUNNING && (this.setState(U.RUNNING), this.removeClass(
|
|
5333
|
+
}) : (H.logWarn("video.play not return promise"), this.state < U.RUNNING && (this.setState(U.RUNNING), this.removeClass(b.NOT_ALLOW_AUTOPLAY), this.removeClass(b.NO_START), this.removeClass(b.ENTER), this.addClass(b.PLAYING), this.emit(Ne))), i;
|
|
5333
5334
|
}
|
|
5334
5335
|
}, {
|
|
5335
5336
|
key: "mediaPause",
|
|
5336
5337
|
value: function() {
|
|
5337
|
-
|
|
5338
|
+
M(O(r.prototype), "pause", this).call(this);
|
|
5338
5339
|
}
|
|
5339
5340
|
}, {
|
|
5340
5341
|
key: "videoPause",
|
|
5341
5342
|
value: function() {
|
|
5342
|
-
|
|
5343
|
+
M(O(r.prototype), "pause", this).call(this);
|
|
5343
5344
|
}
|
|
5344
5345
|
}, {
|
|
5345
5346
|
key: "play",
|
|
5346
5347
|
value: function() {
|
|
5347
5348
|
var e = this;
|
|
5348
|
-
return this.removeClass(
|
|
5349
|
+
return this.removeClass(b.PAUSED), me(this, "play", function() {
|
|
5349
5350
|
return e.mediaPlay();
|
|
5350
5351
|
});
|
|
5351
5352
|
}
|
|
@@ -5354,7 +5355,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5354
5355
|
value: function() {
|
|
5355
5356
|
var e = this;
|
|
5356
5357
|
me(this, "pause", function() {
|
|
5357
|
-
|
|
5358
|
+
M(O(r.prototype), "pause", e).call(e);
|
|
5358
5359
|
});
|
|
5359
5360
|
}
|
|
5360
5361
|
}, {
|
|
@@ -5364,7 +5365,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5364
5365
|
if (!(!this.media || Number.isNaN(Number(e)) || !this.hasStart)) {
|
|
5365
5366
|
var s = this.config, l = s.isSeekedPlay, u = s.seekedStatus, c = i || (l ? "play" : u);
|
|
5366
5367
|
e = e < 0 ? 0 : e > this.duration ? parseInt(this.duration, 10) : e, !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1), this._onceSeekCanplay && this.off(_e, this._onceSeekCanplay), this._onceSeekCanplay = function() {
|
|
5367
|
-
switch (n.removeClass(
|
|
5368
|
+
switch (n.removeClass(b.ENTER), n.isSeeking = !1, c) {
|
|
5368
5369
|
case "play":
|
|
5369
5370
|
n.play();
|
|
5370
5371
|
break;
|
|
@@ -5375,7 +5376,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5375
5376
|
n._isPauseBeforeSeek > 1 || n.paused ? n.pause() : n.play();
|
|
5376
5377
|
}
|
|
5377
5378
|
n._isPauseBeforeSeek = 0, n._onceSeekCanplay = null;
|
|
5378
|
-
}, this.once(_e, this._onceSeekCanplay), this.state < U.RUNNING ? (this.removeClass(
|
|
5379
|
+
}, this.once(_e, this._onceSeekCanplay), this.state < U.RUNNING ? (this.removeClass(b.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
|
|
5379
5380
|
}
|
|
5380
5381
|
}
|
|
5381
5382
|
}, {
|
|
@@ -5422,10 +5423,10 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5422
5423
|
}, {
|
|
5423
5424
|
key: "resetState",
|
|
5424
5425
|
value: function() {
|
|
5425
|
-
var e = this, i =
|
|
5426
|
+
var e = this, i = b.NOT_ALLOW_AUTOPLAY, n = b.PLAYING, s = b.NO_START, l = b.PAUSED, u = b.REPLAY, c = b.ENTER, h = b.ENDED, g = b.ERROR, p = b.LOADING, d = [i, n, s, l, u, c, h, g, p];
|
|
5426
5427
|
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, d.forEach(function(v) {
|
|
5427
5428
|
e.removeClass(v);
|
|
5428
|
-
}), this.addClass(
|
|
5429
|
+
}), this.addClass(b.NO_START), this.emit(Et);
|
|
5429
5430
|
}
|
|
5430
5431
|
}, {
|
|
5431
5432
|
key: "reset",
|
|
@@ -5447,14 +5448,14 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5447
5448
|
value: function() {
|
|
5448
5449
|
var e, i = this, n = this.innerContainer, s = this.root, l = this.media;
|
|
5449
5450
|
if (!(!s || !l)) {
|
|
5450
|
-
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(Oe), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media),
|
|
5451
|
+
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(Oe), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media), f.clearAllTimers(this), this.emit(si), (e = Ce) === null || e === void 0 || e.remove(this), q.destroy(this), mn(this), M(O(r.prototype), "destroy", this).call(this), this.fullscreen && this._fullscreenEl === this.root && this.exitFullscreen(), n)
|
|
5451
5452
|
for (var u = n.children, c = 0; c < u.length; c++)
|
|
5452
5453
|
n.removeChild(u[c]);
|
|
5453
5454
|
!n && l instanceof window.Node && s.contains(l) && s.removeChild(l), ["topBar", "leftBar", "rightBar", "innerContainer"].map(function(g) {
|
|
5454
5455
|
i[g] && s.removeChild(i[g]), i[g] = null;
|
|
5455
5456
|
});
|
|
5456
|
-
var
|
|
5457
|
-
|
|
5457
|
+
var h = s.className.split(" ");
|
|
5458
|
+
h.length > 0 ? s.className = h.filter(function(g) {
|
|
5458
5459
|
return g.indexOf("xgplayer") < 0;
|
|
5459
5460
|
}).join(" ") : s.className = "", this.removeAttribute("data-xgfill"), ["isSeeking", "isCanplay", "isActive", "cssfullscreen", "fullscreen"].forEach(function(g) {
|
|
5460
5461
|
i[g] = !1;
|
|
@@ -5465,7 +5466,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5465
5466
|
key: "replay",
|
|
5466
5467
|
value: function() {
|
|
5467
5468
|
var e = this;
|
|
5468
|
-
this.removeClass(
|
|
5469
|
+
this.removeClass(b.ENDED), this.currentTime = 0, this.isSeeking = !1, me(this, "replay", function() {
|
|
5469
5470
|
e.once(_e, function() {
|
|
5470
5471
|
var i = e.mediaPlay();
|
|
5471
5472
|
i && i.catch && i.catch(function(n) {
|
|
@@ -5478,8 +5479,8 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5478
5479
|
key: "retry",
|
|
5479
5480
|
value: function() {
|
|
5480
5481
|
var e = this;
|
|
5481
|
-
this.removeClass(
|
|
5482
|
-
var i = e.currentTime, n = e.config.url, s =
|
|
5482
|
+
this.removeClass(b.ERROR), this.addClass(b.LOADING), me(this, "retry", function() {
|
|
5483
|
+
var i = e.currentTime, n = e.config.url, s = f.isMSE(e.media) ? {
|
|
5483
5484
|
url: n
|
|
5484
5485
|
} : e._preProcessUrl(n);
|
|
5485
5486
|
e.src = s.url, !e.config.isLive && (e.currentTime = i), e.once(ye, function() {
|
|
@@ -5490,22 +5491,22 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5490
5491
|
}, {
|
|
5491
5492
|
key: "changeFullStyle",
|
|
5492
5493
|
value: function(e, i, n, s) {
|
|
5493
|
-
e && (s || (s =
|
|
5494
|
+
e && (s || (s = b.PARENT_FULLSCREEN), this._orgCss || (this._orgCss = f.filterStyleFromText(e)), f.addClass(e, n), i && i !== e && !this._orgPCss && (this._orgPCss = f.filterStyleFromText(i), f.addClass(i, s), i.setAttribute(Oe, this.playerId)));
|
|
5494
5495
|
}
|
|
5495
5496
|
}, {
|
|
5496
5497
|
key: "recoverFullStyle",
|
|
5497
5498
|
value: function(e, i, n, s) {
|
|
5498
|
-
s || (s =
|
|
5499
|
+
s || (s = b.PARENT_FULLSCREEN), this._orgCss && (f.setStyleFromCsstext(e, this._orgCss), this._orgCss = ""), f.removeClass(e, n), i && i !== e && this._orgPCss && (f.setStyleFromCsstext(i, this._orgPCss), this._orgPCss = "", f.removeClass(i, s), i.removeAttribute(Oe));
|
|
5499
5500
|
}
|
|
5500
5501
|
}, {
|
|
5501
5502
|
key: "getFullscreen",
|
|
5502
5503
|
value: function() {
|
|
5503
5504
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget, i = this.root, n = this.media;
|
|
5504
5505
|
(e === "video" || e === "media") && (e = this[e]), e || (e = i), this._fullScreenOffset = {
|
|
5505
|
-
top:
|
|
5506
|
-
left:
|
|
5506
|
+
top: f.scrollTop(),
|
|
5507
|
+
left: f.scrollLeft()
|
|
5507
5508
|
}, this._fullscreenEl = e, this._fullActionFrom = "get";
|
|
5508
|
-
var s =
|
|
5509
|
+
var s = f.getFullScreenEl();
|
|
5509
5510
|
if (s === this._fullscreenEl)
|
|
5510
5511
|
return this.onFullscreenChange(), Promise.resolve();
|
|
5511
5512
|
try {
|
|
@@ -5524,7 +5525,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5524
5525
|
}, {
|
|
5525
5526
|
key: "exitFullscreen",
|
|
5526
5527
|
value: function(e) {
|
|
5527
|
-
if (this.isRotateFullscreen && this.exitRotateFullscreen(), !(!this._fullscreenEl && !
|
|
5528
|
+
if (this.isRotateFullscreen && this.exitRotateFullscreen(), !(!this._fullscreenEl && !f.getFullScreenEl())) {
|
|
5528
5529
|
this.root;
|
|
5529
5530
|
var i = this.media;
|
|
5530
5531
|
this._fullActionFrom = "exit";
|
|
@@ -5547,7 +5548,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5547
5548
|
value: function() {
|
|
5548
5549
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5549
5550
|
this.isRotateFullscreen ? this.exitRotateFullscreen() : this.fullscreen && this.exitFullscreen();
|
|
5550
|
-
var i = e ? "".concat(
|
|
5551
|
+
var i = e ? "".concat(b.INNER_FULLSCREEN, " ").concat(b.CSS_FULLSCREEN) : b.CSS_FULLSCREEN;
|
|
5551
5552
|
this.changeFullStyle(this.root, e, i);
|
|
5552
5553
|
var n = this.config.fullscreen, s = n === void 0 ? {} : n, l = s.useCssFullscreen === !0 || typeof s.useCssFullscreen == "function" && s.useCssFullscreen();
|
|
5553
5554
|
l && (this.fullscreen = !0, this.emit(ve, !0)), this._cssfullscreenEl = e, this.cssfullscreen = !0, this.emit(gt, !0);
|
|
@@ -5555,7 +5556,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5555
5556
|
}, {
|
|
5556
5557
|
key: "exitCssFullscreen",
|
|
5557
5558
|
value: function() {
|
|
5558
|
-
var e = this._cssfullscreenEl ? "".concat(
|
|
5559
|
+
var e = this._cssfullscreenEl ? "".concat(b.INNER_FULLSCREEN, " ").concat(b.CSS_FULLSCREEN) : b.CSS_FULLSCREEN;
|
|
5559
5560
|
if (!this.fullscreen)
|
|
5560
5561
|
this.recoverFullStyle(this.root, this._cssfullscreenEl, e);
|
|
5561
5562
|
else {
|
|
@@ -5569,14 +5570,14 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5569
5570
|
value: function() {
|
|
5570
5571
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5571
5572
|
this.cssfullscreen && this.exitCssFullscreen(e);
|
|
5572
|
-
var i = e ? "".concat(
|
|
5573
|
-
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i,
|
|
5573
|
+
var i = e ? "".concat(b.INNER_FULLSCREEN, " ").concat(b.ROTATE_FULLSCREEN) : b.ROTATE_FULLSCREEN;
|
|
5574
|
+
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i, b.PARENT_ROTATE_FULLSCREEN), this.isRotateFullscreen = !0, this.fullscreen = !0, this.setRotateDeg(90), this._rootStyle = this.root.getAttribute("style"), this.root.style.width = "".concat(window.innerHeight, "px"), this.emit(ve, !0);
|
|
5574
5575
|
}
|
|
5575
5576
|
}, {
|
|
5576
5577
|
key: "exitRotateFullscreen",
|
|
5577
5578
|
value: function(e) {
|
|
5578
|
-
var i = this._fullscreenEl !== this.root ? "".concat(
|
|
5579
|
-
this.recoverFullStyle(this.root, this._fullscreenEl, i,
|
|
5579
|
+
var i = this._fullscreenEl !== this.root ? "".concat(b.INNER_FULLSCREEN, " ").concat(b.ROTATE_FULLSCREEN) : b.ROTATE_FULLSCREEN;
|
|
5580
|
+
this.recoverFullStyle(this.root, this._fullscreenEl, i, b.PARENT_ROTATE_FULLSCREEN), this.isRotateFullscreen = !1, this.fullscreen = !1, this.setRotateDeg(0), this.emit(ve, !1), this._rootStyle && (this.root.style.style = this._rootStyle, this._rootStyle = !1);
|
|
5580
5581
|
}
|
|
5581
5582
|
}, {
|
|
5582
5583
|
key: "setRotateDeg",
|
|
@@ -5621,12 +5622,12 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5621
5622
|
autoHide: !0,
|
|
5622
5623
|
delay: 3e3
|
|
5623
5624
|
}, n = this.innerStates;
|
|
5624
|
-
if (this.isActive = !0, this.removeClass(
|
|
5625
|
+
if (this.isActive = !0, this.removeClass(b.INACTIVE), this._clearUserTimer(), i.isLock !== void 0 && (n.isActiveLocked = i.isLock), i.autoHide === !1 || i.isLock === !0 || n.isActiveLocked) {
|
|
5625
5626
|
this._clearUserTimer();
|
|
5626
5627
|
return;
|
|
5627
5628
|
}
|
|
5628
5629
|
var s = i && i.delay ? i.delay : this.config.inactive;
|
|
5629
|
-
this.userTimer =
|
|
5630
|
+
this.userTimer = f.setTimeout(this, function() {
|
|
5630
5631
|
e.userTimer = null, e.blur();
|
|
5631
5632
|
}, s);
|
|
5632
5633
|
}
|
|
@@ -5636,7 +5637,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5636
5637
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = e.ignorePaused, n = i === void 0 ? !1 : i;
|
|
5637
5638
|
if (!this.innerStates.isActiveLocked) {
|
|
5638
5639
|
var s = this.config.closePauseVideoFocus;
|
|
5639
|
-
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(
|
|
5640
|
+
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(b.INACTIVE);
|
|
5640
5641
|
}
|
|
5641
5642
|
}
|
|
5642
5643
|
}, {
|
|
@@ -5647,7 +5648,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5647
5648
|
}, {
|
|
5648
5649
|
key: "onCanplay",
|
|
5649
5650
|
value: function() {
|
|
5650
|
-
this.removeClass(
|
|
5651
|
+
this.removeClass(b.ENTER), this.removeClass(b.ERROR), this.removeClass(b.LOADING), this.isCanplay = !0, this.waitTimer && f.clearTimeout(this, this.waitTimer);
|
|
5651
5652
|
}
|
|
5652
5653
|
}, {
|
|
5653
5654
|
key: "onLoadeddata",
|
|
@@ -5657,44 +5658,44 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5657
5658
|
}, {
|
|
5658
5659
|
key: "onLoadstart",
|
|
5659
5660
|
value: function() {
|
|
5660
|
-
this.removeClass(
|
|
5661
|
+
this.removeClass(b.ERROR), this.isCanplay = !1;
|
|
5661
5662
|
}
|
|
5662
5663
|
}, {
|
|
5663
5664
|
key: "onPlay",
|
|
5664
5665
|
value: function() {
|
|
5665
|
-
this.state === U.ENDED && this.setState(U.RUNNING), this.removeClass(
|
|
5666
|
+
this.state === U.ENDED && this.setState(U.RUNNING), this.removeClass(b.PAUSED), this.ended && this.removeClass(b.ENDED), !this.config.closePlayVideoFocus && this.focus();
|
|
5666
5667
|
}
|
|
5667
5668
|
}, {
|
|
5668
5669
|
key: "onPause",
|
|
5669
5670
|
value: function() {
|
|
5670
|
-
this.addClass(
|
|
5671
|
+
this.addClass(b.PAUSED), this.updateAcc("pause"), this.config.closePauseVideoFocus || (this._clearUserTimer(), this.focus());
|
|
5671
5672
|
}
|
|
5672
5673
|
}, {
|
|
5673
5674
|
key: "onEnded",
|
|
5674
5675
|
value: function() {
|
|
5675
|
-
this.updateAcc("ended"), this.addClass(
|
|
5676
|
+
this.updateAcc("ended"), this.addClass(b.ENDED), this.setState(U.ENDED);
|
|
5676
5677
|
}
|
|
5677
5678
|
}, {
|
|
5678
5679
|
key: "onError",
|
|
5679
5680
|
value: function() {
|
|
5680
|
-
this.isError = !0, this.updateAcc("error"), this.removeClass(
|
|
5681
|
+
this.isError = !0, this.updateAcc("error"), this.removeClass(b.NOT_ALLOW_AUTOPLAY), this.removeClass(b.NO_START), this.removeClass(b.ENTER), this.removeClass(b.LOADING), this.addClass(b.ERROR);
|
|
5681
5682
|
}
|
|
5682
5683
|
}, {
|
|
5683
5684
|
key: "onSeeking",
|
|
5684
5685
|
value: function() {
|
|
5685
|
-
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(
|
|
5686
|
+
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(b.SEEKING);
|
|
5686
5687
|
}
|
|
5687
5688
|
}, {
|
|
5688
5689
|
key: "onSeeked",
|
|
5689
5690
|
value: function() {
|
|
5690
|
-
this.isSeeking = !1, this.waitTimer &&
|
|
5691
|
+
this.isSeeking = !1, this.waitTimer && f.clearTimeout(this, this.waitTimer), this.removeClass(b.LOADING), this.removeClass(b.SEEKING);
|
|
5691
5692
|
}
|
|
5692
5693
|
}, {
|
|
5693
5694
|
key: "onWaiting",
|
|
5694
5695
|
value: function() {
|
|
5695
5696
|
var e = this;
|
|
5696
|
-
this.waitTimer &&
|
|
5697
|
-
e.addClass(
|
|
5697
|
+
this.waitTimer && f.clearTimeout(this, this.waitTimer), this.updateAcc("waiting"), this.waitTimer = f.setTimeout(this, function() {
|
|
5698
|
+
e.addClass(b.LOADING), e.emit(on), f.clearTimeout(e, e.waitTimer), e.waitTimer = null;
|
|
5698
5699
|
}, this.config.minWaitDelay);
|
|
5699
5700
|
}
|
|
5700
5701
|
}, {
|
|
@@ -5702,20 +5703,20 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5702
5703
|
value: function() {
|
|
5703
5704
|
var e = this;
|
|
5704
5705
|
this.isError = !1;
|
|
5705
|
-
var i =
|
|
5706
|
-
|
|
5706
|
+
var i = b.NO_START, n = b.PAUSED, s = b.ENDED, l = b.ERROR, u = b.REPLAY, c = b.LOADING, h = [i, n, s, l, u, c];
|
|
5707
|
+
h.forEach(function(g) {
|
|
5707
5708
|
e.removeClass(g);
|
|
5708
5709
|
}), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5709
5710
|
}
|
|
5710
5711
|
}, {
|
|
5711
5712
|
key: "onTimeupdate",
|
|
5712
5713
|
value: function() {
|
|
5713
|
-
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(
|
|
5714
|
+
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(b.LOADING)) && this.media.readyState > 2 && (this.removeClass(b.LOADING), f.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state === U.NOTALLOW && this.duration && (this.setState(U.RUNNING), this.emit(Ne)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5714
5715
|
}
|
|
5715
5716
|
}, {
|
|
5716
5717
|
key: "onVolumechange",
|
|
5717
5718
|
value: function() {
|
|
5718
|
-
|
|
5719
|
+
f.typeOf(this.config.volume) === "Number" && (this.config.volume = this.volume);
|
|
5719
5720
|
}
|
|
5720
5721
|
}, {
|
|
5721
5722
|
key: "onRatechange",
|
|
@@ -5726,8 +5727,8 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5726
5727
|
key: "emitUserAction",
|
|
5727
5728
|
value: function(e, i, n) {
|
|
5728
5729
|
if (!(!this.media || !i || !e)) {
|
|
5729
|
-
var s =
|
|
5730
|
-
n.props &&
|
|
5730
|
+
var s = f.typeOf(e) === "String" ? e : e.type || "";
|
|
5731
|
+
n.props && f.typeOf(n.props) !== "Array" && (n.props = [n.props]), this.emit(mt, G({
|
|
5731
5732
|
eventType: s,
|
|
5732
5733
|
action: i,
|
|
5733
5734
|
currentTime: this.currentTime,
|
|
@@ -5751,11 +5752,11 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5751
5752
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
5752
5753
|
startDiff: 0,
|
|
5753
5754
|
endDiff: 0
|
|
5754
|
-
}, n = i || {}, s = n.startDiff, l = s === void 0 ? 0 : s, u = n.endDiff, c = u === void 0 ? 0 : u,
|
|
5755
|
-
if (!
|
|
5755
|
+
}, n = i || {}, s = n.startDiff, l = s === void 0 ? 0 : s, u = n.endDiff, c = u === void 0 ? 0 : u, h = this.media.buffered;
|
|
5756
|
+
if (!h || h.length === 0 || !this.duration)
|
|
5756
5757
|
return !0;
|
|
5757
|
-
for (var g = e || this.media.currentTime || 0.2, p =
|
|
5758
|
-
if (
|
|
5758
|
+
for (var g = e || this.media.currentTime || 0.2, p = h.length, d = 0; d < p; d++)
|
|
5759
|
+
if (h.start(d) + l <= g && h.end(d) - c > g)
|
|
5759
5760
|
return !0;
|
|
5760
5761
|
return !1;
|
|
5761
5762
|
}
|
|
@@ -5767,18 +5768,18 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5767
5768
|
var c = this.videoPos._pi;
|
|
5768
5769
|
if (!c && this.media.videoHeight && (c = this.media.videoWidth / this.media.videoHeight * 100), !!c) {
|
|
5769
5770
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
5770
|
-
var
|
|
5771
|
+
var h = {
|
|
5771
5772
|
rotate: u
|
|
5772
|
-
}, g = 0, p = 0, d = 1, v = Math.abs(u / 90), y = this.root,
|
|
5773
|
+
}, g = 0, p = 0, d = 1, v = Math.abs(u / 90), y = this.root, C = this.innerContainer, w = y.offsetWidth, k = C ? C.offsetHeight : y.offsetHeight, N = k, R = w;
|
|
5773
5774
|
if (v % 2 === 0)
|
|
5774
|
-
d = s > 0 ? 100 / s : l > 0 ? 100 / l : 1,
|
|
5775
|
+
d = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = d, g = i > 0 ? (100 - s) / 2 - i : 0, h.y = v === 2 ? 0 - g : g, p = n > 0 ? (100 - l) / 2 - n : 0, h.x = v === 2 ? 0 - p : p, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(N, "px");
|
|
5775
5776
|
else if (v % 2 === 1) {
|
|
5776
|
-
|
|
5777
|
-
var
|
|
5778
|
-
p = -
|
|
5777
|
+
R = k, N = w;
|
|
5778
|
+
var z = k - w;
|
|
5779
|
+
p = -z / 2 / R * 100, h.x = v === 3 ? p + i / 2 : p - i / 2, g = z / 2 / N * 100, h.y = v === 3 ? g + n / 2 : g - n / 2, h.scale = d, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(N, "px");
|
|
5779
5780
|
}
|
|
5780
|
-
var
|
|
5781
|
-
this.media.style.transform =
|
|
5781
|
+
var F = f.getTransformStyle(h, this.media.style.transform || this.media.style.webkitTransform);
|
|
5782
|
+
this.media.style.transform = F, this.media.style.webkitTransform = F;
|
|
5782
5783
|
}
|
|
5783
5784
|
}
|
|
5784
5785
|
}
|
|
@@ -5804,7 +5805,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5804
5805
|
if (n !== "plugins") {
|
|
5805
5806
|
i.config[n] = e[n];
|
|
5806
5807
|
var s = i.plugins[n.toLowerCase()];
|
|
5807
|
-
s &&
|
|
5808
|
+
s && f.typeOf(s.setConfig) === "Function" && s.setConfig(e[n]);
|
|
5808
5809
|
}
|
|
5809
5810
|
});
|
|
5810
5811
|
}
|
|
@@ -5823,21 +5824,21 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5823
5824
|
if (this.media) {
|
|
5824
5825
|
var i = this.root.getBoundingClientRect();
|
|
5825
5826
|
this.sizeInfo.width = i.width, this.sizeInfo.height = i.height, this.sizeInfo.left = i.left, this.sizeInfo.top = i.top;
|
|
5826
|
-
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize,
|
|
5827
|
-
if ((
|
|
5827
|
+
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
5828
|
+
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
5828
5829
|
this._videoHeight = l, this._videoWidth = s;
|
|
5829
|
-
var g = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, p = i.width, d = i.height - g, v = parseInt(s / l * 1e3, 10), y = parseInt(p / d * 1e3, 10),
|
|
5830
|
-
c === "auto" && y > v || c === "fixWidth" ? (
|
|
5831
|
-
e.root.style[
|
|
5832
|
-
}), (
|
|
5833
|
-
var
|
|
5830
|
+
var g = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, p = i.width, d = i.height - g, v = parseInt(s / l * 1e3, 10), y = parseInt(p / d * 1e3, 10), C = p, w = d, k = {};
|
|
5831
|
+
c === "auto" && y > v || c === "fixWidth" ? (w = p / v * 1e3, this.config.fluid ? k.paddingTop = "".concat(w * 100 / C, "%") : k.height = "".concat(w + g, "px")) : (c === "auto" && y < v || c === "fixHeight") && (C = v * d / 1e3, k.width = "".concat(C, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(k).forEach(function(R) {
|
|
5832
|
+
e.root.style[R] = k[R];
|
|
5833
|
+
}), (h === "fillHeight" && y < v || h === "fillWidth" && y > v) && this.setAttribute("data-xgfill", "cover");
|
|
5834
|
+
var N = {
|
|
5834
5835
|
videoScale: v,
|
|
5835
|
-
vWidth:
|
|
5836
|
-
vHeight:
|
|
5837
|
-
cWidth:
|
|
5838
|
-
cHeight:
|
|
5836
|
+
vWidth: C,
|
|
5837
|
+
vHeight: w,
|
|
5838
|
+
cWidth: C,
|
|
5839
|
+
cHeight: w + g
|
|
5839
5840
|
};
|
|
5840
|
-
this.resizePosition(), this.emit(Se,
|
|
5841
|
+
this.resizePosition(), this.emit(Se, N);
|
|
5841
5842
|
}
|
|
5842
5843
|
}
|
|
5843
5844
|
}
|
|
@@ -5860,7 +5861,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5860
5861
|
key: "_preProcessUrl",
|
|
5861
5862
|
value: function(e, i) {
|
|
5862
5863
|
var n = this.config, s = n.preProcessUrl, l = n.preProcessUrlOptions, u = Object.assign({}, l, i);
|
|
5863
|
-
return !
|
|
5864
|
+
return !f.isBlob(e) && typeof s == "function" ? s(e, u) : {
|
|
5864
5865
|
url: e
|
|
5865
5866
|
};
|
|
5866
5867
|
}
|
|
@@ -5977,18 +5978,18 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
5977
5978
|
}, {
|
|
5978
5979
|
key: "readyState",
|
|
5979
5980
|
get: function() {
|
|
5980
|
-
return
|
|
5981
|
+
return M(O(r.prototype), "readyState", this);
|
|
5981
5982
|
}
|
|
5982
5983
|
}, {
|
|
5983
5984
|
key: "error",
|
|
5984
5985
|
get: function() {
|
|
5985
|
-
var e =
|
|
5986
|
+
var e = M(O(r.prototype), "error", this);
|
|
5986
5987
|
return this.i18n[e] || e;
|
|
5987
5988
|
}
|
|
5988
5989
|
}, {
|
|
5989
5990
|
key: "networkState",
|
|
5990
5991
|
get: function() {
|
|
5991
|
-
return
|
|
5992
|
+
return M(O(r.prototype), "networkState", this);
|
|
5992
5993
|
}
|
|
5993
5994
|
}, {
|
|
5994
5995
|
key: "fullscreenChanging",
|
|
@@ -6015,7 +6016,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
6015
6016
|
return this.videoPos.rotate;
|
|
6016
6017
|
},
|
|
6017
6018
|
set: function(e) {
|
|
6018
|
-
e =
|
|
6019
|
+
e = f.convertDeg(e), !(e % 90 !== 0 || e === this.videoPos.rotate) && (this.videoPos.rotate = e, this.resizePosition());
|
|
6019
6020
|
}
|
|
6020
6021
|
}, {
|
|
6021
6022
|
key: "avgSpeed",
|
|
@@ -6082,7 +6083,7 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
6082
6083
|
key: "setUserActive",
|
|
6083
6084
|
value: function(e, i) {
|
|
6084
6085
|
var n;
|
|
6085
|
-
typeof i == "boolean" && i !== this.muted && (this.addInnerOP("volumechange"),
|
|
6086
|
+
typeof i == "boolean" && i !== this.muted && (this.addInnerOP("volumechange"), f.typeOf(i) === Boolean && (this.muted = i)), (n = Ce) === null || n === void 0 || n.setActive(this.playerId, e);
|
|
6086
6087
|
}
|
|
6087
6088
|
}], [{
|
|
6088
6089
|
key: "debugger",
|
|
@@ -6115,12 +6116,12 @@ var wo = ["play", "pause", "replay", "retry"], Ai = 0, Li = 0, Ce = null, St = /
|
|
|
6115
6116
|
}, {
|
|
6116
6117
|
key: "isHevcSupported",
|
|
6117
6118
|
value: function() {
|
|
6118
|
-
return
|
|
6119
|
+
return B.isHevcSupported();
|
|
6119
6120
|
}
|
|
6120
6121
|
}, {
|
|
6121
6122
|
key: "probeConfigSupported",
|
|
6122
6123
|
value: function(e) {
|
|
6123
|
-
return
|
|
6124
|
+
return B.probeConfigSupported(e);
|
|
6124
6125
|
}
|
|
6125
6126
|
}, {
|
|
6126
6127
|
key: "install",
|
|
@@ -6167,7 +6168,7 @@ var be = {
|
|
|
6167
6168
|
isTimeUpdate: !1,
|
|
6168
6169
|
isFFSend: !1,
|
|
6169
6170
|
isLs: !1
|
|
6170
|
-
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = Q(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer &&
|
|
6171
|
+
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = Q(), 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;
|
|
6171
6172
|
}), _(m(t), "_onSeeking", function() {
|
|
6172
6173
|
t.seekingStart || (t.suspendWaitingStatus("seek"), t.seekingStart = Q(), t.emitLog(be.SEEK_START, {
|
|
6173
6174
|
start: Q()
|
|
@@ -6182,8 +6183,8 @@ var be = {
|
|
|
6182
6183
|
endType: "loadstart"
|
|
6183
6184
|
}));
|
|
6184
6185
|
}), _(m(t), "_onWaiting", function() {
|
|
6185
|
-
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = Q(), t._waitTimer =
|
|
6186
|
-
t._isWaiting && (t.waitingStart = Q(),
|
|
6186
|
+
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = Q(), t._waitTimer = f.setTimeout(m(t), function() {
|
|
6187
|
+
t._isWaiting && (t.waitingStart = Q(), f.clearTimeout(m(t), t._waitTimer), t._waitTimer = null, t._startWaitTimeout(), t.emitLog(be.WAIT_START, {
|
|
6187
6188
|
fixedStart: t.fixedWaitingStart,
|
|
6188
6189
|
start: t.waitingStart,
|
|
6189
6190
|
type: t._waitType,
|
|
@@ -6237,8 +6238,8 @@ var be = {
|
|
|
6237
6238
|
key: "_startWaitTimeout",
|
|
6238
6239
|
value: function() {
|
|
6239
6240
|
var e = this;
|
|
6240
|
-
this._waittTimer &&
|
|
6241
|
-
e.suspendWaitingStatus("timeout"),
|
|
6241
|
+
this._waittTimer && f.clearTimeout(this, this._waittTimer), this._waittTimer = f.setTimeout(this, function() {
|
|
6242
|
+
e.suspendWaitingStatus("timeout"), f.clearTimeout(e, e._waittTimer), e._waittTimer = null;
|
|
6242
6243
|
}, this.config.waitTimeout);
|
|
6243
6244
|
}
|
|
6244
6245
|
}, {
|
|
@@ -6261,7 +6262,7 @@ var be = {
|
|
|
6261
6262
|
}, {
|
|
6262
6263
|
key: "suspendWaitingStatus",
|
|
6263
6264
|
value: function(e) {
|
|
6264
|
-
if (this._waitTimer && (
|
|
6265
|
+
if (this._waitTimer && (f.clearTimeout(this, this._waitTimer), this._waitTimer = null), this._waittTimer && (f.clearTimeout(this, this._waittTimer), this._waittTimer = null), this._isWaiting = !1, !!this.waitingStart) {
|
|
6265
6266
|
var i = Q(), n = i - this.waitingStart, s = i - this.fixedWaitingStart, l = this.config.waitTimeout;
|
|
6266
6267
|
this._isWaiting = !1, this.waitingStart = 0, this.fixedWaitingStart = 0, this.emitLog(be.WAIT_END, {
|
|
6267
6268
|
fixedCostTime: s > l ? l : s,
|
|
@@ -6277,7 +6278,7 @@ var be = {
|
|
|
6277
6278
|
var n = this.player;
|
|
6278
6279
|
this.emit(cn, G({
|
|
6279
6280
|
t: Q(),
|
|
6280
|
-
host:
|
|
6281
|
+
host: f.getHostFromUrl(n.currentSrc),
|
|
6281
6282
|
vtype: n.vtype,
|
|
6282
6283
|
eventType: e,
|
|
6283
6284
|
currentTime: this.player.currentTime,
|
|
@@ -6298,7 +6299,7 @@ var be = {
|
|
|
6298
6299
|
};
|
|
6299
6300
|
}
|
|
6300
6301
|
}]), r;
|
|
6301
|
-
}(
|
|
6302
|
+
}(V);
|
|
6302
6303
|
function Eo() {
|
|
6303
6304
|
return new DOMParser().parseFromString(`<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">
|
|
6304
6305
|
<path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>
|
|
@@ -6322,14 +6323,14 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6322
6323
|
key: "afterCreate",
|
|
6323
6324
|
value: function() {
|
|
6324
6325
|
var e = this;
|
|
6325
|
-
|
|
6326
|
+
V.insert(this.icons.replay, this.root, 0), this.__handleReplay = this.hook("replayClick", function() {
|
|
6326
6327
|
e.player.replay();
|
|
6327
6328
|
}, {
|
|
6328
6329
|
pre: function(n) {
|
|
6329
6330
|
n.preventDefault(), n.stopPropagation();
|
|
6330
6331
|
}
|
|
6331
6332
|
}), this.bind(".xgplayer-replay", ["click", "touchend"], this.__handleReplay), this.on(Be, function() {
|
|
6332
|
-
if (e.playerConfig.loop ||
|
|
6333
|
+
if (e.playerConfig.loop || f.addClass(e.player.root, "replay"), !e.config.disable) {
|
|
6333
6334
|
e.show();
|
|
6334
6335
|
var i = e.root.querySelector("path");
|
|
6335
6336
|
if (i) {
|
|
@@ -6346,7 +6347,7 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6346
6347
|
}, {
|
|
6347
6348
|
key: "handleReplay",
|
|
6348
6349
|
value: function(e) {
|
|
6349
|
-
e.preventDefault(), e.stopPropagation(), this.player.replay(),
|
|
6350
|
+
e.preventDefault(), e.stopPropagation(), this.player.replay(), f.removeClass(this.player.root, "replay");
|
|
6350
6351
|
}
|
|
6351
6352
|
}, {
|
|
6352
6353
|
key: "show",
|
|
@@ -6388,7 +6389,7 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6388
6389
|
};
|
|
6389
6390
|
}
|
|
6390
6391
|
}]), r;
|
|
6391
|
-
}(
|
|
6392
|
+
}(V), xo = /* @__PURE__ */ function(a) {
|
|
6392
6393
|
L(r, a);
|
|
6393
6394
|
var o = D(r);
|
|
6394
6395
|
function r() {
|
|
@@ -6405,12 +6406,12 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6405
6406
|
}, {
|
|
6406
6407
|
key: "hide",
|
|
6407
6408
|
value: function() {
|
|
6408
|
-
|
|
6409
|
+
f.addClass(this.root, "hide");
|
|
6409
6410
|
}
|
|
6410
6411
|
}, {
|
|
6411
6412
|
key: "show",
|
|
6412
6413
|
value: function(e) {
|
|
6413
|
-
|
|
6414
|
+
f.removeClass(this.root, "hide");
|
|
6414
6415
|
}
|
|
6415
6416
|
}, {
|
|
6416
6417
|
key: "beforeCreate",
|
|
@@ -6422,15 +6423,15 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6422
6423
|
value: function() {
|
|
6423
6424
|
var e = this;
|
|
6424
6425
|
this.on(Be, function() {
|
|
6425
|
-
e.isEndedShow &&
|
|
6426
|
+
e.isEndedShow && f.removeClass(e.root, "hide");
|
|
6426
6427
|
}), this.config.hideCanplay ? (this.once(oe, function() {
|
|
6427
6428
|
e.onTimeUpdate();
|
|
6428
6429
|
}), this.on(Tt, function() {
|
|
6429
|
-
|
|
6430
|
+
f.removeClass(e.root, "hide"), f.addClass(e.root, "xg-showplay"), e.once(oe, function() {
|
|
6430
6431
|
e.onTimeUpdate();
|
|
6431
6432
|
});
|
|
6432
6433
|
})) : this.on(ae, function() {
|
|
6433
|
-
|
|
6434
|
+
f.addClass(e.root, "hide");
|
|
6434
6435
|
});
|
|
6435
6436
|
}
|
|
6436
6437
|
}, {
|
|
@@ -6447,7 +6448,7 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6447
6448
|
key: "onTimeUpdate",
|
|
6448
6449
|
value: function() {
|
|
6449
6450
|
var e = this;
|
|
6450
|
-
this.player.currentTime ?
|
|
6451
|
+
this.player.currentTime ? f.removeClass(this.root, "xg-showplay") : this.once(oe, function() {
|
|
6451
6452
|
e.onTimeUpdate();
|
|
6452
6453
|
});
|
|
6453
6454
|
}
|
|
@@ -6478,8 +6479,8 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6478
6479
|
}, {
|
|
6479
6480
|
key: "render",
|
|
6480
6481
|
value: function() {
|
|
6481
|
-
var e = this.config, i = e.poster, n = e.hideCanplay, s = e.fillMode, l = e.notHidden, u = this.getBgSize(s), c = i ? "background-image:url(".concat(i, ");").concat(u) : u,
|
|
6482
|
-
return '<xg-poster class="xgplayer-poster '.concat(
|
|
6482
|
+
var e = this.config, i = e.poster, n = e.hideCanplay, s = e.fillMode, l = e.notHidden, u = this.getBgSize(s), c = i ? "background-image:url(".concat(i, ");").concat(u) : u, h = l ? "xg-not-hidden" : n ? "xg-showplay" : "";
|
|
6483
|
+
return '<xg-poster class="xgplayer-poster '.concat(h, '" style="').concat(c, `">
|
|
6483
6484
|
</xg-poster>`);
|
|
6484
6485
|
}
|
|
6485
6486
|
}], [{
|
|
@@ -6499,7 +6500,7 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6499
6500
|
};
|
|
6500
6501
|
}
|
|
6501
6502
|
}]), r;
|
|
6502
|
-
}(
|
|
6503
|
+
}(V);
|
|
6503
6504
|
function li() {
|
|
6504
6505
|
return new DOMParser().parseFromString(`<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
|
|
6505
6506
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
|
|
@@ -6539,11 +6540,11 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6539
6540
|
return x(this, r), e = o.call(this, t), _(m(e), "onPlayerReset", function() {
|
|
6540
6541
|
e.autoPlayStart = !1;
|
|
6541
6542
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6542
|
-
e.setAttr("data-state", "play"),
|
|
6543
|
+
e.setAttr("data-state", "play"), f.removeClass(e.root, i), e.show();
|
|
6543
6544
|
}), _(m(e), "onAutoplayStart", function() {
|
|
6544
6545
|
if (!e.autoPlayStart) {
|
|
6545
6546
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6546
|
-
|
|
6547
|
+
f.addClass(e.root, i), e.autoPlayStart = !0, e.onPlayPause("play");
|
|
6547
6548
|
}
|
|
6548
6549
|
}), e.autoPlayStart = !1, e;
|
|
6549
6550
|
}
|
|
@@ -6552,10 +6553,10 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6552
6553
|
value: function() {
|
|
6553
6554
|
var e = this, i = this.player, n = this.playerConfig;
|
|
6554
6555
|
this.initIcons(), this.once(ni, function() {
|
|
6555
|
-
n && (n.lang && n.lang === "en" ?
|
|
6556
|
+
n && (n.lang && n.lang === "en" ? f.addClass(i.root, "lang-is-en") : n.lang === "jp" && f.addClass(i.root, "lang-is-jp"));
|
|
6556
6557
|
}), this.on(Ne, this.onAutoplayStart), n.autoplay || this.show(), this.on(ri, function() {
|
|
6557
6558
|
var s = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6558
|
-
e.setAttr("data-state", "play"),
|
|
6559
|
+
e.setAttr("data-state", "play"), f.removeClass(e.root, s), e.show();
|
|
6559
6560
|
}), this.on(ae, function() {
|
|
6560
6561
|
e.onPlayPause("play");
|
|
6561
6562
|
}), this.on(Ze, function() {
|
|
@@ -6597,22 +6598,22 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6597
6598
|
}, {
|
|
6598
6599
|
key: "hide",
|
|
6599
6600
|
value: function() {
|
|
6600
|
-
|
|
6601
|
+
f.addClass(this.root, "hide");
|
|
6601
6602
|
}
|
|
6602
6603
|
}, {
|
|
6603
6604
|
key: "show",
|
|
6604
6605
|
value: function(e) {
|
|
6605
|
-
|
|
6606
|
+
f.removeClass(this.root, "hide");
|
|
6606
6607
|
}
|
|
6607
6608
|
}, {
|
|
6608
6609
|
key: "focusHide",
|
|
6609
6610
|
value: function() {
|
|
6610
|
-
|
|
6611
|
+
f.addClass(this.root, "focus-hide");
|
|
6611
6612
|
}
|
|
6612
6613
|
}, {
|
|
6613
6614
|
key: "recover",
|
|
6614
6615
|
value: function() {
|
|
6615
|
-
|
|
6616
|
+
f.removeClass(this.root, "focus-hide");
|
|
6616
6617
|
}
|
|
6617
6618
|
}, {
|
|
6618
6619
|
key: "switchStatus",
|
|
@@ -6625,17 +6626,17 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6625
6626
|
var i = this;
|
|
6626
6627
|
this._animateId = Io("pauseplay", 400, {
|
|
6627
6628
|
start: function() {
|
|
6628
|
-
|
|
6629
|
+
f.addClass(i.root, "interact"), i.show(), i.switchStatus(!0);
|
|
6629
6630
|
},
|
|
6630
6631
|
end: function() {
|
|
6631
|
-
|
|
6632
|
+
f.removeClass(i.root, "interact"), !e && i.hide(), i._animateId = null;
|
|
6632
6633
|
}
|
|
6633
6634
|
});
|
|
6634
6635
|
}
|
|
6635
6636
|
}, {
|
|
6636
6637
|
key: "endAnimate",
|
|
6637
6638
|
value: function() {
|
|
6638
|
-
|
|
6639
|
+
f.removeClass(this.root, "interact"), Di(this._animateId), this._animateId = null;
|
|
6639
6640
|
}
|
|
6640
6641
|
}, {
|
|
6641
6642
|
key: "switchPausePlay",
|
|
@@ -6706,7 +6707,7 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6706
6707
|
};
|
|
6707
6708
|
}
|
|
6708
6709
|
}]), r;
|
|
6709
|
-
}(
|
|
6710
|
+
}(V), Ao = /* @__PURE__ */ function(a) {
|
|
6710
6711
|
L(r, a);
|
|
6711
6712
|
var o = D(r);
|
|
6712
6713
|
function r() {
|
|
@@ -6715,7 +6716,7 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6715
6716
|
return I(r, [{
|
|
6716
6717
|
key: "render",
|
|
6717
6718
|
value: function() {
|
|
6718
|
-
var e = this.config.innerHtml, i =
|
|
6719
|
+
var e = this.config.innerHtml, i = f.createDom("xg-enter", "", {}, "xgplayer-enter");
|
|
6719
6720
|
if (e && e instanceof window.HTMLElement)
|
|
6720
6721
|
i.appendChild(e);
|
|
6721
6722
|
else if (e && typeof e == "string")
|
|
@@ -6741,7 +6742,7 @@ var Po = /* @__PURE__ */ function(a) {
|
|
|
6741
6742
|
};
|
|
6742
6743
|
}
|
|
6743
6744
|
}]), r;
|
|
6744
|
-
}(
|
|
6745
|
+
}(V);
|
|
6745
6746
|
function Ae(a, o, r) {
|
|
6746
6747
|
try {
|
|
6747
6748
|
return ' <div class="xg-tips '.concat(r ? "hide" : " ", '" lang-key="').concat(a.i18nKeys[o], `">
|
|
@@ -6800,7 +6801,7 @@ var Oi = /* @__PURE__ */ function(a) {
|
|
|
6800
6801
|
};
|
|
6801
6802
|
}
|
|
6802
6803
|
}]), r;
|
|
6803
|
-
}(
|
|
6804
|
+
}(V);
|
|
6804
6805
|
function Ri(a) {
|
|
6805
6806
|
var o = parseFloat(a), r = a.indexOf("%") === -1 && !Number.isNaN(o);
|
|
6806
6807
|
return r && o;
|
|
@@ -6835,10 +6836,10 @@ function Fi(a) {
|
|
|
6835
6836
|
var i = ci[e], n = o[i], s = parseFloat(n);
|
|
6836
6837
|
r[i] = Number.isNaN(s) ? 0 : s;
|
|
6837
6838
|
}
|
|
6838
|
-
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight,
|
|
6839
|
+
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight, h = r.marginTop + r.marginBottom, g = r.borderLeftWidth + r.borderRightWidth, p = r.borderTopWidth + r.borderBottomWidth, d = t, v = Ri(o.width);
|
|
6839
6840
|
v !== !1 && (r.width = v + (d ? 0 : l + g));
|
|
6840
6841
|
var y = Ri(o.height);
|
|
6841
|
-
return y !== !1 && (r.height = y + (d ? 0 : u + p)), r.innerWidth = r.width - (l + g), r.innerHeight = r.height - (u + p), r.outerWidth = r.width + c, r.outerHeight = r.height +
|
|
6842
|
+
return y !== !1 && (r.height = y + (d ? 0 : u + p)), r.innerWidth = r.width - (l + g), r.innerHeight = r.height - (u + p), r.outerWidth = r.width + c, r.outerHeight = r.height + h, r;
|
|
6842
6843
|
}
|
|
6843
6844
|
}
|
|
6844
6845
|
function Rt(a, o) {
|
|
@@ -7006,8 +7007,8 @@ var Ft = {
|
|
|
7006
7007
|
key: "dragMove",
|
|
7007
7008
|
value: function(e, i) {
|
|
7008
7009
|
if (e = e || window.event, !!this.isDown) {
|
|
7009
|
-
var n = this.startPos, s = n.x, l = n.y, u = this._dragPointerMove(e, i), c = u.x,
|
|
7010
|
-
c = this.checkContain("x", c, s),
|
|
7010
|
+
var n = this.startPos, s = n.x, l = n.y, u = this._dragPointerMove(e, i), c = u.x, h = u.y;
|
|
7011
|
+
c = this.checkContain("x", c, s), h = this.checkContain("y", h, l), this.position.x = s + c, this.position.y = l + h, this.dragPoint.x = c, this.dragPoint.y = h, this.emit(Ft.MOVE, this.position);
|
|
7011
7012
|
}
|
|
7012
7013
|
}
|
|
7013
7014
|
}, {
|
|
@@ -7078,7 +7079,7 @@ var Ft = {
|
|
|
7078
7079
|
u.paused ? u.play() : u.pause();
|
|
7079
7080
|
}), _(m(e), "onScroll", function(s) {
|
|
7080
7081
|
if (!(!window.scrollY && window.scrollY !== 0 || Math.abs(window.scrollY - e.pos.scrollY) < 50)) {
|
|
7081
|
-
var l = parseInt(
|
|
7082
|
+
var l = parseInt(f.getCss(e.player.root, "height"));
|
|
7082
7083
|
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);
|
|
7083
7084
|
}
|
|
7084
7085
|
}), e.isMini = !1, e.isClose = !1;
|
|
@@ -7121,7 +7122,7 @@ var Ft = {
|
|
|
7121
7122
|
};
|
|
7122
7123
|
i.controls.registerPlugin(Oi, s, Oi.pluginName);
|
|
7123
7124
|
}
|
|
7124
|
-
var l =
|
|
7125
|
+
var l = f.checkTouchSupport() ? "touchend" : "click";
|
|
7125
7126
|
this.bind(".mini-cancel-btn", l, this.onCancelClick), this.bind(".play-icon", l, this.onCenterClick), this.config.disableDrag || (this._draggabilly = new Oo(this.player.root, {
|
|
7126
7127
|
handle: this.root
|
|
7127
7128
|
})), this.config.isScrollSwitch && window.addEventListener("scroll", this.onScroll);
|
|
@@ -7153,7 +7154,7 @@ var Ft = {
|
|
|
7153
7154
|
var e = this;
|
|
7154
7155
|
if (!this.isMini) {
|
|
7155
7156
|
var i = this.player, n = this.playerConfig, s = this.config.target || this.player.root;
|
|
7156
|
-
this.lastStyle = {},
|
|
7157
|
+
this.lastStyle = {}, f.addClass(i.root, "xgplayer-mini"), ["width", "height", "top", "left"].map(function(l) {
|
|
7157
7158
|
e.lastStyle[l] = s.style[l], s.style[l] = "".concat(e.pos[l], "px");
|
|
7158
7159
|
}), n.fluid && (s.style["padding-top"] = ""), this.emit(pt, !0), i.isMini = this.isMini = !0;
|
|
7159
7160
|
}
|
|
@@ -7165,7 +7166,7 @@ var Ft = {
|
|
|
7165
7166
|
if (!this.isMini)
|
|
7166
7167
|
return !1;
|
|
7167
7168
|
var i = this.player, n = this.playerConfig, s = this.config.target || this.player.root;
|
|
7168
|
-
|
|
7169
|
+
f.removeClass(i.root, "xgplayer-mini"), this.lastStyle && Object.keys(this.lastStyle).map(function(l) {
|
|
7169
7170
|
s.style[l] = e.lastStyle[l];
|
|
7170
7171
|
}), this.lastStyle = null, n.fluid && (i.root.style.width = "100%", i.root.style.height = "0", i.root.style["padding-top"] = "".concat(n.height * 100 / n.width, "%")), this.emit(pt, !1), this.isMini = i.isMini = !1;
|
|
7171
7172
|
}
|
|
@@ -7173,7 +7174,7 @@ var Ft = {
|
|
|
7173
7174
|
key: "destroy",
|
|
7174
7175
|
value: function() {
|
|
7175
7176
|
window.removeEventListener("scroll", this.onScroll);
|
|
7176
|
-
var e =
|
|
7177
|
+
var e = f.checkTouchSupport() ? "touchend" : "click";
|
|
7177
7178
|
this.unbind(".mini-cancel-btn", e, this.onCancelClick), this.unbind(".play-icon", e, this.onCenterClick), this._draggabilly && this._draggabilly.destroy(), this._draggabilly = null, this.exitMini();
|
|
7178
7179
|
}
|
|
7179
7180
|
}, {
|
|
@@ -7216,7 +7217,7 @@ var Ft = {
|
|
|
7216
7217
|
};
|
|
7217
7218
|
}
|
|
7218
7219
|
}]), r;
|
|
7219
|
-
}(
|
|
7220
|
+
}(V), at = {
|
|
7220
7221
|
mouseenter: "onMouseEnter",
|
|
7221
7222
|
mouseleave: "onMouseLeave",
|
|
7222
7223
|
mousemove: "onMouseMove"
|
|
@@ -7239,8 +7240,8 @@ var Ft = {
|
|
|
7239
7240
|
autoHide: !1
|
|
7240
7241
|
}) : c.focus(), t.emit(sn);
|
|
7241
7242
|
}), _(m(t), "onMouseLeave", function(s) {
|
|
7242
|
-
var l = t.playerConfig, u = l.closePlayerBlur, c = l.leavePlayerTime,
|
|
7243
|
-
!u && !
|
|
7243
|
+
var l = t.playerConfig, u = l.closePlayerBlur, c = l.leavePlayerTime, h = l.closeDelayBlur;
|
|
7244
|
+
!u && !h && (c ? t.player.focus({
|
|
7244
7245
|
autoHide: !0,
|
|
7245
7246
|
delay: c
|
|
7246
7247
|
}) : t.player.blur({
|
|
@@ -7249,7 +7250,7 @@ var Ft = {
|
|
|
7249
7250
|
}), _(m(t), "onVideoClick", function(s) {
|
|
7250
7251
|
var l = m(t), u = l.player, c = l.playerConfig;
|
|
7251
7252
|
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() {
|
|
7252
|
-
t._clickCount && (t._clickCount--, me(m(t), Mt[0], function(
|
|
7253
|
+
t._clickCount && (t._clickCount--, me(m(t), Mt[0], function(h, g) {
|
|
7253
7254
|
t.switchPlayPause(g.e);
|
|
7254
7255
|
}, {
|
|
7255
7256
|
e: s,
|
|
@@ -7263,7 +7264,7 @@ var Ft = {
|
|
|
7263
7264
|
t._clickCount = 0;
|
|
7264
7265
|
return;
|
|
7265
7266
|
}
|
|
7266
|
-
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), me(m(t), Mt[1], function(
|
|
7267
|
+
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), me(m(t), Mt[1], function(h, g) {
|
|
7267
7268
|
t.emitUserAction(g.e, "switch_fullscreen", {
|
|
7268
7269
|
props: "fullscreen",
|
|
7269
7270
|
from: u.fullscreen,
|
|
@@ -7284,7 +7285,7 @@ var Ft = {
|
|
|
7284
7285
|
e.__hooks[n] = null;
|
|
7285
7286
|
});
|
|
7286
7287
|
var i = this.playerConfig.isMobileSimulateMode;
|
|
7287
|
-
i === "mobile" ||
|
|
7288
|
+
i === "mobile" || B.device === "mobile" && !B.os.isIpad || this.initEvents();
|
|
7288
7289
|
}
|
|
7289
7290
|
}, {
|
|
7290
7291
|
key: "initEvents",
|
|
@@ -7374,8 +7375,8 @@ var Bo = /* @__PURE__ */ function() {
|
|
|
7374
7375
|
var i = r._pos, n = r.root;
|
|
7375
7376
|
r.__clearPress(), n.removeEventListener(r.events.cancel, r.onTouchCancel), n.removeEventListener(r.events.end, r.onTouchEnd), n.removeEventListener(r.events.move, r.onTouchMove), e.moving = i.moving, e.press = i.press, i.press && r.trigger(we.PRESS_END, e), r.trigger(we.TOUCH_END, e), !i.press && !i.moving && r.__setDb(e), i.press = !1, i.start = !1, i.moving = !1;
|
|
7376
7377
|
}), _(this, "onTouchMove", function(e) {
|
|
7377
|
-
var i = r._pos, n = r.config, s = Ni(e.touches), l = s ? parseInt(s.pageX, 10) : e.pageX, u = s ? parseInt(s.pageY, 10) : e.pageX, c = l - i.x,
|
|
7378
|
-
Math.abs(
|
|
7378
|
+
var i = r._pos, n = r.config, s = Ni(e.touches), l = s ? parseInt(s.pageX, 10) : e.pageX, u = s ? parseInt(s.pageY, 10) : e.pageX, c = l - i.x, h = u - i.y;
|
|
7379
|
+
Math.abs(h) < n.miniStep && Math.abs(c) < n.miniStep || (r.__clearPress(), i.press && r.trigger(we.PRESS_END, e), i.press = !1, i.moving = !0, r.trigger(we.TOUCH_MOVE, e));
|
|
7379
7380
|
}), this._pos = {
|
|
7380
7381
|
moving: !1,
|
|
7381
7382
|
start: !1,
|
|
@@ -7482,25 +7483,25 @@ var Ve = {
|
|
|
7482
7483
|
function r(t) {
|
|
7483
7484
|
var e;
|
|
7484
7485
|
return x(this, r), e = o.call(this, t), _(m(e), "onTouchStart", function(i) {
|
|
7485
|
-
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig,
|
|
7486
|
-
if (
|
|
7487
|
-
u.isStart = !0, e.timer && clearTimeout(e.timer),
|
|
7486
|
+
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = e.getTouche(i);
|
|
7487
|
+
if (h && !l.disableGesture && e.duration > 0 && !s.ended) {
|
|
7488
|
+
u.isStart = !0, e.timer && clearTimeout(e.timer), f.checkIsFunction(c.disableSwipeHandler) && c.disableSwipeHandler(), e.find(".xg-dur").innerHTML = f.format(e.duration);
|
|
7488
7489
|
var g = e.root.getBoundingClientRect();
|
|
7489
7490
|
s.rotateDeg === 90 ? (u.top = g.left, u.left = g.top, u.width = g.height, u.height = g.width) : (u.top = g.top, u.left = g.left, u.width = g.width, u.height = g.height);
|
|
7490
|
-
var p = parseInt(
|
|
7491
|
+
var p = parseInt(h.pageX - u.left, 10), d = parseInt(h.pageY - u.top, 10);
|
|
7491
7492
|
u.x = s.rotateDeg === 90 ? d : p, u.y = s.rotateDeg === 90 ? p : d, 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;
|
|
7492
7493
|
}
|
|
7493
7494
|
}), _(m(e), "onTouchMove", function(i) {
|
|
7494
7495
|
var n = e.getTouche(i), s = m(e), l = s.pos, u = s.config, c = s.player;
|
|
7495
7496
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
7496
|
-
var
|
|
7497
|
-
if (Math.abs(v - l.x) >
|
|
7498
|
-
var
|
|
7499
|
-
if (
|
|
7497
|
+
var h = u.miniMoveStep, g = u.hideControlsActive, p = parseInt(n.pageX - l.left, 10), d = parseInt(n.pageY - l.top, 10), v = c.rotateDeg === 90 ? d : p, y = c.rotateDeg === 90 ? p : d;
|
|
7498
|
+
if (Math.abs(v - l.x) > h || Math.abs(y - l.y) > h) {
|
|
7499
|
+
var C = v - l.x, w = y - l.y, k = l.scope;
|
|
7500
|
+
if (k === -1 && (k = e.checkScope(v, y, C, w, l), k === 0 && (g ? c.blur() : c.focus({
|
|
7500
7501
|
autoHide: !1
|
|
7501
|
-
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope =
|
|
7502
|
+
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = k), k === -1 || k > 0 && !u.gestureY || k === 0 && !u.gestureX)
|
|
7502
7503
|
return;
|
|
7503
|
-
e.executeMove(
|
|
7504
|
+
e.executeMove(C, w, k, l.width, l.height), l.x = v, l.y = y;
|
|
7504
7505
|
}
|
|
7505
7506
|
}
|
|
7506
7507
|
}), _(m(e), "onTouchEnd", function(i) {
|
|
@@ -7509,8 +7510,8 @@ var Ve = {
|
|
|
7509
7510
|
s.getPlugin("progress") && s.getPlugin("progress").resetSeekState();
|
|
7510
7511
|
}, 10), !!l.isStart) {
|
|
7511
7512
|
l.scope > -1 && i.cancelable && i.preventDefault();
|
|
7512
|
-
var c = e.config,
|
|
7513
|
-
!
|
|
7513
|
+
var c = e.config, h = c.disableGesture, g = c.gestureX;
|
|
7514
|
+
!h && g ? e.endLastMove(l.scope) : l.time = 0, l.scope = -1, e.resetPos(), f.checkIsFunction(u.enableSwipeHandler) && u.enableSwipeHandler(), e.changeAction(Ve.AUTO);
|
|
7514
7515
|
}
|
|
7515
7516
|
}), _(m(e), "onRootTouchMove", function(i) {
|
|
7516
7517
|
e.config.disableGesture || !e.config.gestureX || e.checkIsRootTarget(i) && (i.stopPropagation(), e.pos.isStart ? e.onTouchMove(i) : e.onTouchStart(i));
|
|
@@ -7561,7 +7562,7 @@ var Ve = {
|
|
|
7561
7562
|
e.__hooks[g] = null;
|
|
7562
7563
|
});
|
|
7563
7564
|
var i = this.playerConfig, n = this.config, s = this.player;
|
|
7564
|
-
i.closeVideoDblclick === !0 && (n.closedbClick = !0), this.resetPos(),
|
|
7565
|
+
i.closeVideoDblclick === !0 && (n.closedbClick = !0), this.resetPos(), f.isUndefined(i.disableGesture) || (n.disableGesture = !!i.disableGesture), this.appendChild(".xg-seek-icon", this.icons.seekTipIcon), this.xgMask = f.createDom("xg-mask", "", {}, "xgmask"), s.root.appendChild(this.xgMask), this.initCustomStyle(), this.registerThumbnail();
|
|
7565
7566
|
var l = this.domEventType === "mouse" ? "mouse" : "touch";
|
|
7566
7567
|
this.touch = new Bo(this.root, {
|
|
7567
7568
|
eventType: l,
|
|
@@ -7591,11 +7592,11 @@ var Ve = {
|
|
|
7591
7592
|
e[c[g]](p);
|
|
7592
7593
|
});
|
|
7593
7594
|
}), !n.disableActive) {
|
|
7594
|
-
var
|
|
7595
|
-
|
|
7595
|
+
var h = s.plugins.progress;
|
|
7596
|
+
h && (h.addCallBack("dragmove", function(g) {
|
|
7596
7597
|
e.activeSeekNote(g.currentTime, g.forward);
|
|
7597
7598
|
}), ["dragend", "click"].forEach(function(g) {
|
|
7598
|
-
|
|
7599
|
+
h.addCallBack(g, function() {
|
|
7599
7600
|
e.changeAction(Ve.AUTO);
|
|
7600
7601
|
});
|
|
7601
7602
|
}));
|
|
@@ -7616,13 +7617,13 @@ var Ve = {
|
|
|
7616
7617
|
value: function() {
|
|
7617
7618
|
var e = this.playerConfig || {}, i = e.commonStyle, n = i.playedColor, s = i.progressColor, l = i.timePreviewStyle, u = i.curTimeColor, c = i.durationColor;
|
|
7618
7619
|
if (n && (this.find(".xg-curbar").style.backgroundColor = n), s && (this.find(".xg-bar").style.backgroundColor = s), l) {
|
|
7619
|
-
var
|
|
7620
|
+
var h = this.find(".time-preview");
|
|
7620
7621
|
Object.keys(l).forEach(function(d) {
|
|
7621
|
-
|
|
7622
|
+
h.style[d] = l[d];
|
|
7622
7623
|
});
|
|
7623
7624
|
}
|
|
7624
7625
|
var g = u || n, p = c;
|
|
7625
|
-
g && (this.find(".xg-cur").style.color = g), p && (this.find(".xg-dur").style.color = p), this.config.disableTimeProgress &&
|
|
7626
|
+
g && (this.find(".xg-cur").style.color = g), p && (this.find(".xg-dur").style.color = p), this.config.disableTimeProgress && f.addClass(this.find(".xg-timebar"), "hide");
|
|
7626
7627
|
}
|
|
7627
7628
|
}, {
|
|
7628
7629
|
key: "resetPos",
|
|
@@ -7673,8 +7674,8 @@ var Ve = {
|
|
|
7673
7674
|
var u = l.width, c = -1;
|
|
7674
7675
|
if (e < 0 || e > u)
|
|
7675
7676
|
return c;
|
|
7676
|
-
var
|
|
7677
|
-
return Math.abs(n) > 0 &&
|
|
7677
|
+
var h = Math.abs(s === 0 ? n : n / s);
|
|
7678
|
+
return Math.abs(n) > 0 && h >= 1.73 && e > l.scopeM1 && e < l.scopeM2 ? c = 0 : (Math.abs(n) === 0 || h <= 0.57) && (c = e < l.scopeL ? 1 : e > l.scopeR ? 2 : 3), c;
|
|
7678
7679
|
}
|
|
7679
7680
|
}, {
|
|
7680
7681
|
key: "executeMove",
|
|
@@ -7687,7 +7688,7 @@ var Ve = {
|
|
|
7687
7688
|
this.updateBrightness(i / l);
|
|
7688
7689
|
break;
|
|
7689
7690
|
case 2:
|
|
7690
|
-
|
|
7691
|
+
B.os.isIos || this.updateVolume(i / l);
|
|
7691
7692
|
break;
|
|
7692
7693
|
}
|
|
7693
7694
|
}
|
|
@@ -7725,16 +7726,16 @@ var Ve = {
|
|
|
7725
7726
|
value: function(e) {
|
|
7726
7727
|
var i = this.player, n = this.config, s = this.playerConfig;
|
|
7727
7728
|
if (i.state < U.RUNNING) {
|
|
7728
|
-
s.closeVideoClick || (this.sendUseAction(
|
|
7729
|
+
s.closeVideoClick || (this.sendUseAction(f.createEvent("click")), i.play());
|
|
7729
7730
|
return;
|
|
7730
7731
|
}
|
|
7731
|
-
!n.closedbClick || s.closeVideoClick ? i.isActive ? i.blur() : i.focus() : s.closeVideoClick || ((i.isActive || n.focusVideoClick) && (this.sendUseAction(
|
|
7732
|
+
!n.closedbClick || s.closeVideoClick ? i.isActive ? i.blur() : i.focus() : s.closeVideoClick || ((i.isActive || n.focusVideoClick) && (this.sendUseAction(f.createEvent("click")), this.switchPlayPause()), i.focus());
|
|
7732
7733
|
}
|
|
7733
7734
|
}, {
|
|
7734
7735
|
key: "dbClickHandler",
|
|
7735
7736
|
value: function(e) {
|
|
7736
7737
|
var i = this.config, n = this.player;
|
|
7737
|
-
!i.closedbClick && n.state >= U.RUNNING && (this.sendUseAction(
|
|
7738
|
+
!i.closedbClick && n.state >= U.RUNNING && (this.sendUseAction(f.createEvent("dblclick")), this.switchPlayPause());
|
|
7738
7739
|
}
|
|
7739
7740
|
}, {
|
|
7740
7741
|
key: "onClick",
|
|
@@ -7810,7 +7811,7 @@ var Ve = {
|
|
|
7810
7811
|
if (!(!e || typeof e != "number" || l || s.disableActive)) {
|
|
7811
7812
|
e < 0 ? e = 0 : e > n.duration && (e = n.duration - 0.2), this.changeAction(Ve.SEEKING);
|
|
7812
7813
|
var u = n.plugins.start;
|
|
7813
|
-
u && u.focusHide(), this.find(".xg-dur").innerHTML =
|
|
7814
|
+
u && u.focusHide(), this.find(".xg-dur").innerHTML = f.format(this.duration), this.find(".xg-cur").innerHTML = f.format(e), this.find(".xg-curbar").style.width = "".concat(e / this.duration * 100, "%"), i ? f.removeClass(this.find(".xg-seek-show"), "xg-back") : f.addClass(this.find(".xg-seek-show"), "xg-back"), this.updateThumbnails(e);
|
|
7814
7815
|
}
|
|
7815
7816
|
}
|
|
7816
7817
|
}, {
|
|
@@ -7904,7 +7905,7 @@ var Ve = {
|
|
|
7904
7905
|
};
|
|
7905
7906
|
}
|
|
7906
7907
|
}]), r;
|
|
7907
|
-
}(
|
|
7908
|
+
}(V);
|
|
7908
7909
|
function zo(a) {
|
|
7909
7910
|
a.preventDefault(), a.returnValue = !1;
|
|
7910
7911
|
}
|
|
@@ -7922,12 +7923,12 @@ var Hi = /* @__PURE__ */ function(a) {
|
|
|
7922
7923
|
i[n] = arguments[n];
|
|
7923
7924
|
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onBodyKeyDown", function(s) {
|
|
7924
7925
|
if (t.player) {
|
|
7925
|
-
var l = s || window.event, u = l.keyCode, c = m(t),
|
|
7926
|
+
var l = s || window.event, u = l.keyCode, c = m(t), h = c._keyState, g = c.player, p = t.config, d = p.disable, v = p.disableBodyTrigger, y = p.isIgnoreUserActive;
|
|
7926
7927
|
if (d || v || !(g.isUserActive || y) || Bi(l.target) || !t.checkIsVisible() || l.metaKey || l.altKey || l.ctrlKey) {
|
|
7927
|
-
|
|
7928
|
+
h.isBodyKeyDown = !1;
|
|
7928
7929
|
return;
|
|
7929
7930
|
}
|
|
7930
|
-
!s.repeat && !
|
|
7931
|
+
!s.repeat && !h.isKeyDown && ((l.target === document.body || t.config.isGlobalTrigger && !Bi(l.target)) && t.checkCode(u, !0) && (h.isBodyKeyDown = !0), document.addEventListener("keyup", t.onBodyKeyUp)), h.isBodyKeyDown && t.handleKeyDown(l);
|
|
7931
7932
|
}
|
|
7932
7933
|
}), _(m(t), "onBodyKeyUp", function(s) {
|
|
7933
7934
|
t.player && (document.removeEventListener("keyup", t.onBodyKeyUp), t.handleKeyUp(s));
|
|
@@ -8068,9 +8069,9 @@ var Hi = /* @__PURE__ */ function(a) {
|
|
|
8068
8069
|
}, {
|
|
8069
8070
|
key: "seek",
|
|
8070
8071
|
value: function(e) {
|
|
8071
|
-
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.duration, u = i.offsetDuration, c = i.timeSegments,
|
|
8072
|
-
|
|
8073
|
-
var d =
|
|
8072
|
+
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.duration, u = i.offsetDuration, c = i.timeSegments, h = s > -1 ? s : n, g = u || l, p = e.repeat && this.seekStep >= 4 ? parseInt(this.seekStep / 2, 10) : this.seekStep;
|
|
8073
|
+
h + p <= g ? h = h + p : h = g;
|
|
8074
|
+
var d = f.getCurrentTimeByOffset(h, c), v = {
|
|
8074
8075
|
currentTime: {
|
|
8075
8076
|
from: n,
|
|
8076
8077
|
to: d
|
|
@@ -8083,17 +8084,17 @@ var Hi = /* @__PURE__ */ function(a) {
|
|
|
8083
8084
|
}, {
|
|
8084
8085
|
key: "seekBack",
|
|
8085
8086
|
value: function(e) {
|
|
8086
|
-
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.timeSegments, u = e.repeat ? parseInt(this.seekStep / 2, 10) : this.seekStep, c = s > -1 ? s : n,
|
|
8087
|
-
|
|
8087
|
+
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.timeSegments, u = e.repeat ? parseInt(this.seekStep / 2, 10) : this.seekStep, c = s > -1 ? s : n, h = c - u;
|
|
8088
|
+
h < 0 && (h = 0), h = f.getCurrentTimeByOffset(h, l);
|
|
8088
8089
|
var g = {
|
|
8089
8090
|
currentTime: {
|
|
8090
8091
|
from: n,
|
|
8091
|
-
to:
|
|
8092
|
+
to: h
|
|
8092
8093
|
}
|
|
8093
8094
|
};
|
|
8094
8095
|
this.emitUserAction(e, "seek", {
|
|
8095
8096
|
props: g
|
|
8096
|
-
}), this.player.currentTime =
|
|
8097
|
+
}), this.player.currentTime = h;
|
|
8097
8098
|
}
|
|
8098
8099
|
}, {
|
|
8099
8100
|
key: "changePlaybackRate",
|
|
@@ -8144,8 +8145,8 @@ var Hi = /* @__PURE__ */ function(a) {
|
|
|
8144
8145
|
key: "handleKeyCode",
|
|
8145
8146
|
value: function(e, i, n) {
|
|
8146
8147
|
for (var s = Object.keys(this.keyCodeMap), l = 0; l < s.length; l++) {
|
|
8147
|
-
var u = this.keyCodeMap[s[l]], c = u.action,
|
|
8148
|
-
if (
|
|
8148
|
+
var u = this.keyCodeMap[s[l]], c = u.action, h = u.keyCode, g = u.disable, p = u.pressAction, d = u.disablePress;
|
|
8149
|
+
if (h === e) {
|
|
8149
8150
|
if (!g && !(n && d)) {
|
|
8150
8151
|
var v = n && p || c;
|
|
8151
8152
|
typeof v == "function" ? c(i, this.player, n) : typeof v == "string" && typeof this[v] == "function" && this[v](i, this.player, n), this.emit(un, G({
|
|
@@ -8241,7 +8242,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8241
8242
|
};
|
|
8242
8243
|
}
|
|
8243
8244
|
}]), r;
|
|
8244
|
-
}(
|
|
8245
|
+
}(V), Wo = [{
|
|
8245
8246
|
tag: "xg-cache",
|
|
8246
8247
|
className: "xgplayer-progress-cache",
|
|
8247
8248
|
styleKey: "cachedColor"
|
|
@@ -8283,8 +8284,8 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8283
8284
|
}, e = this.progressList, i = this.fragments;
|
|
8284
8285
|
if (!(e.length < 1)) {
|
|
8285
8286
|
var n = t.newIndex, s = t.curIndex, l = t.millisecond;
|
|
8286
|
-
n !== s && e.map(function(
|
|
8287
|
-
g < n ?
|
|
8287
|
+
n !== s && e.map(function(h, g) {
|
|
8288
|
+
g < n ? h[r].style.width = "100%" : g > n && (h[r].style.width = 0);
|
|
8288
8289
|
});
|
|
8289
8290
|
var u = i[n], c = l === 0 ? 0 : (l - u.start) / u.duration;
|
|
8290
8291
|
e[n][r].style.width = c < 0 ? 0 : "".concat(c * 100, "%");
|
|
@@ -8331,7 +8332,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8331
8332
|
this.updateDuration(parseInt(t * 1e3, 10));
|
|
8332
8333
|
}
|
|
8333
8334
|
var e = this.playedIndex, i = this.cachedIndex;
|
|
8334
|
-
if (
|
|
8335
|
+
if (f.typeOf(r.played) !== "Undefined") {
|
|
8335
8336
|
var n = this.findIndex(r.played * 1e3, e);
|
|
8336
8337
|
if (n < 0)
|
|
8337
8338
|
return;
|
|
@@ -8341,7 +8342,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8341
8342
|
millisecond: parseInt(r.played * 1e3, 10)
|
|
8342
8343
|
}), this.playedIndex = n;
|
|
8343
8344
|
}
|
|
8344
|
-
if (
|
|
8345
|
+
if (f.typeOf(r.cached) !== "Undefined") {
|
|
8345
8346
|
var s = this.findIndex(r.cached * 1e3, i);
|
|
8346
8347
|
if (s < 0)
|
|
8347
8348
|
return;
|
|
@@ -8375,7 +8376,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8375
8376
|
key: "findHightLight",
|
|
8376
8377
|
value: function() {
|
|
8377
8378
|
for (var r = this.root.children, t = 0; t < r.length; t++)
|
|
8378
|
-
if (
|
|
8379
|
+
if (f.hasClass(r[t], this.fragConfig.fragFocusClass))
|
|
8379
8380
|
return {
|
|
8380
8381
|
dom: r[t],
|
|
8381
8382
|
pos: r[t].getBoundingClientRect()
|
|
@@ -8394,14 +8395,14 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8394
8395
|
key: "unHightLight",
|
|
8395
8396
|
value: function() {
|
|
8396
8397
|
for (var r = this.root.children, t = 0; t < r.length; t++)
|
|
8397
|
-
|
|
8398
|
+
f.removeClass(r[t], this.fragConfig.fragFocusClass);
|
|
8398
8399
|
}
|
|
8399
8400
|
}, {
|
|
8400
8401
|
key: "setHightLight",
|
|
8401
8402
|
value: function(r) {
|
|
8402
8403
|
var t = this.root.children;
|
|
8403
8404
|
if (r < t.length)
|
|
8404
|
-
return
|
|
8405
|
+
return f.addClass(t[r], this.fragConfig.fragFocusClass), {
|
|
8405
8406
|
dom: t[r],
|
|
8406
8407
|
pos: t[r].getBoundingClientRect()
|
|
8407
8408
|
};
|
|
@@ -8430,14 +8431,14 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8430
8431
|
key: "render",
|
|
8431
8432
|
value: function() {
|
|
8432
8433
|
var r = this, t = this.style.progressColor;
|
|
8433
|
-
if (this.root || (this.root =
|
|
8434
|
+
if (this.root || (this.root = f.createDom("xg-inners", "", {}, "progress-list")), this.fragments) {
|
|
8434
8435
|
var e = this.fragConfig, i = e.fragClass, n = e.fragFocusClass;
|
|
8435
8436
|
this.progressList = this.fragments.map(function(s) {
|
|
8436
|
-
var l =
|
|
8437
|
+
var l = f.createDom("xg-inner", "", {
|
|
8437
8438
|
style: t ? "background:".concat(t, "; flex: ").concat(s.percent) : "flex: ".concat(s.percent)
|
|
8438
8439
|
}, "".concat(s.isFocus ? n : "", " xgplayer-progress-inner ").concat(i));
|
|
8439
8440
|
return r.root.appendChild(l), Wo.forEach(function(u) {
|
|
8440
|
-
l.appendChild(
|
|
8441
|
+
l.appendChild(f.createDom(u.tag, "", {
|
|
8441
8442
|
style: u.styleKey ? "background: ".concat(r.style[u.styleKey], "; width:0;") : "width:0;"
|
|
8442
8443
|
}, u.className));
|
|
8443
8444
|
}), {
|
|
@@ -8458,15 +8459,15 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8458
8459
|
function r(t) {
|
|
8459
8460
|
var e;
|
|
8460
8461
|
return x(this, r), e = o.call(this, t), _(m(e), "onMoveOnly", function(i, n) {
|
|
8461
|
-
var s = m(e), l = s.pos, u = s.config, c = s.player,
|
|
8462
|
+
var s = m(e), l = s.pos, u = s.config, c = s.player, h = n;
|
|
8462
8463
|
if (i) {
|
|
8463
|
-
|
|
8464
|
-
var g =
|
|
8464
|
+
f.event(i);
|
|
8465
|
+
var g = f.getEventPos(i, c.zoom), p = c.rotateDeg === 90 ? g.clientY : g.clientX;
|
|
8465
8466
|
if (l.moving && Math.abs(l.x - p) < u.miniMoveStep)
|
|
8466
8467
|
return;
|
|
8467
|
-
l.moving = !0, l.x = p,
|
|
8468
|
+
l.moving = !0, l.x = p, h = e.computeTime(i, p);
|
|
8468
8469
|
}
|
|
8469
|
-
e.triggerCallbacks("dragmove",
|
|
8470
|
+
e.triggerCallbacks("dragmove", h, i), e._updateInnerFocus(h);
|
|
8470
8471
|
}), _(m(e), "onBodyClick", function(i) {
|
|
8471
8472
|
e.pos.isLocked && (e.pos.isLocked = !1, i.preventDefault(), i.stopPropagation());
|
|
8472
8473
|
}), _(m(e), "_mouseDownHandler", function(i, n) {
|
|
@@ -8475,36 +8476,36 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8475
8476
|
var s = m(e), l = s.pos;
|
|
8476
8477
|
l.moving && e.updateWidth(n.currentTime, n.seekTime, n.percent, 2);
|
|
8477
8478
|
}), _(m(e), "_mouseMoveHandler", function(i, n) {
|
|
8478
|
-
var s = m(e), l = s._state, u = s.pos, c = s.config,
|
|
8479
|
-
l.time < n.currentTime ? n.forward = !0 : n.forward = !1, l.time = n.currentTime, u.isDown && !u.moving && (u.moving = !0, c.isPauseMoving &&
|
|
8479
|
+
var s = m(e), l = s._state, u = s.pos, c = s.config, h = s.player;
|
|
8480
|
+
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);
|
|
8480
8481
|
}), _(m(e), "onMouseDown", function(i) {
|
|
8481
|
-
var n = m(e), s = n._state, l = n.player, u = n.pos, c = n.config,
|
|
8482
|
-
if (!(l.isMini || c.closeMoveSeek || !
|
|
8482
|
+
var n = m(e), s = n._state, l = n.player, u = n.pos, c = n.config, h = n.playerConfig, g = f.getEventPos(i, l.zoom), p = l.rotateDeg === 90 ? g.clientY : g.clientX;
|
|
8483
|
+
if (!(l.isMini || c.closeMoveSeek || !h.allowSeekAfterEnded && l.ended)) {
|
|
8483
8484
|
if (!l.duration && !l.isPlaying) {
|
|
8484
8485
|
l.play();
|
|
8485
8486
|
return;
|
|
8486
8487
|
}
|
|
8487
|
-
i.stopPropagation(), e.focus(),
|
|
8488
|
+
i.stopPropagation(), e.focus(), f.checkIsFunction(h.disableSwipeHandler) && h.disableSwipeHandler(), f.checkIsFunction(c.onMoveStart) && c.onMoveStart(), f.event(i), u.x = p, u.isDown = !0, u.moving = !1, s.prePlayTime = l.currentTime, l.focus({
|
|
8488
8489
|
autoHide: !1
|
|
8489
|
-
}), e.isProgressMoving = !0,
|
|
8490
|
+
}), e.isProgressMoving = !0, f.addClass(e.progressBtn, "active");
|
|
8490
8491
|
var d = e.computeTime(i, p);
|
|
8491
8492
|
d.prePlayTime = s.prePlayTime, e._mouseDownHandlerHook(i, d);
|
|
8492
8493
|
var v = i.type;
|
|
8493
8494
|
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;
|
|
8494
8495
|
}
|
|
8495
8496
|
}), _(m(e), "onMouseUp", function(i) {
|
|
8496
|
-
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig,
|
|
8497
|
-
i.stopPropagation(), i.preventDefault(),
|
|
8497
|
+
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = n._state;
|
|
8498
|
+
i.stopPropagation(), i.preventDefault(), f.checkIsFunction(c.enableSwipeHandler) && c.enableSwipeHandler(), f.checkIsFunction(l.onMoveEnd) && l.onMoveEnd(), f.event(i), f.removeClass(e.progressBtn, "active");
|
|
8498
8499
|
var g = e.computeTime(i, u.x);
|
|
8499
|
-
g.prePlayTime =
|
|
8500
|
+
g.prePlayTime = h.prePlayTime, u.moving ? (e.triggerCallbacks("dragend", g, i), e.emitUserAction("drag", "dragend", g)) : (e.triggerCallbacks("click", g, i), e.emitUserAction("click", "click", g)), e._mouseUpHandlerHook(i, g), u.moving = !1, u.isDown = !1, u.x = 0, u.y = 0, u.isLocked = !0, h.prePlayTime = 0, h.time = 0;
|
|
8500
8501
|
var p = i.type;
|
|
8501
|
-
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)),
|
|
8502
|
+
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() {
|
|
8502
8503
|
e.resetSeekState();
|
|
8503
8504
|
}, 1), s.focus();
|
|
8504
8505
|
}), _(m(e), "onMouseMove", function(i) {
|
|
8505
8506
|
var n = m(e), s = n._state, l = n.pos, u = n.player, c = n.config;
|
|
8506
|
-
|
|
8507
|
-
var
|
|
8507
|
+
f.checkTouchSupport() && i.preventDefault(), f.event(i);
|
|
8508
|
+
var h = f.getEventPos(i, u.zoom), g = u.rotateDeg === 90 ? h.clientY : h.clientX, p = Math.abs(l.x - g);
|
|
8508
8509
|
if (!(l.moving && p < c.miniMoveStep || !l.moving && p < c.miniStartStep)) {
|
|
8509
8510
|
l.x = g;
|
|
8510
8511
|
var d = e.computeTime(i, g);
|
|
@@ -8517,9 +8518,9 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8517
8518
|
}), _(m(e), "onMouseEnter", function(i) {
|
|
8518
8519
|
var n = m(e), s = n.player, l = n.pos;
|
|
8519
8520
|
if (!(l.isDown || l.isEnter || s.isMini || !s.config.allowSeekAfterEnded && s.ended)) {
|
|
8520
|
-
l.isEnter = !0, e.bind("mousemove", e.onMoveOnly), e.bind("mouseleave", e.onMouseLeave),
|
|
8521
|
-
var u =
|
|
8522
|
-
e.triggerCallbacks("mouseenter",
|
|
8521
|
+
l.isEnter = !0, e.bind("mousemove", e.onMoveOnly), e.bind("mouseleave", e.onMouseLeave), f.event(i);
|
|
8522
|
+
var u = f.getEventPos(i, s.zoom), c = s.rotateDeg === 90 ? u.clientY : u.clientX, h = e.computeTime(i, c);
|
|
8523
|
+
e.triggerCallbacks("mouseenter", h, i), e.focus();
|
|
8523
8524
|
}
|
|
8524
8525
|
}), _(m(e), "onMouseLeave", function(i) {
|
|
8525
8526
|
e.triggerCallbacks("mouseleave", null, i), e.unlock(), e._updateInnerFocus(null);
|
|
@@ -8610,7 +8611,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8610
8611
|
fragAutoFocus: s,
|
|
8611
8612
|
fragClass: l,
|
|
8612
8613
|
style: this.playerConfig.commonStyle || {}
|
|
8613
|
-
}),
|
|
8614
|
+
}), B.device === "mobile" && (this.config.isDragingSeek = !1, this.isMobile = !0), this.progressBtn = this.find(".xgplayer-progress-btn"), this.on(Pe, function() {
|
|
8614
8615
|
e.onMouseLeave();
|
|
8615
8616
|
}), this.on(oe, function() {
|
|
8616
8617
|
e.onTimeupdate();
|
|
@@ -8692,12 +8693,12 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8692
8693
|
}, {
|
|
8693
8694
|
key: "focus",
|
|
8694
8695
|
value: function() {
|
|
8695
|
-
this.player.controls.pauseAutoHide(),
|
|
8696
|
+
this.player.controls.pauseAutoHide(), f.addClass(this.root, "active");
|
|
8696
8697
|
}
|
|
8697
8698
|
}, {
|
|
8698
8699
|
key: "blur",
|
|
8699
8700
|
value: function() {
|
|
8700
|
-
this._disableBlur || (this.player.controls.recoverAutoHide(),
|
|
8701
|
+
this._disableBlur || (this.player.controls.recoverAutoHide(), f.removeClass(this.root, "active"));
|
|
8701
8702
|
}
|
|
8702
8703
|
}, {
|
|
8703
8704
|
key: "disableBlur",
|
|
@@ -8721,17 +8722,17 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8721
8722
|
}, {
|
|
8722
8723
|
key: "computeTime",
|
|
8723
8724
|
value: function(e, i) {
|
|
8724
|
-
var n = this.player, s = this.root.getBoundingClientRect(), l = s.width, u = s.height, c = s.top,
|
|
8725
|
-
n.rotateDeg === 90 ? (g = u, p = c) : (g = l, p =
|
|
8725
|
+
var n = this.player, s = this.root.getBoundingClientRect(), l = s.width, u = s.height, c = s.top, h = s.left, g, p, d = i;
|
|
8726
|
+
n.rotateDeg === 90 ? (g = u, p = c) : (g = l, p = h);
|
|
8726
8727
|
var v = d - p;
|
|
8727
8728
|
v = v > g ? g : v < 0 ? 0 : v;
|
|
8728
8729
|
var y = v / g;
|
|
8729
8730
|
y = y < 0 ? 0 : y > 1 ? 1 : y;
|
|
8730
|
-
var
|
|
8731
|
+
var C = parseInt(y * this.offsetDuration * 1e3, 10) / 1e3, w = f.getCurrentTimeByOffset(C, n.timeSegments);
|
|
8731
8732
|
return {
|
|
8732
8733
|
percent: y,
|
|
8733
|
-
currentTime:
|
|
8734
|
-
seekTime:
|
|
8734
|
+
currentTime: C,
|
|
8735
|
+
seekTime: w,
|
|
8735
8736
|
offset: v,
|
|
8736
8737
|
width: g,
|
|
8737
8738
|
left: p,
|
|
@@ -8780,7 +8781,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8780
8781
|
n.now = -1;
|
|
8781
8782
|
}
|
|
8782
8783
|
var u = this.currentTime;
|
|
8783
|
-
u =
|
|
8784
|
+
u = f.adjustTimeByDuration(u, s, e), this.innerList.update({
|
|
8784
8785
|
played: u
|
|
8785
8786
|
}, s), this.progressBtn.style.left = "".concat(u / s * 100, "%");
|
|
8786
8787
|
}
|
|
@@ -8791,7 +8792,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8791
8792
|
var i = this.player, n = this.duration;
|
|
8792
8793
|
if (i) {
|
|
8793
8794
|
var s = i.bufferedPoint.end;
|
|
8794
|
-
s =
|
|
8795
|
+
s = f.adjustTimeByDuration(s, n, e), this.innerList.update({
|
|
8795
8796
|
cached: s
|
|
8796
8797
|
}, n);
|
|
8797
8798
|
}
|
|
@@ -8863,7 +8864,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8863
8864
|
return Ui;
|
|
8864
8865
|
}
|
|
8865
8866
|
}]), r;
|
|
8866
|
-
}(
|
|
8867
|
+
}(V), Ue = /* @__PURE__ */ function(a) {
|
|
8867
8868
|
L(r, a);
|
|
8868
8869
|
var o = D(r);
|
|
8869
8870
|
function r() {
|
|
@@ -8892,7 +8893,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8892
8893
|
this.unbind("mouseenter", this._onMouseenter), this.unbind("mouseleave", this._onMouseLeave);
|
|
8893
8894
|
}
|
|
8894
8895
|
}]), r;
|
|
8895
|
-
}(
|
|
8896
|
+
}(V), Ko = /* @__PURE__ */ function(a) {
|
|
8896
8897
|
L(r, a);
|
|
8897
8898
|
var o = D(r);
|
|
8898
8899
|
function r() {
|
|
@@ -8902,7 +8903,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8902
8903
|
key: "afterCreate",
|
|
8903
8904
|
value: function() {
|
|
8904
8905
|
var e = this;
|
|
8905
|
-
|
|
8906
|
+
M(O(r.prototype), "afterCreate", this).call(this);
|
|
8906
8907
|
var i = this.player, n = this.config;
|
|
8907
8908
|
n.disable || (this.initIcons(), this.btnClick = this.btnClick.bind(this), this.bind(["touchend", "click"], this.btnClick), this.on([Ze, rt, He], function() {
|
|
8908
8909
|
e.animate(i.paused);
|
|
@@ -8952,7 +8953,7 @@ var jo = /* @__PURE__ */ function(a) {
|
|
|
8952
8953
|
}, {
|
|
8953
8954
|
key: "destroy",
|
|
8954
8955
|
value: function() {
|
|
8955
|
-
|
|
8956
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(["touchend", "click"], this.btnClick);
|
|
8956
8957
|
}
|
|
8957
8958
|
}, {
|
|
8958
8959
|
key: "render",
|
|
@@ -9020,12 +9021,12 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9020
9021
|
}, {
|
|
9021
9022
|
key: "show",
|
|
9022
9023
|
value: function() {
|
|
9023
|
-
|
|
9024
|
+
f.addClass(this.root, "show");
|
|
9024
9025
|
}
|
|
9025
9026
|
}, {
|
|
9026
9027
|
key: "hide",
|
|
9027
9028
|
value: function() {
|
|
9028
|
-
|
|
9029
|
+
f.removeClass(this.root, "show");
|
|
9029
9030
|
}
|
|
9030
9031
|
}, {
|
|
9031
9032
|
key: "render",
|
|
@@ -9047,7 +9048,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9047
9048
|
};
|
|
9048
9049
|
}
|
|
9049
9050
|
}]), r;
|
|
9050
|
-
}(
|
|
9051
|
+
}(V);
|
|
9051
9052
|
function qo() {
|
|
9052
9053
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
|
|
9053
9054
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>
|
|
@@ -9076,11 +9077,11 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9076
9077
|
key: "afterCreate",
|
|
9077
9078
|
value: function() {
|
|
9078
9079
|
var e = this;
|
|
9079
|
-
|
|
9080
|
+
M(O(r.prototype), "afterCreate", this).call(this);
|
|
9080
9081
|
var i = this.config, n = this.playerConfig;
|
|
9081
9082
|
if (!i.disable) {
|
|
9082
9083
|
i.target && (this.playerConfig.fullscreenTarget = this.config.target);
|
|
9083
|
-
var s =
|
|
9084
|
+
var s = f.getFullScreenEl();
|
|
9084
9085
|
n.fullscreenTarget === s && this.player.getFullscreen().catch(function(l) {
|
|
9085
9086
|
}), this.initIcons(), this.handleFullscreen = this.hook("fullscreenChange", this.toggleFullScreen, {
|
|
9086
9087
|
pre: function(u) {
|
|
@@ -9103,7 +9104,7 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9103
9104
|
}
|
|
9104
9105
|
}
|
|
9105
9106
|
}
|
|
9106
|
-
})),
|
|
9107
|
+
})), B.device === "mobile" && window.addEventListener("orientationchange", this._onOrientationChange);
|
|
9107
9108
|
}
|
|
9108
9109
|
}
|
|
9109
9110
|
}, {
|
|
@@ -9123,7 +9124,7 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9123
9124
|
}, {
|
|
9124
9125
|
key: "destroy",
|
|
9125
9126
|
value: function() {
|
|
9126
|
-
|
|
9127
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", B.device === "mobile" ? "touchend" : "click", this.handleFullscreen), B.device === "mobile" && window.removeEventListener("orientationchange", this._onOrientationChange);
|
|
9127
9128
|
}
|
|
9128
9129
|
}, {
|
|
9129
9130
|
key: "initIcons",
|
|
@@ -9256,13 +9257,13 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9256
9257
|
var i = this.player, n = this.config, s = this.duration;
|
|
9257
9258
|
if (!(n.disable || this.isActiving || !i.hasStart)) {
|
|
9258
9259
|
var l = this.currentTime + this.timeOffset;
|
|
9259
|
-
l =
|
|
9260
|
+
l = f.adjustTimeByDuration(l, s, e), this.mode === "flex" ? (this.centerCurDom.innerHTML = this.minWidthTime(f.format(l)), s !== 1 / 0 && s > 0 && (this.centerDurDom.innerHTML = f.format(s))) : (this.timeDom.innerHTML = this.minWidthTime(f.format(l)), s !== 1 / 0 && s > 0 && (this.durationDom.innerHTML = f.format(s)));
|
|
9260
9261
|
}
|
|
9261
9262
|
}
|
|
9262
9263
|
}, {
|
|
9263
9264
|
key: "onReset",
|
|
9264
9265
|
value: function() {
|
|
9265
|
-
this.mode === "flex" ? (this.centerCurDom.innerHTML = this.minWidthTime(
|
|
9266
|
+
this.mode === "flex" ? (this.centerCurDom.innerHTML = this.minWidthTime(f.format(0)), this.centerDurDom.innerHTML = f.format(0)) : (this.timeDom.innerHTML = this.minWidthTime(f.format(0)), this.durationDom.innerHTML = f.format(0));
|
|
9266
9267
|
}
|
|
9267
9268
|
}, {
|
|
9268
9269
|
key: "createCenterTime",
|
|
@@ -9270,14 +9271,14 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9270
9271
|
var e = this.player;
|
|
9271
9272
|
if (!(!e.controls || !e.controls.center)) {
|
|
9272
9273
|
var i = e.controls.center;
|
|
9273
|
-
this.centerCurDom =
|
|
9274
|
+
this.centerCurDom = f.createDom("xg-icon", "00:00", {}, "xgplayer-time xg-time-left"), this.centerDurDom = f.createDom("xg-icon", "00:00", {}, "xgplayer-time xg-time-right"), i.children.length > 0 ? i.insertBefore(this.centerCurDom, i.children[0]) : i.appendChild(this.centerCurDom), i.appendChild(this.centerDurDom);
|
|
9274
9275
|
}
|
|
9275
9276
|
}
|
|
9276
9277
|
}, {
|
|
9277
9278
|
key: "afterPlayerInit",
|
|
9278
9279
|
value: function() {
|
|
9279
9280
|
var e = this.config;
|
|
9280
|
-
if (this.duration === 1 / 0 || this.playerConfig.isLive ? (
|
|
9281
|
+
if (this.duration === 1 / 0 || this.playerConfig.isLive ? (f.hide(this.durationDom), f.hide(this.timeDom), f.hide(this.find(".time-separator")), f.show(this.find(".time-live-tag"))) : f.hide(this.find(".time-live-tag")), e.hide) {
|
|
9281
9282
|
this.hide();
|
|
9282
9283
|
return;
|
|
9283
9284
|
}
|
|
@@ -9286,17 +9287,17 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9286
9287
|
}, {
|
|
9287
9288
|
key: "changeLiveState",
|
|
9288
9289
|
value: function(e) {
|
|
9289
|
-
e ? (
|
|
9290
|
+
e ? (f.hide(this.durationDom), f.hide(this.timeDom), f.hide(this.find(".time-separator")), f.show(this.find(".time-live-tag"))) : (f.hide(this.find(".time-live-tag")), f.show(this.find(".time-separator")), f.show(this.durationDom), f.show(this.timeDom));
|
|
9290
9291
|
}
|
|
9291
9292
|
}, {
|
|
9292
9293
|
key: "updateTime",
|
|
9293
9294
|
value: function(e) {
|
|
9294
9295
|
if (this.isActiving = !0, !(!e && e !== 0 || e > this.duration)) {
|
|
9295
9296
|
if (this.mode === "flex") {
|
|
9296
|
-
this.centerCurDom.innerHTML = this.minWidthTime(
|
|
9297
|
+
this.centerCurDom.innerHTML = this.minWidthTime(f.format(e));
|
|
9297
9298
|
return;
|
|
9298
9299
|
}
|
|
9299
|
-
this.timeDom.innerHTML = this.minWidthTime(
|
|
9300
|
+
this.timeDom.innerHTML = this.minWidthTime(f.format(e));
|
|
9300
9301
|
}
|
|
9301
9302
|
}
|
|
9302
9303
|
}, {
|
|
@@ -9346,7 +9347,7 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9346
9347
|
};
|
|
9347
9348
|
}
|
|
9348
9349
|
}]), r;
|
|
9349
|
-
}(
|
|
9350
|
+
}(V), ea = /* @__PURE__ */ function(a) {
|
|
9350
9351
|
L(r, a);
|
|
9351
9352
|
var o = D(r);
|
|
9352
9353
|
function r() {
|
|
@@ -9358,13 +9359,13 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9358
9359
|
t.updateSegments();
|
|
9359
9360
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9360
9361
|
if (t._checkIfEnabled(u)) {
|
|
9361
|
-
var c =
|
|
9362
|
-
t.player.offsetCurrentTime =
|
|
9362
|
+
var c = f.getIndexByTime(l, u), h = f.getOffsetCurrentTime(l, u, c);
|
|
9363
|
+
t.player.offsetCurrentTime = h, t.changeIndex(c, u);
|
|
9363
9364
|
}
|
|
9364
9365
|
}), _(m(t), "_onLoadedData", function() {
|
|
9365
9366
|
var s = t.player.timeSegments;
|
|
9366
9367
|
if (t._checkIfEnabled(s)) {
|
|
9367
|
-
var l =
|
|
9368
|
+
var l = f.getOffsetCurrentTime(0, s);
|
|
9368
9369
|
t.player.offsetCurrentTime = l, t.changeIndex(0, s), t.curPos.start > 0 && (t.player.currentTime = t.curPos.start);
|
|
9369
9370
|
}
|
|
9370
9371
|
}), _(m(t), "_onTimeupdate", function() {
|
|
@@ -9372,12 +9373,12 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9372
9373
|
if (t._checkIfEnabled(u)) {
|
|
9373
9374
|
var c = u.length;
|
|
9374
9375
|
t.lastCurrentTime = l;
|
|
9375
|
-
var
|
|
9376
|
-
|
|
9377
|
-
var g =
|
|
9376
|
+
var h = f.getIndexByTime(l, u);
|
|
9377
|
+
h !== t.curIndex && t.changeIndex(h, u);
|
|
9378
|
+
var g = f.getOffsetCurrentTime(l, u, h);
|
|
9378
9379
|
if (t.player.offsetCurrentTime = g, !!t.curPos) {
|
|
9379
9380
|
var p = t.curPos, d = p.start, v = p.end;
|
|
9380
|
-
l < d ? t.player.currentTime = d : l > v &&
|
|
9381
|
+
l < d ? t.player.currentTime = d : l > v && h >= c - 1 && t.player.pause();
|
|
9381
9382
|
}
|
|
9382
9383
|
}
|
|
9383
9384
|
}), _(m(t), "_onSeeking", function() {
|
|
@@ -9388,10 +9389,10 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9388
9389
|
else if (l > u[u.length - 1].end)
|
|
9389
9390
|
t.player.currentTime = u[u.length - 1].end;
|
|
9390
9391
|
else {
|
|
9391
|
-
var c =
|
|
9392
|
+
var c = f.getIndexByTime(l, u);
|
|
9392
9393
|
if (c >= 0) {
|
|
9393
|
-
var
|
|
9394
|
-
|
|
9394
|
+
var h = t.getSeekTime(l, t.lastCurrentTime, c, u);
|
|
9395
|
+
h >= 0 && (t.player.currentTime = h);
|
|
9395
9396
|
}
|
|
9396
9397
|
}
|
|
9397
9398
|
}), _(m(t), "_onPlay", function() {
|
|
@@ -9440,8 +9441,8 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9440
9441
|
if (l === 0)
|
|
9441
9442
|
u.offset = s.start, u.cTime = 0, u.segDuration = c, u.duration = c;
|
|
9442
9443
|
else {
|
|
9443
|
-
var
|
|
9444
|
-
u.offset =
|
|
9444
|
+
var h = n[l - 1];
|
|
9445
|
+
u.offset = h.offset + (u.start - h.end), u.cTime = h.duration + h.cTime, u.segDuration = c, u.duration = h.duration + c;
|
|
9445
9446
|
}
|
|
9446
9447
|
}
|
|
9447
9448
|
}), n) : [];
|
|
@@ -9449,8 +9450,8 @@ var Zo = /* @__PURE__ */ function(a) {
|
|
|
9449
9450
|
}, {
|
|
9450
9451
|
key: "getSeekTime",
|
|
9451
9452
|
value: function(e, i, n, s) {
|
|
9452
|
-
var l = -1, u = s[n], c = u.start,
|
|
9453
|
-
if (e >= c && e <=
|
|
9453
|
+
var l = -1, u = s[n], c = u.start, h = u.end;
|
|
9454
|
+
if (e >= c && e <= h)
|
|
9454
9455
|
return l;
|
|
9455
9456
|
var g = e - i;
|
|
9456
9457
|
if (g < 0 && e < c) {
|
|
@@ -9515,22 +9516,22 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9515
9516
|
i[n] = arguments[n];
|
|
9516
9517
|
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onBarMousedown", function(s) {
|
|
9517
9518
|
var l = m(t), u = l.player, c = t.find(".xgplayer-bar");
|
|
9518
|
-
|
|
9519
|
-
var
|
|
9520
|
-
if (g.h = p, g.barH =
|
|
9519
|
+
f.event(s);
|
|
9520
|
+
var h = c.getBoundingClientRect(), g = f.getEventPos(s, u.zoom), p = h.height - (g.clientY - h.top);
|
|
9521
|
+
if (g.h = p, g.barH = h.height, t.pos = g, !(p < -2))
|
|
9521
9522
|
return t.updateVolumePos(p, s), document.addEventListener("mouseup", t.onBarMouseUp), t._d.isStart = !0, !1;
|
|
9522
9523
|
}), _(m(t), "onBarMouseMove", function(s) {
|
|
9523
9524
|
var l = m(t), u = l._d;
|
|
9524
9525
|
if (u.isStart) {
|
|
9525
|
-
var c = m(t),
|
|
9526
|
-
s.preventDefault(), s.stopPropagation(),
|
|
9527
|
-
var p =
|
|
9526
|
+
var c = m(t), h = c.pos, g = c.player;
|
|
9527
|
+
s.preventDefault(), s.stopPropagation(), f.event(s);
|
|
9528
|
+
var p = f.getEventPos(s, g.zoom);
|
|
9528
9529
|
u.isMoving = !0;
|
|
9529
|
-
var d =
|
|
9530
|
-
d >
|
|
9530
|
+
var d = h.h - p.clientY + h.clientY;
|
|
9531
|
+
d > h.barH || t.updateVolumePos(d, s);
|
|
9531
9532
|
}
|
|
9532
9533
|
}), _(m(t), "onBarMouseUp", function(s) {
|
|
9533
|
-
|
|
9534
|
+
f.event(s), document.removeEventListener("mouseup", t.onBarMouseUp);
|
|
9534
9535
|
var l = m(t), u = l._d;
|
|
9535
9536
|
u.isStart = !1, u.isMoving = !1;
|
|
9536
9537
|
}), _(m(t), "onMouseenter", function(s) {
|
|
@@ -9583,7 +9584,7 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9583
9584
|
pre: function(u) {
|
|
9584
9585
|
u.preventDefault(), u.stopPropagation();
|
|
9585
9586
|
}
|
|
9586
|
-
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave),
|
|
9587
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), B.device !== "mobile" && this.playerConfig.isMobileSimulateMode !== "mobile" && (this.bind("mouseenter", this._onMouseenterHandler), this.bind(["blur", "mouseleave"], this._onMouseleaveHandler), this.bind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.bind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)), this.bind(".xgplayer-icon", ["touchend", "click"], this.changeMutedHandler), this.on(Zi, this.onVolumeChange), this.once(ke, this.onVolumeChange), f.typeOf(s) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
9587
9588
|
}
|
|
9588
9589
|
}
|
|
9589
9590
|
}, {
|
|
@@ -9593,19 +9594,19 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9593
9594
|
if (!(!l || !s)) {
|
|
9594
9595
|
var u = parseInt(e / l.getBoundingClientRect().height * 1e3, 10);
|
|
9595
9596
|
s.style.height = "".concat(e, "px");
|
|
9596
|
-
var c = Math.max(Math.min(u / 1e3, 1), 0),
|
|
9597
|
+
var c = Math.max(Math.min(u / 1e3, 1), 0), h = {
|
|
9597
9598
|
volume: {
|
|
9598
9599
|
from: n.volume,
|
|
9599
9600
|
to: c
|
|
9600
9601
|
}
|
|
9601
9602
|
};
|
|
9602
|
-
n.muted && (
|
|
9603
|
+
n.muted && (h.muted = {
|
|
9603
9604
|
from: !0,
|
|
9604
9605
|
to: !1
|
|
9605
9606
|
}), this.emitUserAction(i, "change_volume", {
|
|
9606
9607
|
muted: n.muted,
|
|
9607
9608
|
volume: n.volume,
|
|
9608
|
-
props:
|
|
9609
|
+
props: h
|
|
9609
9610
|
}), n.volume = Math.max(Math.min(u / 1e3, 1), 0), n.muted && (n.muted = !1), this.config.showValueLabel && this.updateVolumeValue();
|
|
9610
9611
|
}
|
|
9611
9612
|
}
|
|
@@ -9621,14 +9622,14 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9621
9622
|
var e = this.player;
|
|
9622
9623
|
e.focus({
|
|
9623
9624
|
autoHide: !1
|
|
9624
|
-
}), this._timerId && (
|
|
9625
|
+
}), this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), f.addClass(this.root, "slide-show");
|
|
9625
9626
|
}
|
|
9626
9627
|
}, {
|
|
9627
9628
|
key: "unFocus",
|
|
9628
9629
|
value: function() {
|
|
9629
9630
|
var e = this, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, s = arguments.length > 2 ? arguments[2] : void 0, l = this._d, u = this.player;
|
|
9630
|
-
l.isActive || (this._timerId && (
|
|
9631
|
-
l.isActive || (n ? u.blur() : u.focus(),
|
|
9631
|
+
l.isActive || (this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this._timerId = f.setTimeout(this, function() {
|
|
9632
|
+
l.isActive || (n ? u.blur() : u.focus(), f.removeClass(e.root, "slide-show"), l.isStart && e.onBarMouseUp(s)), e._timerId = null;
|
|
9632
9633
|
}, i));
|
|
9633
9634
|
}
|
|
9634
9635
|
}, {
|
|
@@ -9661,7 +9662,7 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9661
9662
|
}, {
|
|
9662
9663
|
key: "destroy",
|
|
9663
9664
|
value: function() {
|
|
9664
|
-
this._timerId && (
|
|
9665
|
+
this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon", B.device === "mobile" ? "touchend" : "click", this.changeMutedHandler);
|
|
9665
9666
|
}
|
|
9666
9667
|
}, {
|
|
9667
9668
|
key: "render",
|
|
@@ -9699,7 +9700,7 @@ var ra = /* @__PURE__ */ function(a) {
|
|
|
9699
9700
|
};
|
|
9700
9701
|
}
|
|
9701
9702
|
}]), r;
|
|
9702
|
-
}(
|
|
9703
|
+
}(V);
|
|
9703
9704
|
function sa() {
|
|
9704
9705
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">
|
|
9705
9706
|
<g clip-path="url(#clip0)">
|
|
@@ -9726,8 +9727,8 @@ var oa = /* @__PURE__ */ function(a) {
|
|
|
9726
9727
|
value: function() {
|
|
9727
9728
|
var e = this;
|
|
9728
9729
|
if (!this.config.disable) {
|
|
9729
|
-
|
|
9730
|
-
e.rotateDeg && e.config.innerRotate &&
|
|
9730
|
+
M(O(r.prototype), "afterCreate", this).call(this), this.appendChild(".xgplayer-icon", this.icons.rotate), this.onBtnClick = this.onBtnClick.bind(this), this.bind(".xgplayer-icon", ["click", "touchend"], this.onBtnClick), this.on(Se, function() {
|
|
9731
|
+
e.rotateDeg && e.config.innerRotate && f.setTimeout(e, function() {
|
|
9731
9732
|
e.updateRotateDeg(e.rotateDeg, e.config.innerRotate);
|
|
9732
9733
|
}, 100);
|
|
9733
9734
|
});
|
|
@@ -9738,7 +9739,7 @@ var oa = /* @__PURE__ */ function(a) {
|
|
|
9738
9739
|
}, {
|
|
9739
9740
|
key: "destroy",
|
|
9740
9741
|
value: function() {
|
|
9741
|
-
|
|
9742
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", ["click", "touchend"], this.onBtnClick);
|
|
9742
9743
|
}
|
|
9743
9744
|
}, {
|
|
9744
9745
|
key: "onBtnClick",
|
|
@@ -9752,17 +9753,17 @@ var oa = /* @__PURE__ */ function(a) {
|
|
|
9752
9753
|
this.player.videoRotateDeg = e;
|
|
9753
9754
|
return;
|
|
9754
9755
|
}
|
|
9755
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer,
|
|
9756
|
-
(e === 0.75 || e === 0.25) && (d = "".concat(p, "px"), v = "".concat(g, "px"), y = -(p - g) / 2,
|
|
9757
|
-
var
|
|
9756
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, g = u.offsetWidth, p = c && i ? c.offsetHeight : u.offsetHeight, d = s, v = l, y = 0, C = 0;
|
|
9757
|
+
(e === 0.75 || e === 0.25) && (d = "".concat(p, "px"), v = "".concat(g, "px"), y = -(p - g) / 2, C = -(g - p) / 2);
|
|
9758
|
+
var w = "translate(".concat(y, "px,").concat(C, "px) rotate(").concat(e, "turn)"), k = {
|
|
9758
9759
|
transformOrigin: "center center",
|
|
9759
|
-
transform:
|
|
9760
|
-
webKitTransform:
|
|
9760
|
+
transform: w,
|
|
9761
|
+
webKitTransform: w,
|
|
9761
9762
|
height: v,
|
|
9762
9763
|
width: d
|
|
9763
|
-
},
|
|
9764
|
-
Object.keys(
|
|
9765
|
-
|
|
9764
|
+
}, N = i ? h : u, R = i ? n.getPlugin("poster") : null;
|
|
9765
|
+
Object.keys(k).map(function(z) {
|
|
9766
|
+
N.style[z] = k[z], R && R.root && (R.root.style[z] = k[z]);
|
|
9766
9767
|
});
|
|
9767
9768
|
}
|
|
9768
9769
|
}, {
|
|
@@ -9862,8 +9863,8 @@ var je = {
|
|
|
9862
9863
|
key: "afterCreate",
|
|
9863
9864
|
value: function() {
|
|
9864
9865
|
var e = this;
|
|
9865
|
-
this.isPIPAvailable() && (
|
|
9866
|
-
e.config.showIcon && (
|
|
9866
|
+
this.isPIPAvailable() && (M(O(r.prototype), "afterCreate", this).call(this), this.pMode = je.INLINE, this.initPipEvents(), this.config.showIcon && this.initIcons(), this.once(wt, function() {
|
|
9867
|
+
e.config.showIcon && (f.removeClass(e.find(".xgplayer-icon"), "xg-icon-disable"), e.bind("click", e.switchPIP));
|
|
9867
9868
|
}));
|
|
9868
9869
|
}
|
|
9869
9870
|
}, {
|
|
@@ -9892,7 +9893,7 @@ var je = {
|
|
|
9892
9893
|
var e = this, i = this.player;
|
|
9893
9894
|
this.leavePIPCallback = function() {
|
|
9894
9895
|
var n = i.paused;
|
|
9895
|
-
|
|
9896
|
+
f.setTimeout(e, function() {
|
|
9896
9897
|
!n && i.mediaPlay();
|
|
9897
9898
|
}, 0), !n && i.mediaPlay(), e.setAttr("data-state", "normal"), e.pipWindow = null, i.emit(Kt, !1);
|
|
9898
9899
|
}, this.enterPIPCallback = function(n) {
|
|
@@ -9926,7 +9927,7 @@ var je = {
|
|
|
9926
9927
|
if (!(!this.isPIPAvailable() || this.isPip))
|
|
9927
9928
|
try {
|
|
9928
9929
|
var l = n.poster;
|
|
9929
|
-
if (l && (i.media.poster =
|
|
9930
|
+
if (l && (i.media.poster = f.typeOf(l) === "String" ? l : l.poster), s.preferDocument && this.isDocPIPAvailable()) {
|
|
9930
9931
|
var u = {};
|
|
9931
9932
|
if (s.width && s.height)
|
|
9932
9933
|
u.width = s.width, u.height = s.height;
|
|
@@ -9934,21 +9935,21 @@ var je = {
|
|
|
9934
9935
|
var c = i.root.getBoundingClientRect();
|
|
9935
9936
|
u.width = c.width, u.height = c.height;
|
|
9936
9937
|
}
|
|
9937
|
-
documentPictureInPicture.requestWindow(u).then(function(
|
|
9938
|
+
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
9938
9939
|
var g = s.docPiPNode, p = s.docPiPStyle;
|
|
9939
9940
|
e.enterPIPCallback();
|
|
9940
|
-
var d = g || i.root, v = d.parentElement, y = d.previousSibling,
|
|
9941
|
-
e.copyStyleIntoPiPWindow(
|
|
9942
|
-
var
|
|
9943
|
-
if (
|
|
9944
|
-
var
|
|
9945
|
-
typeof p == "string" ?
|
|
9941
|
+
var d = g || i.root, v = d.parentElement, y = d.previousSibling, C = d.nextSibling;
|
|
9942
|
+
e.copyStyleIntoPiPWindow(h);
|
|
9943
|
+
var w = document.createElement("style");
|
|
9944
|
+
if (w.append("body{padding:0; margin:0;}"), p) {
|
|
9945
|
+
var k = "";
|
|
9946
|
+
typeof p == "string" ? k = p : typeof p == "function" && (k = p.call(s)), k && w.append(k);
|
|
9946
9947
|
} else
|
|
9947
|
-
d === i.root &&
|
|
9948
|
+
d === i.root && w.append(`
|
|
9948
9949
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
9949
9950
|
`);
|
|
9950
|
-
|
|
9951
|
-
v && (
|
|
9951
|
+
h.document.head.append(w), h.document.body.append(d), h.addEventListener("pagehide", function(N) {
|
|
9952
|
+
v && (C ? v.insertBefore(d, C) : y ? v.insertBefore(d, y.nextSibling) : v.appendChild(d)), e.leavePIPCallback();
|
|
9952
9953
|
}, {
|
|
9953
9954
|
once: !0
|
|
9954
9955
|
});
|
|
@@ -9956,8 +9957,8 @@ var je = {
|
|
|
9956
9957
|
} else
|
|
9957
9958
|
r.checkWebkitSetPresentationMode(i.media) ? i.media.webkitSetPresentationMode("picture-in-picture") : i.media.requestPictureInPicture();
|
|
9958
9959
|
return !0;
|
|
9959
|
-
} catch (
|
|
9960
|
-
return console.error("requestPiP",
|
|
9960
|
+
} catch (h) {
|
|
9961
|
+
return console.error("requestPiP", h), !1;
|
|
9961
9962
|
}
|
|
9962
9963
|
}
|
|
9963
9964
|
}, {
|
|
@@ -9983,8 +9984,8 @@ var je = {
|
|
|
9983
9984
|
}, {
|
|
9984
9985
|
key: "isPIPAvailable",
|
|
9985
9986
|
value: function() {
|
|
9986
|
-
var e = this.player.media, i =
|
|
9987
|
-
return i && (
|
|
9987
|
+
var e = this.player.media, i = f.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : !0;
|
|
9988
|
+
return i && (f.typeOf(e.disablePictureInPicture) === "Boolean" && !e.disablePictureInPicture || e.webkitSupportsPresentationMode && f.typeOf(e.webkitSetPresentationMode) === "Function") || this.isDocPIPAvailable();
|
|
9988
9989
|
}
|
|
9989
9990
|
}, {
|
|
9990
9991
|
key: "isDocPIPAvailable",
|
|
@@ -9994,7 +9995,7 @@ var je = {
|
|
|
9994
9995
|
}, {
|
|
9995
9996
|
key: "destroy",
|
|
9996
9997
|
value: function() {
|
|
9997
|
-
|
|
9998
|
+
M(O(r.prototype), "destroy", this).call(this);
|
|
9998
9999
|
var e = this.player;
|
|
9999
10000
|
e.media.removeEventListener("enterpictureinpicture", this.enterPIPCallback), e.media.removeEventListener("leavepictureinpicture", this.leavePIPCallback), r.checkWebkitSetPresentationMode(e.media) && e.media.removeEventListener("webkitpresentationmodechanged", this.onWebkitpresentationmodechanged), this.exitPIP(), this.unbind("click", this.btnClick);
|
|
10000
10001
|
}
|
|
@@ -10066,7 +10067,7 @@ var fa = /* @__PURE__ */ function(a) {
|
|
|
10066
10067
|
key: "initEvents",
|
|
10067
10068
|
value: function() {
|
|
10068
10069
|
this.nextHandler = this.hook("nextClick", this.changeSrc);
|
|
10069
|
-
var e =
|
|
10070
|
+
var e = B.device === "mobile" ? "touchend" : "click";
|
|
10070
10071
|
this.bind(e, this.playNext), this.show();
|
|
10071
10072
|
}
|
|
10072
10073
|
}, {
|
|
@@ -10108,73 +10109,73 @@ var fa = /* @__PURE__ */ function(a) {
|
|
|
10108
10109
|
};
|
|
10109
10110
|
}
|
|
10110
10111
|
}]), r;
|
|
10111
|
-
}(
|
|
10112
|
+
}(V), Cn = { exports: {} };
|
|
10112
10113
|
(function(a, o) {
|
|
10113
10114
|
(function(r, t) {
|
|
10114
10115
|
a.exports = t();
|
|
10115
10116
|
})(vs, function() {
|
|
10116
10117
|
return function r(t, e, i) {
|
|
10117
|
-
var n = window, s = "application/octet-stream", l = i || s, u = t, c = !e && !i && u,
|
|
10118
|
-
return String(
|
|
10118
|
+
var n = window, s = "application/octet-stream", l = i || s, u = t, c = !e && !i && u, h = document.createElement("a"), g = function(F) {
|
|
10119
|
+
return String(F);
|
|
10119
10120
|
}, p = n.Blob || n.MozBlob || n.WebKitBlob || g, d = e || "download", v, y;
|
|
10120
|
-
if (p = p.call ? p.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (d = c.split("/").pop().split("?")[0],
|
|
10121
|
-
var
|
|
10122
|
-
return
|
|
10123
|
-
r(
|
|
10121
|
+
if (p = p.call ? p.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (d = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
10122
|
+
var C = new XMLHttpRequest();
|
|
10123
|
+
return C.open("GET", c, !0), C.responseType = "blob", C.onload = function(F) {
|
|
10124
|
+
r(F.target.response, d, s);
|
|
10124
10125
|
}, setTimeout(function() {
|
|
10125
|
-
|
|
10126
|
-
}, 0),
|
|
10126
|
+
C.send();
|
|
10127
|
+
}, 0), C;
|
|
10127
10128
|
}
|
|
10128
10129
|
if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))
|
|
10129
10130
|
if (u.length > 1024 * 1024 * 1.999 && p !== g)
|
|
10130
|
-
u =
|
|
10131
|
+
u = R(u), l = u.type || s;
|
|
10131
10132
|
else
|
|
10132
10133
|
return navigator.msSaveBlob ? (
|
|
10133
10134
|
// IE10 can't do a[download], only Blobs:
|
|
10134
|
-
navigator.msSaveBlob(
|
|
10135
|
-
) :
|
|
10135
|
+
navigator.msSaveBlob(R(u), d)
|
|
10136
|
+
) : z(u);
|
|
10136
10137
|
else if (/([\x80-\xff])/.test(u)) {
|
|
10137
|
-
var
|
|
10138
|
-
for (
|
|
10139
|
-
|
|
10140
|
-
u = new p([
|
|
10138
|
+
var w = 0, k = new Uint8Array(u.length), N = k.length;
|
|
10139
|
+
for (w; w < N; ++w)
|
|
10140
|
+
k[w] = u.charCodeAt(w);
|
|
10141
|
+
u = new p([k], { type: l });
|
|
10141
10142
|
}
|
|
10142
10143
|
v = u instanceof p ? u : new p([u], { type: l });
|
|
10143
|
-
function
|
|
10144
|
-
var Y =
|
|
10144
|
+
function R(F) {
|
|
10145
|
+
var Y = F.split(/[:;,]/), K = Y[1], P = Y[2] == "base64" ? atob : decodeURIComponent, X = P(Y.pop()), ne = X.length, ce = 0, Le = new Uint8Array(ne);
|
|
10145
10146
|
for (ce; ce < ne; ++ce)
|
|
10146
10147
|
Le[ce] = X.charCodeAt(ce);
|
|
10147
10148
|
return new p([Le], { type: K });
|
|
10148
10149
|
}
|
|
10149
|
-
function
|
|
10150
|
-
if ("download" in
|
|
10151
|
-
return
|
|
10152
|
-
|
|
10153
|
-
n.URL.revokeObjectURL(
|
|
10150
|
+
function z(F, Y) {
|
|
10151
|
+
if ("download" in h)
|
|
10152
|
+
return h.href = F, h.setAttribute("download", d), h.className = "download-js-link", h.innerHTML = "downloading...", h.style.display = "none", document.body.appendChild(h), setTimeout(function() {
|
|
10153
|
+
h.click(), document.body.removeChild(h), Y === !0 && setTimeout(function() {
|
|
10154
|
+
n.URL.revokeObjectURL(h.href);
|
|
10154
10155
|
}, 250);
|
|
10155
10156
|
}, 66), !0;
|
|
10156
10157
|
if (/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))
|
|
10157
|
-
return /^data:/.test(
|
|
10158
|
+
return /^data:/.test(F) && (F = "data:" + F.replace(/^data:([\w\/\-\+]+)/, s)), window.open(F) || confirm(`Displaying New Document
|
|
10158
10159
|
|
|
10159
|
-
Use Save As... to download, then click back to return to this page.`) && (location.href =
|
|
10160
|
+
Use Save As... to download, then click back to return to this page.`) && (location.href = F), !0;
|
|
10160
10161
|
var K = document.createElement("iframe");
|
|
10161
|
-
document.body.appendChild(K), !Y && /^data:/.test(
|
|
10162
|
+
document.body.appendChild(K), !Y && /^data:/.test(F) && (F = "data:" + F.replace(/^data:([\w\/\-\+]+)/, s)), K.src = F, setTimeout(function() {
|
|
10162
10163
|
document.body.removeChild(K);
|
|
10163
10164
|
}, 333);
|
|
10164
10165
|
}
|
|
10165
10166
|
if (navigator.msSaveBlob)
|
|
10166
10167
|
return navigator.msSaveBlob(v, d);
|
|
10167
10168
|
if (n.URL)
|
|
10168
|
-
|
|
10169
|
+
z(n.URL.createObjectURL(v), !0);
|
|
10169
10170
|
else {
|
|
10170
10171
|
if (typeof v == "string" || v.constructor === g)
|
|
10171
10172
|
try {
|
|
10172
|
-
return
|
|
10173
|
+
return z("data:" + l + ";base64," + n.btoa(v));
|
|
10173
10174
|
} catch {
|
|
10174
|
-
return
|
|
10175
|
+
return z("data:" + l + "," + encodeURIComponent(v));
|
|
10175
10176
|
}
|
|
10176
|
-
y = new FileReader(), y.onload = function(
|
|
10177
|
-
|
|
10177
|
+
y = new FileReader(), y.onload = function(F) {
|
|
10178
|
+
z(this.result);
|
|
10178
10179
|
}, y.readAsDataURL(v);
|
|
10179
10180
|
}
|
|
10180
10181
|
return !0;
|
|
@@ -10209,7 +10210,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10209
10210
|
if (!e.isLock) {
|
|
10210
10211
|
e.emitUserAction(i, "download");
|
|
10211
10212
|
var n = e.playerConfig.url, s = "";
|
|
10212
|
-
|
|
10213
|
+
f.typeOf(n) === "String" ? s = n : f.typeOf(n) === "Array" && n.length > 0 && (s = n[0].src);
|
|
10213
10214
|
var l = e.getAbsoluteURL(s);
|
|
10214
10215
|
da(l), e.isLock = !0, e.timer = window.setTimeout(function() {
|
|
10215
10216
|
e.isLock = !1, window.clearTimeout(e.timer), e.timer = null;
|
|
@@ -10220,7 +10221,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10220
10221
|
return I(r, [{
|
|
10221
10222
|
key: "afterCreate",
|
|
10222
10223
|
value: function() {
|
|
10223
|
-
|
|
10224
|
+
M(O(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.appendChild(".xgplayer-icon", this.icons.download), this._handler = this.hook("click", this.download, {
|
|
10224
10225
|
pre: function(i) {
|
|
10225
10226
|
i.preventDefault(), i.stopPropagation();
|
|
10226
10227
|
}
|
|
@@ -10245,7 +10246,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10245
10246
|
}, {
|
|
10246
10247
|
key: "destroy",
|
|
10247
10248
|
value: function() {
|
|
10248
|
-
|
|
10249
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.download), window.clearTimeout(this.timer), this.timer = null;
|
|
10249
10250
|
}
|
|
10250
10251
|
}, {
|
|
10251
10252
|
key: "render",
|
|
@@ -10286,7 +10287,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10286
10287
|
}, {
|
|
10287
10288
|
key: "afterCreate",
|
|
10288
10289
|
value: function() {
|
|
10289
|
-
|
|
10290
|
+
M(O(r.prototype), "afterCreate", this).call(this), this.appendChild(".xgplayer-icon", this.icons.screenshotIcon);
|
|
10290
10291
|
var e = this.config;
|
|
10291
10292
|
this.initSize = function(i) {
|
|
10292
10293
|
e.fitVideo && (e.width = i.vWidth, e.height = i.vHeight);
|
|
@@ -10336,17 +10337,17 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10336
10337
|
var n = this, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
10337
10338
|
quality: 0.92,
|
|
10338
10339
|
type: "image/png"
|
|
10339
|
-
}, l = this.config, u = this.player, c = s.quality || l.quality,
|
|
10340
|
+
}, l = this.config, u = this.player, c = s.quality || l.quality, h = s.type || l.type;
|
|
10340
10341
|
return new Promise(function(g, p) {
|
|
10341
10342
|
var d = null, v;
|
|
10342
10343
|
if (u.media.canvas)
|
|
10343
10344
|
d = u.media.canvas;
|
|
10344
10345
|
else {
|
|
10345
10346
|
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), d = n.canvas, v = n.canvasCtx;
|
|
10346
|
-
var y = u.media.videoWidth / u.media.videoHeight,
|
|
10347
|
-
y >
|
|
10347
|
+
var y = u.media.videoWidth / u.media.videoHeight, C = d.width / d.height, w = 0, k = 0, N = u.media.videoWidth, R = u.media.videoHeight, z, F, Y, K;
|
|
10348
|
+
y > C ? (Y = d.width, K = d.width / y, z = 0, F = Math.round((d.height - K) / 2)) : y === C ? (Y = d.width, K = d.height, z = 0, F = 0) : y < C && (Y = d.height * y, K = d.height, z = Math.round((d.width - Y) / 2), F = 0), v.drawImage(u.media, w, k, N, R, z, F, Y, K);
|
|
10348
10349
|
}
|
|
10349
|
-
var P = d.toDataURL(
|
|
10350
|
+
var P = d.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
10350
10351
|
P = P.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), g(P);
|
|
10351
10352
|
});
|
|
10352
10353
|
}
|
|
@@ -10360,7 +10361,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10360
10361
|
}, {
|
|
10361
10362
|
key: "destroy",
|
|
10362
10363
|
value: function() {
|
|
10363
|
-
|
|
10364
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.onClickBtn), this.off(Se, this.initSize);
|
|
10364
10365
|
}
|
|
10365
10366
|
}, {
|
|
10366
10367
|
key: "render",
|
|
@@ -10400,13 +10401,13 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10400
10401
|
}]), r;
|
|
10401
10402
|
}(Ue), ma = /* @__PURE__ */ function() {
|
|
10402
10403
|
function a(o) {
|
|
10403
|
-
x(this, a), this.config = o.config, this.parent = o.root, this.root =
|
|
10404
|
+
x(this, a), this.config = o.config, this.parent = o.root, this.root = f.createDom("ul", "", {}, "xg-options-list xg-list-slide-scroll ".concat(this.config.className)), o.root.appendChild(this.root);
|
|
10404
10405
|
var r = this.config.maxHeight;
|
|
10405
10406
|
r && this.setStyle({
|
|
10406
10407
|
maxHeight: r
|
|
10407
10408
|
}), this.onItemClick = this.onItemClick.bind(this), this.renderItemList();
|
|
10408
10409
|
var t = this.config.domEventType === "touch" ? "touchend" : "click";
|
|
10409
|
-
this._delegates =
|
|
10410
|
+
this._delegates = V.delegate.call(this, this.root, "li", t, this.onItemClick);
|
|
10410
10411
|
}
|
|
10411
10412
|
return I(a, [{
|
|
10412
10413
|
key: "renderItemList",
|
|
@@ -10416,7 +10417,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10416
10417
|
i.style[n] = e[n];
|
|
10417
10418
|
}), r.length > 0 && (this.attrKeys = Object.keys(r[0])), this.root.innerHTML = "", r.map(function(n, s) {
|
|
10418
10419
|
var l = n.selected ? "option-item selected" : "option-item";
|
|
10419
|
-
n["data-index"] = s, t.root.appendChild(
|
|
10420
|
+
n["data-index"] = s, t.root.appendChild(f.createDom("li", "<span>".concat(n.showText, "</span>"), n, l));
|
|
10420
10421
|
});
|
|
10421
10422
|
}
|
|
10422
10423
|
}, {
|
|
@@ -10424,10 +10425,10 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10424
10425
|
value: function(r) {
|
|
10425
10426
|
r.delegateTarget || (r.delegateTarget = r.target);
|
|
10426
10427
|
var t = r.delegateTarget;
|
|
10427
|
-
if (t &&
|
|
10428
|
+
if (t && f.hasClass(t, "selected"))
|
|
10428
10429
|
return !1;
|
|
10429
10430
|
var e = typeof this.config.onItemClick == "function" ? this.config.onItemClick : null, i = this.root.querySelector(".selected");
|
|
10430
|
-
|
|
10431
|
+
f.addClass(t, "selected"), i && f.removeClass(i, "selected"), e(r, {
|
|
10431
10432
|
from: i ? this.getAttrObj(i, this.attrKeys) : null,
|
|
10432
10433
|
to: this.getAttrObj(t, this.attrKeys)
|
|
10433
10434
|
});
|
|
@@ -10447,12 +10448,12 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10447
10448
|
}, {
|
|
10448
10449
|
key: "show",
|
|
10449
10450
|
value: function() {
|
|
10450
|
-
|
|
10451
|
+
f.removeClass(this.root, "hide"), f.addClass(this.root, "active");
|
|
10451
10452
|
}
|
|
10452
10453
|
}, {
|
|
10453
10454
|
key: "hide",
|
|
10454
10455
|
value: function() {
|
|
10455
|
-
|
|
10456
|
+
f.removeClass(this.root, "active"), f.addClass(this.root, "hide");
|
|
10456
10457
|
}
|
|
10457
10458
|
}, {
|
|
10458
10459
|
key: "setStyle",
|
|
@@ -10481,7 +10482,7 @@ var pa = /* @__PURE__ */ function(a) {
|
|
|
10481
10482
|
function ya(a, o) {
|
|
10482
10483
|
return a === de.SIDE ? o === W.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
|
|
10483
10484
|
}
|
|
10484
|
-
var De =
|
|
10485
|
+
var De = B.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
10485
10486
|
L(r, a);
|
|
10486
10487
|
var o = D(r);
|
|
10487
10488
|
function r(t) {
|
|
@@ -10513,7 +10514,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10513
10514
|
key: "afterCreate",
|
|
10514
10515
|
value: function() {
|
|
10515
10516
|
var e = this, i = this.config;
|
|
10516
|
-
this.initIcons(), De = De || this.domEventType === "touch", De &&
|
|
10517
|
+
this.initIcons(), De = De || this.domEventType === "touch", De && B.device === "mobile" && i.listType === de.DEFAULT && (i.listType = de.SIDE), i.hidePortrait && f.addClass(this.root, "portrait"), this.on([Se, ve], function() {
|
|
10517
10518
|
e._resizeList();
|
|
10518
10519
|
}), this.once(ye, function() {
|
|
10519
10520
|
i.list && i.list.length > 0 && (e.renderItemList(i.list), e.show());
|
|
@@ -10527,17 +10528,17 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10527
10528
|
var e = this, i = this.icons, n = Object.keys(i), s = !1;
|
|
10528
10529
|
n.length > 0 && (n.forEach(function(l) {
|
|
10529
10530
|
e.appendChild(".xgplayer-icon", i[l]), !s && (s = i[l]);
|
|
10530
|
-
}), this.isIcons = s), !s && (this.appendChild(".xgplayer-icon",
|
|
10531
|
+
}), this.isIcons = s), !s && (this.appendChild(".xgplayer-icon", f.createDom("span", "", {}, "icon-text")), f.addClass(this.find(".xgplayer-icon"), "btn-text"));
|
|
10531
10532
|
}
|
|
10532
10533
|
}, {
|
|
10533
10534
|
key: "show",
|
|
10534
10535
|
value: function(e) {
|
|
10535
|
-
!this.config.list || this.config.list.length < 2 ||
|
|
10536
|
+
!this.config.list || this.config.list.length < 2 || f.addClass(this.root, "show");
|
|
10536
10537
|
}
|
|
10537
10538
|
}, {
|
|
10538
10539
|
key: "hide",
|
|
10539
10540
|
value: function() {
|
|
10540
|
-
|
|
10541
|
+
f.removeClass(this.root, "show");
|
|
10541
10542
|
}
|
|
10542
10543
|
}, {
|
|
10543
10544
|
key: "getTextByLang",
|
|
@@ -10545,7 +10546,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10545
10546
|
if (e === void 0)
|
|
10546
10547
|
return "";
|
|
10547
10548
|
var s = this.config.list;
|
|
10548
|
-
!n && (n = this.player.lang), i = !i ||
|
|
10549
|
+
!n && (n = this.player.lang), i = !i || f.isUndefined(e[i]) ? "text" : i, typeof e == "number" && (e = s[e]);
|
|
10549
10550
|
try {
|
|
10550
10551
|
return te(e[i]) === "object" ? e[i][n] || e[i].en : e[i];
|
|
10551
10552
|
} catch (l) {
|
|
@@ -10601,7 +10602,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10601
10602
|
root: s.listType === de.SIDE ? u.innerContainer || u.root : this.root
|
|
10602
10603
|
};
|
|
10603
10604
|
if (this.config.isShowIcon) {
|
|
10604
|
-
var
|
|
10605
|
+
var h = this.player.root.getBoundingClientRect(), g = h.height, p = s.listType === de.MIDDLE ? g - 50 : g;
|
|
10605
10606
|
p && s.heightLimit && (c.config.maxHeight = "".concat(p, "px")), this.optionsList = new ma(c), this.changeCurrentText(), this.show();
|
|
10606
10607
|
}
|
|
10607
10608
|
this._resizeList();
|
|
@@ -10653,7 +10654,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10653
10654
|
};
|
|
10654
10655
|
}
|
|
10655
10656
|
}]), r;
|
|
10656
|
-
}(
|
|
10657
|
+
}(V), _a = /* @__PURE__ */ function(a) {
|
|
10657
10658
|
L(r, a);
|
|
10658
10659
|
var o = D(r);
|
|
10659
10660
|
function r(t) {
|
|
@@ -10672,7 +10673,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10672
10673
|
key: "afterCreate",
|
|
10673
10674
|
value: function() {
|
|
10674
10675
|
var e = this;
|
|
10675
|
-
|
|
10676
|
+
M(O(r.prototype), "afterCreate", this).call(this), this.on("resourceReady", function(i) {
|
|
10676
10677
|
e.changeDefinitionList(i);
|
|
10677
10678
|
}), this.on(oi, function(i) {
|
|
10678
10679
|
e.renderItemList(e.config.list, i.to);
|
|
@@ -10681,7 +10682,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10681
10682
|
}, {
|
|
10682
10683
|
key: "show",
|
|
10683
10684
|
value: function(e) {
|
|
10684
|
-
!this.config.list || this.config.list.length < 2 ||
|
|
10685
|
+
!this.config.list || this.config.list.length < 2 || f.addClass(this.root, "show");
|
|
10685
10686
|
}
|
|
10686
10687
|
}, {
|
|
10687
10688
|
key: "initDefinition",
|
|
@@ -10701,14 +10702,14 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10701
10702
|
n && i.forEach(function(c) {
|
|
10702
10703
|
c.selected = !1;
|
|
10703
10704
|
});
|
|
10704
|
-
var l = 0, u = i.map(function(c,
|
|
10705
|
+
var l = 0, u = i.map(function(c, h) {
|
|
10705
10706
|
var g = G(G({}, c), {}, {
|
|
10706
10707
|
showText: e.getTextByLang(c) || c.definition,
|
|
10707
10708
|
selected: !1
|
|
10708
10709
|
});
|
|
10709
|
-
return (c.selected || c.definition && c.definition == s) && (g.selected = !0, l =
|
|
10710
|
+
return (c.selected || c.definition && c.definition == s) && (g.selected = !0, l = h), g;
|
|
10710
10711
|
});
|
|
10711
|
-
|
|
10712
|
+
M(O(r.prototype), "renderItemList", this).call(this, u, l);
|
|
10712
10713
|
}
|
|
10713
10714
|
}, {
|
|
10714
10715
|
key: "changeDefinitionList",
|
|
@@ -10726,7 +10727,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10726
10727
|
key: "onItemClick",
|
|
10727
10728
|
value: function(e, i) {
|
|
10728
10729
|
var n = this.player.definitionList;
|
|
10729
|
-
|
|
10730
|
+
M(O(r.prototype), "onItemClick", this).apply(this, arguments), this.emitUserAction(e, "change_definition", {
|
|
10730
10731
|
from: i.from,
|
|
10731
10732
|
to: i.to
|
|
10732
10733
|
});
|
|
@@ -10776,19 +10777,19 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10776
10777
|
key: "afterCreate",
|
|
10777
10778
|
value: function() {
|
|
10778
10779
|
var e = this;
|
|
10779
|
-
|
|
10780
|
+
M(O(r.prototype), "afterCreate", this).call(this), this.on(Qi, function() {
|
|
10780
10781
|
e.curValue !== e.player.playbackRate && e.renderItemList();
|
|
10781
10782
|
}), this.renderItemList();
|
|
10782
10783
|
}
|
|
10783
10784
|
}, {
|
|
10784
10785
|
key: "show",
|
|
10785
10786
|
value: function(e) {
|
|
10786
|
-
!this.config.list || this.config.list.length === 0 ||
|
|
10787
|
+
!this.config.list || this.config.list.length === 0 || M(O(r.prototype), "show", this).call(this);
|
|
10787
10788
|
}
|
|
10788
10789
|
}, {
|
|
10789
10790
|
key: "onItemClick",
|
|
10790
10791
|
value: function(e, i) {
|
|
10791
|
-
|
|
10792
|
+
M(O(r.prototype), "onItemClick", this).call(this, e, i);
|
|
10792
10793
|
var n = e.delegateTarget, s = Number(n.getAttribute("rate"));
|
|
10793
10794
|
if (!s || s === this.curValue)
|
|
10794
10795
|
return !1;
|
|
@@ -10813,7 +10814,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10813
10814
|
};
|
|
10814
10815
|
return c.rate === i && (c.selected = !0, n = u), c.showText = e.getTextByLang(l), c;
|
|
10815
10816
|
});
|
|
10816
|
-
|
|
10817
|
+
M(O(r.prototype), "renderItemList", this).call(this, s, n);
|
|
10817
10818
|
}
|
|
10818
10819
|
}, {
|
|
10819
10820
|
key: "changeCurrentText",
|
|
@@ -10826,7 +10827,7 @@ var De = N.device === "mobile", Ct = /* @__PURE__ */ function(a) {
|
|
|
10826
10827
|
}, {
|
|
10827
10828
|
key: "destroy",
|
|
10828
10829
|
value: function() {
|
|
10829
|
-
|
|
10830
|
+
M(O(r.prototype), "destroy", this).call(this);
|
|
10830
10831
|
}
|
|
10831
10832
|
}], [{
|
|
10832
10833
|
key: "pluginName",
|
|
@@ -10874,7 +10875,7 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
10874
10875
|
key: "afterCreate",
|
|
10875
10876
|
value: function() {
|
|
10876
10877
|
var e = this;
|
|
10877
|
-
|
|
10878
|
+
M(O(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.config.target && (this.playerConfig.fullscreenTarget = this.config.target), this.initIcons(), this.on(gt, function(i) {
|
|
10878
10879
|
e.animate(i);
|
|
10879
10880
|
}), this.btnClick = this.btnClick.bind(this), this.handleCssFullscreen = this.hook("cssFullscreen_change", this.btnClick, {
|
|
10880
10881
|
pre: function(n) {
|
|
@@ -10925,7 +10926,7 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
10925
10926
|
}, {
|
|
10926
10927
|
key: "destroy",
|
|
10927
10928
|
value: function() {
|
|
10928
|
-
|
|
10929
|
+
M(O(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.btnClick);
|
|
10929
10930
|
}
|
|
10930
10931
|
}, {
|
|
10931
10932
|
key: "render",
|
|
@@ -11014,7 +11015,7 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
11014
11015
|
return "error";
|
|
11015
11016
|
}
|
|
11016
11017
|
}]), r;
|
|
11017
|
-
}(
|
|
11018
|
+
}(V), Ta = /* @__PURE__ */ function(a) {
|
|
11018
11019
|
L(r, a);
|
|
11019
11020
|
var o = D(r);
|
|
11020
11021
|
function r() {
|
|
@@ -11048,7 +11049,7 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
11048
11049
|
if (e) {
|
|
11049
11050
|
this.customOnClick = s;
|
|
11050
11051
|
var l = this.config.interval;
|
|
11051
|
-
this.intervalId && (clearTimeout(this.intervalId), this.intervalId = null),
|
|
11052
|
+
this.intervalId && (clearTimeout(this.intervalId), this.intervalId = null), f.addClass(this.root, "show"), n.mode === "arrow" && f.addClass(this.root, "arrow"), typeof e == "string" ? this.find(".xgplayer-prompt-detail").innerHTML = e : this.find(".xgplayer-prompt-detail").innerHTML = "".concat(e.text || "") + "".concat(e.highlight ? '<i class="highlight">'.concat(e.highlight, "</i>") : ""), n.style && this.setStyle(n.style);
|
|
11052
11053
|
var u = typeof n.autoHide == "boolean" ? n.autoHide : this.config.autoHide;
|
|
11053
11054
|
if (u) {
|
|
11054
11055
|
var c = n.interval || l;
|
|
@@ -11061,12 +11062,12 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
11061
11062
|
}, {
|
|
11062
11063
|
key: "hide",
|
|
11063
11064
|
value: function() {
|
|
11064
|
-
|
|
11065
|
+
f.removeClass(this.root, "show"), f.removeClass(this.root, "arrow"), this.root.removeAttribute("style"), this.customOnClick = null;
|
|
11065
11066
|
}
|
|
11066
11067
|
}, {
|
|
11067
11068
|
key: "render",
|
|
11068
11069
|
value: function() {
|
|
11069
|
-
return '<xg-prompt class="xgplayer-prompt '.concat(
|
|
11070
|
+
return '<xg-prompt class="xgplayer-prompt '.concat(b.CONTROLS_FOLLOW, `">
|
|
11070
11071
|
<span class="xgplayer-prompt-detail"></span>
|
|
11071
11072
|
</xg-prompt>`);
|
|
11072
11073
|
}
|
|
@@ -11092,7 +11093,7 @@ var zi = /* @__PURE__ */ function(a) {
|
|
|
11092
11093
|
};
|
|
11093
11094
|
}
|
|
11094
11095
|
}]), r;
|
|
11095
|
-
}(
|
|
11096
|
+
}(V), Vi = {
|
|
11096
11097
|
time: 0,
|
|
11097
11098
|
text: "",
|
|
11098
11099
|
id: 1,
|
|
@@ -11111,7 +11112,7 @@ var ji = {
|
|
|
11111
11112
|
_updateDotDom: function(o, r) {
|
|
11112
11113
|
if (r) {
|
|
11113
11114
|
var t = this.calcuPosition(o.time, o.duration), e = o.style || {};
|
|
11114
|
-
e.left = "".concat(t.left, "%"), e.width = "".concat(t.width, "%"), r.setAttribute("data-text", o.text), r.setAttribute("data-time", o.time), t.isMini ?
|
|
11115
|
+
e.left = "".concat(t.left, "%"), e.width = "".concat(t.width, "%"), r.setAttribute("data-text", o.text), r.setAttribute("data-time", o.time), t.isMini ? f.addClass(r, "mini") : f.removeClass(r, "mini"), Object.keys(e).map(function(i) {
|
|
11115
11116
|
r.style[i] = e[i];
|
|
11116
11117
|
});
|
|
11117
11118
|
}
|
|
@@ -11129,7 +11130,7 @@ var ji = {
|
|
|
11129
11130
|
i.left = "".concat(e.left, "%"), i.width = "".concat(e.width, "%");
|
|
11130
11131
|
var n = "xgspot_".concat(o.id, " xgplayer-spot");
|
|
11131
11132
|
e.isMini && (n += " mini");
|
|
11132
|
-
var s = o.template ? '<div class="xgplayer-spot-pop">'.concat(o.template, "</div>") : "", l =
|
|
11133
|
+
var s = o.template ? '<div class="xgplayer-spot-pop">'.concat(o.template, "</div>") : "", l = f.createDom("xg-spot", s, {
|
|
11133
11134
|
"data-text": o.text,
|
|
11134
11135
|
"data-time": o.time,
|
|
11135
11136
|
"data-id": o.id
|
|
@@ -11208,7 +11209,7 @@ var ji = {
|
|
|
11208
11209
|
}));
|
|
11209
11210
|
},
|
|
11210
11211
|
positionDot: function(o, r) {
|
|
11211
|
-
var t =
|
|
11212
|
+
var t = f.findDom(o, ".xgplayer-spot-pop");
|
|
11212
11213
|
if (t) {
|
|
11213
11214
|
var e = this.playerSize, i = o.getBoundingClientRect(), n = t.getBoundingClientRect(), s = i.left - e.left, l = e.width - s - i.width / 2;
|
|
11214
11215
|
if (s < n.width / 2 || e.width < n.width) {
|
|
@@ -11275,14 +11276,14 @@ var $e = {
|
|
|
11275
11276
|
var e;
|
|
11276
11277
|
return x(this, r), e = o.call(this, t), _(m(e), "onMousemove", function(i) {
|
|
11277
11278
|
if (!e.config.disable) {
|
|
11278
|
-
if (
|
|
11279
|
+
if (f.hasClass(i.target, "xg-spot-content") && e.config.isHideThumbnailHover) {
|
|
11279
11280
|
e.player.plugins.progress.onMouseLeave(i);
|
|
11280
11281
|
return;
|
|
11281
11282
|
}
|
|
11282
|
-
(e._state.f ||
|
|
11283
|
+
(e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11283
11284
|
}
|
|
11284
11285
|
}), _(m(e), "onMousedown", function(i) {
|
|
11285
|
-
e.config.disable || (e._state.f ||
|
|
11286
|
+
e.config.disable || (e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11286
11287
|
}), _(m(e), "onMouseup", function(i) {
|
|
11287
11288
|
if (e.isDrag) {
|
|
11288
11289
|
var n = e.player.plugins.progress;
|
|
@@ -11295,7 +11296,7 @@ var $e = {
|
|
|
11295
11296
|
n && n.enableBlur(), e.show();
|
|
11296
11297
|
}
|
|
11297
11298
|
}), _(m(e), "onProgressMouseOver", function(i, n) {
|
|
11298
|
-
if (!e.config.disable &&
|
|
11299
|
+
if (!e.config.disable && f.hasClass(n.target, "xgplayer-spot") && !e._curDot) {
|
|
11299
11300
|
e._curDot = n.target, e.focusDot(n.target), e._curDot.children.length > 0 && e.hide();
|
|
11300
11301
|
var s = e.player.plugins.progress;
|
|
11301
11302
|
s && s.disableBlur(), e._curDot.addEventListener("mouseleave", e.onDotMouseLeave);
|
|
@@ -11318,7 +11319,7 @@ var $e = {
|
|
|
11318
11319
|
this._curDot = null, this.handlerSpotClick = this.hook("spotClick", function(i, n) {
|
|
11319
11320
|
n.seekTime && e.player.seek(n.seekTime);
|
|
11320
11321
|
}), this.transformTimeHook = this.hook("transformTime", function(i) {
|
|
11321
|
-
e.setTimeContent(
|
|
11322
|
+
e.setTimeContent(f.format(i));
|
|
11322
11323
|
}), Ea(this), this.on(Pe, function() {
|
|
11323
11324
|
e.show();
|
|
11324
11325
|
}), this.config.disable && this.disable(), this.extTextRoot = this.find(".xg-spot-ext-text");
|
|
@@ -11343,7 +11344,7 @@ var $e = {
|
|
|
11343
11344
|
var e = this, i = this.player.plugins.progress;
|
|
11344
11345
|
if (i && (Object.keys($e).map(function(s) {
|
|
11345
11346
|
e[$e[s]] = e[$e[s]].bind(e), i.addCallBack(s, e[$e[s]]);
|
|
11346
|
-
}),
|
|
11347
|
+
}), B.device !== "mobile")) {
|
|
11347
11348
|
this.bind(".xg-spot-info", "mousemove", this.onMousemove), this.bind(".xg-spot-info", "mousedown", this.onMousedown), this.bind(".xg-spot-info", "mouseup", this.onMouseup);
|
|
11348
11349
|
var n = this.hook("previewClick", function() {
|
|
11349
11350
|
});
|
|
@@ -11360,28 +11361,28 @@ var $e = {
|
|
|
11360
11361
|
}, {
|
|
11361
11362
|
key: "onProgressDragStart",
|
|
11362
11363
|
value: function(e) {
|
|
11363
|
-
this.config.disable || !this.player.duration || (this.isDrag = !0, this.videoPreview &&
|
|
11364
|
+
this.config.disable || !this.player.duration || (this.isDrag = !0, this.videoPreview && f.addClass(this.videoPreview, "show"));
|
|
11364
11365
|
}
|
|
11365
11366
|
}, {
|
|
11366
11367
|
key: "onProgressDragEnd",
|
|
11367
11368
|
value: function(e) {
|
|
11368
|
-
this.config.disable || !this.player.duration || (this.isDrag = !1, this.videoPreview &&
|
|
11369
|
+
this.config.disable || !this.player.duration || (this.isDrag = !1, this.videoPreview && f.removeClass(this.videoPreview, "show"));
|
|
11369
11370
|
}
|
|
11370
11371
|
}, {
|
|
11371
11372
|
key: "onProgressClick",
|
|
11372
11373
|
value: function(e, i) {
|
|
11373
|
-
this.config.disable ||
|
|
11374
|
+
this.config.disable || f.hasClass(i.target, "xgplayer-spot") && (i.stopPropagation(), i.preventDefault(), ["time", "id", "text"].map(function(n) {
|
|
11374
11375
|
e[n] = i.target.getAttribute("data-".concat(n));
|
|
11375
11376
|
}), e.time && (e.time = Number(e.time)), this.handlerSpotClick(i, e));
|
|
11376
11377
|
}
|
|
11377
11378
|
}, {
|
|
11378
11379
|
key: "updateLinePos",
|
|
11379
11380
|
value: function(e, i) {
|
|
11380
|
-
var n = this.root, s = this.previewLine, l = this.player, u = this.config, c = l.controls.mode,
|
|
11381
|
+
var n = this.root, s = this.previewLine, l = this.player, u = this.config, c = l.controls.mode, h = c === "flex", g = n.getBoundingClientRect().width;
|
|
11381
11382
|
if (!(!g && this._hasThumnail)) {
|
|
11382
11383
|
g = this._hasThumnail && g < u.width ? u.width : g;
|
|
11383
11384
|
var p = e - g / 2, d;
|
|
11384
|
-
p < 0 && !
|
|
11385
|
+
p < 0 && !h ? (p = 0, d = e - g / 2) : p > i - g && !h ? (d = p - (i - g), p = i - g) : d = 0, d !== void 0 && (s.style.transform = "translateX(".concat(d.toFixed(2), "px)")), n.style.transform = "translateX(".concat(p.toFixed(2), "px) translateZ(0)");
|
|
11385
11386
|
}
|
|
11386
11387
|
}
|
|
11387
11388
|
}, {
|
|
@@ -11396,8 +11397,8 @@ var $e = {
|
|
|
11396
11397
|
var l = this.root, u = this.config, c = this._state;
|
|
11397
11398
|
if (l) {
|
|
11398
11399
|
c.now = n, this.transformTimeHook(n);
|
|
11399
|
-
var
|
|
11400
|
-
s && s.target &&
|
|
11400
|
+
var h = this.timeStr;
|
|
11401
|
+
s && s.target && f.hasClass(s.target, "xgplayer-spot") ? (this.showTips(s.target.getAttribute("data-text"), !1, h), this.focusDot(s.target), c.f = !0, u.isFocusDots && c.f && (c.now = parseInt(s.target.getAttribute("data-time"), 10))) : u.defaultText ? (c.f = !1, this.showTips(u.defaultText, !0, h)) : (c.f = !1, this.hideTips("")), this.updateTimeText(h), this.updateThumbnails(c.now), this.updateLinePos(e, i);
|
|
11401
11402
|
}
|
|
11402
11403
|
}
|
|
11403
11404
|
}, {
|
|
@@ -11419,16 +11420,16 @@ var $e = {
|
|
|
11419
11420
|
key: "registerThumbnail",
|
|
11420
11421
|
value: function() {
|
|
11421
11422
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11422
|
-
if (
|
|
11423
|
+
if (B.device !== "mobile") {
|
|
11423
11424
|
var i = this.player, n = this.config, s = i.getPlugin("thumbnail");
|
|
11424
11425
|
if (s && s.setConfig(e), !s || !s.usable || !n.isShowThumbnail) {
|
|
11425
|
-
|
|
11426
|
+
f.addClass(this.root, "short-line no-thumbnail");
|
|
11426
11427
|
return;
|
|
11427
11428
|
} else
|
|
11428
|
-
|
|
11429
|
-
n.mode === "short" &&
|
|
11429
|
+
f.removeClass(this.root, "short-line no-thumbnail");
|
|
11430
|
+
n.mode === "short" && f.addClass(this.root, "short-line"), this._hasThumnail = !0;
|
|
11430
11431
|
var l = this.find(".xg-spot-thumbnail");
|
|
11431
|
-
this.thumbnail = s.createThumbnail(l, "progress-thumbnail"), n.isShowCoverPreview && (this.videoPreview =
|
|
11432
|
+
this.thumbnail = s.createThumbnail(l, "progress-thumbnail"), n.isShowCoverPreview && (this.videoPreview = f.createDom("xg-video-preview", "", {}, "xgvideo-preview"), i.root.appendChild(this.videoPreview), this.videothumbnail = s.createThumbnail(this.videoPreview, "xgvideo-thumbnail")), this.updateThumbnails(0);
|
|
11432
11433
|
}
|
|
11433
11434
|
}
|
|
11434
11435
|
}, {
|
|
@@ -11453,7 +11454,7 @@ var $e = {
|
|
|
11453
11454
|
}, {
|
|
11454
11455
|
key: "focusDot",
|
|
11455
11456
|
value: function(e, i) {
|
|
11456
|
-
e && (i || (i = e.getAttribute("data-id")),
|
|
11457
|
+
e && (i || (i = e.getAttribute("data-id")), f.addClass(e, "active"), this._activeDotId = i);
|
|
11457
11458
|
}
|
|
11458
11459
|
}, {
|
|
11459
11460
|
key: "blurDot",
|
|
@@ -11462,28 +11463,28 @@ var $e = {
|
|
|
11462
11463
|
var i = this._activeDotId;
|
|
11463
11464
|
e = this.getDotDom(i);
|
|
11464
11465
|
}
|
|
11465
|
-
e && (
|
|
11466
|
+
e && (f.removeClass(e, "active"), this._activeDotId = null);
|
|
11466
11467
|
}
|
|
11467
11468
|
}, {
|
|
11468
11469
|
key: "showTips",
|
|
11469
11470
|
value: function(e, i) {
|
|
11470
11471
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
11471
|
-
|
|
11472
|
+
f.addClass(this.root, "no-timepoint"), e && (f.addClass(this.find(".xg-spot-content"), "show-text"), i && this.config.mode === "production" ? (f.addClass(this.root, "product"), this.tipText.textContent = e) : (f.removeClass(this.root, "product"), this.tipText.textContent = this._hasThumnail ? e : "".concat(n, " ").concat(e)));
|
|
11472
11473
|
}
|
|
11473
11474
|
}, {
|
|
11474
11475
|
key: "hideTips",
|
|
11475
11476
|
value: function() {
|
|
11476
|
-
|
|
11477
|
+
f.removeClass(this.root, "no-timepoint"), this.tipText.textContent = "", f.removeClass(this.find(".xg-spot-content"), "show-text"), f.removeClass(this.root, "product");
|
|
11477
11478
|
}
|
|
11478
11479
|
}, {
|
|
11479
11480
|
key: "hide",
|
|
11480
11481
|
value: function() {
|
|
11481
|
-
|
|
11482
|
+
f.addClass(this.root, "hide");
|
|
11482
11483
|
}
|
|
11483
11484
|
}, {
|
|
11484
11485
|
key: "show",
|
|
11485
11486
|
value: function(e) {
|
|
11486
|
-
|
|
11487
|
+
f.removeClass(this.root, "hide");
|
|
11487
11488
|
}
|
|
11488
11489
|
}, {
|
|
11489
11490
|
key: "enable",
|
|
@@ -11507,7 +11508,7 @@ var $e = {
|
|
|
11507
11508
|
}, {
|
|
11508
11509
|
key: "render",
|
|
11509
11510
|
value: function() {
|
|
11510
|
-
return
|
|
11511
|
+
return B.device === "mobile" || this.playerConfig.isMobileSimulateMode === "mobile" ? "" : '<div class="xg-spot-info hide '.concat(this.config.mode === "short" ? "short-line" : "", `">
|
|
11511
11512
|
<div class="xg-spot-content">
|
|
11512
11513
|
<div class="xg-spot-thumbnail">
|
|
11513
11514
|
<span class="xg-spot-time"></span>
|
|
@@ -11543,7 +11544,7 @@ var $e = {
|
|
|
11543
11544
|
};
|
|
11544
11545
|
}
|
|
11545
11546
|
}]), r;
|
|
11546
|
-
}(
|
|
11547
|
+
}(V), xa = /* @__PURE__ */ function(a) {
|
|
11547
11548
|
L(r, a);
|
|
11548
11549
|
var o = D(r);
|
|
11549
11550
|
function r(t) {
|
|
@@ -11594,7 +11595,7 @@ var $e = {
|
|
|
11594
11595
|
if (!this._preloadMark[e]) {
|
|
11595
11596
|
var n = this.config.urls, s = n.length, l = [];
|
|
11596
11597
|
e > 0 && l.push(e - 1), l.push(e), e > 0 && e < s - 1 && l.push(e + 1), l.map(function(u) {
|
|
11597
|
-
!i._preloadMark[u] && u >= 0 && u < s && (i._preloadMark[u] = 1,
|
|
11598
|
+
!i._preloadMark[u] && u >= 0 && u < s && (i._preloadMark[u] = 1, f.preloadImg(n[u], function() {
|
|
11598
11599
|
i._preloadMark[u] = 2;
|
|
11599
11600
|
}));
|
|
11600
11601
|
});
|
|
@@ -11603,38 +11604,38 @@ var $e = {
|
|
|
11603
11604
|
}, {
|
|
11604
11605
|
key: "getPosition",
|
|
11605
11606
|
value: function(e) {
|
|
11606
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = this.config, l = s.pic_num, u = s.row, c = s.col,
|
|
11607
|
+
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = this.config, l = s.pic_num, u = s.row, c = s.col, h = s.width, g = s.height;
|
|
11607
11608
|
this.interval = Math.round(this.player.duration / l);
|
|
11608
11609
|
var p = Math.ceil(e / this.interval);
|
|
11609
11610
|
p = p > l ? l : p;
|
|
11610
|
-
var d = p < u * c ? 0 : Math.ceil(p / (u * c)) - 1, v = p - d * (c * u), y = v > 0 ? Math.ceil(v / c) - 1 : 0,
|
|
11611
|
+
var d = p < u * c ? 0 : Math.ceil(p / (u * c)) - 1, v = p - d * (c * u), y = v > 0 ? Math.ceil(v / c) - 1 : 0, C = v > 0 ? v - y * c - 1 : 0, w = 0, k = 0;
|
|
11611
11612
|
if (i && n) {
|
|
11612
|
-
var
|
|
11613
|
-
|
|
11613
|
+
var N = i / n;
|
|
11614
|
+
N < h / g ? (k = n, w = k * (h / g)) : (w = i, k = w / (h / g));
|
|
11614
11615
|
} else
|
|
11615
|
-
n ? i || (
|
|
11616
|
-
var
|
|
11616
|
+
n ? i || (k = n || g, w = k * (h / g)) : (w = i || h, k = w / (h / g));
|
|
11617
|
+
var R = this.getUrlByIndex(d);
|
|
11617
11618
|
return {
|
|
11618
11619
|
urlIndex: d,
|
|
11619
11620
|
rowIndex: y,
|
|
11620
|
-
colIndex:
|
|
11621
|
-
url:
|
|
11622
|
-
height:
|
|
11623
|
-
width:
|
|
11621
|
+
colIndex: C,
|
|
11622
|
+
url: R,
|
|
11623
|
+
height: k,
|
|
11624
|
+
width: w,
|
|
11624
11625
|
style: {
|
|
11625
|
-
backgroundImage: "url(".concat(
|
|
11626
|
-
backgroundSize: "".concat(
|
|
11627
|
-
backgroundPosition: "-".concat(
|
|
11628
|
-
width: "".concat(
|
|
11629
|
-
height: "".concat(
|
|
11626
|
+
backgroundImage: "url(".concat(R, ")"),
|
|
11627
|
+
backgroundSize: "".concat(w * c, "px auto"),
|
|
11628
|
+
backgroundPosition: "-".concat(C * w, "px -").concat(y * k, "px"),
|
|
11629
|
+
width: "".concat(w, "px"),
|
|
11630
|
+
height: "".concat(k, "px")
|
|
11630
11631
|
}
|
|
11631
11632
|
};
|
|
11632
11633
|
}
|
|
11633
11634
|
}, {
|
|
11634
11635
|
key: "update",
|
|
11635
11636
|
value: function(e, i) {
|
|
11636
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", u = this.config, c = u.pic_num,
|
|
11637
|
-
if (!(c <= 0 || !
|
|
11637
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", u = this.config, c = u.pic_num, h = u.urls;
|
|
11638
|
+
if (!(c <= 0 || !h || h.length === 0)) {
|
|
11638
11639
|
var g = this.getPosition(i, n, s);
|
|
11639
11640
|
this.preload(g.urlIndex), Object.keys(g.style).map(function(p) {
|
|
11640
11641
|
e.style[p] = g.style[p];
|
|
@@ -11652,7 +11653,7 @@ var $e = {
|
|
|
11652
11653
|
}, {
|
|
11653
11654
|
key: "createThumbnail",
|
|
11654
11655
|
value: function(e, i) {
|
|
11655
|
-
var n =
|
|
11656
|
+
var n = f.createDom("xg-thumbnail", "", {}, "thumbnail ".concat(i));
|
|
11656
11657
|
return e && e.appendChild(n), n;
|
|
11657
11658
|
}
|
|
11658
11659
|
}], [{
|
|
@@ -11677,7 +11678,7 @@ var $e = {
|
|
|
11677
11678
|
};
|
|
11678
11679
|
}
|
|
11679
11680
|
}]), r;
|
|
11680
|
-
}(
|
|
11681
|
+
}(V);
|
|
11681
11682
|
function Ht(a) {
|
|
11682
11683
|
return a ? "background:".concat(a, ";") : "";
|
|
11683
11684
|
}
|
|
@@ -11691,7 +11692,7 @@ var Ia = /* @__PURE__ */ function(a) {
|
|
|
11691
11692
|
i[n] = arguments[n];
|
|
11692
11693
|
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onTimeupdate", function() {
|
|
11693
11694
|
var s = t.player.ended, l = m(t), u = l.offsetDuration, c = t.currentTime;
|
|
11694
|
-
c =
|
|
11695
|
+
c = f.adjustTimeByDuration(c, u, s), t.update({
|
|
11695
11696
|
played: c
|
|
11696
11697
|
}, u);
|
|
11697
11698
|
}), t;
|
|
@@ -11742,8 +11743,8 @@ var Ia = /* @__PURE__ */ function(a) {
|
|
|
11742
11743
|
played: Ht(i.playedColor),
|
|
11743
11744
|
progress: Ht(i.progressColor),
|
|
11744
11745
|
height: u > 0 && u !== 2 ? "height: ".concat(u, "px;") : ""
|
|
11745
|
-
},
|
|
11746
|
-
return '<xg-mini-progress class="xg-mini-progress '.concat(
|
|
11746
|
+
}, h = l === "show" ? "xg-mini-progress-show" : "";
|
|
11747
|
+
return '<xg-mini-progress class="xg-mini-progress '.concat(h, '" style="').concat(c.progress, " ").concat(c.height, `">
|
|
11747
11748
|
<xg-mini-progress-cache class="xg-mini-progress-cache" style="`).concat(c.cached, `"></xg-mini-progress-cache>
|
|
11748
11749
|
<xg-mini-progress-played class="xg-mini-progress-played" style="`).concat(c.played, `"></xg-mini-progress-played>
|
|
11749
11750
|
</xg-mini-progress>`);
|
|
@@ -11763,7 +11764,7 @@ var Ia = /* @__PURE__ */ function(a) {
|
|
|
11763
11764
|
};
|
|
11764
11765
|
}
|
|
11765
11766
|
}]), r;
|
|
11766
|
-
}(
|
|
11767
|
+
}(V), Ge = {
|
|
11767
11768
|
REAL_TIME: "realtime",
|
|
11768
11769
|
FIRST_FRAME: "firstframe",
|
|
11769
11770
|
FRAME_RATE: "framerate",
|
|
@@ -11805,10 +11806,10 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
11805
11806
|
!t.player.paused && t._checkIfCanStart() && t.start(0, l);
|
|
11806
11807
|
}
|
|
11807
11808
|
}), _(m(t), "start", function(s, l) {
|
|
11808
|
-
var u = t.player.video, c = Pa(),
|
|
11809
|
-
!
|
|
11809
|
+
var u = t.player.video, c = Pa(), h = t.checkVideoIsSupport(u);
|
|
11810
|
+
!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 === Ge.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));
|
|
11810
11811
|
}), _(m(t), "stop", function() {
|
|
11811
|
-
t.frameId && (t._loopType === "timer" ?
|
|
11812
|
+
t.frameId && (t._loopType === "timer" ? f.clearTimeout(m(t), t.frameId) : f.cancelAnimationFrame(t.frameId), t.frameId = null);
|
|
11812
11813
|
}), t;
|
|
11813
11814
|
}
|
|
11814
11815
|
return I(r, [{
|
|
@@ -11881,7 +11882,7 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
11881
11882
|
if (!e)
|
|
11882
11883
|
return null;
|
|
11883
11884
|
var i = e && e instanceof window.HTMLVideoElement ? e : e.canvas ? e.canvas : e.flyVideo ? e.flyVideo : null;
|
|
11884
|
-
if (i && !(
|
|
11885
|
+
if (i && !(B.browser === "safari" && f.isMSE(i)))
|
|
11885
11886
|
return i;
|
|
11886
11887
|
var n = i ? i.tagName.toLowerCase() : "";
|
|
11887
11888
|
return n === "canvas" || n === "img" ? i : null;
|
|
@@ -11891,7 +11892,7 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
11891
11892
|
value: function() {
|
|
11892
11893
|
var e = this.playerConfig.poster;
|
|
11893
11894
|
if (e) {
|
|
11894
|
-
var i =
|
|
11895
|
+
var i = f.typeOf(e) === "String" ? e : f.typeOf(e.poster) === "String" ? e.poster : null;
|
|
11895
11896
|
this.updateImg(i);
|
|
11896
11897
|
}
|
|
11897
11898
|
}
|
|
@@ -11933,10 +11934,10 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
11933
11934
|
try {
|
|
11934
11935
|
var n = this._pos, s = this.config, l = this.canvas.getBoundingClientRect(), u = l.width, c = l.height;
|
|
11935
11936
|
if (u !== n.width || c !== n.height || n.pi !== i) {
|
|
11936
|
-
var
|
|
11937
|
+
var h = parseInt(u / c * 100, 10);
|
|
11937
11938
|
n.pi = i, n.width !== u && (n.width = this.canvas.width = u), n.height !== c && (n.height = this.canvas.height = c);
|
|
11938
11939
|
var g = c, p = u;
|
|
11939
|
-
|
|
11940
|
+
h < i ? p = parseInt(c * i / 100, 10) : h > i && (g = parseInt(u * 100 / i, 10)), n.rwidth = p * s.multiple, n.rheight = g * s.multiple, n.x = (u - n.rwidth) / 2, n.y = (c - n.rheight) / 2;
|
|
11940
11941
|
}
|
|
11941
11942
|
this.canvasFilter && (this.canvasCtx.filter = s.filter), this.canvasCtx.drawImage(e, n.x, n.y, n.rwidth, n.rheight);
|
|
11942
11943
|
} catch (d) {
|
|
@@ -11983,10 +11984,10 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
11983
11984
|
}, {
|
|
11984
11985
|
key: "supportCanvasFilter",
|
|
11985
11986
|
value: function() {
|
|
11986
|
-
return !(
|
|
11987
|
+
return !(B.browser === "safari" || B.browser === "firefox");
|
|
11987
11988
|
}
|
|
11988
11989
|
}]), r;
|
|
11989
|
-
}(
|
|
11990
|
+
}(V), Da = {
|
|
11990
11991
|
LANG: "zh-cn",
|
|
11991
11992
|
TEXT: {
|
|
11992
11993
|
ERROR_TYPES: {
|
|
@@ -12222,13 +12223,13 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
12222
12223
|
} else
|
|
12223
12224
|
t.seekingEventReceived = !1;
|
|
12224
12225
|
if (!(l.media.paused && l.media.currentTime !== 0 && t.hasPlayed)) {
|
|
12225
|
-
var c = l.media.buffered,
|
|
12226
|
+
var c = l.media.buffered, h = u.smallGapLimit || 0.5, g = u.gapDetectionThreshold || 0.3, p = l.media.currentTime, d = t._getIndex(c, p, g);
|
|
12226
12227
|
if (!(d === null || d === 0)) {
|
|
12227
12228
|
console.log("GapJump bufferRange ", c.start(d), c.end(d));
|
|
12228
12229
|
var v = c.start(d) + 0.1, y = l.media.duration;
|
|
12229
12230
|
if (!(v > y)) {
|
|
12230
|
-
var
|
|
12231
|
-
|
|
12231
|
+
var C = v - p, w = C <= h;
|
|
12232
|
+
C < r.BROWSER_GAP_TOLERANCE || w && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? v + 0.1 : v), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", d, " isGapSamll:", w, " currentTime:", l.media.currentTime, " jumpSize:", p - l.media.currentTime), v !== 0.08 && l && l.emit("log", {
|
|
12232
12233
|
type: "oneevent",
|
|
12233
12234
|
end_type: "gap",
|
|
12234
12235
|
vid: l.config.vid,
|
|
@@ -12293,7 +12294,7 @@ var lt = null, La = /* @__PURE__ */ function(a) {
|
|
|
12293
12294
|
};
|
|
12294
12295
|
}
|
|
12295
12296
|
}]), r;
|
|
12296
|
-
}(
|
|
12297
|
+
}(V);
|
|
12297
12298
|
wn.BROWSER_GAP_TOLERANCE = 1e-3;
|
|
12298
12299
|
var Ra = /* @__PURE__ */ function(a) {
|
|
12299
12300
|
L(r, a);
|
|
@@ -12310,8 +12311,8 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12310
12311
|
var s = m(t), l = s.player, u = s.config;
|
|
12311
12312
|
if (clearTimeout(t.timer), t.timer = null, !(t.jumpCnt > u.jumpCntMax || u.useWaitingTimeoutJump === !1) && !(l.media.paused && l.media.currentTime !== 0 && t.hasPlayed)) {
|
|
12312
12313
|
t.jumpSize = u.jumpSize * (t.jumpCnt + 1), t.jumpCnt === u.jumpSize && t.jumpSize < 6 && (t.jumpSize = 6);
|
|
12313
|
-
var c = l.currentTime + t.jumpSize,
|
|
12314
|
-
c >
|
|
12314
|
+
var c = l.currentTime + t.jumpSize, h = l.media.duration;
|
|
12315
|
+
c > h || (t.jumpCnt++, l.currentTime = c);
|
|
12315
12316
|
}
|
|
12316
12317
|
}), t;
|
|
12317
12318
|
}
|
|
@@ -12341,7 +12342,7 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12341
12342
|
};
|
|
12342
12343
|
}
|
|
12343
12344
|
}]), r;
|
|
12344
|
-
}(
|
|
12345
|
+
}(V), Ke = "cdn", ut = ["cdn"], Fa = /* @__PURE__ */ function(a) {
|
|
12345
12346
|
L(r, a);
|
|
12346
12347
|
var o = D(r);
|
|
12347
12348
|
function r() {
|
|
@@ -12358,7 +12359,7 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12358
12359
|
l += u;
|
|
12359
12360
|
}), Math.floor(l / t.speedListCache[s].length);
|
|
12360
12361
|
}), _(m(t), "startTimer", function() {
|
|
12361
|
-
|
|
12362
|
+
f.isMSE(t.player.video) || (t.initSpeedList(), t.cnt = 0, t.timer = setTimeout(t.testSpeed, t.config.testTimeStep));
|
|
12362
12363
|
}), _(m(t), "initSpeedList", function() {
|
|
12363
12364
|
t.speedListCache = {}, ut.forEach(function(s) {
|
|
12364
12365
|
t.speedListCache[s] = [];
|
|
@@ -12367,24 +12368,24 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12367
12368
|
s.speed && t.appendList(s.speed, s.type || Ke);
|
|
12368
12369
|
}), _(m(t), "testSpeed", function() {
|
|
12369
12370
|
if (clearTimeout(t.timer), t.timer = null, !(!t.player || !t.config.openSpeed)) {
|
|
12370
|
-
var s = t.config, l = s.url, u = s.loadSize, c = s.testCnt,
|
|
12371
|
+
var s = t.config, l = s.url, u = s.loadSize, c = s.testCnt, h = s.testTimeStep, g = l + (l.indexOf("?") < 0 ? "?testst=" : "&testst=") + Date.now();
|
|
12371
12372
|
if (!(t.cnt >= c)) {
|
|
12372
12373
|
t.cnt++;
|
|
12373
12374
|
try {
|
|
12374
12375
|
var p = (/* @__PURE__ */ new Date()).getTime(), d = null, v = new XMLHttpRequest();
|
|
12375
12376
|
t.xhr = v, v.open("GET", g);
|
|
12376
|
-
var y = {},
|
|
12377
|
-
y.Range = "bytes=" +
|
|
12378
|
-
v.setRequestHeader(
|
|
12377
|
+
var y = {}, C = Math.floor(Math.random() * 10);
|
|
12378
|
+
y.Range = "bytes=" + C + "-" + (u + C), y && Object.keys(y).forEach(function(w) {
|
|
12379
|
+
v.setRequestHeader(w, y[w]);
|
|
12379
12380
|
}), v.onreadystatechange = function() {
|
|
12380
12381
|
if (v.readyState === 4) {
|
|
12381
12382
|
t.xhr = null, d = (/* @__PURE__ */ new Date()).getTime();
|
|
12382
|
-
var
|
|
12383
|
-
t.appendList(
|
|
12383
|
+
var w = v.getResponseHeader("Content-Length") / 1024 * 8, k = Math.round(w * 1e3 / (d - p));
|
|
12384
|
+
t.appendList(k), t.timer = setTimeout(t.testSpeed, h);
|
|
12384
12385
|
}
|
|
12385
12386
|
}, v.send();
|
|
12386
|
-
} catch (
|
|
12387
|
-
console.error(
|
|
12387
|
+
} catch (w) {
|
|
12388
|
+
console.error(w);
|
|
12388
12389
|
}
|
|
12389
12390
|
}
|
|
12390
12391
|
}
|
|
@@ -12393,8 +12394,8 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12393
12394
|
if (!(!t.speedListCache || !t.speedListCache[l])) {
|
|
12394
12395
|
var u = t.config.saveSpeedMax;
|
|
12395
12396
|
t.speedListCache[l].length >= u && t.speedListCache[l].shift(), t.speedListCache[l].push(s);
|
|
12396
|
-
var c = m(t),
|
|
12397
|
-
|
|
12397
|
+
var c = m(t), h = c.player;
|
|
12398
|
+
h && (l === Ke ? h.realTimeSpeed = s : h[t.getSpeedName("realTime", l)] = s), t.updateSpeed(l);
|
|
12398
12399
|
}
|
|
12399
12400
|
}), _(m(t), "updateSpeed", function() {
|
|
12400
12401
|
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ke, l = t.getSpeed(s), u = m(t), c = u.player;
|
|
@@ -12405,8 +12406,8 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12405
12406
|
realTimeSpeed: c.realTimeSpeed
|
|
12406
12407
|
}));
|
|
12407
12408
|
else {
|
|
12408
|
-
var
|
|
12409
|
-
(!c[
|
|
12409
|
+
var h = t.getSpeedName("avg", s);
|
|
12410
|
+
(!c[h] || l !== c[h]) && (c[h] = l, c.emit($t, {
|
|
12410
12411
|
speed: l,
|
|
12411
12412
|
realTimeSpeed: c.realTimeSpeed
|
|
12412
12413
|
}));
|
|
@@ -12467,7 +12468,7 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12467
12468
|
};
|
|
12468
12469
|
}
|
|
12469
12470
|
}]), r;
|
|
12470
|
-
}(
|
|
12471
|
+
}(V), Ma = /* @__PURE__ */ function(a) {
|
|
12471
12472
|
L(r, a);
|
|
12472
12473
|
var o = D(r);
|
|
12473
12474
|
function r() {
|
|
@@ -12524,8 +12525,8 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12524
12525
|
}, {
|
|
12525
12526
|
key: "_checkStuck",
|
|
12526
12527
|
value: function(e, i, n, s) {
|
|
12527
|
-
var l = this.player.media || this.player.video, u = document.hidden, c = l.paused,
|
|
12528
|
-
if (!(u || c ||
|
|
12528
|
+
var l = this.player.media || this.player.video, u = document.hidden, c = l.paused, h = l.readyState, g = l.currentTime, p = l.buffered;
|
|
12529
|
+
if (!(u || c || h < 4)) {
|
|
12529
12530
|
var d = this._checkBuffer(g, p), v = d.enoughBuffer, y = d.buffers;
|
|
12530
12531
|
v && (e <= this.config.reportFrame ? (this._currentStuckCount++, this._payload.push({
|
|
12531
12532
|
currentTime: g,
|
|
@@ -12576,15 +12577,15 @@ var Ra = /* @__PURE__ */ function(a) {
|
|
|
12576
12577
|
};
|
|
12577
12578
|
}
|
|
12578
12579
|
}]), r;
|
|
12579
|
-
}(
|
|
12580
|
+
}(V);
|
|
12580
12581
|
Xe.use(Da);
|
|
12581
12582
|
var Na = /* @__PURE__ */ I(function a(o, r) {
|
|
12582
12583
|
var t, e, i;
|
|
12583
12584
|
x(this, a);
|
|
12584
12585
|
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [ea, Go, Ia, Sa, Qo], u = [].concat(l, [Ko, Zo, oa, fa, _a, ka, pa, va, ra, ua]), c = [So, xo, Po, jo, Ao, wa, Ta, xa, Ro];
|
|
12585
12586
|
this.plugins = [Oa, To].concat(fe(u), c, [wn, Ra]);
|
|
12586
|
-
var
|
|
12587
|
-
switch (
|
|
12587
|
+
var h = n ? "mobile" : B.device;
|
|
12588
|
+
switch (h) {
|
|
12588
12589
|
case "pc":
|
|
12589
12590
|
(t = this.plugins).push.apply(t, [Hi, Nt, zi, Fa, Ma]);
|
|
12590
12591
|
break;
|
|
@@ -12594,7 +12595,7 @@ var Na = /* @__PURE__ */ I(function a(o, r) {
|
|
|
12594
12595
|
default:
|
|
12595
12596
|
(i = this.plugins).push.apply(i, [Hi, Nt, zi]);
|
|
12596
12597
|
}
|
|
12597
|
-
(
|
|
12598
|
+
(B.os.isIpad || h === "pc") && this.plugins.push(La), B.os.isIpad && this.plugins.push(Nt), this.ignores = [], this.i18n = [];
|
|
12598
12599
|
}), he = /* @__PURE__ */ function(a) {
|
|
12599
12600
|
L(r, a);
|
|
12600
12601
|
var o = D(r);
|
|
@@ -12604,14 +12605,14 @@ var Na = /* @__PURE__ */ I(function a(o, r) {
|
|
|
12604
12605
|
return I(r);
|
|
12605
12606
|
}(St);
|
|
12606
12607
|
_(he, "defaultPreset", Na);
|
|
12607
|
-
_(he, "Util",
|
|
12608
|
-
_(he, "Sniffer",
|
|
12608
|
+
_(he, "Util", f);
|
|
12609
|
+
_(he, "Sniffer", B);
|
|
12609
12610
|
_(he, "Errors", ht);
|
|
12610
12611
|
_(he, "Events", Js);
|
|
12611
|
-
_(he, "Plugin",
|
|
12612
|
+
_(he, "Plugin", V);
|
|
12612
12613
|
_(he, "BasePlugin", xe);
|
|
12613
12614
|
_(he, "I18N", Xe);
|
|
12614
|
-
_(he, "STATE_CLASS",
|
|
12615
|
+
_(he, "STATE_CLASS", b);
|
|
12615
12616
|
_(he, "InstManager", _n);
|
|
12616
12617
|
const Ba = ["id"], Ha = /* @__PURE__ */ ue({
|
|
12617
12618
|
name: "ElImageViewer",
|
|
@@ -12663,7 +12664,7 @@ const Ba = ["id"], Ha = /* @__PURE__ */ ue({
|
|
|
12663
12664
|
}, s = ee(() => ({
|
|
12664
12665
|
...n,
|
|
12665
12666
|
...t.config
|
|
12666
|
-
})), l = o, u = Yt(a, "modelValue"), c = Gi(),
|
|
12667
|
+
})), l = o, u = Yt(a, "modelValue"), c = Gi(), h = Fn("image-viewer");
|
|
12667
12668
|
function g() {
|
|
12668
12669
|
l("close"), u.value = !1, r.destroy();
|
|
12669
12670
|
}
|
|
@@ -12691,14 +12692,14 @@ const Ba = ["id"], Ha = /* @__PURE__ */ ue({
|
|
|
12691
12692
|
{
|
|
12692
12693
|
ref: "wrapper",
|
|
12693
12694
|
tabindex: -1,
|
|
12694
|
-
class: J(j(
|
|
12695
|
+
class: J(j(h).e("wrapper")),
|
|
12695
12696
|
style: re({ zIndex: a.zIndex })
|
|
12696
12697
|
},
|
|
12697
12698
|
[
|
|
12698
12699
|
S(
|
|
12699
12700
|
"div",
|
|
12700
12701
|
{
|
|
12701
|
-
class: J(j(
|
|
12702
|
+
class: J(j(h).e("mask"))
|
|
12702
12703
|
},
|
|
12703
12704
|
null,
|
|
12704
12705
|
2
|
|
@@ -12708,7 +12709,7 @@ const Ba = ["id"], Ha = /* @__PURE__ */ ue({
|
|
|
12708
12709
|
S(
|
|
12709
12710
|
"div",
|
|
12710
12711
|
{
|
|
12711
|
-
class: J(j(
|
|
12712
|
+
class: J(j(h).e("canvas"))
|
|
12712
12713
|
},
|
|
12713
12714
|
[
|
|
12714
12715
|
S("div", { id: j(c) }, null, 8, Ba),
|
|
@@ -12716,7 +12717,7 @@ const Ba = ["id"], Ha = /* @__PURE__ */ ue({
|
|
|
12716
12717
|
S(
|
|
12717
12718
|
"span",
|
|
12718
12719
|
{
|
|
12719
|
-
class: J([j(
|
|
12720
|
+
class: J([j(h).e("btn"), j(h).e("close")]),
|
|
12720
12721
|
onClick: g
|
|
12721
12722
|
},
|
|
12722
12723
|
[
|
|
@@ -12889,31 +12890,31 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
12889
12890
|
for (c of r == null ? void 0 : r.returnNode) {
|
|
12890
12891
|
if (isNaN(c[1]))
|
|
12891
12892
|
return;
|
|
12892
|
-
let
|
|
12893
|
+
let h = Array.from(new Array(c[1] + 1).keys()).slice(c[0]);
|
|
12893
12894
|
ft(() => {
|
|
12894
|
-
n(
|
|
12895
|
+
n(h);
|
|
12895
12896
|
});
|
|
12896
12897
|
}
|
|
12897
12898
|
}, n = (c) => {
|
|
12898
|
-
var
|
|
12899
|
-
let
|
|
12900
|
-
c.forEach((
|
|
12901
|
-
let
|
|
12902
|
-
p +=
|
|
12899
|
+
var C, w, k;
|
|
12900
|
+
let h = document.createElement("div"), g = document.getElementById("approveProcess"), p = 0, d = (C = document.getElementById(`${c[0]}`)) == null ? void 0 : C.offsetWidth, v = (w = document.getElementById(`${c[0]}`)) == null ? void 0 : w.offsetLeft, y = (k = document.getElementById(`${c[0]}`)) == null ? void 0 : k.offsetTop;
|
|
12901
|
+
c.forEach((N) => {
|
|
12902
|
+
let R = document.getElementById(`${N}`);
|
|
12903
|
+
p += R.offsetHeight;
|
|
12903
12904
|
}), setTimeout(() => {
|
|
12904
|
-
|
|
12905
|
+
h.style.width = d + 32 + "px", h.style.height = p + "px", h.style.background = "#f9f9f9", h.style.position = "absolute", h.style.top = y - 16 + "px", h.style.left = v - 16 + "px", h.style.zIndex = -1, g == null || g.appendChild(h);
|
|
12905
12906
|
});
|
|
12906
|
-
}, s = (c,
|
|
12907
|
+
}, s = (c, h, g) => {
|
|
12907
12908
|
var v, y;
|
|
12908
|
-
let p = (v = e.listData) == null ? void 0 : v.findIndex((
|
|
12909
|
-
if (g && ((y = g[e.defaultFile.approvePersonList]) == null ? void 0 : y.findIndex((
|
|
12909
|
+
let p = (v = e.listData) == null ? void 0 : v.findIndex((C) => C.lineType == "dashed"), d = "";
|
|
12910
|
+
if (g && ((y = g[e.defaultFile.approvePersonList]) == null ? void 0 : y.findIndex((w) => w[e.defaultFile.approveStatus] === e.statusOption.执行中)) > -1)
|
|
12910
12911
|
return "ikapprove ikapprove-dengdai orange";
|
|
12911
12912
|
switch (c) {
|
|
12912
12913
|
case e.statusOption.发起:
|
|
12913
12914
|
d = "ikapprove-duihao2 green";
|
|
12914
12915
|
break;
|
|
12915
12916
|
case e.statusOption.执行中:
|
|
12916
|
-
d = p ==
|
|
12917
|
+
d = p == h ? "ikapprove-dengdai orange" : "";
|
|
12917
12918
|
break;
|
|
12918
12919
|
case e.statusOption.同意:
|
|
12919
12920
|
d = "ikapprove-duihao2 green";
|
|
@@ -12935,20 +12936,20 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
12935
12936
|
break;
|
|
12936
12937
|
}
|
|
12937
12938
|
return `ikapprove ${d}`;
|
|
12938
|
-
}, l = (c,
|
|
12939
|
+
}, l = (c, h) => {
|
|
12939
12940
|
c.show = !c.show;
|
|
12940
12941
|
let g = document.getElementById(`${c[e.defaultFile.nodeId]}`), p = Array.from(g == null ? void 0 : g.getElementsByClassName("approveList"));
|
|
12941
12942
|
for (let d of p)
|
|
12942
|
-
d.style.display =
|
|
12943
|
+
d.style.display = h;
|
|
12943
12944
|
}, u = (c) => Je(t.value, c);
|
|
12944
|
-
return (c,
|
|
12945
|
+
return (c, h) => {
|
|
12945
12946
|
const g = Te("el-image"), p = Te("IkingApprovalProcessDetail");
|
|
12946
12947
|
return T(), E("div", Va, [
|
|
12947
12948
|
(T(!0), E(
|
|
12948
12949
|
le,
|
|
12949
12950
|
null,
|
|
12950
12951
|
Re(e.listData, (d, v) => {
|
|
12951
|
-
var y,
|
|
12952
|
+
var y, C, w, k, N, R, z, F, Y, K;
|
|
12952
12953
|
return T(), E("div", {
|
|
12953
12954
|
class: "approveBlock",
|
|
12954
12955
|
id: d[e.defaultFile.nodeId],
|
|
@@ -13054,7 +13055,7 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13054
13055
|
[
|
|
13055
13056
|
A(" 待审批节点 "),
|
|
13056
13057
|
S("div", null, [
|
|
13057
|
-
((
|
|
13058
|
+
((C = d[e.defaultFile.approvePersonList]) == null ? void 0 : C.length) == 1 ? (T(), E("span", nl, [
|
|
13058
13059
|
Me(
|
|
13059
13060
|
$(d[e.defaultFile.originator]) + " ",
|
|
13060
13061
|
1
|
|
@@ -13070,7 +13071,7 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13070
13071
|
])) : d[e.defaultFile.approvePersonList] ? (T(), E(
|
|
13071
13072
|
"span",
|
|
13072
13073
|
sl,
|
|
13073
|
-
$(`${(
|
|
13074
|
+
$(`${(w = d[e.defaultFile.approvePersonList]) == null ? void 0 : w.length}人${d[e.defaultFile.approveTypeName]}`),
|
|
13074
13075
|
1
|
|
13075
13076
|
/* TEXT */
|
|
13076
13077
|
)) : A("v-if", !0)
|
|
@@ -13084,7 +13085,7 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13084
13085
|
al,
|
|
13085
13086
|
S("div", ll, [
|
|
13086
13087
|
A(" 抄送一人时 "),
|
|
13087
|
-
((
|
|
13088
|
+
((k = d[e.defaultFile.approvePersonList]) == null ? void 0 : k.length) == 1 ? (T(), E("span", ul, [
|
|
13088
13089
|
S("span", null, [
|
|
13089
13090
|
Me("已抄送给 "),
|
|
13090
13091
|
S(
|
|
@@ -13104,9 +13105,9 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13104
13105
|
)
|
|
13105
13106
|
])) : A("v-if", !0),
|
|
13106
13107
|
A(" 抄送多人时 "),
|
|
13107
|
-
((
|
|
13108
|
+
((N = d[e.defaultFile.approvePersonList]) == null ? void 0 : N.length) > 1 ? (T(), E("span", hl, [
|
|
13108
13109
|
Me(
|
|
13109
|
-
$(`已抄送${(
|
|
13110
|
+
$(`已抄送${(R = d[e.defaultFile.approvePersonList]) == null ? void 0 : R.length}人`) + " ",
|
|
13110
13111
|
1
|
|
13111
13112
|
/* TEXT */
|
|
13112
13113
|
),
|
|
@@ -13137,7 +13138,7 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13137
13138
|
/* TEXT */
|
|
13138
13139
|
)) : A("v-if", !0),
|
|
13139
13140
|
A(" 是抄送节点,并且抄送人员大于1时,展示图标 "),
|
|
13140
|
-
d[e.defaultFile.nodeType] == e.nodeType.抄送节点 && ((
|
|
13141
|
+
d[e.defaultFile.nodeType] == e.nodeType.抄送节点 && ((z = d[e.defaultFile.approvePersonList]) == null ? void 0 : z.length) > 1 ? (T(), E("span", _l, [
|
|
13141
13142
|
d != null && d.show ? (T(), E("i", {
|
|
13142
13143
|
key: 0,
|
|
13143
13144
|
class: "ikapprove ikapprove-a-putongjiantouzhankai",
|
|
@@ -13188,7 +13189,7 @@ const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-b301aa7d"]]), za = Ie(U
|
|
|
13188
13189
|
])) : A("v-if", !0)
|
|
13189
13190
|
])) : A("v-if", !0),
|
|
13190
13191
|
A(" 附件 "),
|
|
13191
|
-
(
|
|
13192
|
+
(F = d[e.defaultFile.attachment]) != null && F.length ? (T(), Ee(j(Qr), {
|
|
13192
13193
|
key: 1,
|
|
13193
13194
|
list: d[e.defaultFile.attachment]
|
|
13194
13195
|
}, null, 8, ["list"])) : A("v-if", !0),
|