iking-web-ui-pro 0.2.21 → 0.2.22
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/IKExpandCollapse/ik.index.es.js +79 -73
- package/dist/IKExpandCollapse/ik.index.umd.js +1 -1
- package/dist/IKExpandCollapse/style.css +1 -1
- package/dist/IKPreviewFile/ik.index.es.js +302 -296
- package/dist/IKPreviewFile/ik.index.umd.js +16 -16
- package/dist/IKPreviewFile/style.css +1 -1
- package/dist/IKVerticalStepBar/ik.index.es.js +130 -124
- package/dist/IKVerticalStepBar/ik.index.umd.js +3 -3
- package/dist/IKVerticalStepBar/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +306 -300
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcessDetail/style.css +1 -1
- package/dist/IkBaseDialog/ik.index.es.js +117 -111
- package/dist/IkBaseDialog/ik.index.umd.js +1 -1
- package/dist/IkBaseDialog/style.css +1 -1
- package/dist/IkBtnSetting/ik.index.es.js +242 -236
- package/dist/IkBtnSetting/ik.index.umd.js +1 -1
- package/dist/IkBtnSetting/style.css +1 -1
- package/dist/IkCollapseCard/ik.index.es.js +83 -77
- package/dist/IkCollapseCard/ik.index.umd.js +1 -1
- package/dist/IkCollapseCard/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +434 -428
- package/dist/IkDescription/ik.index.umd.js +1 -1
- package/dist/IkDescription/style.css +1 -1
- package/dist/IkDetailPreviewFiles/ik.index.es.js +308 -302
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +1 -1
- package/dist/IkDetailPreviewFiles/style.css +1 -1
- package/dist/IkIconPicker/ik.index.es.js +140 -134
- package/dist/IkIconPicker/ik.index.umd.js +1 -1
- package/dist/IkIconPicker/style.css +1 -1
- package/dist/IkMonacoEditor/ik.index.es.js +383 -377
- package/dist/IkMonacoEditor/ik.index.umd.js +3 -3
- package/dist/IkMonacoEditor/style.css +1 -1
- package/dist/IkPageFull/ik.index.es.js +1135 -1129
- package/dist/IkPageFull/ik.index.umd.js +2 -2
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +588 -582
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/style.css +1 -1
- package/dist/IkSchedule/ik.index.es.js +2960 -2954
- package/dist/IkSchedule/ik.index.umd.js +1 -1
- package/dist/IkSchedule/style.css +1 -1
- package/dist/IkSideText/ik.index.es.js +111 -105
- package/dist/IkSideText/ik.index.umd.js +1 -1
- package/dist/IkSideText/style.css +1 -1
- package/dist/IkSvgIcon/ik.index.es.js +74 -68
- package/dist/IkSvgIcon/ik.index.umd.js +1 -1
- package/dist/IkSvgIcon/style.css +1 -1
- package/dist/IkUploadFile/ik.index.es.js +720 -714
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +223 -217
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/IkUploadImage/style.css +1 -1
- package/dist/index.es.js +5502 -5496
- package/dist/index.umd.js +78 -78
- package/dist/src/components/IkSvgIcon/index.d.ts +6 -2
- package/dist/src/components/IkSvgIcon/src/index.vue.d.ts +6 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as se, computed as K, openBlock as x, createElementBlock as O, createElementVNode as S, inject as Ze, ref as Xe, resolveComponent as Ee, Fragment as $e, renderList as
|
|
1
|
+
import { defineComponent as se, computed as K, openBlock as x, createElementBlock as O, createElementVNode as S, inject as Ze, ref as Xe, resolveComponent as Ee, Fragment as $e, renderList as Ut, normalizeStyle as le, toDisplayString as _e, normalizeClass as te, createVNode as X, unref as z, withModifiers as et, renderSlot as pe, createBlock as ce, withCtx as q, createCommentVNode as ue, mergeModels as ct, useModel as Xt, reactive as bn, watch as zi, nextTick as Vi, createTextVNode as Ye, h as wn, mergeProps as zt, createSlots as Tn, Teleport as En, Transition as Sn, useCssVars as xn } from "vue";
|
|
2
2
|
import { useNamespace as Pn, ElTag as In } from "element-plus";
|
|
3
3
|
import { paramType as An, ikFile as Ln, buildUUID as ji, ikColor as Dn } from "iking-utils-pro";
|
|
4
4
|
const Pe = (a, o) => {
|
|
@@ -9,7 +9,7 @@ const Pe = (a, o) => {
|
|
|
9
9
|
for (const [r, t] of Object.entries(o))
|
|
10
10
|
a[r] = t;
|
|
11
11
|
return a;
|
|
12
|
-
},
|
|
12
|
+
}, Vt = (a, o) => {
|
|
13
13
|
var i, n, s, l;
|
|
14
14
|
const r = (i = a == null ? void 0 : a.response) != null && i.data ? ci((s = (n = a == null ? void 0 : a.response) == null ? void 0 : n.data) == null ? void 0 : s.suffix) : ((l = a.raw) == null ? void 0 : l.type) || ci(a[o.suffix]), t = r == null ? void 0 : r.toLowerCase(), e = {
|
|
15
15
|
sheet: "excel",
|
|
@@ -453,7 +453,7 @@ const Pe = (a, o) => {
|
|
|
453
453
|
vr,
|
|
454
454
|
mr,
|
|
455
455
|
yr
|
|
456
|
-
],
|
|
456
|
+
], kr = {
|
|
457
457
|
key: 9,
|
|
458
458
|
t: "1692251753690",
|
|
459
459
|
class: "icon",
|
|
@@ -463,7 +463,7 @@ const Pe = (a, o) => {
|
|
|
463
463
|
"p-id": "4336",
|
|
464
464
|
width: "200",
|
|
465
465
|
height: "200"
|
|
466
|
-
},
|
|
466
|
+
}, Cr = /* @__PURE__ */ S(
|
|
467
467
|
"path",
|
|
468
468
|
{
|
|
469
469
|
d: "M145.6 0C100.8 0 64 36.8 64 81.6v860.8C64 987.2 100.8 1024 145.6 1024h732.8c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0h-512z",
|
|
@@ -505,7 +505,7 @@ const Pe = (a, o) => {
|
|
|
505
505
|
-1
|
|
506
506
|
/* HOISTED */
|
|
507
507
|
), Er = [
|
|
508
|
-
|
|
508
|
+
Cr,
|
|
509
509
|
br,
|
|
510
510
|
wr,
|
|
511
511
|
Tr
|
|
@@ -619,8 +619,8 @@ const Pe = (a, o) => {
|
|
|
619
619
|
}
|
|
620
620
|
},
|
|
621
621
|
setup(a) {
|
|
622
|
-
const o = a, r = K(() => o.file ?
|
|
623
|
-
return (t, e) => r.value === "image" ? (x(), O("svg", Fn, Un)) : r.value === "zip" ? (x(), O("svg", zn, Wn)) : r.value === "ppt" ? (x(), O("svg", Gn, Yn)) : r.value === "word" ? (x(), O("svg", Xn, Jn)) : r.value === "pdf" ? (x(), O("svg", Qn, ir)) : r.value === "txt" ? (x(), O("svg", nr, or)) : r.value === "audio" ? (x(), O("svg", ar, cr)) : r.value === "video" ? (x(), O("svg", fr, gr)) : r.value === "excel" ? (x(), O("svg", pr, _r)) : r.value === "exe" ? (x(), O("svg",
|
|
622
|
+
const o = a, r = K(() => o.file ? Vt(o.file, o.fields) : o.type);
|
|
623
|
+
return (t, e) => r.value === "image" ? (x(), O("svg", Fn, Un)) : r.value === "zip" ? (x(), O("svg", zn, Wn)) : r.value === "ppt" ? (x(), O("svg", Gn, Yn)) : r.value === "word" ? (x(), O("svg", Xn, Jn)) : r.value === "pdf" ? (x(), O("svg", Qn, ir)) : r.value === "txt" ? (x(), O("svg", nr, or)) : r.value === "audio" ? (x(), O("svg", ar, cr)) : r.value === "video" ? (x(), O("svg", fr, gr)) : r.value === "excel" ? (x(), O("svg", pr, _r)) : r.value === "exe" ? (x(), O("svg", kr, Er)) : r.value === "json" ? (x(), O("svg", Sr, Ar)) : (x(), O("svg", Lr, Fr));
|
|
624
624
|
}
|
|
625
625
|
}), Nr = Pe(Mr);
|
|
626
626
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
@@ -639,7 +639,7 @@ var Br = /* @__PURE__ */ se({
|
|
|
639
639
|
]));
|
|
640
640
|
}
|
|
641
641
|
}), Hr = Br;
|
|
642
|
-
const
|
|
642
|
+
const nt = (a, o) => {
|
|
643
643
|
const r = a.__vccOpts || a;
|
|
644
644
|
for (const [t, e] of o)
|
|
645
645
|
r[t] = e;
|
|
@@ -652,7 +652,7 @@ const it = (a, o) => {
|
|
|
652
652
|
const r = ["B", "KB", "MB", "GB", "TB"], t = Math.floor(Math.log(a) / Math.log(1024));
|
|
653
653
|
let e = a / Math.pow(1024, t);
|
|
654
654
|
return (e % 1 === 0 ? e.toFixed(o || 0) : e.toFixed(o)) + " " + r[t];
|
|
655
|
-
},
|
|
655
|
+
}, tt = (a, o) => o ? o.startsWith("http") ? o : `${a || location.origin}${o}` : "", zr = (a) => {
|
|
656
656
|
const o = Ze("loadUrl"), r = K(() => a.loadUrl || a.fileUrl || (o == null ? void 0 : o.value)), t = Ze("uploadUrl"), e = K(() => a.action || a.uploadUrl || (t == null ? void 0 : t.value)), i = Ze("token"), n = K(() => a.token || (i == null ? void 0 : i.value)), s = Ze("onlyofficeConfig"), l = K(() => a.onlyofficeConfig || (s == null ? void 0 : s.value)), u = Ze("userInfo"), c = K(() => a.userInfo || (u == null ? void 0 : u.value));
|
|
657
657
|
return {
|
|
658
658
|
cLoadUrl: r,
|
|
@@ -747,14 +747,14 @@ const it = (a, o) => {
|
|
|
747
747
|
i.value = {
|
|
748
748
|
...h,
|
|
749
749
|
name: h.name,
|
|
750
|
-
url:
|
|
750
|
+
url: tt(
|
|
751
751
|
r.value,
|
|
752
752
|
h.url || ((g = (d = h == null ? void 0 : h.response) == null ? void 0 : d.data) == null ? void 0 : g.id) || (h == null ? void 0 : h.id)
|
|
753
753
|
)
|
|
754
754
|
}, n.value = !0;
|
|
755
755
|
}, l = (h) => {
|
|
756
756
|
Ln.downloadFile(
|
|
757
|
-
|
|
757
|
+
tt(
|
|
758
758
|
r.value,
|
|
759
759
|
h[e.value.url] || h.attachmentId || h.id
|
|
760
760
|
),
|
|
@@ -780,15 +780,15 @@ const it = (a, o) => {
|
|
|
780
780
|
a.simple ? (x(!0), O(
|
|
781
781
|
$e,
|
|
782
782
|
{ key: 0 },
|
|
783
|
-
|
|
783
|
+
Ut(c.value, (k, w) => (x(), O("div", {
|
|
784
784
|
class: "iking-privew-annex simple",
|
|
785
|
-
onClick: (b) => s(
|
|
785
|
+
onClick: (b) => s(k),
|
|
786
786
|
style: le({ width: u.value })
|
|
787
787
|
}, [
|
|
788
788
|
S(
|
|
789
789
|
"div",
|
|
790
790
|
jr,
|
|
791
|
-
_e(
|
|
791
|
+
_e(k.name),
|
|
792
792
|
1
|
|
793
793
|
/* TEXT */
|
|
794
794
|
),
|
|
@@ -800,7 +800,7 @@ const it = (a, o) => {
|
|
|
800
800
|
[
|
|
801
801
|
X(z(Oe), {
|
|
802
802
|
name: "iksvg_daochu",
|
|
803
|
-
onClick:
|
|
803
|
+
onClick: et((b) => l(k), ["stop"]),
|
|
804
804
|
size: 20,
|
|
805
805
|
active: ""
|
|
806
806
|
}, null, 8, ["onClick"]),
|
|
@@ -810,7 +810,7 @@ const it = (a, o) => {
|
|
|
810
810
|
active: ""
|
|
811
811
|
}),
|
|
812
812
|
pe(h.$slots, "operation", {
|
|
813
|
-
data: { ...
|
|
813
|
+
data: { ...k, findex: w }
|
|
814
814
|
})
|
|
815
815
|
],
|
|
816
816
|
2
|
|
@@ -824,7 +824,7 @@ const it = (a, o) => {
|
|
|
824
824
|
(x(!0), O(
|
|
825
825
|
$e,
|
|
826
826
|
null,
|
|
827
|
-
|
|
827
|
+
Ut(c.value, (k, w) => {
|
|
828
828
|
var b;
|
|
829
829
|
return x(), O(
|
|
830
830
|
"div",
|
|
@@ -839,10 +839,10 @@ const it = (a, o) => {
|
|
|
839
839
|
[
|
|
840
840
|
S("div", {
|
|
841
841
|
class: "file-card",
|
|
842
|
-
onClick: (B) => s(
|
|
842
|
+
onClick: (B) => s(k)
|
|
843
843
|
}, [
|
|
844
844
|
X(z(Nr), {
|
|
845
|
-
file:
|
|
845
|
+
file: k,
|
|
846
846
|
style: le({ height: `${a.iconSize}px` }),
|
|
847
847
|
class: "ikui-w-auto",
|
|
848
848
|
fields: e.value
|
|
@@ -851,14 +851,14 @@ const it = (a, o) => {
|
|
|
851
851
|
S(
|
|
852
852
|
"div",
|
|
853
853
|
$r,
|
|
854
|
-
_e(
|
|
854
|
+
_e(k.name),
|
|
855
855
|
1
|
|
856
856
|
/* TEXT */
|
|
857
857
|
),
|
|
858
858
|
S(
|
|
859
859
|
"div",
|
|
860
860
|
Kr,
|
|
861
|
-
_e(z(Ur)(
|
|
861
|
+
_e(z(Ur)(k.size)),
|
|
862
862
|
1
|
|
863
863
|
/* TEXT */
|
|
864
864
|
)
|
|
@@ -871,7 +871,7 @@ const it = (a, o) => {
|
|
|
871
871
|
[
|
|
872
872
|
X(z(Oe), {
|
|
873
873
|
name: "iksvg_daochu",
|
|
874
|
-
onClick:
|
|
874
|
+
onClick: et((B) => l(k), ["stop"]),
|
|
875
875
|
bg: a.showBg,
|
|
876
876
|
size: a.showBg ? "default" : 20,
|
|
877
877
|
title: "下载"
|
|
@@ -883,7 +883,7 @@ const it = (a, o) => {
|
|
|
883
883
|
title: "预览"
|
|
884
884
|
}, null, 8, ["bg", "size"]),
|
|
885
885
|
pe(h.$slots, "operation", {
|
|
886
|
-
data: { ...
|
|
886
|
+
data: { ...k, findex: w }
|
|
887
887
|
})
|
|
888
888
|
],
|
|
889
889
|
2
|
|
@@ -908,7 +908,7 @@ const it = (a, o) => {
|
|
|
908
908
|
)) : ue("v-if", !0),
|
|
909
909
|
X(z(Zr), {
|
|
910
910
|
show: n.value,
|
|
911
|
-
"onUpdate:show": d[0] || (d[0] = (
|
|
911
|
+
"onUpdate:show": d[0] || (d[0] = (k) => n.value = k),
|
|
912
912
|
loadUrl: z(r),
|
|
913
913
|
file: i.value,
|
|
914
914
|
onlyofficeServer: ((m = z(t)) == null ? void 0 : m.serverUrl) || a.onlyofficeServer,
|
|
@@ -924,7 +924,7 @@ const it = (a, o) => {
|
|
|
924
924
|
});
|
|
925
925
|
const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
926
926
|
__name: "IkPreviewFileDialog",
|
|
927
|
-
props: /* @__PURE__ */
|
|
927
|
+
props: /* @__PURE__ */ ct({
|
|
928
928
|
file: {
|
|
929
929
|
type: Object,
|
|
930
930
|
default: () => []
|
|
@@ -959,7 +959,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
959
959
|
}),
|
|
960
960
|
emits: ["update:show"],
|
|
961
961
|
setup(a) {
|
|
962
|
-
const o = a, r =
|
|
962
|
+
const o = a, r = Xt(a, "show"), t = K(() => ({
|
|
963
963
|
name: "name",
|
|
964
964
|
url: "url",
|
|
965
965
|
suffix: "suffix",
|
|
@@ -972,15 +972,15 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
972
972
|
}), s = (u) => {
|
|
973
973
|
var c, h, d, g, p, m, _;
|
|
974
974
|
try {
|
|
975
|
-
const
|
|
975
|
+
const k = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, w = k[t.value.url] || (k == null ? void 0 : k.id) || k.attachmentId, b = (h = k[t.value.suffix] || k.attachmentSuffix) == null ? void 0 : h.toLowerCase(), B = k[t.value.name] || (k == null ? void 0 : k.attachmentName) || (k == null ? void 0 : k.originName);
|
|
976
976
|
if (i.value = {
|
|
977
977
|
...u,
|
|
978
978
|
name: u[t.value.name],
|
|
979
|
-
url:
|
|
980
|
-
}, u &&
|
|
979
|
+
url: tt(o.loadUrl, w)
|
|
980
|
+
}, u && Vt(u, t.value) === "image") {
|
|
981
981
|
n.image = !0;
|
|
982
982
|
return;
|
|
983
|
-
} else if (u &&
|
|
983
|
+
} else if (u && Vt(u, t.value) === "video") {
|
|
984
984
|
n.video = !0;
|
|
985
985
|
return;
|
|
986
986
|
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(b)) {
|
|
@@ -998,7 +998,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
998
998
|
document: {
|
|
999
999
|
key: ji(),
|
|
1000
1000
|
title: B,
|
|
1001
|
-
url:
|
|
1001
|
+
url: tt(o.loadUrl, w),
|
|
1002
1002
|
fileType: b,
|
|
1003
1003
|
...((_ = o.onlyOfficeConfig) == null ? void 0 : _.document) || {}
|
|
1004
1004
|
},
|
|
@@ -1006,8 +1006,8 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
1006
1006
|
};
|
|
1007
1007
|
return;
|
|
1008
1008
|
}
|
|
1009
|
-
} catch (
|
|
1010
|
-
console.info("预览错误: ",
|
|
1009
|
+
} catch (k) {
|
|
1010
|
+
console.info("预览错误: ", k);
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
1013
|
zi([r, o.file], ([u, c]) => {
|
|
@@ -1057,7 +1057,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
1057
1057
|
default: q(() => {
|
|
1058
1058
|
var m;
|
|
1059
1059
|
return [
|
|
1060
|
-
X(z(
|
|
1060
|
+
X(z(Cs), {
|
|
1061
1061
|
"config-options": e.value,
|
|
1062
1062
|
"document-server-url": ((m = a.onlyOfficeConfig) == null ? void 0 : m.serverUrl) || a.onlyofficeServer
|
|
1063
1063
|
}, null, 8, ["config-options", "document-server-url"])
|
|
@@ -1110,85 +1110,89 @@ const Zr = Pe(qr), Jr = {
|
|
|
1110
1110
|
warning: { type: Boolean },
|
|
1111
1111
|
width: {}
|
|
1112
1112
|
},
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1113
|
+
emits: ["click"],
|
|
1114
|
+
setup(a, { emit: o }) {
|
|
1115
|
+
const r = a, t = K(() => r), e = K(() => {
|
|
1116
|
+
const { name: l } = t.value;
|
|
1117
|
+
return /^http?:\/\//.test(l) ? "img" : /i-[^:]+:[^:]+/.test(l) ? "unocss" : l != null && l.startsWith("iksig") ? "iksig" : l != null && l.includes(":") ? "iconify" : l != null && l.startsWith("iksvg") ? "svg" : "i";
|
|
1118
|
+
}), i = K(() => {
|
|
1119
|
+
const l = [];
|
|
1120
|
+
if (t.value.flip)
|
|
1121
|
+
switch (t.value.flip) {
|
|
1121
1122
|
case "horizontal":
|
|
1122
|
-
|
|
1123
|
+
l.push("rotateY(180deg)");
|
|
1123
1124
|
break;
|
|
1124
1125
|
case "vertical":
|
|
1125
|
-
|
|
1126
|
+
l.push("rotateX(180deg)");
|
|
1126
1127
|
break;
|
|
1127
1128
|
case "both":
|
|
1128
|
-
|
|
1129
|
+
l.push("rotateX(180deg)"), l.push("rotateY(180deg)");
|
|
1129
1130
|
break;
|
|
1130
1131
|
}
|
|
1131
|
-
|
|
1132
|
-
const
|
|
1133
|
-
...
|
|
1134
|
-
...
|
|
1135
|
-
...
|
|
1136
|
-
padding:
|
|
1137
|
-
...
|
|
1138
|
-
"--ik-color-icon-dark":
|
|
1139
|
-
"--ik-color-icon-light":
|
|
1132
|
+
t.value.rotate && l.push(`rotate(${t.value.rotate % 360}deg)`);
|
|
1133
|
+
const u = {
|
|
1134
|
+
...t.value.color && { color: t.value.color },
|
|
1135
|
+
...t.value.size && { fontSize: typeof t.value.size == "number" ? `${t.value.size}px` : t.value.size },
|
|
1136
|
+
...l.length && { transform: l.join(" ") },
|
|
1137
|
+
padding: t.value.showBg || t.value.bg ? t.value.padding : 0,
|
|
1138
|
+
...t.value.color && e.value !== "iksig" ? {
|
|
1139
|
+
"--ik-color-icon-dark": t.value.color,
|
|
1140
|
+
"--ik-color-icon-light": t.value.colorLight || Dn.setOpacity(t.value.color, t.value.opacity)
|
|
1140
1141
|
} : {}
|
|
1141
1142
|
};
|
|
1142
|
-
return
|
|
1143
|
-
})
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1143
|
+
return t.value.width && (u.width = u.height = typeof t.value.width == "number" ? `${t.value.width}px` : t.value.width), u;
|
|
1144
|
+
}), n = o, s = (l) => {
|
|
1145
|
+
t.value.disabled || n("click", l);
|
|
1146
|
+
};
|
|
1147
|
+
return (l, u) => {
|
|
1148
|
+
const c = Ee("el-tooltip"), h = Ee("el-button");
|
|
1149
|
+
return t.value.tableIconType === "icon" || !t.value.tableIconType ? (x(), O("span", Jr, [
|
|
1150
|
+
t.value.notip || !t.value.title ? (x(), O(
|
|
1148
1151
|
"i",
|
|
1149
1152
|
{
|
|
1150
1153
|
key: 0,
|
|
1154
|
+
onClick: et(s, ["stop"]),
|
|
1151
1155
|
class: te(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
1152
|
-
[
|
|
1153
|
-
"show-bg":
|
|
1154
|
-
default:
|
|
1155
|
-
small:
|
|
1156
|
-
big:
|
|
1157
|
-
warning:
|
|
1158
|
-
primary:
|
|
1159
|
-
success:
|
|
1160
|
-
error:
|
|
1161
|
-
active:
|
|
1162
|
-
disabled:
|
|
1156
|
+
[l.name]: e.value === "unocss",
|
|
1157
|
+
"show-bg": t.value.showBg || t.value.bg,
|
|
1158
|
+
default: t.value.size === "default",
|
|
1159
|
+
small: t.value.size === "small",
|
|
1160
|
+
big: t.value.size === "big",
|
|
1161
|
+
warning: t.value.warning || t.value.type === "warning",
|
|
1162
|
+
primary: t.value.primary || t.value.type === "primary",
|
|
1163
|
+
success: l.success || t.value.type === "success",
|
|
1164
|
+
error: t.value.error || t.value.type === "error",
|
|
1165
|
+
active: t.value.active,
|
|
1166
|
+
disabled: t.value.disabled
|
|
1163
1167
|
}]),
|
|
1164
|
-
style: le(
|
|
1168
|
+
style: le(i.value)
|
|
1165
1169
|
},
|
|
1166
1170
|
[
|
|
1167
1171
|
ue(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
1168
|
-
|
|
1172
|
+
e.value === "iksig" ? (x(), O(
|
|
1169
1173
|
"i",
|
|
1170
1174
|
{
|
|
1171
1175
|
key: 0,
|
|
1172
|
-
class: te(`iksig ${
|
|
1173
|
-
style: le(
|
|
1176
|
+
class: te(`iksig ${t.value.name}`),
|
|
1177
|
+
style: le(i.value)
|
|
1174
1178
|
},
|
|
1175
1179
|
null,
|
|
1176
1180
|
6
|
|
1177
1181
|
/* CLASS, STYLE */
|
|
1178
|
-
)) :
|
|
1182
|
+
)) : e.value === "svg" ? (x(), O("svg", Qr, [
|
|
1179
1183
|
S("use", {
|
|
1180
|
-
"xlink:href": `#${
|
|
1184
|
+
"xlink:href": `#${t.value.name}`
|
|
1181
1185
|
}, null, 8, es)
|
|
1182
|
-
])) :
|
|
1186
|
+
])) : e.value === "img" ? (x(), O("img", {
|
|
1183
1187
|
key: 2,
|
|
1184
|
-
src:
|
|
1188
|
+
src: t.value.name,
|
|
1185
1189
|
class: "h-[1em] w-[1em]"
|
|
1186
1190
|
}, null, 8, ts)) : (x(), O(
|
|
1187
1191
|
"i",
|
|
1188
1192
|
{
|
|
1189
1193
|
key: 3,
|
|
1190
|
-
class: te(
|
|
1191
|
-
style: le(
|
|
1194
|
+
class: te(t.value.name),
|
|
1195
|
+
style: le(i.value)
|
|
1192
1196
|
},
|
|
1193
1197
|
null,
|
|
1194
1198
|
6
|
|
@@ -1197,9 +1201,9 @@ const Zr = Pe(qr), Jr = {
|
|
|
1197
1201
|
],
|
|
1198
1202
|
6
|
|
1199
1203
|
/* CLASS, STYLE */
|
|
1200
|
-
)) : (x(), ce(
|
|
1204
|
+
)) : (x(), ce(c, {
|
|
1201
1205
|
key: 1,
|
|
1202
|
-
content:
|
|
1206
|
+
content: t.value.title,
|
|
1203
1207
|
placement: "top"
|
|
1204
1208
|
}, {
|
|
1205
1209
|
default: q(() => [
|
|
@@ -1207,44 +1211,45 @@ const Zr = Pe(qr), Jr = {
|
|
|
1207
1211
|
"i",
|
|
1208
1212
|
{
|
|
1209
1213
|
class: te(["ik-svg-icon ik-icon relative h-[1em] w-[1em] inline-flex items-center justify-center fill-current leading-[1em] transition", {
|
|
1210
|
-
[
|
|
1211
|
-
"show-bg":
|
|
1212
|
-
default:
|
|
1213
|
-
small:
|
|
1214
|
-
big:
|
|
1215
|
-
warning:
|
|
1216
|
-
primary:
|
|
1217
|
-
success:
|
|
1218
|
-
error:
|
|
1219
|
-
active:
|
|
1214
|
+
[l.name]: e.value === "unocss",
|
|
1215
|
+
"show-bg": t.value.showBg || t.value.bg,
|
|
1216
|
+
default: t.value.size === "default",
|
|
1217
|
+
small: t.value.size === "small",
|
|
1218
|
+
big: t.value.size === "big",
|
|
1219
|
+
warning: t.value.warning || t.value.type === "warning",
|
|
1220
|
+
primary: l.primary || t.value.type === "primary",
|
|
1221
|
+
success: l.success || t.value.type === "success",
|
|
1222
|
+
error: t.value.error || t.value.type === "error",
|
|
1223
|
+
active: t.value.active
|
|
1220
1224
|
}]),
|
|
1221
|
-
|
|
1225
|
+
onClick: et(s, ["stop"]),
|
|
1226
|
+
style: le(i.value)
|
|
1222
1227
|
},
|
|
1223
1228
|
[
|
|
1224
|
-
|
|
1229
|
+
e.value === "iksig" ? (x(), O(
|
|
1225
1230
|
"i",
|
|
1226
1231
|
{
|
|
1227
1232
|
key: 0,
|
|
1228
|
-
class: te(`iksig ${
|
|
1229
|
-
style: le(
|
|
1233
|
+
class: te(`iksig ${t.value.name}`),
|
|
1234
|
+
style: le(i.value)
|
|
1230
1235
|
},
|
|
1231
1236
|
null,
|
|
1232
1237
|
6
|
|
1233
1238
|
/* CLASS, STYLE */
|
|
1234
|
-
)) :
|
|
1239
|
+
)) : e.value === "svg" ? (x(), O("svg", is, [
|
|
1235
1240
|
S("use", {
|
|
1236
|
-
"xlink:href": `#${
|
|
1241
|
+
"xlink:href": `#${t.value.name}`
|
|
1237
1242
|
}, null, 8, ns)
|
|
1238
|
-
])) :
|
|
1243
|
+
])) : e.value === "img" ? (x(), O("img", {
|
|
1239
1244
|
key: 2,
|
|
1240
|
-
src:
|
|
1245
|
+
src: t.value.name,
|
|
1241
1246
|
class: "h-[1em] w-[1em]"
|
|
1242
1247
|
}, null, 8, rs)) : (x(), O(
|
|
1243
1248
|
"i",
|
|
1244
1249
|
{
|
|
1245
1250
|
key: 3,
|
|
1246
|
-
class: te(
|
|
1247
|
-
style: le(
|
|
1251
|
+
class: te(t.value.name),
|
|
1252
|
+
style: le(i.value)
|
|
1248
1253
|
},
|
|
1249
1254
|
null,
|
|
1250
1255
|
6
|
|
@@ -1258,13 +1263,14 @@ const Zr = Pe(qr), Jr = {
|
|
|
1258
1263
|
_: 1
|
|
1259
1264
|
/* STABLE */
|
|
1260
1265
|
}, 8, ["content"]))
|
|
1261
|
-
])) : (x(), ce(
|
|
1266
|
+
])) : (x(), ce(h, {
|
|
1262
1267
|
key: 1,
|
|
1263
|
-
type: ["warning", "error"].includes(
|
|
1268
|
+
type: ["warning", "error"].includes(t.value.type) ? "danger" : "",
|
|
1269
|
+
onClick: et(s, ["stop"])
|
|
1264
1270
|
}, {
|
|
1265
1271
|
default: q(() => [
|
|
1266
1272
|
Ye(
|
|
1267
|
-
_e(
|
|
1273
|
+
_e(t.value.title),
|
|
1268
1274
|
1
|
|
1269
1275
|
/* TEXT */
|
|
1270
1276
|
)
|
|
@@ -1275,7 +1281,7 @@ const Zr = Pe(qr), Jr = {
|
|
|
1275
1281
|
};
|
|
1276
1282
|
}
|
|
1277
1283
|
});
|
|
1278
|
-
const os = /* @__PURE__ */
|
|
1284
|
+
const os = /* @__PURE__ */ nt(ss, [["__scopeId", "data-v-4a1004b9"]]), Oe = Pe(os), as = {
|
|
1279
1285
|
key: 0,
|
|
1280
1286
|
class: "exit-main-page-maximize"
|
|
1281
1287
|
}, ls = /* @__PURE__ */ se({
|
|
@@ -1309,9 +1315,9 @@ const os = /* @__PURE__ */ it(ss, [["__scopeId", "data-v-a7ec508a"]]), Oe = Pe(o
|
|
|
1309
1315
|
]));
|
|
1310
1316
|
}
|
|
1311
1317
|
});
|
|
1312
|
-
const us = /* @__PURE__ */
|
|
1318
|
+
const us = /* @__PURE__ */ nt(ls, [["__scopeId", "data-v-79f49df8"]]), cs = { class: "base-header" }, fs = /* @__PURE__ */ se({
|
|
1313
1319
|
__name: "IkBaseDialog",
|
|
1314
|
-
props: /* @__PURE__ */
|
|
1320
|
+
props: /* @__PURE__ */ ct({
|
|
1315
1321
|
title: { default: "" },
|
|
1316
1322
|
cancelText: { default: "取消" },
|
|
1317
1323
|
confirmText: { default: "确认" },
|
|
@@ -1330,7 +1336,7 @@ const us = /* @__PURE__ */ it(ls, [["__scopeId", "data-v-79f49df8"]]), cs = { cl
|
|
|
1330
1336
|
}),
|
|
1331
1337
|
emits: ["update:modelValue"],
|
|
1332
1338
|
setup(a) {
|
|
1333
|
-
const o = a, r =
|
|
1339
|
+
const o = a, r = Xt(a, "modelValue"), t = Xe(o.fullscreen), e = () => {
|
|
1334
1340
|
t.value = !t.value;
|
|
1335
1341
|
}, i = se({
|
|
1336
1342
|
setup() {
|
|
@@ -1342,7 +1348,7 @@ const us = /* @__PURE__ */ it(ls, [["__scopeId", "data-v-79f49df8"]]), cs = { cl
|
|
|
1342
1348
|
});
|
|
1343
1349
|
return (n, s) => {
|
|
1344
1350
|
const l = Ee("el-dialog");
|
|
1345
|
-
return x(), ce(l,
|
|
1351
|
+
return x(), ce(l, zt({
|
|
1346
1352
|
modelValue: r.value,
|
|
1347
1353
|
"onUpdate:modelValue": s[0] || (s[0] = (u) => r.value = u)
|
|
1348
1354
|
}, n.$attrs, {
|
|
@@ -1397,7 +1403,7 @@ const us = /* @__PURE__ */ it(ls, [["__scopeId", "data-v-79f49df8"]]), cs = { cl
|
|
|
1397
1403
|
});
|
|
1398
1404
|
const hs = Pe(fs);
|
|
1399
1405
|
var ds = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1400
|
-
function
|
|
1406
|
+
function qt(a) {
|
|
1401
1407
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
1402
1408
|
}
|
|
1403
1409
|
function gs(a, o, r, t) {
|
|
@@ -1527,7 +1533,7 @@ var vs = function(a, o) {
|
|
|
1527
1533
|
}, e.onerror = function(i) {
|
|
1528
1534
|
e.removeAttribute("loading"), t(i);
|
|
1529
1535
|
}, e.setAttribute("loading", ""), e;
|
|
1530
|
-
},
|
|
1536
|
+
}, Zt = se({
|
|
1531
1537
|
name: "DocumentEditor",
|
|
1532
1538
|
props: {
|
|
1533
1539
|
id: {
|
|
@@ -1700,8 +1706,8 @@ const ms = ["id"];
|
|
|
1700
1706
|
function ys(a, o, r, t, e, i) {
|
|
1701
1707
|
return x(), O("div", { id: a.id }, null, 8, ms);
|
|
1702
1708
|
}
|
|
1703
|
-
|
|
1704
|
-
|
|
1709
|
+
Zt.render = ys;
|
|
1710
|
+
Zt.__file = "src/components/DocumentEditor.vue";
|
|
1705
1711
|
const _s = /* @__PURE__ */ se({
|
|
1706
1712
|
__name: "IkOnlyOffice",
|
|
1707
1713
|
props: {
|
|
@@ -1737,7 +1743,7 @@ const _s = /* @__PURE__ */ se({
|
|
|
1737
1743
|
style: le({ height: o.officeHeight })
|
|
1738
1744
|
},
|
|
1739
1745
|
[
|
|
1740
|
-
X(z(
|
|
1746
|
+
X(z(Zt), {
|
|
1741
1747
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
1742
1748
|
ref: "editorRef",
|
|
1743
1749
|
"document-server-url": a.documentServerUrl,
|
|
@@ -1750,7 +1756,7 @@ const _s = /* @__PURE__ */ se({
|
|
|
1750
1756
|
));
|
|
1751
1757
|
}
|
|
1752
1758
|
});
|
|
1753
|
-
const
|
|
1759
|
+
const ks = /* @__PURE__ */ nt(_s, [["__scopeId", "data-v-98d51ef9"]]), Cs = Pe(ks);
|
|
1754
1760
|
function hi(a, o) {
|
|
1755
1761
|
var r = Object.keys(a);
|
|
1756
1762
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -1814,17 +1820,17 @@ function P(a, o) {
|
|
|
1814
1820
|
}
|
|
1815
1821
|
}), Object.defineProperty(a, "prototype", {
|
|
1816
1822
|
writable: !1
|
|
1817
|
-
}), o &&
|
|
1823
|
+
}), o && jt(a, o);
|
|
1818
1824
|
}
|
|
1819
1825
|
function A(a) {
|
|
1820
1826
|
return A = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
1821
1827
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
1822
1828
|
}, A(a);
|
|
1823
1829
|
}
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1830
|
+
function jt(a, o) {
|
|
1831
|
+
return jt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
1826
1832
|
return t.__proto__ = e, t;
|
|
1827
|
-
},
|
|
1833
|
+
}, jt(a, o);
|
|
1828
1834
|
}
|
|
1829
1835
|
function bs() {
|
|
1830
1836
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
@@ -1843,7 +1849,7 @@ function v(a) {
|
|
|
1843
1849
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1844
1850
|
return a;
|
|
1845
1851
|
}
|
|
1846
|
-
function
|
|
1852
|
+
function Jt(a, o) {
|
|
1847
1853
|
if (o && (typeof o == "object" || typeof o == "function"))
|
|
1848
1854
|
return o;
|
|
1849
1855
|
if (o !== void 0)
|
|
@@ -1859,7 +1865,7 @@ function I(a) {
|
|
|
1859
1865
|
e = Reflect.construct(t, arguments, i);
|
|
1860
1866
|
} else
|
|
1861
1867
|
e = t.apply(this, arguments);
|
|
1862
|
-
return
|
|
1868
|
+
return Jt(this, e);
|
|
1863
1869
|
};
|
|
1864
1870
|
}
|
|
1865
1871
|
function ws(a, o) {
|
|
@@ -1881,7 +1887,7 @@ function fe(a) {
|
|
|
1881
1887
|
}
|
|
1882
1888
|
function Ts(a) {
|
|
1883
1889
|
if (Array.isArray(a))
|
|
1884
|
-
return
|
|
1890
|
+
return Wt(a);
|
|
1885
1891
|
}
|
|
1886
1892
|
function Es(a) {
|
|
1887
1893
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null)
|
|
@@ -1890,15 +1896,15 @@ function Es(a) {
|
|
|
1890
1896
|
function Ss(a, o) {
|
|
1891
1897
|
if (a) {
|
|
1892
1898
|
if (typeof a == "string")
|
|
1893
|
-
return
|
|
1899
|
+
return Wt(a, o);
|
|
1894
1900
|
var r = Object.prototype.toString.call(a).slice(8, -1);
|
|
1895
1901
|
if (r === "Object" && a.constructor && (r = a.constructor.name), r === "Map" || r === "Set")
|
|
1896
1902
|
return Array.from(a);
|
|
1897
1903
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
|
|
1898
|
-
return
|
|
1904
|
+
return Wt(a, o);
|
|
1899
1905
|
}
|
|
1900
1906
|
}
|
|
1901
|
-
function
|
|
1907
|
+
function Wt(a, o) {
|
|
1902
1908
|
(o == null || o > a.length) && (o = a.length);
|
|
1903
1909
|
for (var r = 0, t = new Array(o); r < o; r++)
|
|
1904
1910
|
t[r] = a[r];
|
|
@@ -1968,9 +1974,9 @@ var $i = { exports: {} };
|
|
|
1968
1974
|
var m = r ? r + u : u;
|
|
1969
1975
|
if (!this._events[m])
|
|
1970
1976
|
return !1;
|
|
1971
|
-
var _ = this._events[m],
|
|
1977
|
+
var _ = this._events[m], k = arguments.length, w, b;
|
|
1972
1978
|
if (_.fn) {
|
|
1973
|
-
switch (_.once && this.removeListener(u, _.fn, void 0, !0),
|
|
1979
|
+
switch (_.once && this.removeListener(u, _.fn, void 0, !0), k) {
|
|
1974
1980
|
case 1:
|
|
1975
1981
|
return _.fn.call(_.context), !0;
|
|
1976
1982
|
case 2:
|
|
@@ -1984,13 +1990,13 @@ var $i = { exports: {} };
|
|
|
1984
1990
|
case 6:
|
|
1985
1991
|
return _.fn.call(_.context, c, h, d, g, p), !0;
|
|
1986
1992
|
}
|
|
1987
|
-
for (b = 1, w = new Array(
|
|
1993
|
+
for (b = 1, w = new Array(k - 1); b < k; b++)
|
|
1988
1994
|
w[b - 1] = arguments[b];
|
|
1989
1995
|
_.fn.apply(_.context, w);
|
|
1990
1996
|
} else {
|
|
1991
1997
|
var B = _.length, M;
|
|
1992
1998
|
for (b = 0; b < B; b++)
|
|
1993
|
-
switch (_[b].once && this.removeListener(u, _[b].fn, void 0, !0),
|
|
1999
|
+
switch (_[b].once && this.removeListener(u, _[b].fn, void 0, !0), k) {
|
|
1994
2000
|
case 1:
|
|
1995
2001
|
_[b].fn.call(_[b].context);
|
|
1996
2002
|
break;
|
|
@@ -2005,7 +2011,7 @@ var $i = { exports: {} };
|
|
|
2005
2011
|
break;
|
|
2006
2012
|
default:
|
|
2007
2013
|
if (!w)
|
|
2008
|
-
for (M = 1, w = new Array(
|
|
2014
|
+
for (M = 1, w = new Array(k - 1); M < k; M++)
|
|
2009
2015
|
w[M - 1] = arguments[M];
|
|
2010
2016
|
_[b].fn.apply(_[b].context, w);
|
|
2011
2017
|
}
|
|
@@ -2025,7 +2031,7 @@ var $i = { exports: {} };
|
|
|
2025
2031
|
if (p.fn)
|
|
2026
2032
|
p.fn === c && (!d || p.once) && (!h || p.context === h) && n(this, g);
|
|
2027
2033
|
else {
|
|
2028
|
-
for (var m = 0, _ = [],
|
|
2034
|
+
for (var m = 0, _ = [], k = p.length; m < k; m++)
|
|
2029
2035
|
(p[m].fn !== c || d && !p[m].once || h && p[m].context !== h) && _.push(p[m]);
|
|
2030
2036
|
_.length ? this._events[g] = _.length === 1 ? _[0] : _ : n(this, g);
|
|
2031
2037
|
}
|
|
@@ -2036,31 +2042,31 @@ var $i = { exports: {} };
|
|
|
2036
2042
|
}, s.prototype.off = s.prototype.removeListener, s.prototype.addListener = s.prototype.on, s.prefixed = r, s.EventEmitter = s, a.exports = s;
|
|
2037
2043
|
})($i);
|
|
2038
2044
|
var Ki = $i.exports;
|
|
2039
|
-
const Yi = /* @__PURE__ */
|
|
2040
|
-
var Is = typeof window < "u" && window.location && window.location.href.indexOf("xgplayerdebugger=1") > -1,
|
|
2045
|
+
const Yi = /* @__PURE__ */ qt(Ki);
|
|
2046
|
+
var Is = typeof window < "u" && window.location && window.location.href.indexOf("xgplayerdebugger=1") > -1, St = {
|
|
2041
2047
|
info: "color: #525252; background-color: #90ee90;",
|
|
2042
2048
|
error: "color: #525252; background-color: red;",
|
|
2043
2049
|
warn: "color: #525252; background-color: yellow; "
|
|
2044
|
-
},
|
|
2050
|
+
}, xt = "%c[xgplayer]", F = {
|
|
2045
2051
|
config: {
|
|
2046
2052
|
debug: Is ? 3 : 0
|
|
2047
2053
|
},
|
|
2048
2054
|
logInfo: function(o) {
|
|
2049
2055
|
for (var r, t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
|
2050
2056
|
e[i - 1] = arguments[i];
|
|
2051
|
-
this.config.debug >= 3 && (r = console).log.apply(r, [
|
|
2057
|
+
this.config.debug >= 3 && (r = console).log.apply(r, [xt, St.info, o].concat(e));
|
|
2052
2058
|
},
|
|
2053
2059
|
logWarn: function(o) {
|
|
2054
2060
|
for (var r, t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
|
2055
2061
|
e[i - 1] = arguments[i];
|
|
2056
|
-
this.config.debug >= 1 && (r = console).warn.apply(r, [
|
|
2062
|
+
this.config.debug >= 1 && (r = console).warn.apply(r, [xt, St.warn, o].concat(e));
|
|
2057
2063
|
},
|
|
2058
2064
|
logError: function(o) {
|
|
2059
2065
|
var r;
|
|
2060
2066
|
if (!(this.config.debug < 1)) {
|
|
2061
2067
|
for (var t = this.config.debug >= 2 ? "trace" : "error", e = arguments.length, i = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
2062
2068
|
i[n - 1] = arguments[n];
|
|
2063
|
-
(r = console)[t].apply(r, [
|
|
2069
|
+
(r = console)[t].apply(r, [xt, St.error, o].concat(i));
|
|
2064
2070
|
}
|
|
2065
2071
|
}
|
|
2066
2072
|
};
|
|
@@ -2533,7 +2539,7 @@ function Rs(a, o, r) {
|
|
|
2533
2539
|
return window.cancelAnimationFrame(H);
|
|
2534
2540
|
clearTimeout(H);
|
|
2535
2541
|
}
|
|
2536
|
-
function
|
|
2542
|
+
function k(H) {
|
|
2537
2543
|
return u = H, s = m(B, o), c ? p(H) : n;
|
|
2538
2544
|
}
|
|
2539
2545
|
function w(H) {
|
|
@@ -2567,7 +2573,7 @@ function Rs(a, o, r) {
|
|
|
2567
2573
|
ae[Le] = arguments[Le];
|
|
2568
2574
|
if (t = ae, e = this, l = H, ee) {
|
|
2569
2575
|
if (s === void 0)
|
|
2570
|
-
return
|
|
2576
|
+
return k(l);
|
|
2571
2577
|
if (h)
|
|
2572
2578
|
return s = m(B, o), p(l);
|
|
2573
2579
|
}
|
|
@@ -2700,7 +2706,7 @@ var gi = {
|
|
|
2700
2706
|
return Promise.resolve(r);
|
|
2701
2707
|
}
|
|
2702
2708
|
}
|
|
2703
|
-
},
|
|
2709
|
+
}, Gt = "3.0.18", pi = {
|
|
2704
2710
|
1: "media",
|
|
2705
2711
|
2: "media",
|
|
2706
2712
|
3: "media",
|
|
@@ -2714,7 +2720,7 @@ var gi = {
|
|
|
2714
2720
|
4: 5104,
|
|
2715
2721
|
5: 5105,
|
|
2716
2722
|
6: 5106
|
|
2717
|
-
},
|
|
2723
|
+
}, ft = /* @__PURE__ */ E(
|
|
2718
2724
|
function a(o) {
|
|
2719
2725
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
2720
2726
|
errorType: "",
|
|
@@ -2730,7 +2736,7 @@ var gi = {
|
|
|
2730
2736
|
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, d = c.networkState, g = r.errorCode || e.code;
|
|
2731
2737
|
vi[g] && (g = vi[g]);
|
|
2732
2738
|
var p = {
|
|
2733
|
-
playerVersion:
|
|
2739
|
+
playerVersion: Gt,
|
|
2734
2740
|
currentTime: n,
|
|
2735
2741
|
duration: i,
|
|
2736
2742
|
ended: s,
|
|
@@ -2749,14 +2755,14 @@ var gi = {
|
|
|
2749
2755
|
}), p;
|
|
2750
2756
|
} else if (arguments.length > 1) {
|
|
2751
2757
|
for (var m = {
|
|
2752
|
-
playerVersion:
|
|
2758
|
+
playerVersion: Gt,
|
|
2753
2759
|
domain: document.domain
|
|
2754
|
-
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"],
|
|
2755
|
-
m[_[
|
|
2760
|
+
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], k = 0; k < arguments.length; k++)
|
|
2761
|
+
m[_[k]] = arguments[k];
|
|
2756
2762
|
return m.ex = t ? (t[arguments[0]] || {}).msg : "", m;
|
|
2757
2763
|
}
|
|
2758
2764
|
}
|
|
2759
|
-
), re = "play",
|
|
2765
|
+
), re = "play", Qt = "playing", Me = "ended", qe = "pause", rt = "error", Ct = "seeking", ke = "seeked", ne = "timeupdate", st = "waiting", ye = "canplay", Bs = "canplaythrough", Ie = "durationchange", qi = "volumechange", Ce = "loadeddata", Hs = "loadedmetadata", Zi = "ratechange", Ji = "progress", ei = "loadstart", Ne = "emptied", Us = "stalled", zs = "suspend", Vs = "abort", js = "bufferedChange", ti = "focus", Qi = "blur", ii = "ready", en = "urlNull", Fe = "autoplay_started", ni = "autoplay_was_prevented", bt = "complete", ht = "replay", ri = "destroy", wt = "urlchange", $t = "download_speed_change", tn = "leaveplayer", nn = "enterplayer", rn = "loading", ve = "fullscreen_change", dt = "cssFullscreen_change", gt = "mini_state_change", si = "definition_change", Ws = "before_definition_change", Kt = "after_definition_change", Gs = "SEI_PARSED", $s = "retry", Se = "video_resize", Yt = "pip_change", sn = "rotate", on = "screenShot", pt = "playnext", an = "shortcut", ln = "xglog", vt = "user_action", Tt = "reset", un = "source_error", cn = "source_success", Ks = "switch_subtitle", fn = ["play", "playing", "ended", "pause", "error", "seeking", "seeked", "timeupdate", "waiting", "canplay", "canplaythrough", "durationchange", "volumechange", "loadeddata", "loadedmetadata", "ratechange", "progress", "loadstart", "emptied", "stalled", "suspend", "abort", "lowdecode"], hn = {
|
|
2760
2766
|
STATS_INFO: "stats_info",
|
|
2761
2767
|
STATS_DOWNLOAD: "stats_download",
|
|
2762
2768
|
STATS_RESET: "stats_reset"
|
|
@@ -2764,47 +2770,47 @@ var gi = {
|
|
|
2764
2770
|
const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2765
2771
|
__proto__: null,
|
|
2766
2772
|
ABORT: Vs,
|
|
2767
|
-
AFTER_DEFINITION_CHANGE:
|
|
2768
|
-
AUTOPLAY_PREVENTED:
|
|
2773
|
+
AFTER_DEFINITION_CHANGE: Kt,
|
|
2774
|
+
AUTOPLAY_PREVENTED: ni,
|
|
2769
2775
|
AUTOPLAY_STARTED: Fe,
|
|
2770
2776
|
BEFORE_DEFINITION_CHANGE: Ws,
|
|
2771
2777
|
BUFFER_CHANGE: js,
|
|
2772
2778
|
CANPLAY: ye,
|
|
2773
2779
|
CANPLAY_THROUGH: Bs,
|
|
2774
|
-
COMPLETE:
|
|
2775
|
-
CSS_FULLSCREEN_CHANGE:
|
|
2776
|
-
DEFINITION_CHANGE:
|
|
2777
|
-
DESTROY:
|
|
2778
|
-
DOWNLOAD_SPEED_CHANGE:
|
|
2780
|
+
COMPLETE: bt,
|
|
2781
|
+
CSS_FULLSCREEN_CHANGE: dt,
|
|
2782
|
+
DEFINITION_CHANGE: si,
|
|
2783
|
+
DESTROY: ri,
|
|
2784
|
+
DOWNLOAD_SPEED_CHANGE: $t,
|
|
2779
2785
|
DURATION_CHANGE: Ie,
|
|
2780
2786
|
EMPTIED: Ne,
|
|
2781
2787
|
ENDED: Me,
|
|
2782
2788
|
ENTER_PLAYER: nn,
|
|
2783
|
-
ERROR:
|
|
2789
|
+
ERROR: rt,
|
|
2784
2790
|
FPS_STUCK: dn,
|
|
2785
2791
|
FULLSCREEN_CHANGE: ve,
|
|
2786
2792
|
LEAVE_PLAYER: tn,
|
|
2787
|
-
LOADED_DATA:
|
|
2793
|
+
LOADED_DATA: Ce,
|
|
2788
2794
|
LOADED_METADATA: Hs,
|
|
2789
2795
|
LOADING: rn,
|
|
2790
|
-
LOAD_START:
|
|
2791
|
-
MINI_STATE_CHANGE:
|
|
2796
|
+
LOAD_START: ei,
|
|
2797
|
+
MINI_STATE_CHANGE: gt,
|
|
2792
2798
|
PAUSE: qe,
|
|
2793
|
-
PIP_CHANGE:
|
|
2799
|
+
PIP_CHANGE: Yt,
|
|
2794
2800
|
PLAY: re,
|
|
2795
2801
|
PLAYER_BLUR: Qi,
|
|
2796
|
-
PLAYER_FOCUS:
|
|
2797
|
-
PLAYING:
|
|
2798
|
-
PLAYNEXT:
|
|
2802
|
+
PLAYER_FOCUS: ti,
|
|
2803
|
+
PLAYING: Qt,
|
|
2804
|
+
PLAYNEXT: pt,
|
|
2799
2805
|
PROGRESS: Ji,
|
|
2800
2806
|
RATE_CHANGE: Zi,
|
|
2801
|
-
READY:
|
|
2802
|
-
REPLAY:
|
|
2803
|
-
RESET:
|
|
2807
|
+
READY: ii,
|
|
2808
|
+
REPLAY: ht,
|
|
2809
|
+
RESET: Tt,
|
|
2804
2810
|
RETRY: $s,
|
|
2805
2811
|
ROTATE: sn,
|
|
2806
2812
|
SCREEN_SHOT: on,
|
|
2807
|
-
SEEKED:
|
|
2813
|
+
SEEKED: ke,
|
|
2808
2814
|
SEEKING: Ct,
|
|
2809
2815
|
SEI_PARSED: Gs,
|
|
2810
2816
|
SHORTCUT: an,
|
|
@@ -2815,16 +2821,16 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2815
2821
|
SUSPEND: zs,
|
|
2816
2822
|
SWITCH_SUBTITLE: Ks,
|
|
2817
2823
|
TIME_UPDATE: ne,
|
|
2818
|
-
URL_CHANGE:
|
|
2824
|
+
URL_CHANGE: wt,
|
|
2819
2825
|
URL_NULL: en,
|
|
2820
|
-
USER_ACTION:
|
|
2826
|
+
USER_ACTION: vt,
|
|
2821
2827
|
VIDEO_EVENTS: fn,
|
|
2822
2828
|
VIDEO_RESIZE: Se,
|
|
2823
2829
|
VOLUME_CHANGE: qi,
|
|
2824
|
-
WAITING:
|
|
2830
|
+
WAITING: st,
|
|
2825
2831
|
XGLOG: ln
|
|
2826
2832
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2827
|
-
function
|
|
2833
|
+
function Pt(a, o) {
|
|
2828
2834
|
!this || !this.emit || (a === "error" ? this.errorHandler(a, o.error) : this.emit(a, o));
|
|
2829
2835
|
}
|
|
2830
2836
|
function Xs(a, o) {
|
|
@@ -2852,14 +2858,14 @@ function Xs(a, o) {
|
|
|
2852
2858
|
o._rate = o.media && o.media.playbackRate;
|
|
2853
2859
|
}
|
|
2854
2860
|
if (a === "durationchange" && (o._duration = o.media.duration), a === "volumechange" && (e.isMutedChange = o._lastMuted !== o.muted, o._lastMuted = o.muted), a === "error" && (e.error = t || o.video.error), o.mediaEventMiddleware[a]) {
|
|
2855
|
-
var n =
|
|
2861
|
+
var n = Pt.bind(o, a, e);
|
|
2856
2862
|
try {
|
|
2857
2863
|
o.mediaEventMiddleware[a].call(o, e, n);
|
|
2858
2864
|
} catch (s) {
|
|
2859
|
-
throw
|
|
2865
|
+
throw Pt.call(o, a, e), s;
|
|
2860
2866
|
}
|
|
2861
2867
|
} else
|
|
2862
|
-
|
|
2868
|
+
Pt.call(o, a, e);
|
|
2863
2869
|
};
|
|
2864
2870
|
}
|
|
2865
2871
|
var qs = /* @__PURE__ */ function(a) {
|
|
@@ -2958,7 +2964,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
2958
2964
|
l ? l.error(h, g) : n.errorHandler("error", g);
|
|
2959
2965
|
}
|
|
2960
2966
|
var p = pi[4];
|
|
2961
|
-
n.emit(un, new
|
|
2967
|
+
n.emit(un, new ft(n, {
|
|
2962
2968
|
errorType: p,
|
|
2963
2969
|
errorCode: 4,
|
|
2964
2970
|
errorMessage: "sources_load_error",
|
|
@@ -2995,7 +3001,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
2995
3001
|
this.media.currentSrc || (l = "empty_src", n = {
|
|
2996
3002
|
code: 6,
|
|
2997
3003
|
message: l
|
|
2998
|
-
}), this.emit(e, new
|
|
3004
|
+
}), this.emit(e, new ft(this, {
|
|
2999
3005
|
errorType: s,
|
|
3000
3006
|
errorCode: n.code,
|
|
3001
3007
|
errorMessage: n.message || "",
|
|
@@ -3216,7 +3222,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
3216
3222
|
},
|
|
3217
3223
|
set: function(e) {
|
|
3218
3224
|
if (this.media) {
|
|
3219
|
-
if (this.emit(
|
|
3225
|
+
if (this.emit(wt, e), this.emit(st), this._currentTime = 0, this._duration = 0, f.isMSE(this.media)) {
|
|
3220
3226
|
this.onWaiting();
|
|
3221
3227
|
return;
|
|
3222
3228
|
}
|
|
@@ -3359,7 +3365,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
3359
3365
|
}
|
|
3360
3366
|
}]), a;
|
|
3361
3367
|
}(), mi = ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"], yi = ["requestFullscreen", "webkitRequestFullscreen", "mozRequestFullScreen", "msRequestFullscreen"], _i = ["exitFullscreen", "webkitExitFullscreen", "mozCancelFullScreen", "msExitFullscreen"], Re = "data-xgplayerid";
|
|
3362
|
-
function
|
|
3368
|
+
function ot(a, o, r) {
|
|
3363
3369
|
for (var t = arguments.length, e = new Array(t > 3 ? t - 3 : 0), i = 3; i < t; i++)
|
|
3364
3370
|
e[i - 3] = arguments[i];
|
|
3365
3371
|
var n = o.call.apply(o, [a].concat(e));
|
|
@@ -3369,7 +3375,7 @@ function st(a, o, r) {
|
|
|
3369
3375
|
r.call.apply(r, [a].concat(l));
|
|
3370
3376
|
}) : r.call.apply(r, [a].concat(e)));
|
|
3371
3377
|
}
|
|
3372
|
-
function
|
|
3378
|
+
function mt(a, o) {
|
|
3373
3379
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
3374
3380
|
pre: null,
|
|
3375
3381
|
next: null
|
|
@@ -3387,34 +3393,34 @@ function vt(a, o) {
|
|
|
3387
3393
|
try {
|
|
3388
3394
|
var n, s = (n = this.__hooks[a]).call.apply(n, [this, this].concat(Array.prototype.slice.call(arguments)));
|
|
3389
3395
|
s ? s.then ? s.then(function(l) {
|
|
3390
|
-
l !== !1 &&
|
|
3396
|
+
l !== !1 && ot.apply(void 0, [e, o, r.next].concat(fe(t)));
|
|
3391
3397
|
}).catch(function(l) {
|
|
3392
3398
|
throw l;
|
|
3393
|
-
}) :
|
|
3399
|
+
}) : ot.apply(void 0, [this, o, r.next].concat(Array.prototype.slice.call(arguments))) : s === void 0 && ot.apply(void 0, [this, o, r.next].concat(Array.prototype.slice.call(arguments)));
|
|
3394
3400
|
} catch (l) {
|
|
3395
3401
|
throw l.message = "[pluginName: ".concat(this.pluginName, ":").concat(a, "] >> ").concat(l.message), l;
|
|
3396
3402
|
}
|
|
3397
3403
|
else
|
|
3398
|
-
|
|
3404
|
+
ot.apply(void 0, [this, o, r.next].concat(Array.prototype.slice.call(arguments)));
|
|
3399
3405
|
}).bind(this);
|
|
3400
3406
|
}
|
|
3401
|
-
function
|
|
3407
|
+
function yt(a, o) {
|
|
3402
3408
|
var r = this.__hooks;
|
|
3403
3409
|
if (r)
|
|
3404
3410
|
return r.hasOwnProperty(a) ? (r && (r[a] = o), !0) : (console.warn("has no supported hook which name [".concat(a, "]")), !1);
|
|
3405
3411
|
}
|
|
3406
|
-
function
|
|
3412
|
+
function _t(a, o) {
|
|
3407
3413
|
var r = this.__hooks;
|
|
3408
3414
|
r && delete r[a];
|
|
3409
3415
|
}
|
|
3410
|
-
function
|
|
3416
|
+
function ki(a) {
|
|
3411
3417
|
if (!(!this.plugins || !this.plugins[a.toLowerCase()])) {
|
|
3412
3418
|
for (var o = this.plugins[a.toLowerCase()], r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), e = 1; e < r; e++)
|
|
3413
3419
|
t[e - 1] = arguments[e];
|
|
3414
3420
|
return o.useHooks && o.useHooks.apply(o, t);
|
|
3415
3421
|
}
|
|
3416
3422
|
}
|
|
3417
|
-
function
|
|
3423
|
+
function Ci(a) {
|
|
3418
3424
|
if (!(!this.plugins || !this.plugins[a.toLowerCase()])) {
|
|
3419
3425
|
var o = this.plugins[a.toLowerCase()];
|
|
3420
3426
|
if (o) {
|
|
@@ -3456,7 +3462,7 @@ function me(a, o, r) {
|
|
|
3456
3462
|
} else
|
|
3457
3463
|
return r.call.apply(r, [a, a].concat(e));
|
|
3458
3464
|
}
|
|
3459
|
-
function
|
|
3465
|
+
function It(a, o) {
|
|
3460
3466
|
F.logError("[".concat(a, "] event or callback cant be undefined or null when call ").concat(o));
|
|
3461
3467
|
}
|
|
3462
3468
|
var xe = /* @__PURE__ */ function() {
|
|
@@ -3523,7 +3529,7 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3523
3529
|
value: function(r, t) {
|
|
3524
3530
|
var e = this;
|
|
3525
3531
|
if (!r || !t || !this.player) {
|
|
3526
|
-
|
|
3532
|
+
It(this.pluginName, "plugin.on(event, callback)");
|
|
3527
3533
|
return;
|
|
3528
3534
|
}
|
|
3529
3535
|
typeof r == "string" ? (this.__events[r] = t, this.player.on(r, t)) : Array.isArray(r) && r.forEach(function(i) {
|
|
@@ -3535,7 +3541,7 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3535
3541
|
value: function(r, t) {
|
|
3536
3542
|
var e = this;
|
|
3537
3543
|
if (!r || !t || !this.player) {
|
|
3538
|
-
|
|
3544
|
+
It(this.pluginName, "plugin.once(event, callback)");
|
|
3539
3545
|
return;
|
|
3540
3546
|
}
|
|
3541
3547
|
typeof r == "string" ? (this.__onceEvents[r] = t, this.player.once(r, t)) : Array.isArray(r) && r.forEach(function(i) {
|
|
@@ -3547,7 +3553,7 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3547
3553
|
value: function(r, t) {
|
|
3548
3554
|
var e = this;
|
|
3549
3555
|
if (!r || !t || !this.player) {
|
|
3550
|
-
|
|
3556
|
+
It(this.pluginName, "plugin.off(event, callback)");
|
|
3551
3557
|
return;
|
|
3552
3558
|
}
|
|
3553
3559
|
typeof r == "string" ? (delete this.__events[r], this.player.off(r, t)) : Array.isArray(r) && r.forEach(function(i) {
|
|
@@ -3588,21 +3594,21 @@ var xe = /* @__PURE__ */ function() {
|
|
|
3588
3594
|
}, {
|
|
3589
3595
|
key: "hook",
|
|
3590
3596
|
value: function(r, t) {
|
|
3591
|
-
return
|
|
3597
|
+
return mt.call.apply(mt, [this].concat(Array.prototype.slice.call(arguments)));
|
|
3592
3598
|
}
|
|
3593
3599
|
}, {
|
|
3594
3600
|
key: "useHooks",
|
|
3595
3601
|
value: function(r, t) {
|
|
3596
3602
|
for (var e = arguments.length, i = new Array(e > 2 ? e - 2 : 0), n = 2; n < e; n++)
|
|
3597
3603
|
i[n - 2] = arguments[n];
|
|
3598
|
-
return
|
|
3604
|
+
return yt.call.apply(yt, [this].concat(Array.prototype.slice.call(arguments)));
|
|
3599
3605
|
}
|
|
3600
3606
|
}, {
|
|
3601
3607
|
key: "removeHooks",
|
|
3602
3608
|
value: function(r, t) {
|
|
3603
3609
|
for (var e = arguments.length, i = new Array(e > 2 ? e - 2 : 0), n = 2; n < e; n++)
|
|
3604
3610
|
i[n - 2] = arguments[n];
|
|
3605
|
-
return
|
|
3611
|
+
return _t.call.apply(_t, [this].concat(Array.prototype.slice.call(arguments)));
|
|
3606
3612
|
}
|
|
3607
3613
|
}, {
|
|
3608
3614
|
key: "registerPlugin",
|
|
@@ -3657,7 +3663,7 @@ function Qs(a, o) {
|
|
|
3657
3663
|
}
|
|
3658
3664
|
}
|
|
3659
3665
|
var eo = Qs, to = eo;
|
|
3660
|
-
function
|
|
3666
|
+
function At(a, o, r, t, e) {
|
|
3661
3667
|
var i = no.apply(this, arguments);
|
|
3662
3668
|
return a.addEventListener(r, i, e), {
|
|
3663
3669
|
destroy: function() {
|
|
@@ -3666,8 +3672,8 @@ function It(a, o, r, t, e) {
|
|
|
3666
3672
|
};
|
|
3667
3673
|
}
|
|
3668
3674
|
function io(a, o, r, t, e) {
|
|
3669
|
-
return typeof a.addEventListener == "function" ?
|
|
3670
|
-
return
|
|
3675
|
+
return typeof a.addEventListener == "function" ? At.apply(null, arguments) : typeof r == "function" ? At.bind(null, document).apply(null, arguments) : (typeof a == "string" && (a = document.querySelectorAll(a)), Array.prototype.map.call(a, function(i) {
|
|
3676
|
+
return At(i, o, r, t, e);
|
|
3671
3677
|
}));
|
|
3672
3678
|
}
|
|
3673
3679
|
function no(a, o, r, t) {
|
|
@@ -3676,7 +3682,7 @@ function no(a, o, r, t) {
|
|
|
3676
3682
|
};
|
|
3677
3683
|
}
|
|
3678
3684
|
var ro = io;
|
|
3679
|
-
const bi = /* @__PURE__ */
|
|
3685
|
+
const bi = /* @__PURE__ */ qt(ro);
|
|
3680
3686
|
var so = {
|
|
3681
3687
|
CONTROLS: "controls",
|
|
3682
3688
|
ROOT: "root"
|
|
@@ -3694,7 +3700,7 @@ var so = {
|
|
|
3694
3700
|
ICON_DISABLE: "xg-icon-disable",
|
|
3695
3701
|
ICON_HIDE: "xg-icon-hide"
|
|
3696
3702
|
};
|
|
3697
|
-
function
|
|
3703
|
+
function Lt(a) {
|
|
3698
3704
|
return a ? a.indexOf && /^(?:http|data:|\/)/.test(a) : !1;
|
|
3699
3705
|
}
|
|
3700
3706
|
function oo(a, o) {
|
|
@@ -3711,8 +3717,8 @@ function Ti(a, o) {
|
|
|
3711
3717
|
return f.addClass(a, r), Object.keys(t).map(function(n) {
|
|
3712
3718
|
a.setAttribute(n, t[n]);
|
|
3713
3719
|
}), a;
|
|
3714
|
-
if (
|
|
3715
|
-
return t.src =
|
|
3720
|
+
if (Lt(a) || Lt(a.url))
|
|
3721
|
+
return t.src = Lt(a) ? a : a.url || "", i = f.createDom(a.tag || "img", "", t, "xg-img ".concat(r)), i;
|
|
3716
3722
|
if (typeof a == "function")
|
|
3717
3723
|
try {
|
|
3718
3724
|
return i = a(), i instanceof window.Element ? (f.addClass(i, r), Object.keys(t).map(function(n) {
|
|
@@ -4302,7 +4308,7 @@ var $ = {
|
|
|
4302
4308
|
delete this.pluginGroup[r], delete o._pluginInfoId;
|
|
4303
4309
|
}
|
|
4304
4310
|
}
|
|
4305
|
-
},
|
|
4311
|
+
}, C = {
|
|
4306
4312
|
DEFAULT: "xgplayer",
|
|
4307
4313
|
DEFAULT_SKIN: "xgplayer-skin-default",
|
|
4308
4314
|
ENTER: "xgplayer-is-enter",
|
|
@@ -4453,13 +4459,13 @@ var go = function(o, r) {
|
|
|
4453
4459
|
value: function() {
|
|
4454
4460
|
var e = this, i = this.config, n = i.disable, s = i.height, l = i.mode;
|
|
4455
4461
|
if (!n) {
|
|
4456
|
-
l === "flex" && this.player.addClass(
|
|
4462
|
+
l === "flex" && this.player.addClass(C.FLEX_CONTROLS);
|
|
4457
4463
|
var u = {
|
|
4458
4464
|
height: "".concat(s, "px")
|
|
4459
4465
|
};
|
|
4460
4466
|
Object.keys(u).map(function(h) {
|
|
4461
4467
|
e.root.style[h] = u[h];
|
|
4462
|
-
}), 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(
|
|
4468
|
+
}), 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(gt, function(h) {
|
|
4463
4469
|
h ? f.addClass(e.root, "mini-controls") : f.removeClass(e.root, "mini-controls");
|
|
4464
4470
|
});
|
|
4465
4471
|
var c = this.playerConfig.isMobileSimulateMode;
|
|
@@ -4490,12 +4496,12 @@ var go = function(o, r) {
|
|
|
4490
4496
|
}, {
|
|
4491
4497
|
key: "recoverAutoHide",
|
|
4492
4498
|
value: function() {
|
|
4493
|
-
this.config.autoHide && f.addClass(this.root,
|
|
4499
|
+
this.config.autoHide && f.addClass(this.root, C.CONTROLS_AUTOHIDE);
|
|
4494
4500
|
}
|
|
4495
4501
|
}, {
|
|
4496
4502
|
key: "pauseAutoHide",
|
|
4497
4503
|
value: function() {
|
|
4498
|
-
f.removeClass(this.root,
|
|
4504
|
+
f.removeClass(this.root, C.CONTROLS_AUTOHIDE);
|
|
4499
4505
|
}
|
|
4500
4506
|
}, {
|
|
4501
4507
|
key: "show",
|
|
@@ -4556,7 +4562,7 @@ var go = function(o, r) {
|
|
|
4556
4562
|
"flex-controls": i === "flex"
|
|
4557
4563
|
}, {
|
|
4558
4564
|
"bottom-controls": i === "bottom"
|
|
4559
|
-
}, y({},
|
|
4565
|
+
}, y({}, C.CONTROLS_AUTOHIDE, n), {
|
|
4560
4566
|
"xgplayer-controls-initshow": s || !n
|
|
4561
4567
|
});
|
|
4562
4568
|
return '<xg-controls class="'.concat(u, `" unselectable="on">
|
|
@@ -4666,14 +4672,14 @@ var go = function(o, r) {
|
|
|
4666
4672
|
langKeys: [],
|
|
4667
4673
|
textKeys: []
|
|
4668
4674
|
};
|
|
4669
|
-
function
|
|
4675
|
+
function it(a, o) {
|
|
4670
4676
|
return Object.keys(o).forEach(function(r) {
|
|
4671
4677
|
var t = f.typeOf(o[r]), e = f.typeOf(a[r]);
|
|
4672
4678
|
if (t === "Array") {
|
|
4673
4679
|
var i;
|
|
4674
4680
|
e !== "Array" && (a[r] = []), (i = a[r]).push.apply(i, fe(o[r]));
|
|
4675
4681
|
} else
|
|
4676
|
-
t === "Object" ? (e !== "Object" && (a[r] = {}),
|
|
4682
|
+
t === "Object" ? (e !== "Object" && (a[r] = {}), it(a[r], o[r])) : a[r] = o[r];
|
|
4677
4683
|
}), a;
|
|
4678
4684
|
}
|
|
4679
4685
|
function vn() {
|
|
@@ -4693,15 +4699,15 @@ function mo(a, o) {
|
|
|
4693
4699
|
}) : r = a;
|
|
4694
4700
|
var t = o, e = t.lang;
|
|
4695
4701
|
r.map(function(i) {
|
|
4696
|
-
i.LANG === "zh" && (i.LANG = "zh-cn"), e[i.LANG] ?
|
|
4702
|
+
i.LANG === "zh" && (i.LANG = "zh-cn"), e[i.LANG] ? it(e[i.LANG] || {}, i.TEXT || {}) : oi(i, o);
|
|
4697
4703
|
}), vn();
|
|
4698
4704
|
}
|
|
4699
4705
|
}
|
|
4700
|
-
function
|
|
4706
|
+
function oi(a, o) {
|
|
4701
4707
|
var r = a.LANG;
|
|
4702
4708
|
if (o || (o = ie), !!o.lang) {
|
|
4703
4709
|
var t = a.TEXT || {};
|
|
4704
|
-
r === "zh" && (r = "zh-cn"), o.lang[r] ?
|
|
4710
|
+
r === "zh" && (r = "zh-cn"), o.lang[r] ? it(o.lang[r], t) : (o.langKeys.push(r), o.lang[r] = t), vn();
|
|
4705
4711
|
}
|
|
4706
4712
|
}
|
|
4707
4713
|
function yo(a) {
|
|
@@ -4711,9 +4717,9 @@ function yo(a) {
|
|
|
4711
4717
|
textKeys: {},
|
|
4712
4718
|
pId: a
|
|
4713
4719
|
};
|
|
4714
|
-
return
|
|
4720
|
+
return it(r.lang, ie.lang), (o = r.langKeys).push.apply(o, fe(ie.langKeys)), it(r.textKeys, ie.textKeys), r;
|
|
4715
4721
|
}
|
|
4716
|
-
|
|
4722
|
+
oi(vo);
|
|
4717
4723
|
var Ke = {
|
|
4718
4724
|
get textKeys() {
|
|
4719
4725
|
return ie.textKeys;
|
|
@@ -4728,7 +4734,7 @@ var Ke = {
|
|
|
4728
4734
|
}), ie.lang["zh-cn"] && (a.zh = ie.lang["zh-cn"] || {}), a;
|
|
4729
4735
|
},
|
|
4730
4736
|
extend: mo,
|
|
4731
|
-
use:
|
|
4737
|
+
use: oi,
|
|
4732
4738
|
init: yo
|
|
4733
4739
|
}, N = {
|
|
4734
4740
|
INITIAL: 1,
|
|
@@ -4739,7 +4745,7 @@ var Ke = {
|
|
|
4739
4745
|
RUNNING: 6,
|
|
4740
4746
|
ENDED: 7,
|
|
4741
4747
|
DESTROYED: 8
|
|
4742
|
-
}, Si = ["ERROR", "INITIAL", "READY", "ATTACHING", "ATTACHED", "NOTALLOW", "RUNNING", "ENDED", "DESTROYED"], Q = {},
|
|
4748
|
+
}, Si = ["ERROR", "INITIAL", "READY", "ATTACHING", "ATTACHED", "NOTALLOW", "RUNNING", "ENDED", "DESTROYED"], Q = {}, Dt = null, mn = /* @__PURE__ */ function(a) {
|
|
4743
4749
|
P(r, a);
|
|
4744
4750
|
var o = I(r);
|
|
4745
4751
|
function r() {
|
|
@@ -4822,7 +4828,7 @@ var Ke = {
|
|
|
4822
4828
|
}], [{
|
|
4823
4829
|
key: "getInstance",
|
|
4824
4830
|
value: function() {
|
|
4825
|
-
return
|
|
4831
|
+
return Dt || (Dt = new r()), Dt;
|
|
4826
4832
|
}
|
|
4827
4833
|
}]), r;
|
|
4828
4834
|
}(Ki.EventEmitter);
|
|
@@ -4834,7 +4840,7 @@ function _o(a) {
|
|
|
4834
4840
|
}
|
|
4835
4841
|
return null;
|
|
4836
4842
|
}
|
|
4837
|
-
var
|
|
4843
|
+
var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Et = /* @__PURE__ */ function(a) {
|
|
4838
4844
|
P(r, a);
|
|
4839
4845
|
var o = I(r);
|
|
4840
4846
|
function r(t) {
|
|
@@ -4844,15 +4850,15 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4844
4850
|
e = o.call(this, i), y(v(e), "canPlayFunc", function() {
|
|
4845
4851
|
if (e.config) {
|
|
4846
4852
|
var p = e.config, m = p.autoplay, _ = p.defaultPlaybackRate;
|
|
4847
|
-
F.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 = _, (m || e._useAutoplay) && e.mediaPlay(), e.off(ye, e.canPlayFunc), e.removeClass(
|
|
4853
|
+
F.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 = _, (m || e._useAutoplay) && e.mediaPlay(), e.off(ye, e.canPlayFunc), e.removeClass(C.ENTER);
|
|
4848
4854
|
}
|
|
4849
4855
|
}), y(v(e), "onFullscreenChange", function(p, m) {
|
|
4850
4856
|
var _ = function() {
|
|
4851
4857
|
f.setTimeout(v(e), function() {
|
|
4852
4858
|
e.resize();
|
|
4853
4859
|
}, 100);
|
|
4854
|
-
},
|
|
4855
|
-
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(
|
|
4860
|
+
}, k = f.getFullScreenEl();
|
|
4861
|
+
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(vt, {
|
|
4856
4862
|
eventType: "system",
|
|
4857
4863
|
action: "switch_fullscreen",
|
|
4858
4864
|
pluginName: "player",
|
|
@@ -4864,19 +4870,19 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4864
4870
|
to: !1
|
|
4865
4871
|
}]
|
|
4866
4872
|
});
|
|
4867
|
-
var w = Ms(
|
|
4868
|
-
if (m ||
|
|
4869
|
-
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root,
|
|
4873
|
+
var w = Ms(k, e.playerId, Re);
|
|
4874
|
+
if (m || k && (k === e._fullscreenEl || w))
|
|
4875
|
+
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, k, C.FULLSCREEN), e.emit(ve, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
4870
4876
|
else if (e.fullscreen) {
|
|
4871
4877
|
_();
|
|
4872
4878
|
var b = v(e), B = b._fullScreenOffset, M = b.config;
|
|
4873
4879
|
if (M.needFullscreenScroll ? (window.scrollTo(B.left, B.top), f.setTimeout(v(e), function() {
|
|
4874
4880
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
4875
4881
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
4876
|
-
e.removeClass(
|
|
4882
|
+
e.removeClass(C.FULLSCREEN);
|
|
4877
4883
|
else {
|
|
4878
4884
|
var V = e._fullscreenEl;
|
|
4879
|
-
!V && (e.root.contains(p.target) || p.target === e.root) && (V = p.target), e.recoverFullStyle(e.root, V,
|
|
4885
|
+
!V && (e.root.contains(p.target) || p.target === e.root) && (V = p.target), e.recoverFullStyle(e.root, V, C.FULLSCREEN);
|
|
4880
4886
|
}
|
|
4881
4887
|
e._fullscreenEl = null, e.emit(ve, !1);
|
|
4882
4888
|
}
|
|
@@ -4884,7 +4890,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4884
4890
|
e._fullscreenEl = e.media, e.onFullscreenChange(p, !0);
|
|
4885
4891
|
}), y(v(e), "_onWebkitendfullscreen", function(p) {
|
|
4886
4892
|
e.onFullscreenChange(p, !1);
|
|
4887
|
-
}), gn(v(e),
|
|
4893
|
+
}), gn(v(e), ko), e.config = i, e._pluginInfoId = f.generateSessionId(), As(v(e));
|
|
4888
4894
|
var n = e.constructor.defaultPreset;
|
|
4889
4895
|
if (e.config.presets.length) {
|
|
4890
4896
|
var s = e.config.presets.indexOf("default");
|
|
@@ -4918,7 +4924,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4918
4924
|
}, e.instManager = be;
|
|
4919
4925
|
var l = e._initDOM();
|
|
4920
4926
|
if (!l)
|
|
4921
|
-
return console.error(new Error("can't find the dom which id is ".concat(e.config.id, " or this.config.el does not exist"))),
|
|
4927
|
+
return console.error(new Error("can't find the dom which id is ".concat(e.config.id, " or this.config.el does not exist"))), Jt(e);
|
|
4922
4928
|
var u = e.config, c = u.definition, h = c === void 0 ? {} : c, d = u.url;
|
|
4923
4929
|
if (!d && h.list && h.list.length > 0) {
|
|
4924
4930
|
var g = h.list.find(function(p) {
|
|
@@ -4927,7 +4933,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4927
4933
|
g || (h.defaultDefinition = h.list[0].definition, g = h.list[0]), e.config.url = g.url, e.curDefinition = g;
|
|
4928
4934
|
}
|
|
4929
4935
|
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), $.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(N.READY), f.setTimeout(v(e), function() {
|
|
4930
|
-
e.emit(
|
|
4936
|
+
e.emit(ii);
|
|
4931
4937
|
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < N.ATTACHED) && e.start(), e;
|
|
4932
4938
|
}
|
|
4933
4939
|
return E(r, [{
|
|
@@ -4939,7 +4945,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4939
4945
|
if (n && n.nodeType === 1)
|
|
4940
4946
|
this.root = n;
|
|
4941
4947
|
else
|
|
4942
|
-
return this.emit(
|
|
4948
|
+
return this.emit(rt, new ft("use", this.config.vid, {
|
|
4943
4949
|
line: 32,
|
|
4944
4950
|
handle: "Constructor",
|
|
4945
4951
|
msg: "container id can't be empty"
|
|
@@ -4961,17 +4967,17 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4961
4967
|
this.controls = d;
|
|
4962
4968
|
}
|
|
4963
4969
|
var g = this.config.isMobileSimulateMode === "mobile" ? "mobile" : R.device;
|
|
4964
|
-
if (this.addClass("".concat(
|
|
4970
|
+
if (this.addClass("".concat(C.DEFAULT, " ").concat(C.INACTIVE, " xgplayer-").concat(g, " ").concat(this.config.controls ? "" : C.NO_CONTROLS)), this.config.autoplay ? this.addClass(C.ENTER) : this.addClass(C.NO_START), this.config.fluid) {
|
|
4965
4971
|
var p = this.config, m = p.width, _ = p.height;
|
|
4966
4972
|
(typeof m != "number" || typeof _ != "number") && (m = 600, _ = 337.5);
|
|
4967
|
-
var
|
|
4973
|
+
var k = {
|
|
4968
4974
|
width: "100%",
|
|
4969
4975
|
height: "0",
|
|
4970
4976
|
"max-width": "100%",
|
|
4971
4977
|
"padding-top": "".concat(_ * 100 / m, "%")
|
|
4972
4978
|
};
|
|
4973
|
-
Object.keys(
|
|
4974
|
-
i.root.style[D] =
|
|
4979
|
+
Object.keys(k).forEach(function(D) {
|
|
4980
|
+
i.root.style[D] = k[D];
|
|
4975
4981
|
});
|
|
4976
4982
|
} else
|
|
4977
4983
|
["width", "height"].forEach(function(D) {
|
|
@@ -4995,7 +5001,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4995
5001
|
e.on(i, e["on" + i.charAt(0).toUpperCase() + i.slice(1)]);
|
|
4996
5002
|
}), mi.forEach(function(i) {
|
|
4997
5003
|
document && document.addEventListener(i, e.onFullscreenChange);
|
|
4998
|
-
}), R.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(
|
|
5004
|
+
}), R.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(Ce, this.resize), this.playFunc = function() {
|
|
4999
5005
|
e.config.closeFocusVideoFocus || e.media.focus();
|
|
5000
5006
|
}, this.once(re, this.playFunc);
|
|
5001
5007
|
}
|
|
@@ -5024,7 +5030,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5024
5030
|
F.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (R.os.isIpad || R.os.isPhone) && this.mediaPlay());
|
|
5025
5031
|
var l = this.config.startTime;
|
|
5026
5032
|
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 < N.ATTACHED) && $.afterInit(this), this.hasStart = !0, this.setState(N.ATTACHED), f.setTimeout(this, function() {
|
|
5027
|
-
i.emit(
|
|
5033
|
+
i.emit(bt);
|
|
5028
5034
|
}, 0);
|
|
5029
5035
|
}
|
|
5030
5036
|
}
|
|
@@ -5078,7 +5084,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5078
5084
|
this.leftBar || (this.leftBar = f.createPositionBar("xg-left-bar", this.root)), i = this.leftBar;
|
|
5079
5085
|
break;
|
|
5080
5086
|
case j.ROOT_TOP:
|
|
5081
|
-
this.topBar || (this.topBar = f.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && f.addClass(this.topBar,
|
|
5087
|
+
this.topBar || (this.topBar = f.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && f.addClass(this.topBar, C.TOP_BAR_AUTOHIDE)), i = this.topBar;
|
|
5082
5088
|
break;
|
|
5083
5089
|
default:
|
|
5084
5090
|
i = this.innerContainer || this.root;
|
|
@@ -5206,22 +5212,22 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5206
5212
|
value: function() {
|
|
5207
5213
|
var e = this;
|
|
5208
5214
|
if (!this.hasStart && this.state < N.ATTACHED) {
|
|
5209
|
-
this.removeClass(
|
|
5215
|
+
this.removeClass(C.NO_START), this.addClass(C.ENTER), this.start(), this._useAutoplay = !0;
|
|
5210
5216
|
return;
|
|
5211
5217
|
}
|
|
5212
|
-
this.state < N.RUNNING && (this.removeClass(
|
|
5218
|
+
this.state < N.RUNNING && (this.removeClass(C.NO_START), !this.isCanplay && this.addClass(C.ENTER));
|
|
5213
5219
|
var i = L(A(r.prototype), "play", this).call(this);
|
|
5214
5220
|
return i !== void 0 && i && i.then ? i.then(function() {
|
|
5215
|
-
e.removeClass(
|
|
5221
|
+
e.removeClass(C.NOT_ALLOW_AUTOPLAY), e.addClass(C.PLAYING), e.state < N.RUNNING && (F.logInfo(">>>>playPromise.then"), e.setState(N.RUNNING), e.emit(Fe));
|
|
5216
5222
|
}).catch(function(n) {
|
|
5217
5223
|
if (F.logWarn(">>>>playPromise.catch", n.name), e.media && e.media.error) {
|
|
5218
|
-
e.onError(), e.removeClass(
|
|
5224
|
+
e.onError(), e.removeClass(C.ENTER);
|
|
5219
5225
|
return;
|
|
5220
5226
|
}
|
|
5221
5227
|
n.name === "NotAllowedError" && (e._errorTimer = f.setTimeout(e, function() {
|
|
5222
|
-
e._errorTimer = null, e.emit(
|
|
5228
|
+
e._errorTimer = null, e.emit(ni), e.addClass(C.NOT_ALLOW_AUTOPLAY), e.removeClass(C.ENTER), e.pause(), e.setState(N.NOTALLOW);
|
|
5223
5229
|
}, 0));
|
|
5224
|
-
}) : (F.logWarn("video.play not return promise"), this.state < N.RUNNING && (this.setState(N.RUNNING), this.removeClass(
|
|
5230
|
+
}) : (F.logWarn("video.play not return promise"), this.state < N.RUNNING && (this.setState(N.RUNNING), this.removeClass(C.NOT_ALLOW_AUTOPLAY), this.removeClass(C.NO_START), this.removeClass(C.ENTER), this.addClass(C.PLAYING), this.emit(Fe))), i;
|
|
5225
5231
|
}
|
|
5226
5232
|
}, {
|
|
5227
5233
|
key: "mediaPause",
|
|
@@ -5237,7 +5243,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5237
5243
|
key: "play",
|
|
5238
5244
|
value: function() {
|
|
5239
5245
|
var e = this;
|
|
5240
|
-
return this.removeClass(
|
|
5246
|
+
return this.removeClass(C.PAUSED), me(this, "play", function() {
|
|
5241
5247
|
return e.mediaPlay();
|
|
5242
5248
|
});
|
|
5243
5249
|
}
|
|
@@ -5255,8 +5261,8 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5255
5261
|
var n = this;
|
|
5256
5262
|
if (!(!this.media || Number.isNaN(Number(e)) || !this.hasStart)) {
|
|
5257
5263
|
var s = this.config, l = s.isSeekedPlay, u = s.seekedStatus, c = i || (l ? "play" : u);
|
|
5258
|
-
e = e < 0 ? 0 : e > this.duration ? parseInt(this.duration, 10) : e, !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1), this._onceSeekCanplay && this.off(
|
|
5259
|
-
switch (n.removeClass(
|
|
5264
|
+
e = e < 0 ? 0 : e > this.duration ? parseInt(this.duration, 10) : e, !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1), this._onceSeekCanplay && this.off(ke, this._onceSeekCanplay), this._onceSeekCanplay = function() {
|
|
5265
|
+
switch (n.removeClass(C.ENTER), n.isSeeking = !1, c) {
|
|
5260
5266
|
case "play":
|
|
5261
5267
|
n.play();
|
|
5262
5268
|
break;
|
|
@@ -5267,7 +5273,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5267
5273
|
n._isPauseBeforeSeek > 1 || n.paused ? n.pause() : n.play();
|
|
5268
5274
|
}
|
|
5269
5275
|
n._isPauseBeforeSeek = 0, n._onceSeekCanplay = null;
|
|
5270
|
-
}, this.once(
|
|
5276
|
+
}, this.once(ke, this._onceSeekCanplay), this.state < N.RUNNING ? (this.removeClass(C.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
|
|
5271
5277
|
}
|
|
5272
5278
|
}
|
|
5273
5279
|
}, {
|
|
@@ -5284,7 +5290,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5284
5290
|
var n = this, s = this.config.definition;
|
|
5285
5291
|
if (Array.isArray(s == null ? void 0 : s.list) && s.list.forEach(function(u) {
|
|
5286
5292
|
(e == null ? void 0 : e.definition) === u.definition && (n.curDefinition = u);
|
|
5287
|
-
}), e != null && e.bitrate && typeof e.bitrate != "number" && (e.bitrate = parseInt(e.bitrate, 10) || 0), this.emit(
|
|
5293
|
+
}), e != null && e.bitrate && typeof e.bitrate != "number" && (e.bitrate = parseInt(e.bitrate, 10) || 0), this.emit(si, {
|
|
5288
5294
|
from: i,
|
|
5289
5295
|
to: e
|
|
5290
5296
|
}), !this.hasStart) {
|
|
@@ -5295,11 +5301,11 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5295
5301
|
seamless: s.seamless !== !1 && typeof MediaSource < "u" && typeof MediaSource.isTypeSupported == "function"
|
|
5296
5302
|
}, e));
|
|
5297
5303
|
l && l.then ? l.then(function() {
|
|
5298
|
-
n.emit(
|
|
5304
|
+
n.emit(Kt, {
|
|
5299
5305
|
from: i,
|
|
5300
5306
|
to: e
|
|
5301
5307
|
});
|
|
5302
|
-
}) : this.emit(
|
|
5308
|
+
}) : this.emit(Kt, {
|
|
5303
5309
|
from: i,
|
|
5304
5310
|
to: e
|
|
5305
5311
|
});
|
|
@@ -5309,15 +5315,15 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5309
5315
|
value: function() {
|
|
5310
5316
|
this.load(), this.reloadFunc = function() {
|
|
5311
5317
|
this.play();
|
|
5312
|
-
}, this.once(
|
|
5318
|
+
}, this.once(Ce, this.reloadFunc);
|
|
5313
5319
|
}
|
|
5314
5320
|
}, {
|
|
5315
5321
|
key: "resetState",
|
|
5316
5322
|
value: function() {
|
|
5317
|
-
var e = this, i =
|
|
5323
|
+
var e = this, i = C.NOT_ALLOW_AUTOPLAY, n = C.PLAYING, s = C.NO_START, l = C.PAUSED, u = C.REPLAY, c = C.ENTER, h = C.ENDED, d = C.ERROR, g = C.LOADING, p = [i, n, s, l, u, c, h, d, g];
|
|
5318
5324
|
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, p.forEach(function(m) {
|
|
5319
5325
|
e.removeClass(m);
|
|
5320
|
-
}), this.addClass(
|
|
5326
|
+
}), this.addClass(C.NO_START), this.emit(Tt);
|
|
5321
5327
|
}
|
|
5322
5328
|
}, {
|
|
5323
5329
|
key: "reset",
|
|
@@ -5339,7 +5345,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5339
5345
|
value: function() {
|
|
5340
5346
|
var e, i = this, n = this.innerContainer, s = this.root, l = this.media;
|
|
5341
5347
|
if (!(!s || !l)) {
|
|
5342
|
-
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(Re), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media), f.clearAllTimers(this), this.emit(
|
|
5348
|
+
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(Re), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media), f.clearAllTimers(this), this.emit(ri), (e = be) === null || e === void 0 || e.remove(this), $.destroy(this), pn(this), L(A(r.prototype), "destroy", this).call(this), this.fullscreen && this._fullscreenEl === this.root && this.exitFullscreen(), n)
|
|
5343
5349
|
for (var u = n.children, c = 0; c < u.length; c++)
|
|
5344
5350
|
n.removeChild(u[c]);
|
|
5345
5351
|
!n && l instanceof window.Node && s.contains(l) && s.removeChild(l), ["topBar", "leftBar", "rightBar", "innerContainer"].map(function(d) {
|
|
@@ -5357,20 +5363,20 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5357
5363
|
key: "replay",
|
|
5358
5364
|
value: function() {
|
|
5359
5365
|
var e = this;
|
|
5360
|
-
this.removeClass(
|
|
5361
|
-
e.once(
|
|
5366
|
+
this.removeClass(C.ENDED), this.currentTime = 0, this.isSeeking = !1, me(this, "replay", function() {
|
|
5367
|
+
e.once(ke, function() {
|
|
5362
5368
|
var i = e.mediaPlay();
|
|
5363
5369
|
i && i.catch && i.catch(function(n) {
|
|
5364
5370
|
console.log(n);
|
|
5365
5371
|
});
|
|
5366
|
-
}), e.emit(
|
|
5372
|
+
}), e.emit(ht), e.onPlay();
|
|
5367
5373
|
});
|
|
5368
5374
|
}
|
|
5369
5375
|
}, {
|
|
5370
5376
|
key: "retry",
|
|
5371
5377
|
value: function() {
|
|
5372
5378
|
var e = this;
|
|
5373
|
-
this.removeClass(
|
|
5379
|
+
this.removeClass(C.ERROR), this.addClass(C.LOADING), me(this, "retry", function() {
|
|
5374
5380
|
var i = e.currentTime, n = e.config.url, s = f.isMSE(e.media) ? {
|
|
5375
5381
|
url: n
|
|
5376
5382
|
} : e._preProcessUrl(n);
|
|
@@ -5382,12 +5388,12 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5382
5388
|
}, {
|
|
5383
5389
|
key: "changeFullStyle",
|
|
5384
5390
|
value: function(e, i, n, s) {
|
|
5385
|
-
e && (s || (s =
|
|
5391
|
+
e && (s || (s = C.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(Re, this.playerId)));
|
|
5386
5392
|
}
|
|
5387
5393
|
}, {
|
|
5388
5394
|
key: "recoverFullStyle",
|
|
5389
5395
|
value: function(e, i, n, s) {
|
|
5390
|
-
s || (s =
|
|
5396
|
+
s || (s = C.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(Re));
|
|
5391
5397
|
}
|
|
5392
5398
|
}, {
|
|
5393
5399
|
key: "getFullscreen",
|
|
@@ -5439,36 +5445,36 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5439
5445
|
value: function() {
|
|
5440
5446
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5441
5447
|
this.isRotateFullscreen ? this.exitRotateFullscreen() : this.fullscreen && this.exitFullscreen();
|
|
5442
|
-
var i = e ? "".concat(
|
|
5448
|
+
var i = e ? "".concat(C.INNER_FULLSCREEN, " ").concat(C.CSS_FULLSCREEN) : C.CSS_FULLSCREEN;
|
|
5443
5449
|
this.changeFullStyle(this.root, e, i);
|
|
5444
5450
|
var n = this.config.fullscreen, s = n === void 0 ? {} : n, l = s.useCssFullscreen === !0 || typeof s.useCssFullscreen == "function" && s.useCssFullscreen();
|
|
5445
|
-
l && (this.fullscreen = !0, this.emit(ve, !0)), this._cssfullscreenEl = e, this.cssfullscreen = !0, this.emit(
|
|
5451
|
+
l && (this.fullscreen = !0, this.emit(ve, !0)), this._cssfullscreenEl = e, this.cssfullscreen = !0, this.emit(dt, !0);
|
|
5446
5452
|
}
|
|
5447
5453
|
}, {
|
|
5448
5454
|
key: "exitCssFullscreen",
|
|
5449
5455
|
value: function() {
|
|
5450
|
-
var e = this._cssfullscreenEl ? "".concat(
|
|
5456
|
+
var e = this._cssfullscreenEl ? "".concat(C.INNER_FULLSCREEN, " ").concat(C.CSS_FULLSCREEN) : C.CSS_FULLSCREEN;
|
|
5451
5457
|
if (!this.fullscreen)
|
|
5452
5458
|
this.recoverFullStyle(this.root, this._cssfullscreenEl, e);
|
|
5453
5459
|
else {
|
|
5454
5460
|
var i = this.config.fullscreen, n = i === void 0 ? {} : i, s = n.useCssFullscreen === !0 || typeof n.useCssFullscreen == "function" && n.useCssFullscreen();
|
|
5455
5461
|
s ? (this.recoverFullStyle(this.root, this._cssfullscreenEl, e), this.fullscreen = !1, this.emit(ve, !1)) : this.removeClass(e);
|
|
5456
5462
|
}
|
|
5457
|
-
this._cssfullscreenEl = null, this.cssfullscreen = !1, this.emit(
|
|
5463
|
+
this._cssfullscreenEl = null, this.cssfullscreen = !1, this.emit(dt, !1);
|
|
5458
5464
|
}
|
|
5459
5465
|
}, {
|
|
5460
5466
|
key: "getRotateFullscreen",
|
|
5461
5467
|
value: function() {
|
|
5462
5468
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5463
5469
|
this.cssfullscreen && this.exitCssFullscreen(e);
|
|
5464
|
-
var i = e ? "".concat(
|
|
5465
|
-
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i,
|
|
5470
|
+
var i = e ? "".concat(C.INNER_FULLSCREEN, " ").concat(C.ROTATE_FULLSCREEN) : C.ROTATE_FULLSCREEN;
|
|
5471
|
+
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i, C.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);
|
|
5466
5472
|
}
|
|
5467
5473
|
}, {
|
|
5468
5474
|
key: "exitRotateFullscreen",
|
|
5469
5475
|
value: function(e) {
|
|
5470
|
-
var i = this._fullscreenEl !== this.root ? "".concat(
|
|
5471
|
-
this.recoverFullStyle(this.root, this._fullscreenEl, i,
|
|
5476
|
+
var i = this._fullscreenEl !== this.root ? "".concat(C.INNER_FULLSCREEN, " ").concat(C.ROTATE_FULLSCREEN) : C.ROTATE_FULLSCREEN;
|
|
5477
|
+
this.recoverFullStyle(this.root, this._fullscreenEl, i, C.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);
|
|
5472
5478
|
}
|
|
5473
5479
|
}, {
|
|
5474
5480
|
key: "setRotateDeg",
|
|
@@ -5486,7 +5492,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5486
5492
|
this.onFocus(e);
|
|
5487
5493
|
return;
|
|
5488
5494
|
}
|
|
5489
|
-
this.emit(
|
|
5495
|
+
this.emit(ti, W({
|
|
5490
5496
|
paused: this.paused,
|
|
5491
5497
|
ended: this.ended
|
|
5492
5498
|
}, e));
|
|
@@ -5513,7 +5519,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5513
5519
|
autoHide: !0,
|
|
5514
5520
|
delay: 3e3
|
|
5515
5521
|
}, n = this.innerStates;
|
|
5516
|
-
if (this.isActive = !0, this.removeClass(
|
|
5522
|
+
if (this.isActive = !0, this.removeClass(C.INACTIVE), this._clearUserTimer(), i.isLock !== void 0 && (n.isActiveLocked = i.isLock), i.autoHide === !1 || i.isLock === !0 || n.isActiveLocked) {
|
|
5517
5523
|
this._clearUserTimer();
|
|
5518
5524
|
return;
|
|
5519
5525
|
}
|
|
@@ -5528,7 +5534,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5528
5534
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = e.ignorePaused, n = i === void 0 ? !1 : i;
|
|
5529
5535
|
if (!this.innerStates.isActiveLocked) {
|
|
5530
5536
|
var s = this.config.closePauseVideoFocus;
|
|
5531
|
-
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(
|
|
5537
|
+
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(C.INACTIVE);
|
|
5532
5538
|
}
|
|
5533
5539
|
}
|
|
5534
5540
|
}, {
|
|
@@ -5539,7 +5545,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5539
5545
|
}, {
|
|
5540
5546
|
key: "onCanplay",
|
|
5541
5547
|
value: function() {
|
|
5542
|
-
this.removeClass(
|
|
5548
|
+
this.removeClass(C.ENTER), this.removeClass(C.ERROR), this.removeClass(C.LOADING), this.isCanplay = !0, this.waitTimer && f.clearTimeout(this, this.waitTimer);
|
|
5543
5549
|
}
|
|
5544
5550
|
}, {
|
|
5545
5551
|
key: "onLoadeddata",
|
|
@@ -5549,44 +5555,44 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5549
5555
|
}, {
|
|
5550
5556
|
key: "onLoadstart",
|
|
5551
5557
|
value: function() {
|
|
5552
|
-
this.removeClass(
|
|
5558
|
+
this.removeClass(C.ERROR), this.isCanplay = !1;
|
|
5553
5559
|
}
|
|
5554
5560
|
}, {
|
|
5555
5561
|
key: "onPlay",
|
|
5556
5562
|
value: function() {
|
|
5557
|
-
this.state === N.ENDED && this.setState(N.RUNNING), this.removeClass(
|
|
5563
|
+
this.state === N.ENDED && this.setState(N.RUNNING), this.removeClass(C.PAUSED), this.ended && this.removeClass(C.ENDED), !this.config.closePlayVideoFocus && this.focus();
|
|
5558
5564
|
}
|
|
5559
5565
|
}, {
|
|
5560
5566
|
key: "onPause",
|
|
5561
5567
|
value: function() {
|
|
5562
|
-
this.addClass(
|
|
5568
|
+
this.addClass(C.PAUSED), this.updateAcc("pause"), this.config.closePauseVideoFocus || (this._clearUserTimer(), this.focus());
|
|
5563
5569
|
}
|
|
5564
5570
|
}, {
|
|
5565
5571
|
key: "onEnded",
|
|
5566
5572
|
value: function() {
|
|
5567
|
-
this.updateAcc("ended"), this.addClass(
|
|
5573
|
+
this.updateAcc("ended"), this.addClass(C.ENDED), this.setState(N.ENDED);
|
|
5568
5574
|
}
|
|
5569
5575
|
}, {
|
|
5570
5576
|
key: "onError",
|
|
5571
5577
|
value: function() {
|
|
5572
|
-
this.isError = !0, this.updateAcc("error"), this.removeClass(
|
|
5578
|
+
this.isError = !0, this.updateAcc("error"), this.removeClass(C.NOT_ALLOW_AUTOPLAY), this.removeClass(C.NO_START), this.removeClass(C.ENTER), this.removeClass(C.LOADING), this.addClass(C.ERROR);
|
|
5573
5579
|
}
|
|
5574
5580
|
}, {
|
|
5575
5581
|
key: "onSeeking",
|
|
5576
5582
|
value: function() {
|
|
5577
|
-
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(
|
|
5583
|
+
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(C.SEEKING);
|
|
5578
5584
|
}
|
|
5579
5585
|
}, {
|
|
5580
5586
|
key: "onSeeked",
|
|
5581
5587
|
value: function() {
|
|
5582
|
-
this.isSeeking = !1, this.waitTimer && f.clearTimeout(this, this.waitTimer), this.removeClass(
|
|
5588
|
+
this.isSeeking = !1, this.waitTimer && f.clearTimeout(this, this.waitTimer), this.removeClass(C.LOADING), this.removeClass(C.SEEKING);
|
|
5583
5589
|
}
|
|
5584
5590
|
}, {
|
|
5585
5591
|
key: "onWaiting",
|
|
5586
5592
|
value: function() {
|
|
5587
5593
|
var e = this;
|
|
5588
5594
|
this.waitTimer && f.clearTimeout(this, this.waitTimer), this.updateAcc("waiting"), this.waitTimer = f.setTimeout(this, function() {
|
|
5589
|
-
e.addClass(
|
|
5595
|
+
e.addClass(C.LOADING), e.emit(rn), f.clearTimeout(e, e.waitTimer), e.waitTimer = null;
|
|
5590
5596
|
}, this.config.minWaitDelay);
|
|
5591
5597
|
}
|
|
5592
5598
|
}, {
|
|
@@ -5594,7 +5600,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5594
5600
|
value: function() {
|
|
5595
5601
|
var e = this;
|
|
5596
5602
|
this.isError = !1;
|
|
5597
|
-
var i =
|
|
5603
|
+
var i = C.NO_START, n = C.PAUSED, s = C.ENDED, l = C.ERROR, u = C.REPLAY, c = C.LOADING, h = [i, n, s, l, u, c];
|
|
5598
5604
|
h.forEach(function(d) {
|
|
5599
5605
|
e.removeClass(d);
|
|
5600
5606
|
}), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
@@ -5602,7 +5608,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5602
5608
|
}, {
|
|
5603
5609
|
key: "onTimeupdate",
|
|
5604
5610
|
value: function() {
|
|
5605
|
-
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(
|
|
5611
|
+
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(C.LOADING)) && this.media.readyState > 2 && (this.removeClass(C.LOADING), f.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state === N.NOTALLOW && this.duration && (this.setState(N.RUNNING), this.emit(Fe)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5606
5612
|
}
|
|
5607
5613
|
}, {
|
|
5608
5614
|
key: "onVolumechange",
|
|
@@ -5619,7 +5625,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5619
5625
|
value: function(e, i, n) {
|
|
5620
5626
|
if (!(!this.media || !i || !e)) {
|
|
5621
5627
|
var s = f.typeOf(e) === "String" ? e : e.type || "";
|
|
5622
|
-
n.props && f.typeOf(n.props) !== "Array" && (n.props = [n.props]), this.emit(
|
|
5628
|
+
n.props && f.typeOf(n.props) !== "Array" && (n.props = [n.props]), this.emit(vt, W({
|
|
5623
5629
|
eventType: s,
|
|
5624
5630
|
action: i,
|
|
5625
5631
|
currentTime: this.currentTime,
|
|
@@ -5661,7 +5667,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5661
5667
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
5662
5668
|
var h = {
|
|
5663
5669
|
rotate: u
|
|
5664
|
-
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root,
|
|
5670
|
+
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root, k = this.innerContainer, w = _.offsetWidth, b = k ? k.offsetHeight : _.offsetHeight, B = b, M = w;
|
|
5665
5671
|
if (m % 2 === 0)
|
|
5666
5672
|
p = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = p, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, g = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - g : g, this.media.style.width = "".concat(M, "px"), this.media.style.height = "".concat(B, "px");
|
|
5667
5673
|
else if (m % 2 === 1) {
|
|
@@ -5705,7 +5711,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5705
5711
|
value: function(e) {
|
|
5706
5712
|
var i = this;
|
|
5707
5713
|
this.resetState(), this.setConfig(e), this._currentTime = 0, this._duration = 0, me(this, "playnext", function() {
|
|
5708
|
-
i.start(), i.emit(
|
|
5714
|
+
i.start(), i.emit(pt, e);
|
|
5709
5715
|
});
|
|
5710
5716
|
}
|
|
5711
5717
|
}, {
|
|
@@ -5718,15 +5724,15 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5718
5724
|
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
5719
5725
|
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
5720
5726
|
this._videoHeight = l, this._videoWidth = s;
|
|
5721
|
-
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10),
|
|
5722
|
-
c === "auto" && _ > m || c === "fixWidth" ? (w = g / m * 1e3, this.config.fluid ? b.paddingTop = "".concat(w * 100 /
|
|
5727
|
+
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10), k = g, w = p, b = {};
|
|
5728
|
+
c === "auto" && _ > m || c === "fixWidth" ? (w = g / m * 1e3, this.config.fluid ? b.paddingTop = "".concat(w * 100 / k, "%") : b.height = "".concat(w + d, "px")) : (c === "auto" && _ < m || c === "fixHeight") && (k = m * p / 1e3, b.width = "".concat(k, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(b).forEach(function(M) {
|
|
5723
5729
|
e.root.style[M] = b[M];
|
|
5724
5730
|
}), (h === "fillHeight" && _ < m || h === "fillWidth" && _ > m) && this.setAttribute("data-xgfill", "cover");
|
|
5725
5731
|
var B = {
|
|
5726
5732
|
videoScale: m,
|
|
5727
|
-
vWidth:
|
|
5733
|
+
vWidth: k,
|
|
5728
5734
|
vHeight: w,
|
|
5729
|
-
cWidth:
|
|
5735
|
+
cWidth: k,
|
|
5730
5736
|
cHeight: w + d
|
|
5731
5737
|
};
|
|
5732
5738
|
this.resizePosition(), this.emit(Se, B);
|
|
@@ -5843,7 +5849,7 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5843
5849
|
}, {
|
|
5844
5850
|
key: "version",
|
|
5845
5851
|
get: function() {
|
|
5846
|
-
return
|
|
5852
|
+
return Gt;
|
|
5847
5853
|
}
|
|
5848
5854
|
}, {
|
|
5849
5855
|
key: "playerId",
|
|
@@ -5944,31 +5950,31 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5944
5950
|
}, {
|
|
5945
5951
|
key: "hook",
|
|
5946
5952
|
value: function(e, i) {
|
|
5947
|
-
return
|
|
5953
|
+
return mt.call.apply(mt, [this].concat(Array.prototype.slice.call(arguments)));
|
|
5948
5954
|
}
|
|
5949
5955
|
}, {
|
|
5950
5956
|
key: "useHooks",
|
|
5951
5957
|
value: function(e, i) {
|
|
5952
|
-
return
|
|
5958
|
+
return yt.call.apply(yt, [this].concat(Array.prototype.slice.call(arguments)));
|
|
5953
5959
|
}
|
|
5954
5960
|
}, {
|
|
5955
5961
|
key: "removeHooks",
|
|
5956
5962
|
value: function(e, i) {
|
|
5957
|
-
return
|
|
5963
|
+
return _t.call.apply(_t, [this].concat(Array.prototype.slice.call(arguments)));
|
|
5958
5964
|
}
|
|
5959
5965
|
}, {
|
|
5960
5966
|
key: "usePluginHooks",
|
|
5961
5967
|
value: function(e, i, n) {
|
|
5962
5968
|
for (var s = arguments.length, l = new Array(s > 3 ? s - 3 : 0), u = 3; u < s; u++)
|
|
5963
5969
|
l[u - 3] = arguments[u];
|
|
5964
|
-
return
|
|
5970
|
+
return ki.call.apply(ki, [this].concat(Array.prototype.slice.call(arguments)));
|
|
5965
5971
|
}
|
|
5966
5972
|
}, {
|
|
5967
5973
|
key: "removePluginHooks",
|
|
5968
5974
|
value: function(e, i, n) {
|
|
5969
5975
|
for (var s = arguments.length, l = new Array(s > 3 ? s - 3 : 0), u = 3; u < s; u++)
|
|
5970
5976
|
l[u - 3] = arguments[u];
|
|
5971
|
-
return
|
|
5977
|
+
return Ci.call.apply(Ci, [this].concat(Array.prototype.slice.call(arguments)));
|
|
5972
5978
|
}
|
|
5973
5979
|
}, {
|
|
5974
5980
|
key: "setUserActive",
|
|
@@ -6026,9 +6032,9 @@ var Co = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
6026
6032
|
}
|
|
6027
6033
|
}]), r;
|
|
6028
6034
|
}(qs);
|
|
6029
|
-
y(
|
|
6030
|
-
y(
|
|
6031
|
-
|
|
6035
|
+
y(Et, "defaultPreset", null);
|
|
6036
|
+
y(Et, "XgVideoProxy", null);
|
|
6037
|
+
Et.instManager = mn.getInstance();
|
|
6032
6038
|
function Y() {
|
|
6033
6039
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
6034
6040
|
}
|
|
@@ -6040,7 +6046,7 @@ var we = {
|
|
|
6040
6046
|
WAIT_END: "waitingEnd",
|
|
6041
6047
|
SEEK_START: "seekStart",
|
|
6042
6048
|
SEEK_END: "seekEnd"
|
|
6043
|
-
},
|
|
6049
|
+
}, Co = /* @__PURE__ */ function(a) {
|
|
6044
6050
|
P(r, a);
|
|
6045
6051
|
var o = I(r);
|
|
6046
6052
|
function r() {
|
|
@@ -6092,18 +6098,18 @@ var we = {
|
|
|
6092
6098
|
key: "afterCreate",
|
|
6093
6099
|
value: function() {
|
|
6094
6100
|
var e = this;
|
|
6095
|
-
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = Y(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(
|
|
6101
|
+
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = Y(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(ei, function() {
|
|
6096
6102
|
var i = e._state, n = i.autoplayStart, s = i.isFFSend;
|
|
6097
6103
|
e.startCostTime = Y() - e.newPointTime, F.logInfo("[xgLogger]".concat(e.player.playerId, " LOAD_START"), "autoplayStart:".concat(n, " isFFSend:").concat(s, " startCostTime:").concat(e.startCostTime, " newPointTime").concat(e.newPointTime)), !s && (!i.isLs && e.emitLog(we.LOAD_START, {}), i.isLs = !0, i.isTimeUpdate = !1, i.isFFLoading = !0, e.pt = Y(), e.vt = 0, e.fvt = 0, e._initOnceEvents(), e._onWaitingLoadStart());
|
|
6098
|
-
}), this.on(
|
|
6104
|
+
}), this.on(Ce, function() {
|
|
6099
6105
|
e.vt = Y(), e.fvt = e.vt - e.pt, e.loadedCostTime = e.vt - e.newPointTime;
|
|
6100
6106
|
var i = e._state, n = i.isTimeUpdate, s = i.isFFSend, l = i.autoplayStart;
|
|
6101
6107
|
F.logInfo("[xgLogger]".concat(e.player.playerId, " LOADED_DATA"), "fvt:".concat(e.fvt, " isTimeUpdate:").concat(e._state.isTimeUpdate, " loadedCostTime:").concat(e.loadedCostTime)), (n || l) && e._sendFF("loadedData"), s || e.emitLog(we.LOADED_DATA, {}), e.suspendWaitingStatus("loadeddata");
|
|
6102
|
-
}), this.on(Ct, this._onSeeking), this.on(
|
|
6108
|
+
}), this.on(Ct, this._onSeeking), this.on(ke, this._onSeeked), this.on(ri, function() {
|
|
6103
6109
|
e.endState("destroy");
|
|
6104
|
-
}), this.on(
|
|
6110
|
+
}), this.on(wt, function() {
|
|
6105
6111
|
e.endState("urlChange"), F.logInfo("[xgLogger]".concat(e.player.playerId, " URL_CHANGE")), e._state.isFFSend && e._onReset();
|
|
6106
|
-
}), this.on([
|
|
6112
|
+
}), this.on([Qt, ye], this._onPlaying), this.on(st, this._onWaiting), this.on(rt, this._onError), this.on(Tt, function() {
|
|
6107
6113
|
F.logInfo("[xgLogger]".concat(e.player.playerId, " RESET")), e.endState("reset"), e._initOnceEvents(), e._onReset();
|
|
6108
6114
|
});
|
|
6109
6115
|
}
|
|
@@ -6317,7 +6323,7 @@ var wo = /* @__PURE__ */ function(a) {
|
|
|
6317
6323
|
e.isEndedShow && f.removeClass(e.root, "hide");
|
|
6318
6324
|
}), this.config.hideCanplay ? (this.once(ne, function() {
|
|
6319
6325
|
e.onTimeUpdate();
|
|
6320
|
-
}), this.on(
|
|
6326
|
+
}), this.on(wt, function() {
|
|
6321
6327
|
f.removeClass(e.root, "hide"), f.addClass(e.root, "xg-showplay"), e.once(ne, function() {
|
|
6322
6328
|
e.onTimeUpdate();
|
|
6323
6329
|
});
|
|
@@ -6392,13 +6398,13 @@ var wo = /* @__PURE__ */ function(a) {
|
|
|
6392
6398
|
}
|
|
6393
6399
|
}]), r;
|
|
6394
6400
|
}(U);
|
|
6395
|
-
function
|
|
6401
|
+
function ai() {
|
|
6396
6402
|
return new DOMParser().parseFromString(`<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
|
|
6397
6403
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
|
|
6398
6404
|
</svg>
|
|
6399
6405
|
`, "image/svg+xml").firstChild;
|
|
6400
6406
|
}
|
|
6401
|
-
function
|
|
6407
|
+
function li() {
|
|
6402
6408
|
return new DOMParser().parseFromString(`<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
|
|
6403
6409
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>
|
|
6404
6410
|
</svg>
|
|
@@ -6443,16 +6449,16 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6443
6449
|
key: "afterCreate",
|
|
6444
6450
|
value: function() {
|
|
6445
6451
|
var e = this, i = this.player, n = this.playerConfig;
|
|
6446
|
-
this.initIcons(), this.once(
|
|
6452
|
+
this.initIcons(), this.once(ii, function() {
|
|
6447
6453
|
n && (n.lang && n.lang === "en" ? f.addClass(i.root, "lang-is-en") : n.lang === "jp" && f.addClass(i.root, "lang-is-jp"));
|
|
6448
|
-
}), this.on(Fe, this.onAutoplayStart), n.autoplay || this.show(), this.on(
|
|
6454
|
+
}), this.on(Fe, this.onAutoplayStart), n.autoplay || this.show(), this.on(ni, function() {
|
|
6449
6455
|
var s = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6450
6456
|
e.setAttr("data-state", "play"), f.removeClass(e.root, s), e.show();
|
|
6451
6457
|
}), this.on(re, function() {
|
|
6452
6458
|
e.onPlayPause("play");
|
|
6453
6459
|
}), this.on(qe, function() {
|
|
6454
6460
|
e.onPlayPause("pause");
|
|
6455
|
-
}), this.on(
|
|
6461
|
+
}), this.on(Tt, function() {
|
|
6456
6462
|
e.onPlayerReset();
|
|
6457
6463
|
}), this.clickHandler = this.hook("startClick", this.switchPausePlay, {
|
|
6458
6464
|
pre: function(l) {
|
|
@@ -6471,11 +6477,11 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6471
6477
|
value: function() {
|
|
6472
6478
|
return {
|
|
6473
6479
|
startPlay: {
|
|
6474
|
-
icon:
|
|
6480
|
+
icon: ai,
|
|
6475
6481
|
class: "xg-icon-play"
|
|
6476
6482
|
},
|
|
6477
6483
|
startPause: {
|
|
6478
|
-
icon:
|
|
6484
|
+
icon: li,
|
|
6479
6485
|
class: "xg-icon-pause"
|
|
6480
6486
|
}
|
|
6481
6487
|
};
|
|
@@ -6697,7 +6703,7 @@ function Li(a) {
|
|
|
6697
6703
|
var o = parseFloat(a), r = a.indexOf("%") === -1 && !Number.isNaN(o);
|
|
6698
6704
|
return r && o;
|
|
6699
6705
|
}
|
|
6700
|
-
var
|
|
6706
|
+
var ui = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"], yn = ui.length;
|
|
6701
6707
|
function Po() {
|
|
6702
6708
|
for (var a = {
|
|
6703
6709
|
width: 0,
|
|
@@ -6707,7 +6713,7 @@ function Po() {
|
|
|
6707
6713
|
outerWidth: 0,
|
|
6708
6714
|
outerHeight: 0
|
|
6709
6715
|
}, o = 0; o < yn; o++) {
|
|
6710
|
-
var r =
|
|
6716
|
+
var r = ui[o];
|
|
6711
6717
|
a[r] = 0;
|
|
6712
6718
|
}
|
|
6713
6719
|
return a;
|
|
@@ -6724,7 +6730,7 @@ function Di(a) {
|
|
|
6724
6730
|
var r = {};
|
|
6725
6731
|
r.width = a.offsetWidth, r.height = a.offsetHeight;
|
|
6726
6732
|
for (var t = r.isBorderBox = o.boxSizing === "border-box", e = 0; e < yn; e++) {
|
|
6727
|
-
var i =
|
|
6733
|
+
var i = ui[e], n = o[i], s = parseFloat(n);
|
|
6728
6734
|
r[i] = Number.isNaN(s) ? 0 : s;
|
|
6729
6735
|
}
|
|
6730
6736
|
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight, h = r.marginTop + r.marginBottom, d = r.borderLeftWidth + r.borderRightWidth, g = r.borderTopWidth + r.borderBottomWidth, p = t, m = Li(o.width);
|
|
@@ -6733,14 +6739,14 @@ function Di(a) {
|
|
|
6733
6739
|
return _ !== !1 && (r.height = _ + (p ? 0 : u + g)), r.innerWidth = r.width - (l + d), r.innerHeight = r.height - (u + g), r.outerWidth = r.width + c, r.outerHeight = r.height + h, r;
|
|
6734
6740
|
}
|
|
6735
6741
|
}
|
|
6736
|
-
function
|
|
6742
|
+
function Rt(a, o) {
|
|
6737
6743
|
for (var r = 0; r < a.length; r++) {
|
|
6738
6744
|
var t = a[r];
|
|
6739
6745
|
if (t.identifier === o)
|
|
6740
6746
|
return t;
|
|
6741
6747
|
}
|
|
6742
6748
|
}
|
|
6743
|
-
var
|
|
6749
|
+
var Ot = {
|
|
6744
6750
|
START: "dragStart",
|
|
6745
6751
|
MOVE: "dragMove",
|
|
6746
6752
|
ENDED: "dragEnded"
|
|
@@ -6759,7 +6765,7 @@ var Rt = {
|
|
|
6759
6765
|
}, e.startPos = {
|
|
6760
6766
|
x: 0,
|
|
6761
6767
|
y: 0
|
|
6762
|
-
}, e._root = t instanceof Element ? t : document.querySelector(t), e._handlerDom = i.handle instanceof Element ? i.handle : document.querySelector(i.handle), !e._root || !e._handlerDom ?
|
|
6768
|
+
}, e._root = t instanceof Element ? t : document.querySelector(t), e._handlerDom = i.handle instanceof Element ? i.handle : document.querySelector(i.handle), !e._root || !e._handlerDom ? Jt(e) : (e._bindStartEvent(), e);
|
|
6763
6769
|
}
|
|
6764
6770
|
return E(r, [{
|
|
6765
6771
|
key: "_bindStartEvent",
|
|
@@ -6851,19 +6857,19 @@ var Rt = {
|
|
|
6851
6857
|
}, {
|
|
6852
6858
|
key: "ontouchmove",
|
|
6853
6859
|
value: function(e) {
|
|
6854
|
-
var i =
|
|
6860
|
+
var i = Rt(e.changedTouches, this.touchIdentifier);
|
|
6855
6861
|
i && this.dragMove(e, i);
|
|
6856
6862
|
}
|
|
6857
6863
|
}, {
|
|
6858
6864
|
key: "ontouchend",
|
|
6859
6865
|
value: function(e) {
|
|
6860
|
-
var i =
|
|
6866
|
+
var i = Rt(e.changedTouches, this.touchIdentifier);
|
|
6861
6867
|
i && this.dragEnd(e, i), e.preventDefault();
|
|
6862
6868
|
}
|
|
6863
6869
|
}, {
|
|
6864
6870
|
key: "ontouchcancel",
|
|
6865
6871
|
value: function(e) {
|
|
6866
|
-
var i =
|
|
6872
|
+
var i = Rt(e.changedTouches, this.touchIdentifier);
|
|
6867
6873
|
i && this.dragCancel(e, i);
|
|
6868
6874
|
}
|
|
6869
6875
|
}, {
|
|
@@ -6878,12 +6884,12 @@ var Rt = {
|
|
|
6878
6884
|
}, {
|
|
6879
6885
|
key: "dragRealStart",
|
|
6880
6886
|
value: function(e, i) {
|
|
6881
|
-
this.isDragging = !0, this.animate(), this.emit(
|
|
6887
|
+
this.isDragging = !0, this.animate(), this.emit(Ot.START, this.startPos);
|
|
6882
6888
|
}
|
|
6883
6889
|
}, {
|
|
6884
6890
|
key: "dragEnd",
|
|
6885
6891
|
value: function(e, i) {
|
|
6886
|
-
this._root && (this._unbindPostStartEvents(), this.isDragging && (this._root.style.transform = "", this.setLeftTop(), this.emit(
|
|
6892
|
+
this._root && (this._unbindPostStartEvents(), this.isDragging && (this._root.style.transform = "", this.setLeftTop(), this.emit(Ot.ENDED)), this.presetInfo());
|
|
6887
6893
|
}
|
|
6888
6894
|
}, {
|
|
6889
6895
|
key: "_dragPointerMove",
|
|
@@ -6899,7 +6905,7 @@ var Rt = {
|
|
|
6899
6905
|
value: function(e, i) {
|
|
6900
6906
|
if (e = e || window.event, !!this.isDown) {
|
|
6901
6907
|
var n = this.startPos, s = n.x, l = n.y, u = this._dragPointerMove(e, i), c = u.x, h = u.y;
|
|
6902
|
-
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(
|
|
6908
|
+
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(Ot.MOVE, this.position);
|
|
6903
6909
|
}
|
|
6904
6910
|
}
|
|
6905
6911
|
}, {
|
|
@@ -7024,11 +7030,11 @@ var Rt = {
|
|
|
7024
7030
|
value: function() {
|
|
7025
7031
|
return {
|
|
7026
7032
|
play: {
|
|
7027
|
-
icon:
|
|
7033
|
+
icon: ai,
|
|
7028
7034
|
class: "xg-icon-play"
|
|
7029
7035
|
},
|
|
7030
7036
|
pause: {
|
|
7031
|
-
icon:
|
|
7037
|
+
icon: li,
|
|
7032
7038
|
class: "xg-icon-pause"
|
|
7033
7039
|
}
|
|
7034
7040
|
};
|
|
@@ -7047,7 +7053,7 @@ var Rt = {
|
|
|
7047
7053
|
var i = this.player, n = this.playerConfig, s = this.config.target || this.player.root;
|
|
7048
7054
|
this.lastStyle = {}, f.addClass(i.root, "xgplayer-mini"), ["width", "height", "top", "left"].map(function(l) {
|
|
7049
7055
|
e.lastStyle[l] = s.style[l], s.style[l] = "".concat(e.pos[l], "px");
|
|
7050
|
-
}), n.fluid && (s.style["padding-top"] = ""), this.emit(
|
|
7056
|
+
}), n.fluid && (s.style["padding-top"] = ""), this.emit(gt, !0), i.isMini = this.isMini = !0;
|
|
7051
7057
|
}
|
|
7052
7058
|
}
|
|
7053
7059
|
}, {
|
|
@@ -7059,7 +7065,7 @@ var Rt = {
|
|
|
7059
7065
|
var i = this.player, n = this.playerConfig, s = this.config.target || this.player.root;
|
|
7060
7066
|
f.removeClass(i.root, "xgplayer-mini"), this.lastStyle && Object.keys(this.lastStyle).map(function(l) {
|
|
7061
7067
|
s.style[l] = e.lastStyle[l];
|
|
7062
|
-
}), 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(
|
|
7068
|
+
}), 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(gt, !1), this.isMini = i.isMini = !1;
|
|
7063
7069
|
}
|
|
7064
7070
|
}, {
|
|
7065
7071
|
key: "destroy",
|
|
@@ -7108,11 +7114,11 @@ var Rt = {
|
|
|
7108
7114
|
};
|
|
7109
7115
|
}
|
|
7110
7116
|
}]), r;
|
|
7111
|
-
}(U),
|
|
7117
|
+
}(U), at = {
|
|
7112
7118
|
mouseenter: "onMouseEnter",
|
|
7113
7119
|
mouseleave: "onMouseLeave",
|
|
7114
7120
|
mousemove: "onMouseMove"
|
|
7115
|
-
},
|
|
7121
|
+
}, Ft = ["videoClick", "videoDbClick"], Mt = /* @__PURE__ */ function(a) {
|
|
7116
7122
|
P(r, a);
|
|
7117
7123
|
var o = I(r);
|
|
7118
7124
|
function r() {
|
|
@@ -7141,7 +7147,7 @@ var Rt = {
|
|
|
7141
7147
|
}), y(v(t), "onVideoClick", function(s) {
|
|
7142
7148
|
var l = v(t), u = l.player, c = l.playerConfig;
|
|
7143
7149
|
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() {
|
|
7144
|
-
t._clickCount && (t._clickCount--, me(v(t),
|
|
7150
|
+
t._clickCount && (t._clickCount--, me(v(t), Ft[0], function(h, d) {
|
|
7145
7151
|
t.switchPlayPause(d.e);
|
|
7146
7152
|
}, {
|
|
7147
7153
|
e: s,
|
|
@@ -7155,7 +7161,7 @@ var Rt = {
|
|
|
7155
7161
|
t._clickCount = 0;
|
|
7156
7162
|
return;
|
|
7157
7163
|
}
|
|
7158
|
-
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), me(v(t),
|
|
7164
|
+
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), me(v(t), Ft[1], function(h, d) {
|
|
7159
7165
|
t.emitUserAction(d.e, "switch_fullscreen", {
|
|
7160
7166
|
props: "fullscreen",
|
|
7161
7167
|
from: u.fullscreen,
|
|
@@ -7172,7 +7178,7 @@ var Rt = {
|
|
|
7172
7178
|
key: "afterCreate",
|
|
7173
7179
|
value: function() {
|
|
7174
7180
|
var e = this;
|
|
7175
|
-
this._clickCount = 0,
|
|
7181
|
+
this._clickCount = 0, Ft.map(function(n) {
|
|
7176
7182
|
e.__hooks[n] = null;
|
|
7177
7183
|
});
|
|
7178
7184
|
var i = this.playerConfig.isMobileSimulateMode;
|
|
@@ -7182,8 +7188,8 @@ var Rt = {
|
|
|
7182
7188
|
key: "initEvents",
|
|
7183
7189
|
value: function() {
|
|
7184
7190
|
var e = this, i = this.player, n = i.media, s = i.root, l = this.playerConfig.enableContextmenu;
|
|
7185
|
-
s && s.addEventListener("click", this.onVideoClick, !1), s && s.addEventListener("dblclick", this.onVideoDblClick, !1), Object.keys(
|
|
7186
|
-
s.addEventListener(u, e[
|
|
7191
|
+
s && s.addEventListener("click", this.onVideoClick, !1), s && s.addEventListener("dblclick", this.onVideoDblClick, !1), Object.keys(at).map(function(u) {
|
|
7192
|
+
s.addEventListener(u, e[at[u]], !1);
|
|
7187
7193
|
}), !l && n && n.addEventListener("contextmenu", this.onContextmenu, !1);
|
|
7188
7194
|
}
|
|
7189
7195
|
}, {
|
|
@@ -7205,8 +7211,8 @@ var Rt = {
|
|
|
7205
7211
|
key: "destroy",
|
|
7206
7212
|
value: function() {
|
|
7207
7213
|
var e = this, i = this.player, n = i.video, s = i.root;
|
|
7208
|
-
this.clickTimer && clearTimeout(this.clickTimer), s.removeEventListener("click", this.onVideoClick, !1), s.removeEventListener("dblclick", this.onVideoDblClick, !1), n.removeEventListener("contextmenu", this.onContextmenu, !1), Object.keys(
|
|
7209
|
-
s.removeEventListener(l, e[
|
|
7214
|
+
this.clickTimer && clearTimeout(this.clickTimer), s.removeEventListener("click", this.onVideoClick, !1), s.removeEventListener("dblclick", this.onVideoDblClick, !1), n.removeEventListener("contextmenu", this.onContextmenu, !1), Object.keys(at).map(function(l) {
|
|
7215
|
+
s.removeEventListener(l, e[at[l]], !1);
|
|
7210
7216
|
});
|
|
7211
7217
|
}
|
|
7212
7218
|
}], [{
|
|
@@ -7368,7 +7374,7 @@ var Ue = {
|
|
|
7368
7374
|
SEEKING: "seeking",
|
|
7369
7375
|
PLAYBACK: "playbackrate",
|
|
7370
7376
|
LIGHT: ""
|
|
7371
|
-
},
|
|
7377
|
+
}, Nt = ["videoClick", "videoDbClick"], No = /* @__PURE__ */ function(a) {
|
|
7372
7378
|
P(r, a);
|
|
7373
7379
|
var o = I(r);
|
|
7374
7380
|
function r(t) {
|
|
@@ -7387,12 +7393,12 @@ var Ue = {
|
|
|
7387
7393
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
7388
7394
|
var h = u.miniMoveStep, d = u.hideControlsActive, g = parseInt(n.pageX - l.left, 10), p = parseInt(n.pageY - l.top, 10), m = c.rotateDeg === 90 ? p : g, _ = c.rotateDeg === 90 ? g : p;
|
|
7389
7395
|
if (Math.abs(m - l.x) > h || Math.abs(_ - l.y) > h) {
|
|
7390
|
-
var
|
|
7391
|
-
if (b === -1 && (b = e.checkScope(m, _,
|
|
7396
|
+
var k = m - l.x, w = _ - l.y, b = l.scope;
|
|
7397
|
+
if (b === -1 && (b = e.checkScope(m, _, k, w, l), b === 0 && (d ? c.blur() : c.focus({
|
|
7392
7398
|
autoHide: !1
|
|
7393
7399
|
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = b), b === -1 || b > 0 && !u.gestureY || b === 0 && !u.gestureX)
|
|
7394
7400
|
return;
|
|
7395
|
-
e.executeMove(
|
|
7401
|
+
e.executeMove(k, w, b, l.width, l.height), l.x = m, l.y = _;
|
|
7396
7402
|
}
|
|
7397
7403
|
}
|
|
7398
7404
|
}), y(v(e), "onTouchEnd", function(i) {
|
|
@@ -7449,7 +7455,7 @@ var Ue = {
|
|
|
7449
7455
|
key: "afterCreate",
|
|
7450
7456
|
value: function() {
|
|
7451
7457
|
var e = this;
|
|
7452
|
-
|
|
7458
|
+
Nt.map(function(d) {
|
|
7453
7459
|
e.__hooks[d] = null;
|
|
7454
7460
|
});
|
|
7455
7461
|
var i = this.playerConfig, n = this.config, s = this.player;
|
|
@@ -7632,7 +7638,7 @@ var Ue = {
|
|
|
7632
7638
|
key: "onClick",
|
|
7633
7639
|
value: function(e) {
|
|
7634
7640
|
var i = this, n = this.player;
|
|
7635
|
-
me(this,
|
|
7641
|
+
me(this, Nt[0], function(s, l) {
|
|
7636
7642
|
i.clickHandler(l.e);
|
|
7637
7643
|
}, {
|
|
7638
7644
|
e,
|
|
@@ -7643,7 +7649,7 @@ var Ue = {
|
|
|
7643
7649
|
key: "onDbClick",
|
|
7644
7650
|
value: function(e) {
|
|
7645
7651
|
var i = this, n = this.player;
|
|
7646
|
-
me(this,
|
|
7652
|
+
me(this, Nt[1], function(s, l) {
|
|
7647
7653
|
i.dbClickHandler(l.e);
|
|
7648
7654
|
}, {
|
|
7649
7655
|
e,
|
|
@@ -8506,7 +8512,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8506
8512
|
e.onMouseLeave();
|
|
8507
8513
|
}), this.on(ne, function() {
|
|
8508
8514
|
e.onTimeupdate();
|
|
8509
|
-
}), this.on(
|
|
8515
|
+
}), this.on(ke, function() {
|
|
8510
8516
|
e.onTimeupdate(), e.onCacheUpdate();
|
|
8511
8517
|
}), this.on(Ji, function() {
|
|
8512
8518
|
e.onCacheUpdate();
|
|
@@ -8619,10 +8625,10 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8619
8625
|
m = m > d ? d : m < 0 ? 0 : m;
|
|
8620
8626
|
var _ = m / d;
|
|
8621
8627
|
_ = _ < 0 ? 0 : _ > 1 ? 1 : _;
|
|
8622
|
-
var
|
|
8628
|
+
var k = parseInt(_ * this.offsetDuration * 1e3, 10) / 1e3, w = f.getCurrentTimeByOffset(k, n.timeSegments);
|
|
8623
8629
|
return {
|
|
8624
8630
|
percent: _,
|
|
8625
|
-
currentTime:
|
|
8631
|
+
currentTime: k,
|
|
8626
8632
|
seekTime: w,
|
|
8627
8633
|
offset: m,
|
|
8628
8634
|
width: d,
|
|
@@ -8796,7 +8802,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8796
8802
|
var e = this;
|
|
8797
8803
|
L(A(r.prototype), "afterCreate", this).call(this);
|
|
8798
8804
|
var i = this.player, n = this.config;
|
|
8799
|
-
n.disable || (this.initIcons(), this.btnClick = this.btnClick.bind(this), this.bind(["touchend", "click"], this.btnClick), this.on([qe,
|
|
8805
|
+
n.disable || (this.initIcons(), this.btnClick = this.btnClick.bind(this), this.bind(["touchend", "click"], this.btnClick), this.on([qe, rt, Ne], function() {
|
|
8800
8806
|
e.animate(i.paused);
|
|
8801
8807
|
}), this.on(re, function() {
|
|
8802
8808
|
e.animate(i.paused);
|
|
@@ -8807,11 +8813,11 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8807
8813
|
value: function() {
|
|
8808
8814
|
return {
|
|
8809
8815
|
play: {
|
|
8810
|
-
icon:
|
|
8816
|
+
icon: ai,
|
|
8811
8817
|
class: "xg-icon-play"
|
|
8812
8818
|
},
|
|
8813
8819
|
pause: {
|
|
8814
|
-
icon:
|
|
8820
|
+
icon: li,
|
|
8815
8821
|
class: "xg-icon-pause"
|
|
8816
8822
|
}
|
|
8817
8823
|
};
|
|
@@ -9116,7 +9122,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9116
9122
|
key: "afterCreate",
|
|
9117
9123
|
value: function() {
|
|
9118
9124
|
var e = this, i = this.player.controls.config.mode;
|
|
9119
|
-
this.mode = i === "flex" ? "flex" : "normal", !this.config.disable && (this.mode === "flex" && (this.createCenterTime(), this.root.style.display = "none"), this.durationDom = this.find(".time-duration"), this.timeDom = this.find(".time-current"), this.on([Ie,
|
|
9125
|
+
this.mode = i === "flex" ? "flex" : "normal", !this.config.disable && (this.mode === "flex" && (this.createCenterTime(), this.root.style.display = "none"), this.durationDom = this.find(".time-duration"), this.timeDom = this.find(".time-current"), this.on([Ie, ke, ne], function(n) {
|
|
9120
9126
|
n.eventName === "durationchange" && (e.isActiving = !1), e.onTimeUpdate();
|
|
9121
9127
|
}), this.on(Me, function() {
|
|
9122
9128
|
e.onTimeUpdate(!0);
|
|
@@ -9204,7 +9210,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9204
9210
|
var e = this, i = this.player, n = function() {
|
|
9205
9211
|
e.isActiving = !1;
|
|
9206
9212
|
};
|
|
9207
|
-
this.off(
|
|
9213
|
+
this.off(ke, n), i.isSeeking && i.media.seeking ? this.once(ke, n) : this.isActiving = !1;
|
|
9208
9214
|
}
|
|
9209
9215
|
}, {
|
|
9210
9216
|
key: "destroy",
|
|
@@ -9294,7 +9300,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9294
9300
|
return E(r, [{
|
|
9295
9301
|
key: "afterCreate",
|
|
9296
9302
|
value: function() {
|
|
9297
|
-
this.curIndex = -1, this.curPos = null, this.lastCurrentTime = 0, this.updateSegments(), this.on(Ie, this._onDurationChange), this.on(
|
|
9303
|
+
this.curIndex = -1, this.curPos = null, this.lastCurrentTime = 0, this.updateSegments(), this.on(Ie, this._onDurationChange), this.on(Ce, this._onLoadedData), this.on(ne, this._onTimeupdate), this.on(Ct, this._onSeeking), this.on(re, this._onPlay);
|
|
9298
9304
|
}
|
|
9299
9305
|
}, {
|
|
9300
9306
|
key: "setConfig",
|
|
@@ -9475,7 +9481,7 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9475
9481
|
pre: function(u) {
|
|
9476
9482
|
u.preventDefault(), u.stopPropagation();
|
|
9477
9483
|
}
|
|
9478
|
-
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), R.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(qi, this.onVolumeChange), this.once(
|
|
9484
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), R.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(qi, this.onVolumeChange), this.once(Ce, this.onVolumeChange), f.typeOf(s) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
9479
9485
|
}
|
|
9480
9486
|
}
|
|
9481
9487
|
}, {
|
|
@@ -9644,9 +9650,9 @@ var na = /* @__PURE__ */ function(a) {
|
|
|
9644
9650
|
this.player.videoRotateDeg = e;
|
|
9645
9651
|
return;
|
|
9646
9652
|
}
|
|
9647
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0,
|
|
9648
|
-
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2,
|
|
9649
|
-
var w = "translate(".concat(_, "px,").concat(
|
|
9653
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0, k = 0;
|
|
9654
|
+
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2, k = -(d - g) / 2);
|
|
9655
|
+
var w = "translate(".concat(_, "px,").concat(k, "px) rotate(").concat(e, "turn)"), b = {
|
|
9650
9656
|
transformOrigin: "center center",
|
|
9651
9657
|
transform: w,
|
|
9652
9658
|
webKitTransform: w,
|
|
@@ -9754,7 +9760,7 @@ var ze = {
|
|
|
9754
9760
|
key: "afterCreate",
|
|
9755
9761
|
value: function() {
|
|
9756
9762
|
var e = this;
|
|
9757
|
-
this.isPIPAvailable() && (L(A(r.prototype), "afterCreate", this).call(this), this.pMode = ze.INLINE, this.initPipEvents(), this.config.showIcon && this.initIcons(), this.once(
|
|
9763
|
+
this.isPIPAvailable() && (L(A(r.prototype), "afterCreate", this).call(this), this.pMode = ze.INLINE, this.initPipEvents(), this.config.showIcon && this.initIcons(), this.once(bt, function() {
|
|
9758
9764
|
e.config.showIcon && (f.removeClass(e.find(".xgplayer-icon"), "xg-icon-disable"), e.bind("click", e.switchPIP));
|
|
9759
9765
|
}));
|
|
9760
9766
|
}
|
|
@@ -9786,9 +9792,9 @@ var ze = {
|
|
|
9786
9792
|
var n = i.paused;
|
|
9787
9793
|
f.setTimeout(e, function() {
|
|
9788
9794
|
!n && i.mediaPlay();
|
|
9789
|
-
}, 0), !n && i.mediaPlay(), e.setAttr("data-state", "normal"), e.pipWindow = null, i.emit(
|
|
9795
|
+
}, 0), !n && i.mediaPlay(), e.setAttr("data-state", "normal"), e.pipWindow = null, i.emit(Yt, !1);
|
|
9790
9796
|
}, this.enterPIPCallback = function(n) {
|
|
9791
|
-
i.emit(
|
|
9797
|
+
i.emit(Yt, !0), n != null && n.pictureInPictureWindow && (e.pipWindow = n.pictureInPictureWindow), e.setAttr("data-state", "pip");
|
|
9792
9798
|
}, this.onWebkitpresentationmodechanged = function(n) {
|
|
9793
9799
|
var s = i.media.webkitPresentationMode;
|
|
9794
9800
|
e.pMode === ze.FULLSCREEN && s !== ze.FULLSCREEN && i.onFullscreenChange(null, !1), e.pMode = s, s === ze.PIP ? e.enterPIPCallback(n) : s === ze.INLINE && e.leavePIPCallback(n);
|
|
@@ -9829,7 +9835,7 @@ var ze = {
|
|
|
9829
9835
|
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
9830
9836
|
var d = s.docPiPNode, g = s.docPiPStyle;
|
|
9831
9837
|
e.enterPIPCallback();
|
|
9832
|
-
var p = d || i.root, m = p.parentElement, _ = p.previousSibling,
|
|
9838
|
+
var p = d || i.root, m = p.parentElement, _ = p.previousSibling, k = p.nextSibling;
|
|
9833
9839
|
e.copyStyleIntoPiPWindow(h);
|
|
9834
9840
|
var w = document.createElement("style");
|
|
9835
9841
|
if (w.append("body{padding:0; margin:0;}"), g) {
|
|
@@ -9840,7 +9846,7 @@ var ze = {
|
|
|
9840
9846
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
9841
9847
|
`);
|
|
9842
9848
|
h.document.head.append(w), h.document.body.append(p), h.addEventListener("pagehide", function(B) {
|
|
9843
|
-
m && (
|
|
9849
|
+
m && (k ? m.insertBefore(p, k) : _ ? m.insertBefore(p, _.nextSibling) : m.appendChild(p)), e.leavePIPCallback();
|
|
9844
9850
|
}, {
|
|
9845
9851
|
once: !0
|
|
9846
9852
|
});
|
|
@@ -9939,7 +9945,7 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
9939
9945
|
var e;
|
|
9940
9946
|
return T(this, r), e = o.call(this, t), y(v(e), "playNext", function(i) {
|
|
9941
9947
|
var n = v(e), s = n.player;
|
|
9942
|
-
i.preventDefault(), i.stopPropagation(), e.idx + 1 < e.config.urlList.length ? (e.idx++, e.nextHandler(e.config.urlList[e.idx], e.idx), s.emit(
|
|
9948
|
+
i.preventDefault(), i.stopPropagation(), e.idx + 1 < e.config.urlList.length ? (e.idx++, e.nextHandler(e.config.urlList[e.idx], e.idx), s.emit(pt, e.idx + 1)) : (e.nextHandler(), s.emit(pt));
|
|
9943
9949
|
}), e.idx = -1, e;
|
|
9944
9950
|
}
|
|
9945
9951
|
return E(r, [{
|
|
@@ -10010,12 +10016,12 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
10010
10016
|
return String(D);
|
|
10011
10017
|
}, g = n.Blob || n.MozBlob || n.WebKitBlob || d, p = e || "download", m, _;
|
|
10012
10018
|
if (g = g.call ? g.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (p = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
10013
|
-
var
|
|
10014
|
-
return
|
|
10019
|
+
var k = new XMLHttpRequest();
|
|
10020
|
+
return k.open("GET", c, !0), k.responseType = "blob", k.onload = function(D) {
|
|
10015
10021
|
r(D.target.response, p, s);
|
|
10016
10022
|
}, setTimeout(function() {
|
|
10017
|
-
|
|
10018
|
-
}, 0),
|
|
10023
|
+
k.send();
|
|
10024
|
+
}, 0), k;
|
|
10019
10025
|
}
|
|
10020
10026
|
if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))
|
|
10021
10027
|
if (u.length > 1024 * 1024 * 1.999 && g !== d)
|
|
@@ -10074,7 +10080,7 @@ Use Save As... to download, then click back to return to this page.`) && (locati
|
|
|
10074
10080
|
});
|
|
10075
10081
|
})(_n);
|
|
10076
10082
|
var ua = _n.exports;
|
|
10077
|
-
const ca = /* @__PURE__ */
|
|
10083
|
+
const ca = /* @__PURE__ */ qt(ua);
|
|
10078
10084
|
function fa() {
|
|
10079
10085
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">
|
|
10080
10086
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
@@ -10235,8 +10241,8 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10235
10241
|
p = u.media.canvas;
|
|
10236
10242
|
else {
|
|
10237
10243
|
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), p = n.canvas, m = n.canvasCtx;
|
|
10238
|
-
var _ = u.media.videoWidth / u.media.videoHeight,
|
|
10239
|
-
_ >
|
|
10244
|
+
var _ = u.media.videoWidth / u.media.videoHeight, k = p.width / p.height, w = 0, b = 0, B = u.media.videoWidth, M = u.media.videoHeight, V, D, J, G;
|
|
10245
|
+
_ > k ? (J = p.width, G = p.width / _, V = 0, D = Math.round((p.height - G) / 2)) : _ === k ? (J = p.width, G = p.height, V = 0, D = 0) : _ < k && (J = p.height * _, G = p.height, V = Math.round((p.width - J) / 2), D = 0), m.drawImage(u.media, w, b, B, M, V, D, J, G);
|
|
10240
10246
|
}
|
|
10241
10247
|
var H = p.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
10242
10248
|
H = H.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), d(H);
|
|
@@ -10373,7 +10379,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10373
10379
|
function pa(a, o) {
|
|
10374
10380
|
return a === de.SIDE ? o === j.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
|
|
10375
10381
|
}
|
|
10376
|
-
var De = R.device === "mobile",
|
|
10382
|
+
var De = R.device === "mobile", kt = /* @__PURE__ */ function(a) {
|
|
10377
10383
|
P(r, a);
|
|
10378
10384
|
var o = I(r);
|
|
10379
10385
|
function r(t) {
|
|
@@ -10409,7 +10415,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10409
10415
|
e._resizeList();
|
|
10410
10416
|
}), this.once(ye, function() {
|
|
10411
10417
|
i.list && i.list.length > 0 && (e.renderItemList(i.list), e.show());
|
|
10412
|
-
}), De && this.on(
|
|
10418
|
+
}), De && this.on(ti, function() {
|
|
10413
10419
|
e.isActive && (e.optionsList && e.optionsList.hide(), e.isActive = !1);
|
|
10414
10420
|
}), De ? (i.toggleMode = Ve.CLICK, this.activeEvent = "touchend") : this.activeEvent = i.toggleMode === Ve.CLICK ? "click" : "mouseenter", i.toggleMode === Ve.CLICK ? this.bind(this.activeEvent, this.switchActiveState) : (this.bind(this.activeEvent, this.onEnter), this.bind("mouseleave", this.onLeave)), this.isIcons && this.bind("click", this.onIconClick);
|
|
10415
10421
|
}
|
|
@@ -10566,7 +10572,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10566
10572
|
var e = this;
|
|
10567
10573
|
L(A(r.prototype), "afterCreate", this).call(this), this.on("resourceReady", function(i) {
|
|
10568
10574
|
e.changeDefinitionList(i);
|
|
10569
|
-
}), this.on(
|
|
10575
|
+
}), this.on(si, function(i) {
|
|
10570
10576
|
e.renderItemList(e.config.list, i.to);
|
|
10571
10577
|
}), this.player.definitionList.length < 2 && this.hide();
|
|
10572
10578
|
}
|
|
@@ -10634,7 +10640,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10634
10640
|
}, {
|
|
10635
10641
|
key: "defaultConfig",
|
|
10636
10642
|
get: function() {
|
|
10637
|
-
return W(W({},
|
|
10643
|
+
return W(W({}, kt.defaultConfig), {}, {
|
|
10638
10644
|
position: j.CONTROLS_RIGHT,
|
|
10639
10645
|
index: 3,
|
|
10640
10646
|
list: [],
|
|
@@ -10646,7 +10652,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10646
10652
|
});
|
|
10647
10653
|
}
|
|
10648
10654
|
}]), r;
|
|
10649
|
-
}(
|
|
10655
|
+
}(kt), ma = /* @__PURE__ */ function(a) {
|
|
10650
10656
|
P(r, a);
|
|
10651
10657
|
var o = I(r);
|
|
10652
10658
|
function r(t) {
|
|
@@ -10728,7 +10734,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10728
10734
|
}, {
|
|
10729
10735
|
key: "defaultConfig",
|
|
10730
10736
|
get: function() {
|
|
10731
|
-
return W(W({},
|
|
10737
|
+
return W(W({}, kt.defaultConfig), {}, {
|
|
10732
10738
|
position: j.CONTROLS_RIGHT,
|
|
10733
10739
|
index: 4,
|
|
10734
10740
|
list: [2, 1.5, 1, 0.75, 0.5],
|
|
@@ -10738,7 +10744,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10738
10744
|
});
|
|
10739
10745
|
}
|
|
10740
10746
|
}]), r;
|
|
10741
|
-
}(
|
|
10747
|
+
}(kt);
|
|
10742
10748
|
function ya() {
|
|
10743
10749
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
|
|
10744
10750
|
<path fill="#fff" transform="scale(1.3, 1.3)" class='path_full' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
|
|
@@ -10766,7 +10772,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10766
10772
|
key: "afterCreate",
|
|
10767
10773
|
value: function() {
|
|
10768
10774
|
var e = this;
|
|
10769
|
-
L(A(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.config.target && (this.playerConfig.fullscreenTarget = this.config.target), this.initIcons(), this.on(
|
|
10775
|
+
L(A(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.config.target && (this.playerConfig.fullscreenTarget = this.config.target), this.initIcons(), this.on(dt, function(i) {
|
|
10770
10776
|
e.animate(i);
|
|
10771
10777
|
}), this.btnClick = this.btnClick.bind(this), this.handleCssFullscreen = this.hook("cssFullscreen_change", this.btnClick, {
|
|
10772
10778
|
pre: function(n) {
|
|
@@ -10845,7 +10851,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10845
10851
|
};
|
|
10846
10852
|
}
|
|
10847
10853
|
}]), r;
|
|
10848
|
-
}(Be),
|
|
10854
|
+
}(Be), ka = /* @__PURE__ */ function(a) {
|
|
10849
10855
|
P(r, a);
|
|
10850
10856
|
var o = I(r);
|
|
10851
10857
|
function r() {
|
|
@@ -10859,7 +10865,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10859
10865
|
pre: function(n) {
|
|
10860
10866
|
n.preventDefault(), n.stopPropagation();
|
|
10861
10867
|
}
|
|
10862
|
-
}), this.onError = this.hook("showError", this.handleError), this.bind(".xgplayer-error-refresh", "click", this.clickHandler), this.on(
|
|
10868
|
+
}), this.onError = this.hook("showError", this.handleError), this.bind(".xgplayer-error-refresh", "click", this.clickHandler), this.on(rt, function(i) {
|
|
10863
10869
|
e.onError(i);
|
|
10864
10870
|
});
|
|
10865
10871
|
}
|
|
@@ -10906,7 +10912,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10906
10912
|
return "error";
|
|
10907
10913
|
}
|
|
10908
10914
|
}]), r;
|
|
10909
|
-
}(U),
|
|
10915
|
+
}(U), Ca = /* @__PURE__ */ function(a) {
|
|
10910
10916
|
P(r, a);
|
|
10911
10917
|
var o = I(r);
|
|
10912
10918
|
function r() {
|
|
@@ -10958,7 +10964,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10958
10964
|
}, {
|
|
10959
10965
|
key: "render",
|
|
10960
10966
|
value: function() {
|
|
10961
|
-
return '<xg-prompt class="xgplayer-prompt '.concat(
|
|
10967
|
+
return '<xg-prompt class="xgplayer-prompt '.concat(C.CONTROLS_FOLLOW, `">
|
|
10962
10968
|
<span class="xgplayer-prompt-detail"></span>
|
|
10963
10969
|
</xg-prompt>`);
|
|
10964
10970
|
}
|
|
@@ -10994,7 +11000,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10994
11000
|
width: 6,
|
|
10995
11001
|
height: 6
|
|
10996
11002
|
};
|
|
10997
|
-
function
|
|
11003
|
+
function kn(a) {
|
|
10998
11004
|
Object.keys(Hi).map(function(o) {
|
|
10999
11005
|
a[o] === void 0 && (a[o] = Hi[o]);
|
|
11000
11006
|
});
|
|
@@ -11016,7 +11022,7 @@ var Ui = {
|
|
|
11016
11022
|
},
|
|
11017
11023
|
createDot: function(o) {
|
|
11018
11024
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, t = this.player.plugins.progress;
|
|
11019
|
-
if (t && (r && (
|
|
11025
|
+
if (t && (r && (kn(o), this._ispots.push(o)), !(!this.ispotsInit && r))) {
|
|
11020
11026
|
var e = this.calcuPosition(o.time, o.duration), i = o.style || {};
|
|
11021
11027
|
i.left = "".concat(e.left, "%"), i.width = "".concat(e.width, "%");
|
|
11022
11028
|
var n = "xgspot_".concat(o.id, " xgplayer-spot");
|
|
@@ -11143,7 +11149,7 @@ function ba(a) {
|
|
|
11143
11149
|
});
|
|
11144
11150
|
var t = r.config.progressDot || o.ispots || [];
|
|
11145
11151
|
a._ispots = t.map(function(e) {
|
|
11146
|
-
return
|
|
11152
|
+
return kn(e), e;
|
|
11147
11153
|
}), a.ispotsInit = !1, a.playerSize = {
|
|
11148
11154
|
left: r.sizeInfo.left,
|
|
11149
11155
|
width: r.sizeInfo.width
|
|
@@ -11499,7 +11505,7 @@ var je = {
|
|
|
11499
11505
|
this.interval = Math.round(this.player.duration / l);
|
|
11500
11506
|
var g = Math.ceil(e / this.interval);
|
|
11501
11507
|
g = g > l ? l : g;
|
|
11502
|
-
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0,
|
|
11508
|
+
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0, k = m > 0 ? m - _ * c - 1 : 0, w = 0, b = 0;
|
|
11503
11509
|
if (i && n) {
|
|
11504
11510
|
var B = i / n;
|
|
11505
11511
|
B < h / d ? (b = n, w = b * (h / d)) : (w = i, b = w / (h / d));
|
|
@@ -11509,14 +11515,14 @@ var je = {
|
|
|
11509
11515
|
return {
|
|
11510
11516
|
urlIndex: p,
|
|
11511
11517
|
rowIndex: _,
|
|
11512
|
-
colIndex:
|
|
11518
|
+
colIndex: k,
|
|
11513
11519
|
url: M,
|
|
11514
11520
|
height: b,
|
|
11515
11521
|
width: w,
|
|
11516
11522
|
style: {
|
|
11517
11523
|
backgroundImage: "url(".concat(M, ")"),
|
|
11518
11524
|
backgroundSize: "".concat(w * c, "px auto"),
|
|
11519
|
-
backgroundPosition: "-".concat(
|
|
11525
|
+
backgroundPosition: "-".concat(k * w, "px -").concat(_ * b, "px"),
|
|
11520
11526
|
width: "".concat(w, "px"),
|
|
11521
11527
|
height: "".concat(b, "px")
|
|
11522
11528
|
}
|
|
@@ -11570,7 +11576,7 @@ var je = {
|
|
|
11570
11576
|
}
|
|
11571
11577
|
}]), r;
|
|
11572
11578
|
}(U);
|
|
11573
|
-
function
|
|
11579
|
+
function Bt(a) {
|
|
11574
11580
|
return a ? "background:".concat(a, ";") : "";
|
|
11575
11581
|
}
|
|
11576
11582
|
var Ea = /* @__PURE__ */ function(a) {
|
|
@@ -11630,9 +11636,9 @@ var Ea = /* @__PURE__ */ function(a) {
|
|
|
11630
11636
|
var e = this.playerConfig, i = e.commonStyle, n = e.miniprogress;
|
|
11631
11637
|
if (n) {
|
|
11632
11638
|
var s = this.config, l = s.mode, u = s.height, c = {
|
|
11633
|
-
cached:
|
|
11634
|
-
played:
|
|
11635
|
-
progress:
|
|
11639
|
+
cached: Bt(i.cachedColor),
|
|
11640
|
+
played: Bt(i.playedColor),
|
|
11641
|
+
progress: Bt(i.progressColor),
|
|
11636
11642
|
height: u > 0 && u !== 2 ? "height: ".concat(u, "px;") : ""
|
|
11637
11643
|
}, h = l === "show" ? "xg-mini-progress-show" : "";
|
|
11638
11644
|
return '<xg-mini-progress class="xg-mini-progress '.concat(h, '" style="').concat(c.progress, " ").concat(c.height, `">
|
|
@@ -11676,7 +11682,7 @@ function xa() {
|
|
|
11676
11682
|
return !1;
|
|
11677
11683
|
}
|
|
11678
11684
|
}
|
|
11679
|
-
var
|
|
11685
|
+
var lt = null, Pa = /* @__PURE__ */ function(a) {
|
|
11680
11686
|
P(r, a);
|
|
11681
11687
|
var o = I(r);
|
|
11682
11688
|
function r() {
|
|
@@ -11717,7 +11723,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11717
11723
|
x: 0,
|
|
11718
11724
|
y: 0,
|
|
11719
11725
|
pi: 0
|
|
11720
|
-
}, this.isStart = !1, this._isLoaded = !1, this.videoPI = 0, this.preTime = 0, this.interval = parseInt(1e3 / l, 10), this.canvas = null, this.canvasCtx = null, this._frameCount = 0, this._loopType = this.config.mode !== We.REAL_TIME && this.interval >= 1e3 ? "timer" : "animation", this.once(
|
|
11726
|
+
}, this.isStart = !1, this._isLoaded = !1, this.videoPI = 0, this.preTime = 0, this.interval = parseInt(1e3 / l, 10), this.canvas = null, this.canvasCtx = null, this._frameCount = 0, this._loopType = this.config.mode !== We.REAL_TIME && this.interval >= 1e3 ? "timer" : "animation", this.once(bt, function() {
|
|
11721
11727
|
e.player && (e.init(), e.renderByPoster(), e.player.paused || e.start());
|
|
11722
11728
|
}), s !== We.POSTER && (s !== We.FIRST_FRAME && (this.on(Ne, function() {
|
|
11723
11729
|
e.stop();
|
|
@@ -11726,7 +11732,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11726
11732
|
e._checkIfCanStart() && e.start(0, u);
|
|
11727
11733
|
}), this.on(qe, function() {
|
|
11728
11734
|
e.stop();
|
|
11729
|
-
})), this.on(
|
|
11735
|
+
})), this.on(Ce, this.onLoadedData), this.on(ei, function() {
|
|
11730
11736
|
e._isLoaded = !1, e.stop();
|
|
11731
11737
|
}), document.addEventListener("visibilitychange", this.onVisibilitychange)));
|
|
11732
11738
|
}
|
|
@@ -11870,7 +11876,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11870
11876
|
}, {
|
|
11871
11877
|
key: "isSupport",
|
|
11872
11878
|
get: function() {
|
|
11873
|
-
return typeof
|
|
11879
|
+
return typeof lt == "boolean" || (lt = xa()), lt;
|
|
11874
11880
|
}
|
|
11875
11881
|
}, {
|
|
11876
11882
|
key: "supportCanvasFilter",
|
|
@@ -11953,7 +11959,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11953
11959
|
FORWARD: "快进中",
|
|
11954
11960
|
LIVE_TIP: "直播"
|
|
11955
11961
|
}
|
|
11956
|
-
}, Je = "info",
|
|
11962
|
+
}, Je = "info", Ht = hn, Aa = /* @__PURE__ */ function(a) {
|
|
11957
11963
|
P(r, a);
|
|
11958
11964
|
var o = I(r);
|
|
11959
11965
|
function r() {
|
|
@@ -11992,7 +11998,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11992
11998
|
}, {
|
|
11993
11999
|
key: "afterCreate",
|
|
11994
12000
|
value: function() {
|
|
11995
|
-
this.reset(), this.on(
|
|
12001
|
+
this.reset(), this.on(vt, this._recordUserActions), this.on(Ht.STATS_INFO, this._recordInfo), this.on(Ht.STATS_DOWNLOAD, this._downloadStats), this.on(Ht.STATS_RESET, this._onReset);
|
|
11996
12002
|
}
|
|
11997
12003
|
}, {
|
|
11998
12004
|
key: "destroy",
|
|
@@ -12097,7 +12103,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12097
12103
|
return {};
|
|
12098
12104
|
}
|
|
12099
12105
|
}]), r;
|
|
12100
|
-
}(xe),
|
|
12106
|
+
}(xe), Cn = /* @__PURE__ */ function(a) {
|
|
12101
12107
|
P(r, a);
|
|
12102
12108
|
var o = I(r);
|
|
12103
12109
|
function r() {
|
|
@@ -12119,8 +12125,8 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12119
12125
|
console.log("GapJump bufferRange ", c.start(p), c.end(p));
|
|
12120
12126
|
var m = c.start(p) + 0.1, _ = l.media.duration;
|
|
12121
12127
|
if (!(m > _)) {
|
|
12122
|
-
var
|
|
12123
|
-
|
|
12128
|
+
var k = m - g, w = k <= h;
|
|
12129
|
+
k < r.BROWSER_GAP_TOLERANCE || w && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? m + 0.1 : m), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", p, " isGapSamll:", w, " currentTime:", l.media.currentTime, " jumpSize:", g - l.media.currentTime), m !== 0.08 && l && l.emit("log", {
|
|
12124
12130
|
type: "oneevent",
|
|
12125
12131
|
end_type: "gap",
|
|
12126
12132
|
vid: l.config.vid,
|
|
@@ -12138,7 +12144,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12138
12144
|
key: "afterCreate",
|
|
12139
12145
|
value: function() {
|
|
12140
12146
|
var e = this, i = this.config.useGapJump;
|
|
12141
|
-
i !== !1 && (this.hasPlayed = !1, this.seekingEventReceived = !1, this.isSafari = /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), this.on(
|
|
12147
|
+
i !== !1 && (this.hasPlayed = !1, this.seekingEventReceived = !1, this.isSafari = /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), this.on(st, this.onGapJump), this.on(re, function() {
|
|
12142
12148
|
e.hasPlayed = !0;
|
|
12143
12149
|
}), this.on(Ct, function() {
|
|
12144
12150
|
e.seekingEventReceived = !0;
|
|
@@ -12186,7 +12192,7 @@ var at = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12186
12192
|
}
|
|
12187
12193
|
}]), r;
|
|
12188
12194
|
}(U);
|
|
12189
|
-
|
|
12195
|
+
Cn.BROWSER_GAP_TOLERANCE = 1e-3;
|
|
12190
12196
|
var La = /* @__PURE__ */ function(a) {
|
|
12191
12197
|
P(r, a);
|
|
12192
12198
|
var o = I(r);
|
|
@@ -12211,7 +12217,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12211
12217
|
key: "afterCreate",
|
|
12212
12218
|
value: function() {
|
|
12213
12219
|
var e = this, i = this.config, n = i.useWaitingTimeoutJump, s = i.jumpSize;
|
|
12214
|
-
n !== !1 && (this.hasPlayed = !1, this.jumpCnt = 0, this.timer = null, this.jumpSize = s, this.on(
|
|
12220
|
+
n !== !1 && (this.hasPlayed = !1, this.jumpCnt = 0, this.timer = null, this.jumpSize = s, this.on(st, this.onWaiting), this.on([Qt, ye], function() {
|
|
12215
12221
|
clearTimeout(e.timer), e.timer = null, e.jumpSize = e.config.jumpSize;
|
|
12216
12222
|
}), this.on(re, function() {
|
|
12217
12223
|
e.hasPlayed = !0;
|
|
@@ -12233,7 +12239,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12233
12239
|
};
|
|
12234
12240
|
}
|
|
12235
12241
|
}]), r;
|
|
12236
|
-
}(U), Ge = "cdn",
|
|
12242
|
+
}(U), Ge = "cdn", ut = ["cdn"], Da = /* @__PURE__ */ function(a) {
|
|
12237
12243
|
P(r, a);
|
|
12238
12244
|
var o = I(r);
|
|
12239
12245
|
function r() {
|
|
@@ -12252,7 +12258,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12252
12258
|
}), y(v(t), "startTimer", function() {
|
|
12253
12259
|
f.isMSE(t.player.video) || (t.initSpeedList(), t.cnt = 0, t.timer = setTimeout(t.testSpeed, t.config.testTimeStep));
|
|
12254
12260
|
}), y(v(t), "initSpeedList", function() {
|
|
12255
|
-
t.speedListCache = {},
|
|
12261
|
+
t.speedListCache = {}, ut.forEach(function(s) {
|
|
12256
12262
|
t.speedListCache[s] = [];
|
|
12257
12263
|
});
|
|
12258
12264
|
}), y(v(t), "_onRealSpeedChange", function(s) {
|
|
@@ -12265,8 +12271,8 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12265
12271
|
try {
|
|
12266
12272
|
var g = (/* @__PURE__ */ new Date()).getTime(), p = null, m = new XMLHttpRequest();
|
|
12267
12273
|
t.xhr = m, m.open("GET", d);
|
|
12268
|
-
var _ = {},
|
|
12269
|
-
_.Range = "bytes=" +
|
|
12274
|
+
var _ = {}, k = Math.floor(Math.random() * 10);
|
|
12275
|
+
_.Range = "bytes=" + k + "-" + (u + k), _ && Object.keys(_).forEach(function(w) {
|
|
12270
12276
|
m.setRequestHeader(w, _[w]);
|
|
12271
12277
|
}), m.onreadystatechange = function() {
|
|
12272
12278
|
if (m.readyState === 4) {
|
|
@@ -12292,13 +12298,13 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12292
12298
|
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ge, l = t.getSpeed(s), u = v(t), c = u.player;
|
|
12293
12299
|
if (c)
|
|
12294
12300
|
if (s === Ge)
|
|
12295
|
-
(!c.avgSpeed || l !== c.avgSpeed) && (c.avgSpeed = l, c.emit(
|
|
12301
|
+
(!c.avgSpeed || l !== c.avgSpeed) && (c.avgSpeed = l, c.emit($t, {
|
|
12296
12302
|
speed: l,
|
|
12297
12303
|
realTimeSpeed: c.realTimeSpeed
|
|
12298
12304
|
}));
|
|
12299
12305
|
else {
|
|
12300
12306
|
var h = t.getSpeedName("avg", s);
|
|
12301
|
-
(!c[h] || l !== c[h]) && (c[h] = l, c.emit(
|
|
12307
|
+
(!c[h] || l !== c[h]) && (c[h] = l, c.emit($t, {
|
|
12302
12308
|
speed: l,
|
|
12303
12309
|
realTimeSpeed: c.realTimeSpeed
|
|
12304
12310
|
}));
|
|
@@ -12309,7 +12315,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12309
12315
|
key: "afterCreate",
|
|
12310
12316
|
value: function() {
|
|
12311
12317
|
var e = this.config, i = e.openSpeed, n = e.addSpeedTypeList;
|
|
12312
|
-
(n == null ? void 0 : n.length) > 0 &&
|
|
12318
|
+
(n == null ? void 0 : n.length) > 0 && ut.push.apply(ut, fe(n)), this.initSpeedList(), this.on("real_time_speed", this._onRealSpeedChange), this.timer = null, this.cnt = 0, this.xhr = null, i && this.on([Ce, ht], this.startTimer);
|
|
12313
12319
|
}
|
|
12314
12320
|
}, {
|
|
12315
12321
|
key: "getSpeedName",
|
|
@@ -12336,7 +12342,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12336
12342
|
key: "destroy",
|
|
12337
12343
|
value: function() {
|
|
12338
12344
|
var e = this;
|
|
12339
|
-
this.off("real_time_speed", this._onRealSpeedChange), this.off([
|
|
12345
|
+
this.off("real_time_speed", this._onRealSpeedChange), this.off([Ce, ht], this.startTimer), ut.forEach(function(i) {
|
|
12340
12346
|
e.speedListCache && e.speedListCache[i] && (e.speedListCache[i] = []);
|
|
12341
12347
|
}), this.speedListCache && (this.speedListCache = {}), clearTimeout(this.timer), this.timer = null, this.xhr && this.xhr.readyState !== 4 && (this.xhr.cancel && this.xhr.cancel(), this.xhr = null);
|
|
12342
12348
|
}
|
|
@@ -12473,20 +12479,20 @@ Ke.use(Ia);
|
|
|
12473
12479
|
var Oa = /* @__PURE__ */ E(function a(o, r) {
|
|
12474
12480
|
var t, e, i;
|
|
12475
12481
|
T(this, a);
|
|
12476
|
-
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [Zo, jo, Ea, wa, qo], u = [].concat(l, [Wo, Xo, na, la, va, ma, ha, da, ta, oa]), c = [wo, To, So, Uo, xo,
|
|
12477
|
-
this.plugins = [Aa,
|
|
12482
|
+
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [Zo, jo, Ea, wa, qo], u = [].concat(l, [Wo, Xo, na, la, va, ma, ha, da, ta, oa]), c = [wo, To, So, Uo, xo, ka, Ca, Ta, Lo];
|
|
12483
|
+
this.plugins = [Aa, Co].concat(fe(u), c, [Cn, La]);
|
|
12478
12484
|
var h = n ? "mobile" : R.device;
|
|
12479
12485
|
switch (h) {
|
|
12480
12486
|
case "pc":
|
|
12481
|
-
(t = this.plugins).push.apply(t, [Mi,
|
|
12487
|
+
(t = this.plugins).push.apply(t, [Mi, Mt, Bi, Da, Ra]);
|
|
12482
12488
|
break;
|
|
12483
12489
|
case "mobile":
|
|
12484
12490
|
(e = this.plugins).push.apply(e, [No]);
|
|
12485
12491
|
break;
|
|
12486
12492
|
default:
|
|
12487
|
-
(i = this.plugins).push.apply(i, [Mi,
|
|
12493
|
+
(i = this.plugins).push.apply(i, [Mi, Mt, Bi]);
|
|
12488
12494
|
}
|
|
12489
|
-
(R.os.isIpad || h === "pc") && this.plugins.push(Pa), R.os.isIpad && this.plugins.push(
|
|
12495
|
+
(R.os.isIpad || h === "pc") && this.plugins.push(Pa), R.os.isIpad && this.plugins.push(Mt), this.ignores = [], this.i18n = [];
|
|
12490
12496
|
}), he = /* @__PURE__ */ function(a) {
|
|
12491
12497
|
P(r, a);
|
|
12492
12498
|
var o = I(r);
|
|
@@ -12494,21 +12500,21 @@ var Oa = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12494
12500
|
return T(this, r), o.apply(this, arguments);
|
|
12495
12501
|
}
|
|
12496
12502
|
return E(r);
|
|
12497
|
-
}(
|
|
12503
|
+
}(Et);
|
|
12498
12504
|
y(he, "defaultPreset", Oa);
|
|
12499
12505
|
y(he, "Util", f);
|
|
12500
12506
|
y(he, "Sniffer", R);
|
|
12501
|
-
y(he, "Errors",
|
|
12507
|
+
y(he, "Errors", ft);
|
|
12502
12508
|
y(he, "Events", Ys);
|
|
12503
12509
|
y(he, "Plugin", U);
|
|
12504
12510
|
y(he, "BasePlugin", xe);
|
|
12505
12511
|
y(he, "I18N", Ke);
|
|
12506
|
-
y(he, "STATE_CLASS",
|
|
12512
|
+
y(he, "STATE_CLASS", C);
|
|
12507
12513
|
y(he, "InstManager", mn);
|
|
12508
12514
|
const Fa = ["id"], Ma = /* @__PURE__ */ se({
|
|
12509
12515
|
name: "ElImageViewer",
|
|
12510
12516
|
__name: "Player",
|
|
12511
|
-
props: /* @__PURE__ */
|
|
12517
|
+
props: /* @__PURE__ */ ct({
|
|
12512
12518
|
url: {
|
|
12513
12519
|
type: String,
|
|
12514
12520
|
default: ""
|
|
@@ -12529,12 +12535,12 @@ const Fa = ["id"], Ma = /* @__PURE__ */ se({
|
|
|
12529
12535
|
},
|
|
12530
12536
|
modelModifiers: {}
|
|
12531
12537
|
}),
|
|
12532
|
-
emits: /* @__PURE__ */
|
|
12538
|
+
emits: /* @__PURE__ */ ct({
|
|
12533
12539
|
close: () => !0
|
|
12534
12540
|
}, ["update:modelValue"]),
|
|
12535
12541
|
setup(a, { emit: o }) {
|
|
12536
12542
|
let r = null;
|
|
12537
|
-
const t = a, { cLoadUrl: e } = Wi(t), i = K(() =>
|
|
12543
|
+
const t = a, { cLoadUrl: e } = Wi(t), i = K(() => tt(e.value, t.url)), n = {
|
|
12538
12544
|
width: "100%",
|
|
12539
12545
|
height: "100%",
|
|
12540
12546
|
// 是否自动播放
|
|
@@ -12555,7 +12561,7 @@ const Fa = ["id"], Ma = /* @__PURE__ */ se({
|
|
|
12555
12561
|
}, s = K(() => ({
|
|
12556
12562
|
...n,
|
|
12557
12563
|
...t.config
|
|
12558
|
-
})), l = o, u =
|
|
12564
|
+
})), l = o, u = Xt(a, "modelValue"), c = ji(), h = Pn("image-viewer");
|
|
12559
12565
|
function d() {
|
|
12560
12566
|
l("close"), u.value = !1, r.destroy();
|
|
12561
12567
|
}
|
|
@@ -12640,7 +12646,7 @@ const Fa = ["id"], Ma = /* @__PURE__ */ se({
|
|
|
12640
12646
|
};
|
|
12641
12647
|
}
|
|
12642
12648
|
});
|
|
12643
|
-
const Na = /* @__PURE__ */
|
|
12649
|
+
const Na = /* @__PURE__ */ nt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = Pe(Na), Ha = /* @__PURE__ */ se({
|
|
12644
12650
|
__name: "IkDescription",
|
|
12645
12651
|
props: {
|
|
12646
12652
|
showIcon: {
|
|
@@ -12715,7 +12721,7 @@ const Na = /* @__PURE__ */ it(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = Pe(N
|
|
|
12715
12721
|
const n = Ee("el-descriptions-item"), s = Ee("el-descriptions");
|
|
12716
12722
|
return x(), ce(
|
|
12717
12723
|
s,
|
|
12718
|
-
|
|
12724
|
+
zt({ class: "margin-top" }, { ...a.titleProps, ...o }),
|
|
12719
12725
|
{
|
|
12720
12726
|
extra: q(() => [
|
|
12721
12727
|
pe(e.$slots, "extra", {}, void 0, !0)
|
|
@@ -12724,9 +12730,9 @@ const Na = /* @__PURE__ */ it(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = Pe(N
|
|
|
12724
12730
|
(x(!0), O(
|
|
12725
12731
|
$e,
|
|
12726
12732
|
null,
|
|
12727
|
-
|
|
12733
|
+
Ut(a.listData, (l) => (x(), ce(
|
|
12728
12734
|
n,
|
|
12729
|
-
|
|
12735
|
+
zt({
|
|
12730
12736
|
key: l[r.id],
|
|
12731
12737
|
ref_for: !0
|
|
12732
12738
|
}, l[r.props]),
|
|
@@ -12799,7 +12805,7 @@ const Na = /* @__PURE__ */ it(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = Pe(N
|
|
|
12799
12805
|
};
|
|
12800
12806
|
}
|
|
12801
12807
|
});
|
|
12802
|
-
const Ua = /* @__PURE__ */
|
|
12808
|
+
const Ua = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-a15afa30"]]), Wa = Pe(Ua);
|
|
12803
12809
|
export {
|
|
12804
12810
|
Wa as IkDescriptions,
|
|
12805
12811
|
Wa as default
|