iking-web-ui-pro 0.2.28 → 0.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKPreviewFile/ik.index.es.js +927 -872
- package/dist/IKPreviewFile/ik.index.umd.js +36 -36
- package/dist/IKSearch/ik.index.es.js +727 -665
- package/dist/IKSearch/ik.index.umd.js +2 -2
- package/dist/IKSearch/style.css +1 -1
- package/dist/IkApprovalProcess/ik.index.es.js +580 -527
- package/dist/IkApprovalProcess/ik.index.umd.js +1 -1
- package/dist/IkApprovalProcess/style.css +1 -1
- package/dist/IkApprovalProcessDetail/ik.index.es.js +674 -619
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +38 -38
- package/dist/IkCalendar/ik.index.es.js +1815 -1753
- package/dist/IkCalendar/ik.index.umd.js +1 -1
- package/dist/IkCalendar/style.css +1 -1
- package/dist/IkDescription/ik.index.es.js +1031 -976
- package/dist/IkDescription/ik.index.umd.js +36 -36
- package/dist/IkDetailPreviewFiles/ik.index.es.js +970 -915
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +42 -42
- package/dist/IkPageFull/ik.index.es.js +1038 -976
- package/dist/IkPageFull/ik.index.umd.js +3 -3
- package/dist/IkPageFull/style.css +1 -1
- package/dist/IkPickerUser/ik.index.es.js +741 -679
- package/dist/IkPickerUser/ik.index.umd.js +1 -1
- package/dist/IkPickerUser/style.css +1 -1
- package/dist/IkPlayer/ik.index.es.js +54 -1
- package/dist/IkPlayer/ik.index.umd.js +1 -1
- package/dist/IkPreviewFileDialog/ik.index.es.js +54 -1
- package/dist/IkPreviewFileDialog/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/ik.index.es.js +1640 -1579
- package/dist/IkUploadFile/ik.index.umd.js +58 -58
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/IkUploadImage/ik.index.es.js +143 -90
- package/dist/IkUploadImage/ik.index.umd.js +1 -1
- package/dist/index.es.js +15155 -15092
- package/dist/index.umd.js +106 -106
- package/dist/src/utils/use-provider.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as oe, computed as X, openBlock as x, createElementBlock as
|
|
1
|
+
import { defineComponent as oe, computed as X, openBlock as x, createElementBlock as O, createElementVNode as S, inject as qe, ref as me, resolveComponent as Ne, Fragment as Oe, renderList as lt, normalizeStyle as ie, toDisplayString as Ee, normalizeClass as Q, createVNode as K, unref as z, withModifiers as ui, createBlock as ye, createCommentVNode as ee, renderSlot as Fe, withCtx as de, mergeModels as ut, useModel as Kt, reactive as Cn, watch as Yt, nextTick as zi, createTextVNode as Ht, h as wn, mergeProps as bn, createSlots as Tn, Teleport as En, Transition as Sn, pushScopeId as xn, popScopeId as Pn } from "vue";
|
|
2
2
|
import { paramType as In, ikFile as An, buildUUID as Vi, ikColor as Ln, ikUrl as Dn } from "iking-utils-pro";
|
|
3
3
|
import { useNamespace as Rn } from "element-plus";
|
|
4
|
-
const
|
|
4
|
+
const Pe = (a, o) => {
|
|
5
5
|
if (a.install = (r) => {
|
|
6
6
|
for (const t of [a, ...Object.values(o ?? {})])
|
|
7
7
|
r.component(t.name, t);
|
|
@@ -620,15 +620,15 @@ const xe = (a, o) => {
|
|
|
620
620
|
},
|
|
621
621
|
setup(a) {
|
|
622
622
|
const o = a, r = X(() => o.file ? Ut(o.file, o.fields) : o.type);
|
|
623
|
-
return (t, e) => r.value === "image" ? (x(),
|
|
623
|
+
return (t, e) => r.value === "image" ? (x(), O("svg", Mn, zn)) : r.value === "zip" ? (x(), O("svg", Vn, Gn)) : r.value === "ppt" ? (x(), O("svg", $n, Xn)) : r.value === "word" ? (x(), O("svg", qn, Qn)) : r.value === "pdf" ? (x(), O("svg", er, nr)) : r.value === "txt" ? (x(), O("svg", rr, ar)) : r.value === "audio" ? (x(), O("svg", lr, fr)) : r.value === "video" ? (x(), O("svg", hr, pr)) : r.value === "excel" ? (x(), O("svg", vr, kr)) : r.value === "exe" ? (x(), O("svg", Cr, Sr)) : r.value === "json" ? (x(), O("svg", xr, Lr)) : (x(), O("svg", Dr, Mr));
|
|
624
624
|
}
|
|
625
|
-
}), Br =
|
|
625
|
+
}), Br = Pe(Nr);
|
|
626
626
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
627
627
|
var Hr = /* @__PURE__ */ oe({
|
|
628
628
|
name: "Close",
|
|
629
629
|
__name: "close",
|
|
630
630
|
setup(a) {
|
|
631
|
-
return (o, r) => (x(),
|
|
631
|
+
return (o, r) => (x(), O("svg", {
|
|
632
632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
633
|
viewBox: "0 0 1024 1024"
|
|
634
634
|
}, [
|
|
@@ -660,7 +660,60 @@ const Vr = (a) => {
|
|
|
660
660
|
cUploadUrl: e,
|
|
661
661
|
cToken: n,
|
|
662
662
|
cOnlyofficeConfig: l,
|
|
663
|
-
cUserInfo: c
|
|
663
|
+
cUserInfo: c,
|
|
664
|
+
cOnlyofficePreviewType: [
|
|
665
|
+
"csv",
|
|
666
|
+
"djvu",
|
|
667
|
+
"doc",
|
|
668
|
+
"docm",
|
|
669
|
+
"docx",
|
|
670
|
+
"docxf",
|
|
671
|
+
"dot",
|
|
672
|
+
"dotm",
|
|
673
|
+
"dotx",
|
|
674
|
+
"epub",
|
|
675
|
+
"fb2",
|
|
676
|
+
"fodp",
|
|
677
|
+
"fods",
|
|
678
|
+
"fodt",
|
|
679
|
+
"htm",
|
|
680
|
+
"html",
|
|
681
|
+
"mht",
|
|
682
|
+
"odp",
|
|
683
|
+
"ods",
|
|
684
|
+
"odt",
|
|
685
|
+
"oform",
|
|
686
|
+
"otp",
|
|
687
|
+
"ots",
|
|
688
|
+
"ott",
|
|
689
|
+
"oxps",
|
|
690
|
+
"pdf",
|
|
691
|
+
"pot",
|
|
692
|
+
"potm",
|
|
693
|
+
"potx",
|
|
694
|
+
"pps",
|
|
695
|
+
"ppsm",
|
|
696
|
+
"ppsx",
|
|
697
|
+
"ppt",
|
|
698
|
+
"pptm",
|
|
699
|
+
"pptx",
|
|
700
|
+
"rtf",
|
|
701
|
+
"txt",
|
|
702
|
+
"xls",
|
|
703
|
+
"xlsb",
|
|
704
|
+
"xlsm",
|
|
705
|
+
"xlsx",
|
|
706
|
+
"xlt",
|
|
707
|
+
"xltm",
|
|
708
|
+
"xltx",
|
|
709
|
+
"xml",
|
|
710
|
+
"xps",
|
|
711
|
+
"png",
|
|
712
|
+
"jpeg",
|
|
713
|
+
"jpg",
|
|
714
|
+
"video",
|
|
715
|
+
"mp4"
|
|
716
|
+
]
|
|
664
717
|
};
|
|
665
718
|
}, ji = Vr, jr = ["onClick"], Wr = { class: "fileName simple" }, Gr = ["onClick"], $r = { class: "text" }, Kr = { class: "fileName" }, Yr = { class: "size" }, Xr = /* @__PURE__ */ oe({
|
|
666
719
|
__name: "IkPreviewFile",
|
|
@@ -738,59 +791,59 @@ const Vr = (a) => {
|
|
|
738
791
|
},
|
|
739
792
|
emits: ["handPreview"],
|
|
740
793
|
setup(a, { emit: o }) {
|
|
741
|
-
const r = a, { cLoadUrl: t, cOnlyofficeConfig: e } = ji(r),
|
|
794
|
+
const r = a, { cLoadUrl: t, cOnlyofficeConfig: e, cOnlyofficePreviewType: i } = ji(r), n = o, s = X(() => ({
|
|
742
795
|
name: "name",
|
|
743
796
|
url: "url",
|
|
744
797
|
suffix: "suffix",
|
|
745
798
|
size: "size",
|
|
746
799
|
...r.field
|
|
747
|
-
})),
|
|
748
|
-
var
|
|
749
|
-
|
|
800
|
+
})), l = me({}), u = me(!1), c = (g) => {
|
|
801
|
+
var v, y;
|
|
802
|
+
l.value = {
|
|
750
803
|
...g,
|
|
751
804
|
name: g.name,
|
|
752
805
|
url: Qe(
|
|
753
806
|
t.value,
|
|
754
|
-
g.url || ((
|
|
807
|
+
g.url || ((y = (v = g == null ? void 0 : g.response) == null ? void 0 : v.data) == null ? void 0 : y.id) || (g == null ? void 0 : g.id)
|
|
755
808
|
)
|
|
756
|
-
}, r.isOnlyOfficePreview && (
|
|
757
|
-
},
|
|
809
|
+
}, r.isOnlyOfficePreview && (u.value = !0), n("handPreview", l.value);
|
|
810
|
+
}, h = (g) => {
|
|
758
811
|
An.downloadFile(
|
|
759
812
|
Qe(
|
|
760
813
|
t.value,
|
|
761
|
-
g[
|
|
814
|
+
g[s.value.url] || g.attachmentId || g.id
|
|
762
815
|
),
|
|
763
|
-
g[
|
|
816
|
+
g[s.value.name] || g.attachmentName
|
|
764
817
|
);
|
|
765
|
-
},
|
|
818
|
+
}, d = X(() => In.isNumber(r.width) ? `${r.width}px` : r.width), p = X(() => r.list.map((g) => ({
|
|
766
819
|
...g,
|
|
767
|
-
name: g[
|
|
768
|
-
size: g[
|
|
769
|
-
suffix: g[
|
|
820
|
+
name: g[s.value.name] || g.attachmentName,
|
|
821
|
+
size: g[s.value.size] || g.fileSize || g.attachmentSize,
|
|
822
|
+
suffix: g[s.value.suffix] || g.attachmentSuffix
|
|
770
823
|
})));
|
|
771
|
-
return (g,
|
|
772
|
-
var
|
|
773
|
-
const
|
|
774
|
-
return x(),
|
|
775
|
-
|
|
824
|
+
return (g, v) => {
|
|
825
|
+
var C, b, w;
|
|
826
|
+
const y = Ne("tmplate");
|
|
827
|
+
return x(), O(
|
|
828
|
+
Oe,
|
|
776
829
|
null,
|
|
777
830
|
[
|
|
778
|
-
(
|
|
779
|
-
|
|
831
|
+
(C = a.list) != null && C.length ? (x(), O(
|
|
832
|
+
Oe,
|
|
780
833
|
{ key: 0 },
|
|
781
834
|
[
|
|
782
|
-
a.simple ? (x(!0),
|
|
783
|
-
|
|
835
|
+
a.simple ? (x(!0), O(
|
|
836
|
+
Oe,
|
|
784
837
|
{ key: 0 },
|
|
785
|
-
lt(
|
|
838
|
+
lt(p.value, (A, F) => (x(), O("div", {
|
|
786
839
|
class: "iking-privew-annex simple",
|
|
787
|
-
onClick: (
|
|
788
|
-
style:
|
|
840
|
+
onClick: (H) => c(A),
|
|
841
|
+
style: ie({ width: d.value })
|
|
789
842
|
}, [
|
|
790
843
|
S(
|
|
791
844
|
"div",
|
|
792
845
|
Wr,
|
|
793
|
-
|
|
846
|
+
Ee(A.name),
|
|
794
847
|
1
|
|
795
848
|
/* TEXT */
|
|
796
849
|
),
|
|
@@ -800,19 +853,20 @@ const Vr = (a) => {
|
|
|
800
853
|
class: Q(["flex flex-center", { "hover-show": a.iconHoverShow }])
|
|
801
854
|
},
|
|
802
855
|
[
|
|
803
|
-
|
|
856
|
+
K(z(Te), {
|
|
804
857
|
name: "iksvg_daochu",
|
|
805
|
-
onClick: ui((
|
|
858
|
+
onClick: ui((H) => h(A), ["stop"]),
|
|
806
859
|
size: 20,
|
|
807
860
|
active: ""
|
|
808
861
|
}, null, 8, ["onClick"]),
|
|
809
|
-
|
|
862
|
+
z(i).includes(A.suffix) ? (x(), ye(z(Te), {
|
|
863
|
+
key: 0,
|
|
810
864
|
name: "iksvg_yulan",
|
|
811
865
|
size: 20,
|
|
812
866
|
active: ""
|
|
813
|
-
}),
|
|
814
|
-
|
|
815
|
-
data: { ...
|
|
867
|
+
})) : ee("v-if", !0),
|
|
868
|
+
Fe(g.$slots, "operation", {
|
|
869
|
+
data: { ...A, findex: F }
|
|
816
870
|
})
|
|
817
871
|
],
|
|
818
872
|
2
|
|
@@ -821,46 +875,46 @@ const Vr = (a) => {
|
|
|
821
875
|
], 12, jr))),
|
|
822
876
|
256
|
|
823
877
|
/* UNKEYED_FRAGMENT */
|
|
824
|
-
)) : (x(),
|
|
878
|
+
)) : (x(), ye(y, { key: 1 }, {
|
|
825
879
|
default: de(() => [
|
|
826
|
-
(x(!0),
|
|
827
|
-
|
|
880
|
+
(x(!0), O(
|
|
881
|
+
Oe,
|
|
828
882
|
null,
|
|
829
|
-
lt(
|
|
830
|
-
var
|
|
831
|
-
return x(),
|
|
883
|
+
lt(p.value, (A, F) => {
|
|
884
|
+
var H;
|
|
885
|
+
return x(), O(
|
|
832
886
|
"div",
|
|
833
887
|
{
|
|
834
888
|
class: Q(["iking-privew-annex", { "is-bg": a.showBg }]),
|
|
835
|
-
key:
|
|
836
|
-
style:
|
|
837
|
-
marginBottom:
|
|
838
|
-
width:
|
|
889
|
+
key: F,
|
|
890
|
+
style: ie({
|
|
891
|
+
marginBottom: F == ((H = a.list) == null ? void 0 : H.length) - 1 ? "0" : "10px",
|
|
892
|
+
width: d.value
|
|
839
893
|
})
|
|
840
894
|
},
|
|
841
895
|
[
|
|
842
896
|
S("div", {
|
|
843
897
|
class: "file-card",
|
|
844
|
-
onClick: (
|
|
898
|
+
onClick: (R) => c(A)
|
|
845
899
|
}, [
|
|
846
|
-
|
|
847
|
-
file:
|
|
848
|
-
style:
|
|
900
|
+
K(z(Br), {
|
|
901
|
+
file: A,
|
|
902
|
+
style: ie({ height: `${a.iconSize}px` }),
|
|
849
903
|
class: "ikui-w-auto",
|
|
850
|
-
fields:
|
|
904
|
+
fields: s.value
|
|
851
905
|
}, null, 8, ["file", "style", "fields"]),
|
|
852
906
|
S("div", $r, [
|
|
853
907
|
S(
|
|
854
908
|
"div",
|
|
855
909
|
Kr,
|
|
856
|
-
|
|
910
|
+
Ee(A.name),
|
|
857
911
|
1
|
|
858
912
|
/* TEXT */
|
|
859
913
|
),
|
|
860
914
|
S(
|
|
861
915
|
"div",
|
|
862
916
|
Yr,
|
|
863
|
-
|
|
917
|
+
Ee(z(zr)(A.size)),
|
|
864
918
|
1
|
|
865
919
|
/* TEXT */
|
|
866
920
|
)
|
|
@@ -871,21 +925,22 @@ const Vr = (a) => {
|
|
|
871
925
|
class: Q(["flex flex-center", { "hover-show": a.iconHoverShow }])
|
|
872
926
|
},
|
|
873
927
|
[
|
|
874
|
-
|
|
928
|
+
K(z(Te), {
|
|
875
929
|
name: "iksvg_daochu",
|
|
876
|
-
onClick: ui((
|
|
930
|
+
onClick: ui((R) => h(A), ["stop"]),
|
|
877
931
|
bg: a.showBg,
|
|
878
932
|
size: a.showBg ? "default" : 20,
|
|
879
933
|
title: "下载"
|
|
880
934
|
}, null, 8, ["onClick", "bg", "size"]),
|
|
881
|
-
|
|
935
|
+
z(i).includes(A.suffix) ? (x(), ye(z(Te), {
|
|
936
|
+
key: 0,
|
|
882
937
|
name: "iksvg_yulan",
|
|
883
938
|
bg: a.showBg,
|
|
884
939
|
size: a.showBg ? "default" : 20,
|
|
885
940
|
title: "预览"
|
|
886
|
-
}, null, 8, ["bg", "size"]),
|
|
887
|
-
|
|
888
|
-
data: { ...
|
|
941
|
+
}, null, 8, ["bg", "size"])) : ee("v-if", !0),
|
|
942
|
+
Fe(g.$slots, "operation", {
|
|
943
|
+
data: { ...A, findex: F }
|
|
889
944
|
})
|
|
890
945
|
],
|
|
891
946
|
2
|
|
@@ -907,15 +962,15 @@ const Vr = (a) => {
|
|
|
907
962
|
],
|
|
908
963
|
64
|
|
909
964
|
/* STABLE_FRAGMENT */
|
|
910
|
-
)) :
|
|
911
|
-
|
|
912
|
-
show:
|
|
913
|
-
"onUpdate:show":
|
|
914
|
-
loadUrl:
|
|
915
|
-
file:
|
|
916
|
-
onlyofficeServer: ((
|
|
917
|
-
onlyOfficeConfig:
|
|
918
|
-
onlyOfficeAccept: ((
|
|
965
|
+
)) : ee("v-if", !0),
|
|
966
|
+
K(z(Jr), {
|
|
967
|
+
show: u.value,
|
|
968
|
+
"onUpdate:show": v[0] || (v[0] = (A) => u.value = A),
|
|
969
|
+
loadUrl: z(t),
|
|
970
|
+
file: l.value,
|
|
971
|
+
onlyofficeServer: ((b = z(e)) == null ? void 0 : b.serverUrl) || a.onlyofficeServer,
|
|
972
|
+
onlyOfficeConfig: z(e),
|
|
973
|
+
onlyOfficeAccept: ((w = z(e)) == null ? void 0 : w.accept) || a.onlyOfficeAccept
|
|
919
974
|
}, null, 8, ["show", "loadUrl", "file", "onlyofficeServer", "onlyOfficeConfig", "onlyOfficeAccept"])
|
|
920
975
|
],
|
|
921
976
|
64
|
|
@@ -924,7 +979,7 @@ const Vr = (a) => {
|
|
|
924
979
|
};
|
|
925
980
|
}
|
|
926
981
|
});
|
|
927
|
-
const qr =
|
|
982
|
+
const qr = Pe(Xr), Zr = /* @__PURE__ */ oe({
|
|
928
983
|
__name: "IkPreviewFileDialog",
|
|
929
984
|
props: /* @__PURE__ */ ut({
|
|
930
985
|
file: {
|
|
@@ -972,9 +1027,9 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
972
1027
|
office: !1,
|
|
973
1028
|
video: !1
|
|
974
1029
|
}), s = (u) => {
|
|
975
|
-
var c, h, d,
|
|
1030
|
+
var c, h, d, p, g, v, y;
|
|
976
1031
|
try {
|
|
977
|
-
const
|
|
1032
|
+
const C = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, b = C[t.value.url] || (C == null ? void 0 : C.id) || C.attachmentId, w = (h = C[t.value.suffix] || C.attachmentSuffix) == null ? void 0 : h.toLowerCase(), A = C[t.value.name] || (C == null ? void 0 : C.attachmentName) || (C == null ? void 0 : C.originName);
|
|
978
1033
|
if (i.value = {
|
|
979
1034
|
...u,
|
|
980
1035
|
name: u[t.value.name],
|
|
@@ -985,13 +1040,13 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
985
1040
|
} else if (u && Ut(u, t.value) === "video") {
|
|
986
1041
|
n.video = !0;
|
|
987
1042
|
return;
|
|
988
|
-
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(
|
|
1043
|
+
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(w)) {
|
|
989
1044
|
n.office = !0, e.value = {
|
|
990
1045
|
...o.onlyOfficeConfig,
|
|
991
1046
|
editorConfig: {
|
|
992
|
-
...((
|
|
1047
|
+
...((p = o.onlyOfficeConfig) == null ? void 0 : p.editorConfig) || {},
|
|
993
1048
|
customization: {
|
|
994
|
-
...((
|
|
1049
|
+
...((v = (g = o.onlyOfficeConfig) == null ? void 0 : g.editorConfig) == null ? void 0 : v.customization) || {},
|
|
995
1050
|
review: {
|
|
996
1051
|
reviewDisplay: "final"
|
|
997
1052
|
}
|
|
@@ -999,17 +1054,17 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
999
1054
|
},
|
|
1000
1055
|
document: {
|
|
1001
1056
|
key: Vi(),
|
|
1002
|
-
title:
|
|
1057
|
+
title: A,
|
|
1003
1058
|
url: Qe(o.loadUrl, b),
|
|
1004
|
-
fileType:
|
|
1059
|
+
fileType: w,
|
|
1005
1060
|
...((y = o.onlyOfficeConfig) == null ? void 0 : y.document) || {}
|
|
1006
1061
|
},
|
|
1007
|
-
documentType: Fn(
|
|
1062
|
+
documentType: Fn(w)
|
|
1008
1063
|
};
|
|
1009
1064
|
return;
|
|
1010
1065
|
}
|
|
1011
|
-
} catch (
|
|
1012
|
-
console.info("预览错误: ",
|
|
1066
|
+
} catch (C) {
|
|
1067
|
+
console.info("预览错误: ", C);
|
|
1013
1068
|
}
|
|
1014
1069
|
};
|
|
1015
1070
|
Yt([r, o.file], ([u, c]) => {
|
|
@@ -1021,29 +1076,29 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
1021
1076
|
r.value = !1, n.office = !1, n.image = !1, n.video = !1, i.value = null;
|
|
1022
1077
|
};
|
|
1023
1078
|
return (u, c) => {
|
|
1024
|
-
var d,
|
|
1025
|
-
const h =
|
|
1026
|
-
return r.value ? (x(),
|
|
1027
|
-
|
|
1079
|
+
var d, p, g;
|
|
1080
|
+
const h = Ne("el-image-viewer");
|
|
1081
|
+
return r.value ? (x(), O(
|
|
1082
|
+
Oe,
|
|
1028
1083
|
{ key: 0 },
|
|
1029
1084
|
[
|
|
1030
|
-
(d = i.value) != null && d.url && n.image ? (x(),
|
|
1085
|
+
(d = i.value) != null && d.url && n.image ? (x(), ye(h, {
|
|
1031
1086
|
key: 0,
|
|
1032
|
-
onClose: c[0] || (c[0] = (
|
|
1087
|
+
onClose: c[0] || (c[0] = (v) => l()),
|
|
1033
1088
|
ref: "previewImgRef",
|
|
1034
|
-
"url-list": [(
|
|
1089
|
+
"url-list": [(p = i.value) == null ? void 0 : p.url],
|
|
1035
1090
|
teleported: ""
|
|
1036
|
-
}, null, 8, ["url-list"])) :
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1091
|
+
}, null, 8, ["url-list"])) : ee("v-if", !0),
|
|
1092
|
+
ee(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),
|
|
1093
|
+
ee(" 文档类 "),
|
|
1094
|
+
K(z(Ba), {
|
|
1040
1095
|
modelValue: n.video,
|
|
1041
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
1042
|
-
url: (
|
|
1096
|
+
"onUpdate:modelValue": c[1] || (c[1] = (v) => n.video = v),
|
|
1097
|
+
url: (g = i.value) == null ? void 0 : g.url
|
|
1043
1098
|
}, null, 8, ["modelValue", "url"]),
|
|
1044
|
-
|
|
1099
|
+
K(z(hs), {
|
|
1045
1100
|
modelValue: n.office,
|
|
1046
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
1101
|
+
"onUpdate:modelValue": c[2] || (c[2] = (v) => n.office = v),
|
|
1047
1102
|
draggable: "",
|
|
1048
1103
|
"no-footer": "",
|
|
1049
1104
|
"no-header": "",
|
|
@@ -1057,11 +1112,11 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
1057
1112
|
"modal-class": "ik-only-preview-dialog"
|
|
1058
1113
|
}, {
|
|
1059
1114
|
default: de(() => {
|
|
1060
|
-
var
|
|
1115
|
+
var v;
|
|
1061
1116
|
return [
|
|
1062
|
-
|
|
1117
|
+
K(z(Cs), {
|
|
1063
1118
|
"config-options": e.value,
|
|
1064
|
-
"document-server-url": ((
|
|
1119
|
+
"document-server-url": ((v = a.onlyOfficeConfig) == null ? void 0 : v.serverUrl) || a.onlyofficeServer
|
|
1065
1120
|
}, null, 8, ["config-options", "document-server-url"])
|
|
1066
1121
|
];
|
|
1067
1122
|
}),
|
|
@@ -1071,11 +1126,11 @@ const qr = xe(Xr), Zr = /* @__PURE__ */ oe({
|
|
|
1071
1126
|
],
|
|
1072
1127
|
64
|
|
1073
1128
|
/* STABLE_FRAGMENT */
|
|
1074
|
-
)) :
|
|
1129
|
+
)) : ee("v-if", !0);
|
|
1075
1130
|
};
|
|
1076
1131
|
}
|
|
1077
1132
|
});
|
|
1078
|
-
const Jr =
|
|
1133
|
+
const Jr = Pe(Zr), Qr = {
|
|
1079
1134
|
key: 0,
|
|
1080
1135
|
class: "ik-svg-icon ik-icon-span inline-block inline-flex justify-center box-content line-height-[0]"
|
|
1081
1136
|
}, es = {
|
|
@@ -1145,9 +1200,9 @@ const Jr = xe(Zr), Qr = {
|
|
|
1145
1200
|
return r.value.width && (n.width = n.height = typeof r.value.width == "number" ? `${r.value.width}px` : r.value.width), n;
|
|
1146
1201
|
});
|
|
1147
1202
|
return (i, n) => {
|
|
1148
|
-
const s =
|
|
1149
|
-
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (x(),
|
|
1150
|
-
r.value.notip || !r.value.title ? (x(),
|
|
1203
|
+
const s = Ne("el-tooltip"), l = Ne("el-button");
|
|
1204
|
+
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (x(), O("span", Qr, [
|
|
1205
|
+
r.value.notip || !r.value.title ? (x(), O(
|
|
1151
1206
|
"i",
|
|
1152
1207
|
{
|
|
1153
1208
|
key: 0,
|
|
@@ -1164,34 +1219,34 @@ const Jr = xe(Zr), Qr = {
|
|
|
1164
1219
|
active: r.value.active,
|
|
1165
1220
|
disabled: r.value.disabled
|
|
1166
1221
|
}]),
|
|
1167
|
-
style:
|
|
1222
|
+
style: ie(e.value)
|
|
1168
1223
|
},
|
|
1169
1224
|
[
|
|
1170
|
-
|
|
1171
|
-
t.value === "iksig" ? (x(),
|
|
1225
|
+
ee(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
1226
|
+
t.value === "iksig" ? (x(), O(
|
|
1172
1227
|
"i",
|
|
1173
1228
|
{
|
|
1174
1229
|
key: 0,
|
|
1175
1230
|
class: Q(`iksig ${r.value.name}`),
|
|
1176
|
-
style:
|
|
1231
|
+
style: ie(e.value)
|
|
1177
1232
|
},
|
|
1178
1233
|
null,
|
|
1179
1234
|
6
|
|
1180
1235
|
/* CLASS, STYLE */
|
|
1181
|
-
)) : t.value === "svg" ? (x(),
|
|
1236
|
+
)) : t.value === "svg" ? (x(), O("svg", es, [
|
|
1182
1237
|
S("use", {
|
|
1183
1238
|
"xlink:href": `#${r.value.name}`
|
|
1184
1239
|
}, null, 8, ts)
|
|
1185
|
-
])) : t.value === "img" ? (x(),
|
|
1240
|
+
])) : t.value === "img" ? (x(), O("img", {
|
|
1186
1241
|
key: 2,
|
|
1187
1242
|
src: r.value.name,
|
|
1188
1243
|
class: "h-[1em] w-[1em]"
|
|
1189
|
-
}, null, 8, is)) : (x(),
|
|
1244
|
+
}, null, 8, is)) : (x(), O(
|
|
1190
1245
|
"i",
|
|
1191
1246
|
{
|
|
1192
1247
|
key: 3,
|
|
1193
1248
|
class: Q(r.value.name),
|
|
1194
|
-
style:
|
|
1249
|
+
style: ie(e.value)
|
|
1195
1250
|
},
|
|
1196
1251
|
null,
|
|
1197
1252
|
6
|
|
@@ -1200,7 +1255,7 @@ const Jr = xe(Zr), Qr = {
|
|
|
1200
1255
|
],
|
|
1201
1256
|
6
|
|
1202
1257
|
/* CLASS, STYLE */
|
|
1203
|
-
)) : (x(),
|
|
1258
|
+
)) : (x(), ye(s, {
|
|
1204
1259
|
key: 1,
|
|
1205
1260
|
content: r.value.title,
|
|
1206
1261
|
placement: "top"
|
|
@@ -1221,33 +1276,33 @@ const Jr = xe(Zr), Qr = {
|
|
|
1221
1276
|
error: r.value.error || r.value.type === "error",
|
|
1222
1277
|
active: r.value.active
|
|
1223
1278
|
}]),
|
|
1224
|
-
style:
|
|
1279
|
+
style: ie(e.value)
|
|
1225
1280
|
},
|
|
1226
1281
|
[
|
|
1227
|
-
t.value === "iksig" ? (x(),
|
|
1282
|
+
t.value === "iksig" ? (x(), O(
|
|
1228
1283
|
"i",
|
|
1229
1284
|
{
|
|
1230
1285
|
key: 0,
|
|
1231
1286
|
class: Q(`iksig ${r.value.name}`),
|
|
1232
|
-
style:
|
|
1287
|
+
style: ie(e.value)
|
|
1233
1288
|
},
|
|
1234
1289
|
null,
|
|
1235
1290
|
6
|
|
1236
1291
|
/* CLASS, STYLE */
|
|
1237
|
-
)) : t.value === "svg" ? (x(),
|
|
1292
|
+
)) : t.value === "svg" ? (x(), O("svg", ns, [
|
|
1238
1293
|
S("use", {
|
|
1239
1294
|
"xlink:href": `#${r.value.name}`
|
|
1240
1295
|
}, null, 8, rs)
|
|
1241
|
-
])) : t.value === "img" ? (x(),
|
|
1296
|
+
])) : t.value === "img" ? (x(), O("img", {
|
|
1242
1297
|
key: 2,
|
|
1243
1298
|
src: r.value.name,
|
|
1244
1299
|
class: "h-[1em] w-[1em]"
|
|
1245
|
-
}, null, 8, ss)) : (x(),
|
|
1300
|
+
}, null, 8, ss)) : (x(), O(
|
|
1246
1301
|
"i",
|
|
1247
1302
|
{
|
|
1248
1303
|
key: 3,
|
|
1249
1304
|
class: Q(r.value.name),
|
|
1250
|
-
style:
|
|
1305
|
+
style: ie(e.value)
|
|
1251
1306
|
},
|
|
1252
1307
|
null,
|
|
1253
1308
|
6
|
|
@@ -1261,13 +1316,13 @@ const Jr = xe(Zr), Qr = {
|
|
|
1261
1316
|
_: 1
|
|
1262
1317
|
/* STABLE */
|
|
1263
1318
|
}, 8, ["content"]))
|
|
1264
|
-
])) : (x(),
|
|
1319
|
+
])) : (x(), ye(l, {
|
|
1265
1320
|
key: 1,
|
|
1266
1321
|
type: ["warning", "error"].includes(r.value.type) ? "danger" : ""
|
|
1267
1322
|
}, {
|
|
1268
1323
|
default: de(() => [
|
|
1269
1324
|
Ht(
|
|
1270
|
-
|
|
1325
|
+
Ee(r.value.title),
|
|
1271
1326
|
1
|
|
1272
1327
|
/* TEXT */
|
|
1273
1328
|
)
|
|
@@ -1278,7 +1333,7 @@ const Jr = xe(Zr), Qr = {
|
|
|
1278
1333
|
};
|
|
1279
1334
|
}
|
|
1280
1335
|
});
|
|
1281
|
-
const as = /* @__PURE__ */ tt(os, [["__scopeId", "data-v-52806adf"]]),
|
|
1336
|
+
const as = /* @__PURE__ */ tt(os, [["__scopeId", "data-v-52806adf"]]), Te = Pe(as), ls = /* @__PURE__ */ oe({
|
|
1282
1337
|
__name: "CloseIcon",
|
|
1283
1338
|
props: {
|
|
1284
1339
|
showBg: {
|
|
@@ -1291,13 +1346,13 @@ const as = /* @__PURE__ */ tt(os, [["__scopeId", "data-v-52806adf"]]), be = xe(a
|
|
|
1291
1346
|
}
|
|
1292
1347
|
},
|
|
1293
1348
|
setup(a) {
|
|
1294
|
-
return (o, r) => (x(),
|
|
1349
|
+
return (o, r) => (x(), O(
|
|
1295
1350
|
"div",
|
|
1296
1351
|
{
|
|
1297
1352
|
class: Q({ "exit-main-page-maximize": a.showBg && a.fullscreen })
|
|
1298
1353
|
},
|
|
1299
1354
|
[
|
|
1300
|
-
|
|
1355
|
+
K(z(Te), {
|
|
1301
1356
|
name: "iksvg_guanbidanchuang",
|
|
1302
1357
|
title: "关闭",
|
|
1303
1358
|
size: 20,
|
|
@@ -1341,20 +1396,20 @@ const us = /* @__PURE__ */ tt(ls, [["__scopeId", "data-v-da39e979"]]), cs = { cl
|
|
|
1341
1396
|
}
|
|
1342
1397
|
});
|
|
1343
1398
|
return (n, s) => {
|
|
1344
|
-
const l =
|
|
1345
|
-
return x(),
|
|
1399
|
+
const l = Ne("el-dialog");
|
|
1400
|
+
return x(), ye(l, bn({
|
|
1346
1401
|
modelValue: r.value,
|
|
1347
1402
|
"onUpdate:modelValue": s[0] || (s[0] = (u) => r.value = u)
|
|
1348
1403
|
}, n.$attrs, {
|
|
1349
|
-
"close-icon":
|
|
1404
|
+
"close-icon": z(i),
|
|
1350
1405
|
class: `ik-base-dialog ${n.noHeader ? "no-header" : ""} ${n.noFooter ? "no-footer" : ""}`,
|
|
1351
1406
|
fullscreen: t.value,
|
|
1352
1407
|
"modal-class": "baseDialog"
|
|
1353
1408
|
}), Tn({
|
|
1354
1409
|
icon: de(() => [
|
|
1355
|
-
|
|
1410
|
+
Fe(n.$slots, "title", {}, () => [
|
|
1356
1411
|
Ht(
|
|
1357
|
-
|
|
1412
|
+
Ee(n.title),
|
|
1358
1413
|
1
|
|
1359
1414
|
/* TEXT */
|
|
1360
1415
|
)
|
|
@@ -1362,24 +1417,24 @@ const us = /* @__PURE__ */ tt(ls, [["__scopeId", "data-v-da39e979"]]), cs = { cl
|
|
|
1362
1417
|
]),
|
|
1363
1418
|
header: de(() => [
|
|
1364
1419
|
S("div", cs, [
|
|
1365
|
-
|
|
1420
|
+
Fe(n.$slots, "header", {}, () => [
|
|
1366
1421
|
Ht(
|
|
1367
|
-
|
|
1422
|
+
Ee(n.title),
|
|
1368
1423
|
1
|
|
1369
1424
|
/* TEXT */
|
|
1370
1425
|
)
|
|
1371
1426
|
])
|
|
1372
1427
|
]),
|
|
1373
|
-
n.$attrs.showClose ? (x(),
|
|
1428
|
+
n.$attrs.showClose ? (x(), ye(z(Te), {
|
|
1374
1429
|
key: 0,
|
|
1375
1430
|
onClick: e,
|
|
1376
1431
|
name: t.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
|
|
1377
1432
|
class: "absolute! top-[18px] right-[50px] icon-dialog-full",
|
|
1378
1433
|
title: t.value ? "退出全屏" : "全屏"
|
|
1379
|
-
}, null, 8, ["name", "title"])) :
|
|
1434
|
+
}, null, 8, ["name", "title"])) : ee("v-if", !0)
|
|
1380
1435
|
]),
|
|
1381
1436
|
default: de(() => [
|
|
1382
|
-
|
|
1437
|
+
Fe(n.$slots, "default")
|
|
1383
1438
|
]),
|
|
1384
1439
|
_: 2
|
|
1385
1440
|
/* DYNAMIC */
|
|
@@ -1387,7 +1442,7 @@ const us = /* @__PURE__ */ tt(ls, [["__scopeId", "data-v-da39e979"]]), cs = { cl
|
|
|
1387
1442
|
n.$slots.footer ? {
|
|
1388
1443
|
name: "footer",
|
|
1389
1444
|
fn: de(() => [
|
|
1390
|
-
|
|
1445
|
+
Fe(n.$slots, "footer")
|
|
1391
1446
|
]),
|
|
1392
1447
|
key: "0"
|
|
1393
1448
|
} : void 0
|
|
@@ -1395,7 +1450,7 @@ const us = /* @__PURE__ */ tt(ls, [["__scopeId", "data-v-da39e979"]]), cs = { cl
|
|
|
1395
1450
|
};
|
|
1396
1451
|
}
|
|
1397
1452
|
});
|
|
1398
|
-
const hs =
|
|
1453
|
+
const hs = Pe(fs);
|
|
1399
1454
|
var ds = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1400
1455
|
function Xt(a) {
|
|
1401
1456
|
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
@@ -1698,7 +1753,7 @@ var vs = function(a, o) {
|
|
|
1698
1753
|
});
|
|
1699
1754
|
const ms = ["id"];
|
|
1700
1755
|
function ys(a, o, r, t, e, i) {
|
|
1701
|
-
return x(),
|
|
1756
|
+
return x(), O("div", { id: a.id }, null, 8, ms);
|
|
1702
1757
|
}
|
|
1703
1758
|
qt.render = ys;
|
|
1704
1759
|
qt.__file = "src/components/DocumentEditor.vue";
|
|
@@ -1731,13 +1786,13 @@ const _s = /* @__PURE__ */ oe({
|
|
|
1731
1786
|
}), t = () => {
|
|
1732
1787
|
console.info("文档加载完成", o.configOptions);
|
|
1733
1788
|
};
|
|
1734
|
-
return (e, i) => (x(),
|
|
1789
|
+
return (e, i) => (x(), O(
|
|
1735
1790
|
"div",
|
|
1736
1791
|
{
|
|
1737
|
-
style:
|
|
1792
|
+
style: ie({ height: o.officeHeight })
|
|
1738
1793
|
},
|
|
1739
1794
|
[
|
|
1740
|
-
|
|
1795
|
+
K(z(qt), {
|
|
1741
1796
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
1742
1797
|
ref: "editorRef",
|
|
1743
1798
|
"document-server-url": a.documentServerUrl,
|
|
@@ -1750,7 +1805,7 @@ const _s = /* @__PURE__ */ oe({
|
|
|
1750
1805
|
));
|
|
1751
1806
|
}
|
|
1752
1807
|
});
|
|
1753
|
-
const ks = /* @__PURE__ */ tt(_s, [["__scopeId", "data-v-98d51ef9"]]), Cs =
|
|
1808
|
+
const ks = /* @__PURE__ */ tt(_s, [["__scopeId", "data-v-98d51ef9"]]), Cs = Pe(ks);
|
|
1754
1809
|
function hi(a, o) {
|
|
1755
1810
|
var r = Object.keys(a);
|
|
1756
1811
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -1816,10 +1871,10 @@ function P(a, o) {
|
|
|
1816
1871
|
writable: !1
|
|
1817
1872
|
}), o && zt(a, o);
|
|
1818
1873
|
}
|
|
1819
|
-
function
|
|
1820
|
-
return
|
|
1874
|
+
function L(a) {
|
|
1875
|
+
return L = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
1821
1876
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
1822
|
-
},
|
|
1877
|
+
}, L(a);
|
|
1823
1878
|
}
|
|
1824
1879
|
function zt(a, o) {
|
|
1825
1880
|
return zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
@@ -1838,7 +1893,7 @@ function ws() {
|
|
|
1838
1893
|
return !1;
|
|
1839
1894
|
}
|
|
1840
1895
|
}
|
|
1841
|
-
function
|
|
1896
|
+
function m(a) {
|
|
1842
1897
|
if (a === void 0)
|
|
1843
1898
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1844
1899
|
return a;
|
|
@@ -1848,14 +1903,14 @@ function Zt(a, o) {
|
|
|
1848
1903
|
return o;
|
|
1849
1904
|
if (o !== void 0)
|
|
1850
1905
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
1851
|
-
return
|
|
1906
|
+
return m(a);
|
|
1852
1907
|
}
|
|
1853
1908
|
function I(a) {
|
|
1854
1909
|
var o = ws();
|
|
1855
1910
|
return function() {
|
|
1856
|
-
var t =
|
|
1911
|
+
var t = L(a), e;
|
|
1857
1912
|
if (o) {
|
|
1858
|
-
var i =
|
|
1913
|
+
var i = L(this).constructor;
|
|
1859
1914
|
e = Reflect.construct(t, arguments, i);
|
|
1860
1915
|
} else
|
|
1861
1916
|
e = t.apply(this, arguments);
|
|
@@ -1863,18 +1918,18 @@ function I(a) {
|
|
|
1863
1918
|
};
|
|
1864
1919
|
}
|
|
1865
1920
|
function bs(a, o) {
|
|
1866
|
-
for (; !Object.prototype.hasOwnProperty.call(a, o) && (a =
|
|
1921
|
+
for (; !Object.prototype.hasOwnProperty.call(a, o) && (a = L(a), a !== null); )
|
|
1867
1922
|
;
|
|
1868
1923
|
return a;
|
|
1869
1924
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return typeof Reflect < "u" && Reflect.get ?
|
|
1925
|
+
function D() {
|
|
1926
|
+
return typeof Reflect < "u" && Reflect.get ? D = Reflect.get.bind() : D = function(o, r, t) {
|
|
1872
1927
|
var e = bs(o, r);
|
|
1873
1928
|
if (e) {
|
|
1874
1929
|
var i = Object.getOwnPropertyDescriptor(e, r);
|
|
1875
1930
|
return i.get ? i.get.call(arguments.length < 3 ? o : t) : i.value;
|
|
1876
1931
|
}
|
|
1877
|
-
},
|
|
1932
|
+
}, D.apply(this, arguments);
|
|
1878
1933
|
}
|
|
1879
1934
|
function ue(a) {
|
|
1880
1935
|
return Ts(a) || Es(a) || Ss(a) || xs();
|
|
@@ -1936,8 +1991,8 @@ var Gi = { exports: {} };
|
|
|
1936
1991
|
function i(l, u, c, h, d) {
|
|
1937
1992
|
if (typeof c != "function")
|
|
1938
1993
|
throw new TypeError("The listener must be a function");
|
|
1939
|
-
var
|
|
1940
|
-
return l._events[
|
|
1994
|
+
var p = new e(c, h || l, d), g = r ? r + u : u;
|
|
1995
|
+
return l._events[g] ? l._events[g].fn ? l._events[g] = [l._events[g], p] : l._events[g].push(p) : (l._events[g] = p, l._eventsCount++), l;
|
|
1941
1996
|
}
|
|
1942
1997
|
function n(l, u) {
|
|
1943
1998
|
--l._eventsCount === 0 ? l._events = new t() : delete l._events[u];
|
|
@@ -1958,19 +2013,19 @@ var Gi = { exports: {} };
|
|
|
1958
2013
|
return [];
|
|
1959
2014
|
if (h.fn)
|
|
1960
2015
|
return [h.fn];
|
|
1961
|
-
for (var d = 0,
|
|
1962
|
-
|
|
1963
|
-
return
|
|
2016
|
+
for (var d = 0, p = h.length, g = new Array(p); d < p; d++)
|
|
2017
|
+
g[d] = h[d].fn;
|
|
2018
|
+
return g;
|
|
1964
2019
|
}, s.prototype.listenerCount = function(u) {
|
|
1965
2020
|
var c = r ? r + u : u, h = this._events[c];
|
|
1966
2021
|
return h ? h.fn ? 1 : h.length : 0;
|
|
1967
|
-
}, s.prototype.emit = function(u, c, h, d,
|
|
1968
|
-
var
|
|
1969
|
-
if (!this._events[
|
|
2022
|
+
}, s.prototype.emit = function(u, c, h, d, p, g) {
|
|
2023
|
+
var v = r ? r + u : u;
|
|
2024
|
+
if (!this._events[v])
|
|
1970
2025
|
return !1;
|
|
1971
|
-
var y = this._events[
|
|
2026
|
+
var y = this._events[v], C = arguments.length, b, w;
|
|
1972
2027
|
if (y.fn) {
|
|
1973
|
-
switch (y.once && this.removeListener(u, y.fn, void 0, !0),
|
|
2028
|
+
switch (y.once && this.removeListener(u, y.fn, void 0, !0), C) {
|
|
1974
2029
|
case 1:
|
|
1975
2030
|
return y.fn.call(y.context), !0;
|
|
1976
2031
|
case 2:
|
|
@@ -1980,34 +2035,34 @@ var Gi = { exports: {} };
|
|
|
1980
2035
|
case 4:
|
|
1981
2036
|
return y.fn.call(y.context, c, h, d), !0;
|
|
1982
2037
|
case 5:
|
|
1983
|
-
return y.fn.call(y.context, c, h, d,
|
|
2038
|
+
return y.fn.call(y.context, c, h, d, p), !0;
|
|
1984
2039
|
case 6:
|
|
1985
|
-
return y.fn.call(y.context, c, h, d,
|
|
2040
|
+
return y.fn.call(y.context, c, h, d, p, g), !0;
|
|
1986
2041
|
}
|
|
1987
|
-
for (
|
|
1988
|
-
b[
|
|
2042
|
+
for (w = 1, b = new Array(C - 1); w < C; w++)
|
|
2043
|
+
b[w - 1] = arguments[w];
|
|
1989
2044
|
y.fn.apply(y.context, b);
|
|
1990
2045
|
} else {
|
|
1991
|
-
var
|
|
1992
|
-
for (
|
|
1993
|
-
switch (y[
|
|
2046
|
+
var A = y.length, F;
|
|
2047
|
+
for (w = 0; w < A; w++)
|
|
2048
|
+
switch (y[w].once && this.removeListener(u, y[w].fn, void 0, !0), C) {
|
|
1994
2049
|
case 1:
|
|
1995
|
-
y[
|
|
2050
|
+
y[w].fn.call(y[w].context);
|
|
1996
2051
|
break;
|
|
1997
2052
|
case 2:
|
|
1998
|
-
y[
|
|
2053
|
+
y[w].fn.call(y[w].context, c);
|
|
1999
2054
|
break;
|
|
2000
2055
|
case 3:
|
|
2001
|
-
y[
|
|
2056
|
+
y[w].fn.call(y[w].context, c, h);
|
|
2002
2057
|
break;
|
|
2003
2058
|
case 4:
|
|
2004
|
-
y[
|
|
2059
|
+
y[w].fn.call(y[w].context, c, h, d);
|
|
2005
2060
|
break;
|
|
2006
2061
|
default:
|
|
2007
2062
|
if (!b)
|
|
2008
|
-
for (
|
|
2009
|
-
b[
|
|
2010
|
-
y[
|
|
2063
|
+
for (F = 1, b = new Array(C - 1); F < C; F++)
|
|
2064
|
+
b[F - 1] = arguments[F];
|
|
2065
|
+
y[w].fn.apply(y[w].context, b);
|
|
2011
2066
|
}
|
|
2012
2067
|
}
|
|
2013
2068
|
return !0;
|
|
@@ -2016,18 +2071,18 @@ var Gi = { exports: {} };
|
|
|
2016
2071
|
}, s.prototype.once = function(u, c, h) {
|
|
2017
2072
|
return i(this, u, c, h, !0);
|
|
2018
2073
|
}, s.prototype.removeListener = function(u, c, h, d) {
|
|
2019
|
-
var
|
|
2020
|
-
if (!this._events[
|
|
2074
|
+
var p = r ? r + u : u;
|
|
2075
|
+
if (!this._events[p])
|
|
2021
2076
|
return this;
|
|
2022
2077
|
if (!c)
|
|
2023
|
-
return n(this,
|
|
2024
|
-
var
|
|
2025
|
-
if (
|
|
2026
|
-
|
|
2078
|
+
return n(this, p), this;
|
|
2079
|
+
var g = this._events[p];
|
|
2080
|
+
if (g.fn)
|
|
2081
|
+
g.fn === c && (!d || g.once) && (!h || g.context === h) && n(this, p);
|
|
2027
2082
|
else {
|
|
2028
|
-
for (var
|
|
2029
|
-
(
|
|
2030
|
-
y.length ? this._events[
|
|
2083
|
+
for (var v = 0, y = [], C = g.length; v < C; v++)
|
|
2084
|
+
(g[v].fn !== c || d && !g[v].once || h && g[v].context !== h) && y.push(g[v]);
|
|
2085
|
+
y.length ? this._events[p] = y.length === 1 ? y[0] : y : n(this, p);
|
|
2031
2086
|
}
|
|
2032
2087
|
return this;
|
|
2033
2088
|
}, s.prototype.removeAllListeners = function(u) {
|
|
@@ -2517,63 +2572,63 @@ function Yi(a) {
|
|
|
2517
2572
|
return a !== null && (o === "object" || o === "function");
|
|
2518
2573
|
}
|
|
2519
2574
|
function Rs(a, o, r) {
|
|
2520
|
-
var t, e, i, n, s, l, u = 0, c = !1, h = !1, d = !0,
|
|
2575
|
+
var t, e, i, n, s, l, u = 0, c = !1, h = !1, d = !0, p = !o && o !== 0 && typeof window.requestAnimationFrame == "function";
|
|
2521
2576
|
if (typeof a != "function")
|
|
2522
2577
|
throw new TypeError("Expected a function");
|
|
2523
2578
|
o = +o || 0, Yi(r) && (c = !!r.leading, h = "maxWait" in r, i = h ? Math.max(+r.maxWait || 0, o) : i, d = "trailing" in r ? !!r.trailing : d);
|
|
2524
|
-
function
|
|
2525
|
-
var
|
|
2526
|
-
return t = e = void 0, u =
|
|
2579
|
+
function g(U) {
|
|
2580
|
+
var te = t, ae = e;
|
|
2581
|
+
return t = e = void 0, u = U, n = a.apply(ae, te), n;
|
|
2527
2582
|
}
|
|
2528
|
-
function
|
|
2529
|
-
return
|
|
2583
|
+
function v(U, te) {
|
|
2584
|
+
return p ? (window.cancelAnimationFrame(s), window.requestAnimationFrame(U)) : setTimeout(U, te);
|
|
2530
2585
|
}
|
|
2531
|
-
function y(
|
|
2532
|
-
if (
|
|
2533
|
-
return window.cancelAnimationFrame(
|
|
2534
|
-
clearTimeout(
|
|
2586
|
+
function y(U) {
|
|
2587
|
+
if (p)
|
|
2588
|
+
return window.cancelAnimationFrame(U);
|
|
2589
|
+
clearTimeout(U);
|
|
2535
2590
|
}
|
|
2536
|
-
function
|
|
2537
|
-
return u =
|
|
2591
|
+
function C(U) {
|
|
2592
|
+
return u = U, s = v(A, o), c ? g(U) : n;
|
|
2538
2593
|
}
|
|
2539
|
-
function b(
|
|
2540
|
-
var
|
|
2594
|
+
function b(U) {
|
|
2595
|
+
var te = U - l, ae = U - u, le = o - te;
|
|
2541
2596
|
return h ? Math.min(le, i - ae) : le;
|
|
2542
2597
|
}
|
|
2543
|
-
function
|
|
2544
|
-
var
|
|
2545
|
-
return l === void 0 ||
|
|
2598
|
+
function w(U) {
|
|
2599
|
+
var te = U - l, ae = U - u;
|
|
2600
|
+
return l === void 0 || te >= o || te < 0 || h && ae >= i;
|
|
2546
2601
|
}
|
|
2547
|
-
function
|
|
2548
|
-
var
|
|
2549
|
-
if (
|
|
2550
|
-
return
|
|
2551
|
-
s =
|
|
2602
|
+
function A() {
|
|
2603
|
+
var U = Date.now();
|
|
2604
|
+
if (w(U))
|
|
2605
|
+
return F(U);
|
|
2606
|
+
s = v(A, b(U));
|
|
2552
2607
|
}
|
|
2553
|
-
function
|
|
2554
|
-
return s = void 0, d && t ?
|
|
2608
|
+
function F(U) {
|
|
2609
|
+
return s = void 0, d && t ? g(U) : (t = e = void 0, n);
|
|
2555
2610
|
}
|
|
2556
|
-
function
|
|
2611
|
+
function H() {
|
|
2557
2612
|
s !== void 0 && y(s), u = 0, t = l = e = s = void 0;
|
|
2558
2613
|
}
|
|
2559
2614
|
function R() {
|
|
2560
|
-
return s === void 0 ? n :
|
|
2615
|
+
return s === void 0 ? n : F(Date.now());
|
|
2561
2616
|
}
|
|
2562
2617
|
function Z() {
|
|
2563
2618
|
return s !== void 0;
|
|
2564
2619
|
}
|
|
2565
|
-
function
|
|
2566
|
-
for (var
|
|
2567
|
-
le[
|
|
2568
|
-
if (t = le, e = this, l =
|
|
2620
|
+
function G() {
|
|
2621
|
+
for (var U = Date.now(), te = w(U), ae = arguments.length, le = new Array(ae), Le = 0; Le < ae; Le++)
|
|
2622
|
+
le[Le] = arguments[Le];
|
|
2623
|
+
if (t = le, e = this, l = U, te) {
|
|
2569
2624
|
if (s === void 0)
|
|
2570
|
-
return
|
|
2625
|
+
return C(l);
|
|
2571
2626
|
if (h)
|
|
2572
|
-
return s =
|
|
2627
|
+
return s = v(A, o), g(l);
|
|
2573
2628
|
}
|
|
2574
|
-
return s === void 0 && (s =
|
|
2629
|
+
return s === void 0 && (s = v(A, o)), n;
|
|
2575
2630
|
}
|
|
2576
|
-
return
|
|
2631
|
+
return G.cancel = H, G.flush = R, G.pending = Z, G;
|
|
2577
2632
|
}
|
|
2578
2633
|
function Os(a, o, r) {
|
|
2579
2634
|
var t = !0, e = !0;
|
|
@@ -2598,9 +2653,9 @@ function Ms(a, o, r) {
|
|
|
2598
2653
|
var gi = {
|
|
2599
2654
|
android: /(Android)\s([\d.]+)/,
|
|
2600
2655
|
ios: /(Version)\/([\d.]+)/
|
|
2601
|
-
}, Ns = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"],
|
|
2656
|
+
}, Ns = ["avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "avc1.42E01E", "mp4v.20.8", "avc1.42E01E, mp4a.40.2", "avc1.58A01E, mp4a.40.2", "avc1.4D401E, mp4a.40.2", "avc1.64001E, mp4a.40.2", "mp4v.20.8, mp4a.40.2", "mp4v.20.240, mp4a.40.2"], M = {
|
|
2602
2657
|
get device() {
|
|
2603
|
-
var a =
|
|
2658
|
+
var a = M.os;
|
|
2604
2659
|
return a.isPc ? "pc" : "mobile";
|
|
2605
2660
|
},
|
|
2606
2661
|
get browser() {
|
|
@@ -2727,9 +2782,9 @@ var gi = {
|
|
|
2727
2782
|
T(this, a);
|
|
2728
2783
|
var t = o && o.i18n ? o.i18n.ERROR_TYPES : null;
|
|
2729
2784
|
if (o.media) {
|
|
2730
|
-
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,
|
|
2731
|
-
vi[
|
|
2732
|
-
var
|
|
2785
|
+
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, p = r.errorCode || e.code;
|
|
2786
|
+
vi[p] && (p = vi[p]);
|
|
2787
|
+
var g = {
|
|
2733
2788
|
playerVersion: jt,
|
|
2734
2789
|
currentTime: n,
|
|
2735
2790
|
duration: i,
|
|
@@ -2738,25 +2793,25 @@ var gi = {
|
|
|
2738
2793
|
networkState: d,
|
|
2739
2794
|
src: l || u,
|
|
2740
2795
|
errorType: r.errorType,
|
|
2741
|
-
errorCode:
|
|
2796
|
+
errorCode: p,
|
|
2742
2797
|
message: r.errorMessage || e.message,
|
|
2743
2798
|
mediaError: e,
|
|
2744
2799
|
originError: r.originError ? r.originError.stack : "",
|
|
2745
2800
|
host: f.getHostFromUrl(l || u)
|
|
2746
2801
|
};
|
|
2747
2802
|
return r.ext && Object.keys(r.ext).map(function(b) {
|
|
2748
|
-
|
|
2749
|
-
}),
|
|
2803
|
+
g[b] = r.ext[b];
|
|
2804
|
+
}), g;
|
|
2750
2805
|
} else if (arguments.length > 1) {
|
|
2751
|
-
for (var
|
|
2806
|
+
for (var v = {
|
|
2752
2807
|
playerVersion: jt,
|
|
2753
2808
|
domain: document.domain
|
|
2754
|
-
}, y = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"],
|
|
2755
|
-
|
|
2756
|
-
return
|
|
2809
|
+
}, y = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], C = 0; C < arguments.length; C++)
|
|
2810
|
+
v[y[C]] = arguments[C];
|
|
2811
|
+
return v.ex = t ? (t[arguments[0]] || {}).msg : "", v;
|
|
2757
2812
|
}
|
|
2758
2813
|
}
|
|
2759
|
-
),
|
|
2814
|
+
), se = "play", Jt = "playing", Be = "ended", Xe = "pause", it = "error", kt = "seeking", _e = "seeked", re = "timeupdate", nt = "waiting", ve = "canplay", Bs = "canplaythrough", Ie = "durationchange", Xi = "volumechange", ke = "loadeddata", Hs = "loadedmetadata", qi = "ratechange", Zi = "progress", Qt = "loadstart", He = "emptied", Us = "stalled", zs = "suspend", Vs = "abort", js = "bufferedChange", ei = "focus", Ji = "blur", ti = "ready", Qi = "urlNull", Me = "autoplay_started", ii = "autoplay_was_prevented", Ct = "complete", ft = "replay", ni = "destroy", wt = "urlchange", Wt = "download_speed_change", en = "leaveplayer", tn = "enterplayer", nn = "loading", ge = "fullscreen_change", ht = "cssFullscreen_change", dt = "mini_state_change", ri = "definition_change", Ws = "before_definition_change", Gt = "after_definition_change", Gs = "SEI_PARSED", $s = "retry", Se = "video_resize", $t = "pip_change", rn = "rotate", sn = "screenShot", gt = "playnext", on = "shortcut", an = "xglog", pt = "user_action", bt = "reset", ln = "source_error", un = "source_success", Ks = "switch_subtitle", cn = ["play", "playing", "ended", "pause", "error", "seeking", "seeked", "timeupdate", "waiting", "canplay", "canplaythrough", "durationchange", "volumechange", "loadeddata", "loadedmetadata", "ratechange", "progress", "loadstart", "emptied", "stalled", "suspend", "abort", "lowdecode"], fn = {
|
|
2760
2815
|
STATS_INFO: "stats_info",
|
|
2761
2816
|
STATS_DOWNLOAD: "stats_download",
|
|
2762
2817
|
STATS_RESET: "stats_reset"
|
|
@@ -2766,7 +2821,7 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2766
2821
|
ABORT: Vs,
|
|
2767
2822
|
AFTER_DEFINITION_CHANGE: Gt,
|
|
2768
2823
|
AUTOPLAY_PREVENTED: ii,
|
|
2769
|
-
AUTOPLAY_STARTED:
|
|
2824
|
+
AUTOPLAY_STARTED: Me,
|
|
2770
2825
|
BEFORE_DEFINITION_CHANGE: Ws,
|
|
2771
2826
|
BUFFER_CHANGE: js,
|
|
2772
2827
|
CANPLAY: ve,
|
|
@@ -2776,7 +2831,7 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2776
2831
|
DEFINITION_CHANGE: ri,
|
|
2777
2832
|
DESTROY: ni,
|
|
2778
2833
|
DOWNLOAD_SPEED_CHANGE: Wt,
|
|
2779
|
-
DURATION_CHANGE:
|
|
2834
|
+
DURATION_CHANGE: Ie,
|
|
2780
2835
|
EMPTIED: He,
|
|
2781
2836
|
ENDED: Be,
|
|
2782
2837
|
ENTER_PLAYER: tn,
|
|
@@ -2784,14 +2839,14 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2784
2839
|
FPS_STUCK: hn,
|
|
2785
2840
|
FULLSCREEN_CHANGE: ge,
|
|
2786
2841
|
LEAVE_PLAYER: en,
|
|
2787
|
-
LOADED_DATA:
|
|
2842
|
+
LOADED_DATA: ke,
|
|
2788
2843
|
LOADED_METADATA: Hs,
|
|
2789
2844
|
LOADING: nn,
|
|
2790
2845
|
LOAD_START: Qt,
|
|
2791
2846
|
MINI_STATE_CHANGE: dt,
|
|
2792
2847
|
PAUSE: Xe,
|
|
2793
2848
|
PIP_CHANGE: $t,
|
|
2794
|
-
PLAY:
|
|
2849
|
+
PLAY: se,
|
|
2795
2850
|
PLAYER_BLUR: Ji,
|
|
2796
2851
|
PLAYER_FOCUS: ei,
|
|
2797
2852
|
PLAYING: Jt,
|
|
@@ -2804,7 +2859,7 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2804
2859
|
RETRY: $s,
|
|
2805
2860
|
ROTATE: rn,
|
|
2806
2861
|
SCREEN_SHOT: sn,
|
|
2807
|
-
SEEKED:
|
|
2862
|
+
SEEKED: _e,
|
|
2808
2863
|
SEEKING: kt,
|
|
2809
2864
|
SEI_PARSED: Gs,
|
|
2810
2865
|
SHORTCUT: on,
|
|
@@ -2814,12 +2869,12 @@ const Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2814
2869
|
STATS_EVENTS: fn,
|
|
2815
2870
|
SUSPEND: zs,
|
|
2816
2871
|
SWITCH_SUBTITLE: Ks,
|
|
2817
|
-
TIME_UPDATE:
|
|
2872
|
+
TIME_UPDATE: re,
|
|
2818
2873
|
URL_CHANGE: wt,
|
|
2819
2874
|
URL_NULL: Qi,
|
|
2820
2875
|
USER_ACTION: pt,
|
|
2821
2876
|
VIDEO_EVENTS: cn,
|
|
2822
|
-
VIDEO_RESIZE:
|
|
2877
|
+
VIDEO_RESIZE: Se,
|
|
2823
2878
|
VOLUME_CHANGE: Xi,
|
|
2824
2879
|
WAITING: nt,
|
|
2825
2880
|
XGLOG: an
|
|
@@ -2882,7 +2937,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
2882
2937
|
"data-index": -1
|
|
2883
2938
|
}, t.videoConfig, t.videoAttributes);
|
|
2884
2939
|
var i = t["x5-video-player-type"] || t.x5VideoPlayerType;
|
|
2885
|
-
return
|
|
2940
|
+
return M.isWeixin && M.os.isAndroid && i && (e.mediaConfig["x5-video-player-type"] = i, delete e.mediaConfig.playsinline, delete e.mediaConfig["webkit-playsinline"], delete e.mediaConfig["x5-playsinline"]), t.loop && (e.mediaConfig.loop = "loop"), t.autoplayMuted && !Object.prototype.hasOwnProperty.call(e.mediaConfig, "muted") && (e.mediaConfig.muted = !0), e.media = f.createDom(e.mediaConfig.mediaType, "", e.mediaConfig, ""), t.defaultPlaybackRate && (e.media.defaultPlaybackRate = e.media.playbackRate = t.defaultPlaybackRate), f.typeOf(t.volume) === "Number" && (e.volume = t.volume), t.autoplayMuted && (e.media.muted = !0, e._lastMuted = !0), t.autoplay && (e.media.autoplay = !0), e._interval = {}, e.mediaEventMiddleware = {}, e.attachVideoEvents(), e;
|
|
2886
2941
|
}
|
|
2887
2942
|
return E(r, [{
|
|
2888
2943
|
key: "setEventsMiddleware",
|
|
@@ -2951,15 +3006,15 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
2951
3006
|
!this._sourceError && (this._sourceError = function(h) {
|
|
2952
3007
|
var d = parseInt(h.target.getAttribute("data-index"), 10);
|
|
2953
3008
|
if (n._videoSourceIndex--, n._videoSourceIndex === 0 || d >= n._videoSourceCount) {
|
|
2954
|
-
var
|
|
3009
|
+
var p = {
|
|
2955
3010
|
code: 4,
|
|
2956
3011
|
message: "sources_load_error"
|
|
2957
3012
|
};
|
|
2958
|
-
l ? l.error(h,
|
|
3013
|
+
l ? l.error(h, p) : n.errorHandler("error", p);
|
|
2959
3014
|
}
|
|
2960
|
-
var
|
|
3015
|
+
var g = pi[4];
|
|
2961
3016
|
n.emit(ln, new ct(n, {
|
|
2962
|
-
errorType:
|
|
3017
|
+
errorType: g,
|
|
2963
3018
|
errorCode: 4,
|
|
2964
3019
|
errorMessage: "sources_load_error",
|
|
2965
3020
|
mediaError: {
|
|
@@ -3251,33 +3306,33 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
3251
3306
|
value: function(e, i) {
|
|
3252
3307
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3253
3308
|
l[u - 2] = arguments[u];
|
|
3254
|
-
(n = L(
|
|
3309
|
+
(n = D(L(r.prototype), "emit", this)).call.apply(n, [this, e, i].concat(l));
|
|
3255
3310
|
}
|
|
3256
3311
|
}, {
|
|
3257
3312
|
key: "on",
|
|
3258
3313
|
value: function(e, i) {
|
|
3259
3314
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3260
3315
|
l[u - 2] = arguments[u];
|
|
3261
|
-
(n = L(
|
|
3316
|
+
(n = D(L(r.prototype), "on", this)).call.apply(n, [this, e, i].concat(l));
|
|
3262
3317
|
}
|
|
3263
3318
|
}, {
|
|
3264
3319
|
key: "once",
|
|
3265
3320
|
value: function(e, i) {
|
|
3266
3321
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3267
3322
|
l[u - 2] = arguments[u];
|
|
3268
|
-
(n = L(
|
|
3323
|
+
(n = D(L(r.prototype), "once", this)).call.apply(n, [this, e, i].concat(l));
|
|
3269
3324
|
}
|
|
3270
3325
|
}, {
|
|
3271
3326
|
key: "off",
|
|
3272
3327
|
value: function(e, i) {
|
|
3273
3328
|
for (var n, s = arguments.length, l = new Array(s > 2 ? s - 2 : 0), u = 2; u < s; u++)
|
|
3274
3329
|
l[u - 2] = arguments[u];
|
|
3275
|
-
(n = L(
|
|
3330
|
+
(n = D(L(r.prototype), "off", this)).call.apply(n, [this, e, i].concat(l));
|
|
3276
3331
|
}
|
|
3277
3332
|
}, {
|
|
3278
3333
|
key: "offAll",
|
|
3279
3334
|
value: function() {
|
|
3280
|
-
L(
|
|
3335
|
+
D(L(r.prototype), "removeAllListeners", this).call(this);
|
|
3281
3336
|
}
|
|
3282
3337
|
}]), r;
|
|
3283
3338
|
}(Ki), Zs = /* @__PURE__ */ function() {
|
|
@@ -3358,7 +3413,7 @@ var qs = /* @__PURE__ */ function(a) {
|
|
|
3358
3413
|
t.clear();
|
|
3359
3414
|
}
|
|
3360
3415
|
}]), a;
|
|
3361
|
-
}(), mi = ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"], yi = ["requestFullscreen", "webkitRequestFullscreen", "mozRequestFullScreen", "msRequestFullscreen"], _i = ["exitFullscreen", "webkitExitFullscreen", "mozCancelFullScreen", "msExitFullscreen"],
|
|
3416
|
+
}(), mi = ["fullscreenchange", "webkitfullscreenchange", "mozfullscreenchange", "MSFullscreenChange"], yi = ["requestFullscreen", "webkitRequestFullscreen", "mozRequestFullScreen", "msRequestFullscreen"], _i = ["exitFullscreen", "webkitExitFullscreen", "mozCancelFullScreen", "msExitFullscreen"], Re = "data-xgplayerid";
|
|
3362
3417
|
function rt(a, o, r) {
|
|
3363
3418
|
for (var t = arguments.length, e = new Array(t > 3 ? t - 3 : 0), i = 3; i < t; i++)
|
|
3364
3419
|
e[i - 3] = arguments[i];
|
|
@@ -3459,7 +3514,7 @@ function pe(a, o, r) {
|
|
|
3459
3514
|
function Pt(a, o) {
|
|
3460
3515
|
N.logError("[".concat(a, "] event or callback cant be undefined or null when call ").concat(o));
|
|
3461
3516
|
}
|
|
3462
|
-
var
|
|
3517
|
+
var xe = /* @__PURE__ */ function() {
|
|
3463
3518
|
function a(o) {
|
|
3464
3519
|
T(this, a), f.checkIsFunction(this.beforeCreate) && this.beforeCreate(o), dn(this), this.__args = o, this.__events = {}, this.__onceEvents = {}, this.config = o.config || {}, this.player = null, this.playerConfig = {}, this.pluginName = "", this.__init(o);
|
|
3465
3520
|
}
|
|
@@ -3740,7 +3795,7 @@ function uo(a, o) {
|
|
|
3740
3795
|
});
|
|
3741
3796
|
});
|
|
3742
3797
|
}
|
|
3743
|
-
var
|
|
3798
|
+
var V = /* @__PURE__ */ function(a) {
|
|
3744
3799
|
P(r, a);
|
|
3745
3800
|
var o = I(r);
|
|
3746
3801
|
function r() {
|
|
@@ -3750,7 +3805,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3750
3805
|
return E(r, [{
|
|
3751
3806
|
key: "__init",
|
|
3752
3807
|
value: function(e) {
|
|
3753
|
-
if (L(
|
|
3808
|
+
if (D(L(r.prototype), "__init", this).call(this, e), !!e.root) {
|
|
3754
3809
|
var i = e.root, n = null;
|
|
3755
3810
|
this.icons = {}, this.root = null, this.parent = null;
|
|
3756
3811
|
var s = this.registerIcons() || {};
|
|
@@ -3844,7 +3899,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3844
3899
|
value: function(e) {
|
|
3845
3900
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
|
|
3846
3901
|
i.root = i.root || this.root;
|
|
3847
|
-
var s = L(
|
|
3902
|
+
var s = D(L(r.prototype), "registerPlugin", this).call(this, e, i, n);
|
|
3848
3903
|
return this._children.push(s), s;
|
|
3849
3904
|
}
|
|
3850
3905
|
}, {
|
|
@@ -3979,7 +4034,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3979
4034
|
n.destroy();
|
|
3980
4035
|
}), this.__delegates = [], this._children instanceof Array && (this._children.map(function(n) {
|
|
3981
4036
|
i.unRegisterPlugin(n.pluginName);
|
|
3982
|
-
}), this._children = null), this.root && (this.root.hasOwnProperty("remove") ? this.root.remove() : this.root.parentNode && this.root.parentNode.removeChild(this.root)), L(
|
|
4037
|
+
}), this._children = null), this.root && (this.root.hasOwnProperty("remove") ? this.root.remove() : this.root.parentNode && this.root.parentNode.removeChild(this.root)), D(L(r.prototype), "__destroy", this).call(this), this.icons = {}, ["root", "parent"].map(function(n) {
|
|
3983
4038
|
e[n] = null;
|
|
3984
4039
|
});
|
|
3985
4040
|
}
|
|
@@ -3990,12 +4045,12 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3990
4045
|
if (s) {
|
|
3991
4046
|
for (var c = 0, h = null, d = ""; c < s; c++) {
|
|
3992
4047
|
h = i.children[c];
|
|
3993
|
-
var
|
|
3994
|
-
if (
|
|
4048
|
+
var p = Number(h.getAttribute("data-index"));
|
|
4049
|
+
if (p >= l) {
|
|
3995
4050
|
d = "beforebegin";
|
|
3996
4051
|
break;
|
|
3997
4052
|
} else
|
|
3998
|
-
|
|
4053
|
+
p < l && (d = "afterend");
|
|
3999
4054
|
}
|
|
4000
4055
|
return u ? d === "afterend" ? i.appendChild(e) : i.insertBefore(e, h) : h.insertAdjacentHTML(d, e), d === "afterend" ? i.children[i.children.length - 1] : i.children[c];
|
|
4001
4056
|
} else
|
|
@@ -4033,7 +4088,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
4033
4088
|
return j;
|
|
4034
4089
|
}
|
|
4035
4090
|
}]), r;
|
|
4036
|
-
}(
|
|
4091
|
+
}(xe), co = /* @__PURE__ */ function() {
|
|
4037
4092
|
function a() {
|
|
4038
4093
|
var o = this;
|
|
4039
4094
|
if (T(this, a), _(this, "__trigger", function(r) {
|
|
@@ -4055,7 +4110,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
4055
4110
|
value: function(r, t) {
|
|
4056
4111
|
if (this.observer) {
|
|
4057
4112
|
this.observer && this.observer.observe(r);
|
|
4058
|
-
for (var e = r.getAttribute(
|
|
4113
|
+
for (var e = r.getAttribute(Re), i = this.__handlers, n = -1, s = 0; s < i.length; s++)
|
|
4059
4114
|
i[s] && r === i[s].target && (n = s);
|
|
4060
4115
|
n > -1 ? this.__handlers[n].handler = t : this.__handlers.push({
|
|
4061
4116
|
target: r,
|
|
@@ -4104,7 +4159,7 @@ function fo(a, o) {
|
|
|
4104
4159
|
function ho(a, o) {
|
|
4105
4160
|
Je.unObserver(a, o);
|
|
4106
4161
|
}
|
|
4107
|
-
var
|
|
4162
|
+
var $ = {
|
|
4108
4163
|
pluginGroup: {},
|
|
4109
4164
|
init: function(o) {
|
|
4110
4165
|
var r = o._pluginInfoId;
|
|
@@ -4302,7 +4357,7 @@ var K = {
|
|
|
4302
4357
|
delete this.pluginGroup[r], delete o._pluginInfoId;
|
|
4303
4358
|
}
|
|
4304
4359
|
}
|
|
4305
|
-
},
|
|
4360
|
+
}, k = {
|
|
4306
4361
|
DEFAULT: "xgplayer",
|
|
4307
4362
|
DEFAULT_SKIN: "xgplayer-skin-default",
|
|
4308
4363
|
ENTER: "xgplayer-is-enter",
|
|
@@ -4419,12 +4474,12 @@ function Ei() {
|
|
|
4419
4474
|
var go = function(o, r) {
|
|
4420
4475
|
var t, e, i;
|
|
4421
4476
|
r.preset && r.options ? i = new r.preset(r.options, o.config) : i = new r({}, o.config);
|
|
4422
|
-
var n = i, s = n.plugins, l = s === void 0 ? [] : s, u = n.ignores, c = u === void 0 ? [] : u, h = n.icons, d = h === void 0 ? {} : h,
|
|
4477
|
+
var n = i, s = n.plugins, l = s === void 0 ? [] : s, u = n.ignores, c = u === void 0 ? [] : u, h = n.icons, d = h === void 0 ? {} : h, p = n.i18n, g = p === void 0 ? [] : p;
|
|
4423
4478
|
o.config.plugins || (o.config.plugins = []), o.config.ignores || (o.config.ignores = []), (t = o.config.plugins).push.apply(t, ue(l)), (e = o.config.ignores).push.apply(e, ue(c)), Object.keys(d).map(function(y) {
|
|
4424
4479
|
o.config.icons[y] || (o.config.icons[y] = d[y]);
|
|
4425
4480
|
});
|
|
4426
|
-
var
|
|
4427
|
-
|
|
4481
|
+
var v = o.config.i18n || [];
|
|
4482
|
+
g.push.apply(g, ue(v)), o.config.i18n = g;
|
|
4428
4483
|
}, po = /* @__PURE__ */ function(a) {
|
|
4429
4484
|
P(r, a);
|
|
4430
4485
|
var o = I(r);
|
|
@@ -4433,27 +4488,27 @@ var go = function(o, r) {
|
|
|
4433
4488
|
T(this, r);
|
|
4434
4489
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
4435
4490
|
i[n] = arguments[n];
|
|
4436
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
4437
|
-
var l =
|
|
4491
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onMouseEnter", function(s) {
|
|
4492
|
+
var l = m(t), u = l.player, c = l.playerConfig;
|
|
4438
4493
|
c.closeControlsBlur && u.focus({
|
|
4439
4494
|
autoHide: !1
|
|
4440
4495
|
});
|
|
4441
|
-
}), _(
|
|
4442
|
-
var l =
|
|
4496
|
+
}), _(m(t), "onMouseLeave", function(s) {
|
|
4497
|
+
var l = m(t), u = l.player;
|
|
4443
4498
|
u.focus();
|
|
4444
4499
|
}), t;
|
|
4445
4500
|
}
|
|
4446
4501
|
return E(r, [{
|
|
4447
4502
|
key: "beforeCreate",
|
|
4448
4503
|
value: function(e) {
|
|
4449
|
-
!e.config.mode &&
|
|
4504
|
+
!e.config.mode && M.device === "mobile" && (e.config.mode = "flex"), e.player.config.marginControls && (e.config.autoHide = !1);
|
|
4450
4505
|
}
|
|
4451
4506
|
}, {
|
|
4452
4507
|
key: "afterCreate",
|
|
4453
4508
|
value: function() {
|
|
4454
4509
|
var e = this, i = this.config, n = i.disable, s = i.height, l = i.mode;
|
|
4455
4510
|
if (!n) {
|
|
4456
|
-
l === "flex" && this.player.addClass(
|
|
4511
|
+
l === "flex" && this.player.addClass(k.FLEX_CONTROLS);
|
|
4457
4512
|
var u = {
|
|
4458
4513
|
height: "".concat(s, "px")
|
|
4459
4514
|
};
|
|
@@ -4463,7 +4518,7 @@ var go = function(o, r) {
|
|
|
4463
4518
|
h ? f.addClass(e.root, "mini-controls") : f.removeClass(e.root, "mini-controls");
|
|
4464
4519
|
});
|
|
4465
4520
|
var c = this.playerConfig.isMobileSimulateMode;
|
|
4466
|
-
|
|
4521
|
+
M.device !== "mobile" && c !== "mobile" && (this.bind("mouseenter", this.onMouseEnter), this.bind("mouseleave", this.onMouseLeave));
|
|
4467
4522
|
}
|
|
4468
4523
|
}
|
|
4469
4524
|
}, {
|
|
@@ -4490,12 +4545,12 @@ var go = function(o, r) {
|
|
|
4490
4545
|
}, {
|
|
4491
4546
|
key: "recoverAutoHide",
|
|
4492
4547
|
value: function() {
|
|
4493
|
-
this.config.autoHide && f.addClass(this.root,
|
|
4548
|
+
this.config.autoHide && f.addClass(this.root, k.CONTROLS_AUTOHIDE);
|
|
4494
4549
|
}
|
|
4495
4550
|
}, {
|
|
4496
4551
|
key: "pauseAutoHide",
|
|
4497
4552
|
value: function() {
|
|
4498
|
-
f.removeClass(this.root,
|
|
4553
|
+
f.removeClass(this.root, k.CONTROLS_AUTOHIDE);
|
|
4499
4554
|
}
|
|
4500
4555
|
}, {
|
|
4501
4556
|
key: "show",
|
|
@@ -4536,14 +4591,14 @@ var go = function(o, r) {
|
|
|
4536
4591
|
default:
|
|
4537
4592
|
i.root = this.left;
|
|
4538
4593
|
}
|
|
4539
|
-
return L(
|
|
4594
|
+
return D(L(r.prototype), "registerPlugin", this).call(this, e, i, n);
|
|
4540
4595
|
}
|
|
4541
4596
|
}
|
|
4542
4597
|
}
|
|
4543
4598
|
}, {
|
|
4544
4599
|
key: "destroy",
|
|
4545
4600
|
value: function() {
|
|
4546
|
-
|
|
4601
|
+
M.device !== "mobile" && (this.unbind("mouseenter", this.onMouseEnter), this.unbind("mouseleave", this.onMouseLeave));
|
|
4547
4602
|
}
|
|
4548
4603
|
}, {
|
|
4549
4604
|
key: "render",
|
|
@@ -4556,7 +4611,7 @@ var go = function(o, r) {
|
|
|
4556
4611
|
"flex-controls": i === "flex"
|
|
4557
4612
|
}, {
|
|
4558
4613
|
"bottom-controls": i === "bottom"
|
|
4559
|
-
}, _({},
|
|
4614
|
+
}, _({}, k.CONTROLS_AUTOHIDE, n), {
|
|
4560
4615
|
"xgplayer-controls-initshow": s || !n
|
|
4561
4616
|
});
|
|
4562
4617
|
return '<xg-controls class="'.concat(u, `" unselectable="on">
|
|
@@ -4586,7 +4641,7 @@ var go = function(o, r) {
|
|
|
4586
4641
|
};
|
|
4587
4642
|
}
|
|
4588
4643
|
}]), r;
|
|
4589
|
-
}(
|
|
4644
|
+
}(V), vo = {
|
|
4590
4645
|
LANG: "en",
|
|
4591
4646
|
TEXT: {
|
|
4592
4647
|
ERROR_TYPES: {
|
|
@@ -4661,7 +4716,7 @@ var go = function(o, r) {
|
|
|
4661
4716
|
FORWARD: "forward",
|
|
4662
4717
|
LIVE_TIP: "Live"
|
|
4663
4718
|
}
|
|
4664
|
-
},
|
|
4719
|
+
}, ne = {
|
|
4665
4720
|
lang: {},
|
|
4666
4721
|
langKeys: [],
|
|
4667
4722
|
textKeys: []
|
|
@@ -4677,13 +4732,13 @@ function et(a, o) {
|
|
|
4677
4732
|
}), a;
|
|
4678
4733
|
}
|
|
4679
4734
|
function pn() {
|
|
4680
|
-
Object.keys(
|
|
4681
|
-
|
|
4735
|
+
Object.keys(ne.lang.en).map(function(a) {
|
|
4736
|
+
ne.textKeys[a] = a;
|
|
4682
4737
|
});
|
|
4683
4738
|
}
|
|
4684
4739
|
function mo(a, o) {
|
|
4685
4740
|
var r = [];
|
|
4686
|
-
if (o || (o =
|
|
4741
|
+
if (o || (o = ne), !!o.lang) {
|
|
4687
4742
|
f.typeOf(a) !== "Array" ? r = Object.keys(a).map(function(i) {
|
|
4688
4743
|
var n = i === "zh" ? "zh-cn" : i;
|
|
4689
4744
|
return {
|
|
@@ -4699,7 +4754,7 @@ function mo(a, o) {
|
|
|
4699
4754
|
}
|
|
4700
4755
|
function si(a, o) {
|
|
4701
4756
|
var r = a.LANG;
|
|
4702
|
-
if (o || (o =
|
|
4757
|
+
if (o || (o = ne), !!o.lang) {
|
|
4703
4758
|
var t = a.TEXT || {};
|
|
4704
4759
|
r === "zh" && (r = "zh-cn"), o.lang[r] ? et(o.lang[r], t) : (o.langKeys.push(r), o.lang[r] = t), pn();
|
|
4705
4760
|
}
|
|
@@ -4711,21 +4766,21 @@ function yo(a) {
|
|
|
4711
4766
|
textKeys: {},
|
|
4712
4767
|
pId: a
|
|
4713
4768
|
};
|
|
4714
|
-
return et(r.lang,
|
|
4769
|
+
return et(r.lang, ne.lang), (o = r.langKeys).push.apply(o, ue(ne.langKeys)), et(r.textKeys, ne.textKeys), r;
|
|
4715
4770
|
}
|
|
4716
4771
|
si(vo);
|
|
4717
4772
|
var Ye = {
|
|
4718
4773
|
get textKeys() {
|
|
4719
|
-
return
|
|
4774
|
+
return ne.textKeys;
|
|
4720
4775
|
},
|
|
4721
4776
|
get langKeys() {
|
|
4722
|
-
return
|
|
4777
|
+
return ne.langKeys;
|
|
4723
4778
|
},
|
|
4724
4779
|
get lang() {
|
|
4725
4780
|
var a = {};
|
|
4726
|
-
return
|
|
4727
|
-
a[o] =
|
|
4728
|
-
}),
|
|
4781
|
+
return ne.langKeys.map(function(o) {
|
|
4782
|
+
a[o] = ne.lang[o];
|
|
4783
|
+
}), ne.lang["zh-cn"] && (a.zh = ne.lang["zh-cn"] || {}), a;
|
|
4729
4784
|
},
|
|
4730
4785
|
extend: mo,
|
|
4731
4786
|
use: si,
|
|
@@ -4834,24 +4889,24 @@ function _o(a) {
|
|
|
4834
4889
|
}
|
|
4835
4890
|
return null;
|
|
4836
4891
|
}
|
|
4837
|
-
var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0,
|
|
4892
|
+
var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, Ce = null, Tt = /* @__PURE__ */ function(a) {
|
|
4838
4893
|
P(r, a);
|
|
4839
4894
|
var o = I(r);
|
|
4840
4895
|
function r(t) {
|
|
4841
4896
|
var e;
|
|
4842
4897
|
T(this, r);
|
|
4843
4898
|
var i = f.deepMerge(Ei(), t);
|
|
4844
|
-
e = o.call(this, i), _(
|
|
4899
|
+
e = o.call(this, i), _(m(e), "canPlayFunc", function() {
|
|
4845
4900
|
if (e.config) {
|
|
4846
|
-
var
|
|
4847
|
-
N.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = y, (
|
|
4901
|
+
var g = e.config, v = g.autoplay, y = g.defaultPlaybackRate;
|
|
4902
|
+
N.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = y, (v || e._useAutoplay) && e.mediaPlay(), e.off(ve, e.canPlayFunc), e.removeClass(k.ENTER);
|
|
4848
4903
|
}
|
|
4849
|
-
}), _(
|
|
4904
|
+
}), _(m(e), "onFullscreenChange", function(g, v) {
|
|
4850
4905
|
var y = function() {
|
|
4851
|
-
f.setTimeout(
|
|
4906
|
+
f.setTimeout(m(e), function() {
|
|
4852
4907
|
e.resize();
|
|
4853
4908
|
}, 100);
|
|
4854
|
-
},
|
|
4909
|
+
}, C = f.getFullScreenEl();
|
|
4855
4910
|
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(pt, {
|
|
4856
4911
|
eventType: "system",
|
|
4857
4912
|
action: "switch_fullscreen",
|
|
@@ -4864,27 +4919,27 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
4864
4919
|
to: !1
|
|
4865
4920
|
}]
|
|
4866
4921
|
});
|
|
4867
|
-
var b = Ms(
|
|
4868
|
-
if (
|
|
4869
|
-
y(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root,
|
|
4922
|
+
var b = Ms(C, e.playerId, Re);
|
|
4923
|
+
if (v || C && (C === e._fullscreenEl || b))
|
|
4924
|
+
y(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, C, k.FULLSCREEN), e.emit(ge, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
4870
4925
|
else if (e.fullscreen) {
|
|
4871
4926
|
y();
|
|
4872
|
-
var
|
|
4873
|
-
if (
|
|
4927
|
+
var w = m(e), A = w._fullScreenOffset, F = w.config;
|
|
4928
|
+
if (F.needFullscreenScroll ? (window.scrollTo(A.left, A.top), f.setTimeout(m(e), function() {
|
|
4874
4929
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
4875
4930
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
4876
|
-
e.removeClass(
|
|
4931
|
+
e.removeClass(k.FULLSCREEN);
|
|
4877
4932
|
else {
|
|
4878
|
-
var
|
|
4879
|
-
!
|
|
4933
|
+
var H = e._fullscreenEl;
|
|
4934
|
+
!H && (e.root.contains(g.target) || g.target === e.root) && (H = g.target), e.recoverFullStyle(e.root, H, k.FULLSCREEN);
|
|
4880
4935
|
}
|
|
4881
4936
|
e._fullscreenEl = null, e.emit(ge, !1);
|
|
4882
4937
|
}
|
|
4883
|
-
}), _(
|
|
4884
|
-
e._fullscreenEl = e.media, e.onFullscreenChange(
|
|
4885
|
-
}), _(
|
|
4886
|
-
e.onFullscreenChange(
|
|
4887
|
-
}), dn(
|
|
4938
|
+
}), _(m(e), "_onWebkitbeginfullscreen", function(g) {
|
|
4939
|
+
e._fullscreenEl = e.media, e.onFullscreenChange(g, !0);
|
|
4940
|
+
}), _(m(e), "_onWebkitendfullscreen", function(g) {
|
|
4941
|
+
e.onFullscreenChange(g, !1);
|
|
4942
|
+
}), dn(m(e), ko), e.config = i, e._pluginInfoId = f.generateSessionId(), As(m(e));
|
|
4888
4943
|
var n = e.constructor.defaultPreset;
|
|
4889
4944
|
if (e.config.presets.length) {
|
|
4890
4945
|
var s = e.config.presets.indexOf("default");
|
|
@@ -4913,20 +4968,20 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
4913
4968
|
}, e._offsetInfo = {
|
|
4914
4969
|
currentTime: -1,
|
|
4915
4970
|
duration: 0
|
|
4916
|
-
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Ye.init(e._pluginInfoId),
|
|
4971
|
+
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Ye.init(e._pluginInfoId), M.os.isAndroid && M.osVersion > 0 && M.osVersion < 6 && (e.config.autoplay = !1), e.database = new Zs(), e.isUserActive = !1, e._onceSeekCanplay = null, e._isPauseBeforeSeek = 0, e.innerStates = {
|
|
4917
4972
|
isActiveLocked: !1
|
|
4918
|
-
}, e.instManager =
|
|
4973
|
+
}, e.instManager = Ce;
|
|
4919
4974
|
var l = e._initDOM();
|
|
4920
4975
|
if (!l)
|
|
4921
4976
|
return console.error(new Error("can't find the dom which id is ".concat(e.config.id, " or this.config.el does not exist"))), Zt(e);
|
|
4922
4977
|
var u = e.config, c = u.definition, h = c === void 0 ? {} : c, d = u.url;
|
|
4923
4978
|
if (!d && h.list && h.list.length > 0) {
|
|
4924
|
-
var
|
|
4925
|
-
return
|
|
4979
|
+
var p = h.list.find(function(g) {
|
|
4980
|
+
return g.definition && g.definition === h.defaultDefinition;
|
|
4926
4981
|
});
|
|
4927
|
-
|
|
4982
|
+
p || (h.defaultDefinition = h.list[0].definition, p = h.list[0]), e.config.url = p.url, e.curDefinition = p;
|
|
4928
4983
|
}
|
|
4929
|
-
return e._bindEvents(), e._registerPresets(), e._registerPlugins(),
|
|
4984
|
+
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), $.onPluginsReady(m(e)), e.getInitDefinition(), e.setState(B.READY), f.setTimeout(m(e), function() {
|
|
4930
4985
|
e.emit(ti);
|
|
4931
4986
|
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < B.ATTACHED) && e.start(), e;
|
|
4932
4987
|
}
|
|
@@ -4946,7 +5001,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
4946
5001
|
})), console.error("this.confg.id or this.config.el can't be empty"), !1;
|
|
4947
5002
|
}
|
|
4948
5003
|
var s = _o(this.root);
|
|
4949
|
-
s && (N.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"), s.destroy()), this.root.setAttribute(
|
|
5004
|
+
s && (N.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"), s.destroy()), this.root.setAttribute(Re, this.playerId), (e = Ce) === null || e === void 0 || e.add(this), $.init(this), this._initBaseDoms();
|
|
4950
5005
|
var l = this.constructor.XgVideoProxy;
|
|
4951
5006
|
if (l && this.mediaConfig.mediaType === l.mediaType) {
|
|
4952
5007
|
var u = this.innerContainer || this.root;
|
|
@@ -4954,31 +5009,31 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
4954
5009
|
var c = new l(u, this.config, this.mediaConfig);
|
|
4955
5010
|
this.attachVideoEvents(c), this.media = c;
|
|
4956
5011
|
}
|
|
4957
|
-
if (this.media.setAttribute(
|
|
4958
|
-
var h = this.config.controls.root || null, d =
|
|
5012
|
+
if (this.media.setAttribute(Re, this.playerId), this.config.controls) {
|
|
5013
|
+
var h = this.config.controls.root || null, d = $.register(this, po, {
|
|
4959
5014
|
root: h
|
|
4960
5015
|
});
|
|
4961
5016
|
this.controls = d;
|
|
4962
5017
|
}
|
|
4963
|
-
var
|
|
4964
|
-
if (this.addClass("".concat(
|
|
4965
|
-
var
|
|
4966
|
-
(typeof
|
|
4967
|
-
var
|
|
5018
|
+
var p = this.config.isMobileSimulateMode === "mobile" ? "mobile" : M.device;
|
|
5019
|
+
if (this.addClass("".concat(k.DEFAULT, " ").concat(k.INACTIVE, " xgplayer-").concat(p, " ").concat(this.config.controls ? "" : k.NO_CONTROLS)), this.config.autoplay ? this.addClass(k.ENTER) : this.addClass(k.NO_START), this.config.fluid) {
|
|
5020
|
+
var g = this.config, v = g.width, y = g.height;
|
|
5021
|
+
(typeof v != "number" || typeof y != "number") && (v = 600, y = 337.5);
|
|
5022
|
+
var C = {
|
|
4968
5023
|
width: "100%",
|
|
4969
5024
|
height: "0",
|
|
4970
5025
|
"max-width": "100%",
|
|
4971
|
-
"padding-top": "".concat(y * 100 /
|
|
5026
|
+
"padding-top": "".concat(y * 100 / v, "%")
|
|
4972
5027
|
};
|
|
4973
|
-
Object.keys(
|
|
4974
|
-
i.root.style[R] =
|
|
5028
|
+
Object.keys(C).forEach(function(R) {
|
|
5029
|
+
i.root.style[R] = C[R];
|
|
4975
5030
|
});
|
|
4976
5031
|
} else
|
|
4977
5032
|
["width", "height"].forEach(function(R) {
|
|
4978
5033
|
i.config[R] && (typeof i.config[R] != "number" ? i.root.style[R] = i.config[R] : i.root.style[R] = "".concat(i.config[R], "px"));
|
|
4979
5034
|
});
|
|
4980
|
-
var b = this.root.getBoundingClientRect(),
|
|
4981
|
-
return this.sizeInfo.width =
|
|
5035
|
+
var b = this.root.getBoundingClientRect(), w = b.width, A = b.height, F = b.left, H = b.top;
|
|
5036
|
+
return this.sizeInfo.width = w, this.sizeInfo.height = A, this.sizeInfo.left = F, this.sizeInfo.top = H, !0;
|
|
4982
5037
|
}
|
|
4983
5038
|
}, {
|
|
4984
5039
|
key: "_initBaseDoms",
|
|
@@ -4995,9 +5050,9 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
4995
5050
|
e.on(i, e["on" + i.charAt(0).toUpperCase() + i.slice(1)]);
|
|
4996
5051
|
}), mi.forEach(function(i) {
|
|
4997
5052
|
document && document.addEventListener(i, e.onFullscreenChange);
|
|
4998
|
-
}),
|
|
5053
|
+
}), M.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(ke, this.resize), this.playFunc = function() {
|
|
4999
5054
|
e.config.closeFocusVideoFocus || e.media.focus();
|
|
5000
|
-
}, this.once(
|
|
5055
|
+
}, this.once(se, this.playFunc);
|
|
5001
5056
|
}
|
|
5002
5057
|
}, {
|
|
5003
5058
|
key: "_unbindEvents",
|
|
@@ -5005,7 +5060,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5005
5060
|
var e = this;
|
|
5006
5061
|
this.root.removeEventListener("mousemove", this.mousemoveFunc), mi.forEach(function(i) {
|
|
5007
5062
|
document.removeEventListener(i, e.onFullscreenChange);
|
|
5008
|
-
}), this.playFunc && this.off(
|
|
5063
|
+
}), this.playFunc && this.off(se, this.playFunc), this.off(ve, this.canPlayFunc), this.media.removeEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.removeEventListener("webkitendfullscreen", this._onWebkitendfullscreen);
|
|
5009
5064
|
}
|
|
5010
5065
|
}, {
|
|
5011
5066
|
key: "_clearUserTimer",
|
|
@@ -5021,9 +5076,9 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5021
5076
|
var n = this.innerContainer ? this.innerContainer : this.root;
|
|
5022
5077
|
this.media instanceof window.Element && !n.contains(this.media) && n.insertBefore(this.media, n.firstChild);
|
|
5023
5078
|
var s = this.media.readyState;
|
|
5024
|
-
N.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (
|
|
5079
|
+
N.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (M.os.isIpad || M.os.isPhone) && this.mediaPlay());
|
|
5025
5080
|
var l = this.config.startTime;
|
|
5026
|
-
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ve, this.canPlayFunc), (!this.hasStart || this.state < B.ATTACHED) &&
|
|
5081
|
+
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ve, this.canPlayFunc), (!this.hasStart || this.state < B.ATTACHED) && $.afterInit(this), this.hasStart = !0, this.setState(B.ATTACHED), f.setTimeout(this, function() {
|
|
5027
5082
|
i.emit(Ct);
|
|
5028
5083
|
}, 0);
|
|
5029
5084
|
}
|
|
@@ -5044,17 +5099,17 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5044
5099
|
if (!i && c[d.toLowerCase()])
|
|
5045
5100
|
return;
|
|
5046
5101
|
if (h.lazy && h.loader) {
|
|
5047
|
-
var
|
|
5048
|
-
h.forceBeforeInit && (
|
|
5049
|
-
e._loadingPlugins.splice(e._loadingPlugins.indexOf(
|
|
5050
|
-
}).catch(function(
|
|
5051
|
-
N.logError("_registerPlugins:loadingPlugin",
|
|
5052
|
-
}), e._loadingPlugins.push(
|
|
5102
|
+
var p = $.lazyRegister(e, h);
|
|
5103
|
+
h.forceBeforeInit && (p.then(function() {
|
|
5104
|
+
e._loadingPlugins.splice(e._loadingPlugins.indexOf(p), 1);
|
|
5105
|
+
}).catch(function(g) {
|
|
5106
|
+
N.logError("_registerPlugins:loadingPlugin", g), e._loadingPlugins.splice(e._loadingPlugins.indexOf(p), 1);
|
|
5107
|
+
}), e._loadingPlugins.push(p));
|
|
5053
5108
|
return;
|
|
5054
5109
|
}
|
|
5055
5110
|
return e.registerPlugin(h);
|
|
5056
|
-
} catch (
|
|
5057
|
-
N.logError("_registerPlugins:",
|
|
5111
|
+
} catch (g) {
|
|
5112
|
+
N.logError("_registerPlugins:", g);
|
|
5058
5113
|
}
|
|
5059
5114
|
});
|
|
5060
5115
|
}
|
|
@@ -5078,7 +5133,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5078
5133
|
this.leftBar || (this.leftBar = f.createPositionBar("xg-left-bar", this.root)), i = this.leftBar;
|
|
5079
5134
|
break;
|
|
5080
5135
|
case j.ROOT_TOP:
|
|
5081
|
-
this.topBar || (this.topBar = f.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && f.addClass(this.topBar,
|
|
5136
|
+
this.topBar || (this.topBar = f.createPositionBar("xg-top-bar", this.root), this.config.topBarAutoHide && f.addClass(this.topBar, k.TOP_BAR_AUTOHIDE)), i = this.topBar;
|
|
5082
5137
|
break;
|
|
5083
5138
|
default:
|
|
5084
5139
|
i = this.innerContainer || this.root;
|
|
@@ -5089,17 +5144,17 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5089
5144
|
}, {
|
|
5090
5145
|
key: "registerPlugin",
|
|
5091
5146
|
value: function(e, i) {
|
|
5092
|
-
var n =
|
|
5147
|
+
var n = $.formatPluginInfo(e, i), s = n.PLUFGIN, l = n.options, u = this.config.plugins, c = $.checkPluginIfExits(s.pluginName, u);
|
|
5093
5148
|
!c && u.push(s);
|
|
5094
|
-
var h =
|
|
5149
|
+
var h = $.getRootByConfig(s.pluginName, this.config);
|
|
5095
5150
|
h.root && (l.root = h.root), h.position && (l.position = h.position);
|
|
5096
5151
|
var d = l.position ? l.position : l.config && l.config.position || s.defaultConfig && s.defaultConfig.position;
|
|
5097
|
-
return !l.root && typeof d == "string" && d.indexOf("controls") > -1 ? this.controls && this.controls.registerPlugin(s, l, s.pluginName) : (l.root || (l.root = this._getRootByPosition(d)),
|
|
5152
|
+
return !l.root && typeof d == "string" && d.indexOf("controls") > -1 ? this.controls && this.controls.registerPlugin(s, l, s.pluginName) : (l.root || (l.root = this._getRootByPosition(d)), $.register(this, s, l));
|
|
5098
5153
|
}
|
|
5099
5154
|
}, {
|
|
5100
5155
|
key: "deregister",
|
|
5101
5156
|
value: function(e) {
|
|
5102
|
-
typeof e == "string" ?
|
|
5157
|
+
typeof e == "string" ? $.unRegister(this, e) : e instanceof xe && $.unRegister(this, e.pluginName);
|
|
5103
5158
|
}
|
|
5104
5159
|
}, {
|
|
5105
5160
|
key: "unRegisterPlugin",
|
|
@@ -5111,7 +5166,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5111
5166
|
key: "removePluginFromConfig",
|
|
5112
5167
|
value: function(e) {
|
|
5113
5168
|
var i;
|
|
5114
|
-
if (typeof e == "string" ? i = e : e instanceof
|
|
5169
|
+
if (typeof e == "string" ? i = e : e instanceof xe && (i = e.pluginName), !!i)
|
|
5115
5170
|
for (var n = this.config.plugins.length - 1; n > -1; n--) {
|
|
5116
5171
|
var s = this.config.plugins[n];
|
|
5117
5172
|
if (s.pluginName.toLowerCase() === i.toLowerCase()) {
|
|
@@ -5123,12 +5178,12 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5123
5178
|
}, {
|
|
5124
5179
|
key: "plugins",
|
|
5125
5180
|
get: function() {
|
|
5126
|
-
return
|
|
5181
|
+
return $.getPlugins(this);
|
|
5127
5182
|
}
|
|
5128
5183
|
}, {
|
|
5129
5184
|
key: "getPlugin",
|
|
5130
5185
|
value: function(e) {
|
|
5131
|
-
var i =
|
|
5186
|
+
var i = $.findPlugin(this, e);
|
|
5132
5187
|
return i && i.pluginName ? i : null;
|
|
5133
5188
|
}
|
|
5134
5189
|
}, {
|
|
@@ -5162,7 +5217,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5162
5217
|
value: function(e) {
|
|
5163
5218
|
var i = this;
|
|
5164
5219
|
if (!(this.state > B.ATTACHING))
|
|
5165
|
-
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(B.ATTACHING), this._registerPlugins(!1),
|
|
5220
|
+
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(B.ATTACHING), this._registerPlugins(!1), $.beforeInit(this).then(function() {
|
|
5166
5221
|
if (i.config) {
|
|
5167
5222
|
e || (e = i.url || i.config.url);
|
|
5168
5223
|
var n = i._preProcessUrl(e), s = i._startInit(n.url);
|
|
@@ -5181,9 +5236,9 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5181
5236
|
this.__startTime = l;
|
|
5182
5237
|
var u = this.paused && !this.isError;
|
|
5183
5238
|
return this.src = s, new Promise(function(c, h) {
|
|
5184
|
-
var d = function(
|
|
5185
|
-
n.off("timeupdate",
|
|
5186
|
-
},
|
|
5239
|
+
var d = function(v) {
|
|
5240
|
+
n.off("timeupdate", p), n.off("canplay", p), h(v);
|
|
5241
|
+
}, p = function() {
|
|
5187
5242
|
n.duration > 0 && n.__startTime > 0 && (n.currentTime = n.__startTime, n.__startTime = -1), u && n.pause(), n.off("error", d), c(!0);
|
|
5188
5243
|
};
|
|
5189
5244
|
if (n.once("error", d), !s) {
|
|
@@ -5193,7 +5248,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5193
5248
|
});
|
|
5194
5249
|
return;
|
|
5195
5250
|
}
|
|
5196
|
-
|
|
5251
|
+
M.os.isAndroid ? n.once("timeupdate", p) : n.once("canplay", p), n.play();
|
|
5197
5252
|
});
|
|
5198
5253
|
}
|
|
5199
5254
|
}, {
|
|
@@ -5206,38 +5261,38 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5206
5261
|
value: function() {
|
|
5207
5262
|
var e = this;
|
|
5208
5263
|
if (!this.hasStart && this.state < B.ATTACHED) {
|
|
5209
|
-
this.removeClass(
|
|
5264
|
+
this.removeClass(k.NO_START), this.addClass(k.ENTER), this.start(), this._useAutoplay = !0;
|
|
5210
5265
|
return;
|
|
5211
5266
|
}
|
|
5212
|
-
this.state < B.RUNNING && (this.removeClass(
|
|
5213
|
-
var i = L(
|
|
5267
|
+
this.state < B.RUNNING && (this.removeClass(k.NO_START), !this.isCanplay && this.addClass(k.ENTER));
|
|
5268
|
+
var i = D(L(r.prototype), "play", this).call(this);
|
|
5214
5269
|
return i !== void 0 && i && i.then ? i.then(function() {
|
|
5215
|
-
e.removeClass(
|
|
5270
|
+
e.removeClass(k.NOT_ALLOW_AUTOPLAY), e.addClass(k.PLAYING), e.state < B.RUNNING && (N.logInfo(">>>>playPromise.then"), e.setState(B.RUNNING), e.emit(Me));
|
|
5216
5271
|
}).catch(function(n) {
|
|
5217
5272
|
if (N.logWarn(">>>>playPromise.catch", n.name), e.media && e.media.error) {
|
|
5218
|
-
e.onError(), e.removeClass(
|
|
5273
|
+
e.onError(), e.removeClass(k.ENTER);
|
|
5219
5274
|
return;
|
|
5220
5275
|
}
|
|
5221
5276
|
n.name === "NotAllowedError" && (e._errorTimer = f.setTimeout(e, function() {
|
|
5222
|
-
e._errorTimer = null, e.emit(ii), e.addClass(
|
|
5277
|
+
e._errorTimer = null, e.emit(ii), e.addClass(k.NOT_ALLOW_AUTOPLAY), e.removeClass(k.ENTER), e.pause(), e.setState(B.NOTALLOW);
|
|
5223
5278
|
}, 0));
|
|
5224
|
-
}) : (N.logWarn("video.play not return promise"), this.state < B.RUNNING && (this.setState(B.RUNNING), this.removeClass(
|
|
5279
|
+
}) : (N.logWarn("video.play not return promise"), this.state < B.RUNNING && (this.setState(B.RUNNING), this.removeClass(k.NOT_ALLOW_AUTOPLAY), this.removeClass(k.NO_START), this.removeClass(k.ENTER), this.addClass(k.PLAYING), this.emit(Me))), i;
|
|
5225
5280
|
}
|
|
5226
5281
|
}, {
|
|
5227
5282
|
key: "mediaPause",
|
|
5228
5283
|
value: function() {
|
|
5229
|
-
L(
|
|
5284
|
+
D(L(r.prototype), "pause", this).call(this);
|
|
5230
5285
|
}
|
|
5231
5286
|
}, {
|
|
5232
5287
|
key: "videoPause",
|
|
5233
5288
|
value: function() {
|
|
5234
|
-
L(
|
|
5289
|
+
D(L(r.prototype), "pause", this).call(this);
|
|
5235
5290
|
}
|
|
5236
5291
|
}, {
|
|
5237
5292
|
key: "play",
|
|
5238
5293
|
value: function() {
|
|
5239
5294
|
var e = this;
|
|
5240
|
-
return this.removeClass(
|
|
5295
|
+
return this.removeClass(k.PAUSED), pe(this, "play", function() {
|
|
5241
5296
|
return e.mediaPlay();
|
|
5242
5297
|
});
|
|
5243
5298
|
}
|
|
@@ -5246,7 +5301,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5246
5301
|
value: function() {
|
|
5247
5302
|
var e = this;
|
|
5248
5303
|
pe(this, "pause", function() {
|
|
5249
|
-
L(
|
|
5304
|
+
D(L(r.prototype), "pause", e).call(e);
|
|
5250
5305
|
});
|
|
5251
5306
|
}
|
|
5252
5307
|
}, {
|
|
@@ -5255,8 +5310,8 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5255
5310
|
var n = this;
|
|
5256
5311
|
if (!(!this.media || Number.isNaN(Number(e)) || !this.hasStart)) {
|
|
5257
5312
|
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(
|
|
5313
|
+
e = e < 0 ? 0 : e > this.duration ? parseInt(this.duration, 10) : e, !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1), this._onceSeekCanplay && this.off(_e, this._onceSeekCanplay), this._onceSeekCanplay = function() {
|
|
5314
|
+
switch (n.removeClass(k.ENTER), n.isSeeking = !1, c) {
|
|
5260
5315
|
case "play":
|
|
5261
5316
|
n.play();
|
|
5262
5317
|
break;
|
|
@@ -5267,7 +5322,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5267
5322
|
n._isPauseBeforeSeek > 1 || n.paused ? n.pause() : n.play();
|
|
5268
5323
|
}
|
|
5269
5324
|
n._isPauseBeforeSeek = 0, n._onceSeekCanplay = null;
|
|
5270
|
-
}, this.once(
|
|
5325
|
+
}, this.once(_e, this._onceSeekCanplay), this.state < B.RUNNING ? (this.removeClass(k.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
|
|
5271
5326
|
}
|
|
5272
5327
|
}
|
|
5273
5328
|
}, {
|
|
@@ -5309,15 +5364,15 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5309
5364
|
value: function() {
|
|
5310
5365
|
this.load(), this.reloadFunc = function() {
|
|
5311
5366
|
this.play();
|
|
5312
|
-
}, this.once(
|
|
5367
|
+
}, this.once(ke, this.reloadFunc);
|
|
5313
5368
|
}
|
|
5314
5369
|
}, {
|
|
5315
5370
|
key: "resetState",
|
|
5316
5371
|
value: function() {
|
|
5317
|
-
var e = this, i =
|
|
5318
|
-
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0,
|
|
5319
|
-
e.removeClass(
|
|
5320
|
-
}), this.addClass(
|
|
5372
|
+
var e = this, i = k.NOT_ALLOW_AUTOPLAY, n = k.PLAYING, s = k.NO_START, l = k.PAUSED, u = k.REPLAY, c = k.ENTER, h = k.ENDED, d = k.ERROR, p = k.LOADING, g = [i, n, s, l, u, c, h, d, p];
|
|
5373
|
+
this.hasStart = !1, this.isError = !1, this._useAutoplay = !1, this.mediaPause(), this._accPlayed.acc = 0, this._accPlayed.t = 0, this._accPlayed.loopAcc = 0, g.forEach(function(v) {
|
|
5374
|
+
e.removeClass(v);
|
|
5375
|
+
}), this.addClass(k.NO_START), this.emit(bt);
|
|
5321
5376
|
}
|
|
5322
5377
|
}, {
|
|
5323
5378
|
key: "reset",
|
|
@@ -5339,7 +5394,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5339
5394
|
value: function() {
|
|
5340
5395
|
var e, i = this, n = this.innerContainer, s = this.root, l = this.media;
|
|
5341
5396
|
if (!(!s || !l)) {
|
|
5342
|
-
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(
|
|
5397
|
+
if (this.hasStart = !1, this._useAutoplay = !1, s.removeAttribute(Re), this.updateAcc("destroy"), this._unbindEvents(), this._detachSourceEvents(this.media), f.clearAllTimers(this), this.emit(ni), (e = Ce) === null || e === void 0 || e.remove(this), $.destroy(this), gn(this), D(L(r.prototype), "destroy", this).call(this), this.fullscreen && this._fullscreenEl === this.root && this.exitFullscreen(), n)
|
|
5343
5398
|
for (var u = n.children, c = 0; c < u.length; c++)
|
|
5344
5399
|
n.removeChild(u[c]);
|
|
5345
5400
|
!n && l instanceof window.Node && s.contains(l) && s.removeChild(l), ["topBar", "leftBar", "rightBar", "innerContainer"].map(function(d) {
|
|
@@ -5357,8 +5412,8 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5357
5412
|
key: "replay",
|
|
5358
5413
|
value: function() {
|
|
5359
5414
|
var e = this;
|
|
5360
|
-
this.removeClass(
|
|
5361
|
-
e.once(
|
|
5415
|
+
this.removeClass(k.ENDED), this.currentTime = 0, this.isSeeking = !1, pe(this, "replay", function() {
|
|
5416
|
+
e.once(_e, function() {
|
|
5362
5417
|
var i = e.mediaPlay();
|
|
5363
5418
|
i && i.catch && i.catch(function(n) {
|
|
5364
5419
|
console.log(n);
|
|
@@ -5370,7 +5425,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5370
5425
|
key: "retry",
|
|
5371
5426
|
value: function() {
|
|
5372
5427
|
var e = this;
|
|
5373
|
-
this.removeClass(
|
|
5428
|
+
this.removeClass(k.ERROR), this.addClass(k.LOADING), pe(this, "retry", function() {
|
|
5374
5429
|
var i = e.currentTime, n = e.config.url, s = f.isMSE(e.media) ? {
|
|
5375
5430
|
url: n
|
|
5376
5431
|
} : e._preProcessUrl(n);
|
|
@@ -5382,12 +5437,12 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5382
5437
|
}, {
|
|
5383
5438
|
key: "changeFullStyle",
|
|
5384
5439
|
value: function(e, i, n, s) {
|
|
5385
|
-
e && (s || (s =
|
|
5440
|
+
e && (s || (s = k.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
5441
|
}
|
|
5387
5442
|
}, {
|
|
5388
5443
|
key: "recoverFullStyle",
|
|
5389
5444
|
value: function(e, i, n, s) {
|
|
5390
|
-
s || (s =
|
|
5445
|
+
s || (s = k.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
5446
|
}
|
|
5392
5447
|
}, {
|
|
5393
5448
|
key: "getFullscreen",
|
|
@@ -5439,7 +5494,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5439
5494
|
value: function() {
|
|
5440
5495
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5441
5496
|
this.isRotateFullscreen ? this.exitRotateFullscreen() : this.fullscreen && this.exitFullscreen();
|
|
5442
|
-
var i = e ? "".concat(
|
|
5497
|
+
var i = e ? "".concat(k.INNER_FULLSCREEN, " ").concat(k.CSS_FULLSCREEN) : k.CSS_FULLSCREEN;
|
|
5443
5498
|
this.changeFullStyle(this.root, e, i);
|
|
5444
5499
|
var n = this.config.fullscreen, s = n === void 0 ? {} : n, l = s.useCssFullscreen === !0 || typeof s.useCssFullscreen == "function" && s.useCssFullscreen();
|
|
5445
5500
|
l && (this.fullscreen = !0, this.emit(ge, !0)), this._cssfullscreenEl = e, this.cssfullscreen = !0, this.emit(ht, !0);
|
|
@@ -5447,7 +5502,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5447
5502
|
}, {
|
|
5448
5503
|
key: "exitCssFullscreen",
|
|
5449
5504
|
value: function() {
|
|
5450
|
-
var e = this._cssfullscreenEl ? "".concat(
|
|
5505
|
+
var e = this._cssfullscreenEl ? "".concat(k.INNER_FULLSCREEN, " ").concat(k.CSS_FULLSCREEN) : k.CSS_FULLSCREEN;
|
|
5451
5506
|
if (!this.fullscreen)
|
|
5452
5507
|
this.recoverFullStyle(this.root, this._cssfullscreenEl, e);
|
|
5453
5508
|
else {
|
|
@@ -5461,14 +5516,14 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5461
5516
|
value: function() {
|
|
5462
5517
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;
|
|
5463
5518
|
this.cssfullscreen && this.exitCssFullscreen(e);
|
|
5464
|
-
var i = e ? "".concat(
|
|
5465
|
-
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i,
|
|
5519
|
+
var i = e ? "".concat(k.INNER_FULLSCREEN, " ").concat(k.ROTATE_FULLSCREEN) : k.ROTATE_FULLSCREEN;
|
|
5520
|
+
this._fullscreenEl = e || this.root, this.changeFullStyle(this.root, e, i, k.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(ge, !0);
|
|
5466
5521
|
}
|
|
5467
5522
|
}, {
|
|
5468
5523
|
key: "exitRotateFullscreen",
|
|
5469
5524
|
value: function(e) {
|
|
5470
|
-
var i = this._fullscreenEl !== this.root ? "".concat(
|
|
5471
|
-
this.recoverFullStyle(this.root, this._fullscreenEl, i,
|
|
5525
|
+
var i = this._fullscreenEl !== this.root ? "".concat(k.INNER_FULLSCREEN, " ").concat(k.ROTATE_FULLSCREEN) : k.ROTATE_FULLSCREEN;
|
|
5526
|
+
this.recoverFullStyle(this.root, this._fullscreenEl, i, k.PARENT_ROTATE_FULLSCREEN), this.isRotateFullscreen = !1, this.fullscreen = !1, this.setRotateDeg(0), this.emit(ge, !1), this._rootStyle && (this.root.style.style = this._rootStyle, this._rootStyle = !1);
|
|
5472
5527
|
}
|
|
5473
5528
|
}, {
|
|
5474
5529
|
key: "setRotateDeg",
|
|
@@ -5513,7 +5568,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5513
5568
|
autoHide: !0,
|
|
5514
5569
|
delay: 3e3
|
|
5515
5570
|
}, n = this.innerStates;
|
|
5516
|
-
if (this.isActive = !0, this.removeClass(
|
|
5571
|
+
if (this.isActive = !0, this.removeClass(k.INACTIVE), this._clearUserTimer(), i.isLock !== void 0 && (n.isActiveLocked = i.isLock), i.autoHide === !1 || i.isLock === !0 || n.isActiveLocked) {
|
|
5517
5572
|
this._clearUserTimer();
|
|
5518
5573
|
return;
|
|
5519
5574
|
}
|
|
@@ -5528,7 +5583,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5528
5583
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = e.ignorePaused, n = i === void 0 ? !1 : i;
|
|
5529
5584
|
if (!this.innerStates.isActiveLocked) {
|
|
5530
5585
|
var s = this.config.closePauseVideoFocus;
|
|
5531
|
-
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(
|
|
5586
|
+
this.isActive = !1, (n || s || !this.paused && !this.ended) && this.addClass(k.INACTIVE);
|
|
5532
5587
|
}
|
|
5533
5588
|
}
|
|
5534
5589
|
}, {
|
|
@@ -5539,7 +5594,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5539
5594
|
}, {
|
|
5540
5595
|
key: "onCanplay",
|
|
5541
5596
|
value: function() {
|
|
5542
|
-
this.removeClass(
|
|
5597
|
+
this.removeClass(k.ENTER), this.removeClass(k.ERROR), this.removeClass(k.LOADING), this.isCanplay = !0, this.waitTimer && f.clearTimeout(this, this.waitTimer);
|
|
5543
5598
|
}
|
|
5544
5599
|
}, {
|
|
5545
5600
|
key: "onLoadeddata",
|
|
@@ -5549,44 +5604,44 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5549
5604
|
}, {
|
|
5550
5605
|
key: "onLoadstart",
|
|
5551
5606
|
value: function() {
|
|
5552
|
-
this.removeClass(
|
|
5607
|
+
this.removeClass(k.ERROR), this.isCanplay = !1;
|
|
5553
5608
|
}
|
|
5554
5609
|
}, {
|
|
5555
5610
|
key: "onPlay",
|
|
5556
5611
|
value: function() {
|
|
5557
|
-
this.state === B.ENDED && this.setState(B.RUNNING), this.removeClass(
|
|
5612
|
+
this.state === B.ENDED && this.setState(B.RUNNING), this.removeClass(k.PAUSED), this.ended && this.removeClass(k.ENDED), !this.config.closePlayVideoFocus && this.focus();
|
|
5558
5613
|
}
|
|
5559
5614
|
}, {
|
|
5560
5615
|
key: "onPause",
|
|
5561
5616
|
value: function() {
|
|
5562
|
-
this.addClass(
|
|
5617
|
+
this.addClass(k.PAUSED), this.updateAcc("pause"), this.config.closePauseVideoFocus || (this._clearUserTimer(), this.focus());
|
|
5563
5618
|
}
|
|
5564
5619
|
}, {
|
|
5565
5620
|
key: "onEnded",
|
|
5566
5621
|
value: function() {
|
|
5567
|
-
this.updateAcc("ended"), this.addClass(
|
|
5622
|
+
this.updateAcc("ended"), this.addClass(k.ENDED), this.setState(B.ENDED);
|
|
5568
5623
|
}
|
|
5569
5624
|
}, {
|
|
5570
5625
|
key: "onError",
|
|
5571
5626
|
value: function() {
|
|
5572
|
-
this.isError = !0, this.updateAcc("error"), this.removeClass(
|
|
5627
|
+
this.isError = !0, this.updateAcc("error"), this.removeClass(k.NOT_ALLOW_AUTOPLAY), this.removeClass(k.NO_START), this.removeClass(k.ENTER), this.removeClass(k.LOADING), this.addClass(k.ERROR);
|
|
5573
5628
|
}
|
|
5574
5629
|
}, {
|
|
5575
5630
|
key: "onSeeking",
|
|
5576
5631
|
value: function() {
|
|
5577
|
-
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(
|
|
5632
|
+
this.isSeeking || this.updateAcc("seeking"), this.isSeeking = !0, this.addClass(k.SEEKING);
|
|
5578
5633
|
}
|
|
5579
5634
|
}, {
|
|
5580
5635
|
key: "onSeeked",
|
|
5581
5636
|
value: function() {
|
|
5582
|
-
this.isSeeking = !1, this.waitTimer && f.clearTimeout(this, this.waitTimer), this.removeClass(
|
|
5637
|
+
this.isSeeking = !1, this.waitTimer && f.clearTimeout(this, this.waitTimer), this.removeClass(k.LOADING), this.removeClass(k.SEEKING);
|
|
5583
5638
|
}
|
|
5584
5639
|
}, {
|
|
5585
5640
|
key: "onWaiting",
|
|
5586
5641
|
value: function() {
|
|
5587
5642
|
var e = this;
|
|
5588
5643
|
this.waitTimer && f.clearTimeout(this, this.waitTimer), this.updateAcc("waiting"), this.waitTimer = f.setTimeout(this, function() {
|
|
5589
|
-
e.addClass(
|
|
5644
|
+
e.addClass(k.LOADING), e.emit(nn), f.clearTimeout(e, e.waitTimer), e.waitTimer = null;
|
|
5590
5645
|
}, this.config.minWaitDelay);
|
|
5591
5646
|
}
|
|
5592
5647
|
}, {
|
|
@@ -5594,7 +5649,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5594
5649
|
value: function() {
|
|
5595
5650
|
var e = this;
|
|
5596
5651
|
this.isError = !1;
|
|
5597
|
-
var i =
|
|
5652
|
+
var i = k.NO_START, n = k.PAUSED, s = k.ENDED, l = k.ERROR, u = k.REPLAY, c = k.LOADING, h = [i, n, s, l, u, c];
|
|
5598
5653
|
h.forEach(function(d) {
|
|
5599
5654
|
e.removeClass(d);
|
|
5600
5655
|
}), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
@@ -5602,7 +5657,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5602
5657
|
}, {
|
|
5603
5658
|
key: "onTimeupdate",
|
|
5604
5659
|
value: function() {
|
|
5605
|
-
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(
|
|
5660
|
+
!this._videoHeight && this.media.videoHeight && this.resize(), (this.waitTimer || this.hasClass(k.LOADING)) && this.media.readyState > 2 && (this.removeClass(k.LOADING), f.clearTimeout(this, this.waitTimer), this.waitTimer = null), !this.paused && this.state === B.NOTALLOW && this.duration && (this.setState(B.RUNNING), this.emit(Me)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5606
5661
|
}
|
|
5607
5662
|
}, {
|
|
5608
5663
|
key: "onVolumechange",
|
|
@@ -5646,8 +5701,8 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5646
5701
|
}, n = i || {}, s = n.startDiff, l = s === void 0 ? 0 : s, u = n.endDiff, c = u === void 0 ? 0 : u, h = this.media.buffered;
|
|
5647
5702
|
if (!h || h.length === 0 || !this.duration)
|
|
5648
5703
|
return !0;
|
|
5649
|
-
for (var d = e || this.media.currentTime || 0.2,
|
|
5650
|
-
if (h.start(
|
|
5704
|
+
for (var d = e || this.media.currentTime || 0.2, p = h.length, g = 0; g < p; g++)
|
|
5705
|
+
if (h.start(g) + l <= d && h.end(g) - c > d)
|
|
5651
5706
|
return !0;
|
|
5652
5707
|
return !1;
|
|
5653
5708
|
}
|
|
@@ -5661,13 +5716,13 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5661
5716
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
5662
5717
|
var h = {
|
|
5663
5718
|
rotate: u
|
|
5664
|
-
}, d = 0,
|
|
5665
|
-
if (
|
|
5666
|
-
|
|
5667
|
-
else if (
|
|
5668
|
-
|
|
5669
|
-
var
|
|
5670
|
-
|
|
5719
|
+
}, d = 0, p = 0, g = 1, v = Math.abs(u / 90), y = this.root, C = this.innerContainer, b = y.offsetWidth, w = C ? C.offsetHeight : y.offsetHeight, A = w, F = b;
|
|
5720
|
+
if (v % 2 === 0)
|
|
5721
|
+
g = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = g, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = v === 2 ? 0 - d : d, p = n > 0 ? (100 - l) / 2 - n : 0, h.x = v === 2 ? 0 - p : p, this.media.style.width = "".concat(F, "px"), this.media.style.height = "".concat(A, "px");
|
|
5722
|
+
else if (v % 2 === 1) {
|
|
5723
|
+
F = w, A = b;
|
|
5724
|
+
var H = w - b;
|
|
5725
|
+
p = -H / 2 / F * 100, h.x = v === 3 ? p + i / 2 : p - i / 2, d = H / 2 / A * 100, h.y = v === 3 ? d + n / 2 : d - n / 2, h.scale = g, this.media.style.width = "".concat(F, "px"), this.media.style.height = "".concat(A, "px");
|
|
5671
5726
|
}
|
|
5672
5727
|
var R = f.getTransformStyle(h, this.media.style.transform || this.media.style.webkitTransform);
|
|
5673
5728
|
this.media.style.transform = R, this.media.style.webkitTransform = R;
|
|
@@ -5718,18 +5773,18 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5718
5773
|
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
5719
5774
|
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
5720
5775
|
this._videoHeight = l, this._videoWidth = s;
|
|
5721
|
-
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0,
|
|
5722
|
-
c === "auto" && y >
|
|
5723
|
-
e.root.style[
|
|
5724
|
-
}), (h === "fillHeight" && y <
|
|
5725
|
-
var
|
|
5726
|
-
videoScale:
|
|
5727
|
-
vWidth:
|
|
5776
|
+
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, p = i.width, g = i.height - d, v = parseInt(s / l * 1e3, 10), y = parseInt(p / g * 1e3, 10), C = p, b = g, w = {};
|
|
5777
|
+
c === "auto" && y > v || c === "fixWidth" ? (b = p / v * 1e3, this.config.fluid ? w.paddingTop = "".concat(b * 100 / C, "%") : w.height = "".concat(b + d, "px")) : (c === "auto" && y < v || c === "fixHeight") && (C = v * g / 1e3, w.width = "".concat(C, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(w).forEach(function(F) {
|
|
5778
|
+
e.root.style[F] = w[F];
|
|
5779
|
+
}), (h === "fillHeight" && y < v || h === "fillWidth" && y > v) && this.setAttribute("data-xgfill", "cover");
|
|
5780
|
+
var A = {
|
|
5781
|
+
videoScale: v,
|
|
5782
|
+
vWidth: C,
|
|
5728
5783
|
vHeight: b,
|
|
5729
|
-
cWidth:
|
|
5784
|
+
cWidth: C,
|
|
5730
5785
|
cHeight: b + d
|
|
5731
5786
|
};
|
|
5732
|
-
this.resizePosition(), this.emit(
|
|
5787
|
+
this.resizePosition(), this.emit(Se, A);
|
|
5733
5788
|
}
|
|
5734
5789
|
}
|
|
5735
5790
|
}
|
|
@@ -5827,7 +5882,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5827
5882
|
console.error("Sorry, set lang fail, because the language [".concat(e, "] is not supported now, list of all supported languages is [").concat(Ye.langKeys.join(), "] "));
|
|
5828
5883
|
return;
|
|
5829
5884
|
}
|
|
5830
|
-
this.config.lang = e,
|
|
5885
|
+
this.config.lang = e, $.setLang(e, this);
|
|
5831
5886
|
}
|
|
5832
5887
|
}, {
|
|
5833
5888
|
key: "i18n",
|
|
@@ -5869,18 +5924,18 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5869
5924
|
}, {
|
|
5870
5925
|
key: "readyState",
|
|
5871
5926
|
get: function() {
|
|
5872
|
-
return L(
|
|
5927
|
+
return D(L(r.prototype), "readyState", this);
|
|
5873
5928
|
}
|
|
5874
5929
|
}, {
|
|
5875
5930
|
key: "error",
|
|
5876
5931
|
get: function() {
|
|
5877
|
-
var e = L(
|
|
5932
|
+
var e = D(L(r.prototype), "error", this);
|
|
5878
5933
|
return this.i18n[e] || e;
|
|
5879
5934
|
}
|
|
5880
5935
|
}, {
|
|
5881
5936
|
key: "networkState",
|
|
5882
5937
|
get: function() {
|
|
5883
|
-
return L(
|
|
5938
|
+
return D(L(r.prototype), "networkState", this);
|
|
5884
5939
|
}
|
|
5885
5940
|
}, {
|
|
5886
5941
|
key: "fullscreenChanging",
|
|
@@ -5974,7 +6029,7 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5974
6029
|
key: "setUserActive",
|
|
5975
6030
|
value: function(e, i) {
|
|
5976
6031
|
var n;
|
|
5977
|
-
typeof i == "boolean" && i !== this.muted && (this.addInnerOP("volumechange"), f.typeOf(i) === Boolean && (this.muted = i)), (n =
|
|
6032
|
+
typeof i == "boolean" && i !== this.muted && (this.addInnerOP("volumechange"), f.typeOf(i) === Boolean && (this.muted = i)), (n = Ce) === null || n === void 0 || n.setActive(this.playerId, e);
|
|
5978
6033
|
}
|
|
5979
6034
|
}], [{
|
|
5980
6035
|
key: "debugger",
|
|
@@ -5987,32 +6042,32 @@ var ko = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, ke = null, Tt = /
|
|
|
5987
6042
|
}, {
|
|
5988
6043
|
key: "instManager",
|
|
5989
6044
|
get: function() {
|
|
5990
|
-
return
|
|
6045
|
+
return Ce;
|
|
5991
6046
|
},
|
|
5992
6047
|
set: function(e) {
|
|
5993
|
-
|
|
6048
|
+
Ce = e;
|
|
5994
6049
|
}
|
|
5995
6050
|
}, {
|
|
5996
6051
|
key: "getCurrentUserActivePlayerId",
|
|
5997
6052
|
value: function() {
|
|
5998
6053
|
var e;
|
|
5999
|
-
return (e =
|
|
6054
|
+
return (e = Ce) === null || e === void 0 ? void 0 : e.getActiveId();
|
|
6000
6055
|
}
|
|
6001
6056
|
}, {
|
|
6002
6057
|
key: "setCurrentUserActive",
|
|
6003
6058
|
value: function(e, i) {
|
|
6004
6059
|
var n;
|
|
6005
|
-
(n =
|
|
6060
|
+
(n = Ce) === null || n === void 0 || n.setActive(e, i);
|
|
6006
6061
|
}
|
|
6007
6062
|
}, {
|
|
6008
6063
|
key: "isHevcSupported",
|
|
6009
6064
|
value: function() {
|
|
6010
|
-
return
|
|
6065
|
+
return M.isHevcSupported();
|
|
6011
6066
|
}
|
|
6012
6067
|
}, {
|
|
6013
6068
|
key: "probeConfigSupported",
|
|
6014
6069
|
value: function(e) {
|
|
6015
|
-
return
|
|
6070
|
+
return M.probeConfigSupported(e);
|
|
6016
6071
|
}
|
|
6017
6072
|
}, {
|
|
6018
6073
|
key: "install",
|
|
@@ -6032,7 +6087,7 @@ Tt.instManager = vn.getInstance();
|
|
|
6032
6087
|
function Y() {
|
|
6033
6088
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
6034
6089
|
}
|
|
6035
|
-
var
|
|
6090
|
+
var we = {
|
|
6036
6091
|
LOAD_START: "loadstart",
|
|
6037
6092
|
LOADED_DATA: "loadeddata",
|
|
6038
6093
|
FIRST_FRAME: "firstFrame",
|
|
@@ -6048,43 +6103,43 @@ var Ce = {
|
|
|
6048
6103
|
T(this, r);
|
|
6049
6104
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
6050
6105
|
i[n] = arguments[n];
|
|
6051
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
6106
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "_onTimeupdate", function() {
|
|
6052
6107
|
t._state.isTimeUpdate = !0, t._state.autoplayStart && (N.logInfo("[xgLogger]".concat(t.player.playerId, " _onTimeupdate")), t._sendFF("onTimeupdate"));
|
|
6053
|
-
}), _(
|
|
6108
|
+
}), _(m(t), "_onAutoplayStart", function() {
|
|
6054
6109
|
N.logInfo("[xgLogger]".concat(t.player.playerId, " _onAutoplayStart")), t._state.autoplayStart = !0, t.vt && t._sendFF("onAutoplayStart");
|
|
6055
|
-
}), _(
|
|
6110
|
+
}), _(m(t), "_onReset", function() {
|
|
6056
6111
|
t._state = {
|
|
6057
6112
|
autoplayStart: !1,
|
|
6058
6113
|
isFFLoading: !1,
|
|
6059
6114
|
isTimeUpdate: !1,
|
|
6060
6115
|
isFFSend: !1,
|
|
6061
6116
|
isLs: !1
|
|
6062
|
-
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = Y(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer && f.clearTimeout(
|
|
6063
|
-
}), _(
|
|
6064
|
-
t.seekingStart || (t.suspendWaitingStatus("seek"), t.seekingStart = Y(), t.emitLog(
|
|
6117
|
+
}, t.vt = 0, t.pt = 0, t.fvt = 0, t.newPointTime = Y(), t.loadedCostTime = 0, t.startCostTime = 0, t._isSeeking = !1, t.seekingStart = 0, t.waitingStart = 0, t.fixedWaitingStart = 0, t._isWaiting = !1, t._waitTimer && f.clearTimeout(m(t), t._waitTimer), t._waittTimer && f.clearTimeout(m(t), t._waittTimer), t._waitTimer = null, t._waittTimer = null, t._waitType = 0;
|
|
6118
|
+
}), _(m(t), "_onSeeking", function() {
|
|
6119
|
+
t.seekingStart || (t.suspendWaitingStatus("seek"), t.seekingStart = Y(), t.emitLog(we.SEEK_START, {
|
|
6065
6120
|
start: Y()
|
|
6066
6121
|
}));
|
|
6067
|
-
}), _(
|
|
6122
|
+
}), _(m(t), "_onSeeked", function() {
|
|
6068
6123
|
t.suspendSeekingStatus("seeked");
|
|
6069
|
-
}), _(
|
|
6070
|
-
t._isWaiting || t.vt || (t._isWaiting = !0, t.waitingStart = Y(), t.fixedWaitingStart = Y(), t._waitType = 1, t.emitLog(
|
|
6124
|
+
}), _(m(t), "_onWaitingLoadStart", function() {
|
|
6125
|
+
t._isWaiting || t.vt || (t._isWaiting = !0, t.waitingStart = Y(), t.fixedWaitingStart = Y(), t._waitType = 1, t.emitLog(we.WAIT_START, {
|
|
6071
6126
|
fixedStart: t.fixedWaitingStart,
|
|
6072
6127
|
start: t.waitingStart,
|
|
6073
6128
|
type: 1,
|
|
6074
6129
|
endType: "loadstart"
|
|
6075
6130
|
}));
|
|
6076
|
-
}), _(
|
|
6077
|
-
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = Y(), t._waitTimer = f.setTimeout(
|
|
6078
|
-
t._isWaiting && (t.waitingStart = Y(), f.clearTimeout(
|
|
6131
|
+
}), _(m(t), "_onWaiting", function() {
|
|
6132
|
+
t._isWaiting || !t.vt || (t._isWaiting = !0, t.vt ? t.seekingStart ? t._waitType = 2 : t._waitType = 0 : t._waitType = 1, t.fixedWaitingStart = Y(), t._waitTimer = f.setTimeout(m(t), function() {
|
|
6133
|
+
t._isWaiting && (t.waitingStart = Y(), f.clearTimeout(m(t), t._waitTimer), t._waitTimer = null, t._startWaitTimeout(), t.emitLog(we.WAIT_START, {
|
|
6079
6134
|
fixedStart: t.fixedWaitingStart,
|
|
6080
6135
|
start: t.waitingStart,
|
|
6081
6136
|
type: t._waitType,
|
|
6082
6137
|
endType: t._waitType === 2 ? "seek" : "playing"
|
|
6083
6138
|
}));
|
|
6084
6139
|
}, 200));
|
|
6085
|
-
}), _(
|
|
6140
|
+
}), _(m(t), "_onError", function() {
|
|
6086
6141
|
t.suspendSeekingStatus("error"), t.suspendWaitingStatus("error");
|
|
6087
|
-
}), _(
|
|
6142
|
+
}), _(m(t), "_onPlaying", function() {
|
|
6088
6143
|
t._isWaiting && t.suspendWaitingStatus("playing");
|
|
6089
6144
|
}), t;
|
|
6090
6145
|
}
|
|
@@ -6094,12 +6149,12 @@ var Ce = {
|
|
|
6094
6149
|
var e = this;
|
|
6095
6150
|
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = Y(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(Qt, function() {
|
|
6096
6151
|
var i = e._state, n = i.autoplayStart, s = i.isFFSend;
|
|
6097
|
-
e.startCostTime = Y() - e.newPointTime, N.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(
|
|
6098
|
-
}), this.on(
|
|
6152
|
+
e.startCostTime = Y() - e.newPointTime, N.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());
|
|
6153
|
+
}), this.on(ke, function() {
|
|
6099
6154
|
e.vt = Y(), e.fvt = e.vt - e.pt, e.loadedCostTime = e.vt - e.newPointTime;
|
|
6100
6155
|
var i = e._state, n = i.isTimeUpdate, s = i.isFFSend, l = i.autoplayStart;
|
|
6101
|
-
N.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(
|
|
6102
|
-
}), this.on(kt, this._onSeeking), this.on(
|
|
6156
|
+
N.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");
|
|
6157
|
+
}), this.on(kt, this._onSeeking), this.on(_e, this._onSeeked), this.on(ni, function() {
|
|
6103
6158
|
e.endState("destroy");
|
|
6104
6159
|
}), this.on(wt, function() {
|
|
6105
6160
|
e.endState("urlChange"), N.logInfo("[xgLogger]".concat(e.player.playerId, " URL_CHANGE")), e._state.isFFSend && e._onReset();
|
|
@@ -6110,14 +6165,14 @@ var Ce = {
|
|
|
6110
6165
|
}, {
|
|
6111
6166
|
key: "_initOnceEvents",
|
|
6112
6167
|
value: function() {
|
|
6113
|
-
this.off(
|
|
6168
|
+
this.off(Me, this._onAutoplayStart), this.off(re, this._onTimeupdate), this.once(Me, this._onAutoplayStart), this.once(re, this._onTimeupdate);
|
|
6114
6169
|
}
|
|
6115
6170
|
}, {
|
|
6116
6171
|
key: "_sendFF",
|
|
6117
6172
|
value: function(e) {
|
|
6118
6173
|
this.s = Y();
|
|
6119
6174
|
var i = this._state, n = i.isFFLoading, s = i.isFFSend;
|
|
6120
|
-
N.logInfo("[xgLogger]".concat(this.player.playerId, " _sendFF"), "".concat(e, " fvt:").concat(this.fvt, " isFFLoading:").concat(n, " !isFFSend:").concat(!s)), this.vt > 0 && n && !s && (N.logInfo("[xgLogger]".concat(this.player.playerId, " emitLog_firstFrame"), e), this._state.isFFLoading = !1, this._state.isFFSend = !0, this.emitLog(
|
|
6175
|
+
N.logInfo("[xgLogger]".concat(this.player.playerId, " _sendFF"), "".concat(e, " fvt:").concat(this.fvt, " isFFLoading:").concat(n, " !isFFSend:").concat(!s)), this.vt > 0 && n && !s && (N.logInfo("[xgLogger]".concat(this.player.playerId, " emitLog_firstFrame"), e), this._state.isFFLoading = !1, this._state.isFFSend = !0, this.emitLog(we.FIRST_FRAME, {
|
|
6121
6176
|
fvt: this.fvt,
|
|
6122
6177
|
costTime: this.fvt,
|
|
6123
6178
|
vt: this.vt,
|
|
@@ -6143,7 +6198,7 @@ var Ce = {
|
|
|
6143
6198
|
value: function(e) {
|
|
6144
6199
|
if (this.seekingStart) {
|
|
6145
6200
|
var i = Y(), n = i - this.seekingStart;
|
|
6146
|
-
this.seekingStart = 0, this.emitLog(
|
|
6201
|
+
this.seekingStart = 0, this.emitLog(we.SEEK_END, {
|
|
6147
6202
|
end: i,
|
|
6148
6203
|
costTime: n,
|
|
6149
6204
|
endType: e
|
|
@@ -6155,7 +6210,7 @@ var Ce = {
|
|
|
6155
6210
|
value: function(e) {
|
|
6156
6211
|
if (this._waitTimer && (f.clearTimeout(this, this._waitTimer), this._waitTimer = null), this._waittTimer && (f.clearTimeout(this, this._waittTimer), this._waittTimer = null), this._isWaiting = !1, !!this.waitingStart) {
|
|
6157
6212
|
var i = Y(), n = i - this.waitingStart, s = i - this.fixedWaitingStart, l = this.config.waitTimeout;
|
|
6158
|
-
this._isWaiting = !1, this.waitingStart = 0, this.fixedWaitingStart = 0, this.emitLog(
|
|
6213
|
+
this._isWaiting = !1, this.waitingStart = 0, this.fixedWaitingStart = 0, this.emitLog(we.WAIT_END, {
|
|
6159
6214
|
fixedCostTime: s > l ? l : s,
|
|
6160
6215
|
costTime: n > l ? l : n,
|
|
6161
6216
|
type: e === "loadeddata" ? 1 : this._waitType,
|
|
@@ -6190,7 +6245,7 @@ var Ce = {
|
|
|
6190
6245
|
};
|
|
6191
6246
|
}
|
|
6192
6247
|
}]), r;
|
|
6193
|
-
}(
|
|
6248
|
+
}(V);
|
|
6194
6249
|
function wo() {
|
|
6195
6250
|
return new DOMParser().parseFromString(`<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">
|
|
6196
6251
|
<path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>
|
|
@@ -6214,7 +6269,7 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6214
6269
|
key: "afterCreate",
|
|
6215
6270
|
value: function() {
|
|
6216
6271
|
var e = this;
|
|
6217
|
-
|
|
6272
|
+
V.insert(this.icons.replay, this.root, 0), this.__handleReplay = this.hook("replayClick", function() {
|
|
6218
6273
|
e.player.replay();
|
|
6219
6274
|
}, {
|
|
6220
6275
|
pre: function(n) {
|
|
@@ -6231,7 +6286,7 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6231
6286
|
i.setAttribute("transform", n);
|
|
6232
6287
|
}
|
|
6233
6288
|
}
|
|
6234
|
-
}), this.on(
|
|
6289
|
+
}), this.on(se, function() {
|
|
6235
6290
|
e.hide();
|
|
6236
6291
|
});
|
|
6237
6292
|
}
|
|
@@ -6280,7 +6335,7 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6280
6335
|
};
|
|
6281
6336
|
}
|
|
6282
6337
|
}]), r;
|
|
6283
|
-
}(
|
|
6338
|
+
}(V), To = /* @__PURE__ */ function(a) {
|
|
6284
6339
|
P(r, a);
|
|
6285
6340
|
var o = I(r);
|
|
6286
6341
|
function r() {
|
|
@@ -6315,13 +6370,13 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6315
6370
|
var e = this;
|
|
6316
6371
|
this.on(Be, function() {
|
|
6317
6372
|
e.isEndedShow && f.removeClass(e.root, "hide");
|
|
6318
|
-
}), this.config.hideCanplay ? (this.once(
|
|
6373
|
+
}), this.config.hideCanplay ? (this.once(re, function() {
|
|
6319
6374
|
e.onTimeUpdate();
|
|
6320
6375
|
}), this.on(wt, function() {
|
|
6321
|
-
f.removeClass(e.root, "hide"), f.addClass(e.root, "xg-showplay"), e.once(
|
|
6376
|
+
f.removeClass(e.root, "hide"), f.addClass(e.root, "xg-showplay"), e.once(re, function() {
|
|
6322
6377
|
e.onTimeUpdate();
|
|
6323
6378
|
});
|
|
6324
|
-
})) : this.on(
|
|
6379
|
+
})) : this.on(se, function() {
|
|
6325
6380
|
f.addClass(e.root, "hide");
|
|
6326
6381
|
});
|
|
6327
6382
|
}
|
|
@@ -6339,7 +6394,7 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6339
6394
|
key: "onTimeUpdate",
|
|
6340
6395
|
value: function() {
|
|
6341
6396
|
var e = this;
|
|
6342
|
-
this.player.currentTime ? f.removeClass(this.root, "xg-showplay") : this.once(
|
|
6397
|
+
this.player.currentTime ? f.removeClass(this.root, "xg-showplay") : this.once(re, function() {
|
|
6343
6398
|
e.onTimeUpdate();
|
|
6344
6399
|
});
|
|
6345
6400
|
}
|
|
@@ -6391,7 +6446,7 @@ var bo = /* @__PURE__ */ function(a) {
|
|
|
6391
6446
|
};
|
|
6392
6447
|
}
|
|
6393
6448
|
}]), r;
|
|
6394
|
-
}(
|
|
6449
|
+
}(V);
|
|
6395
6450
|
function oi() {
|
|
6396
6451
|
return new DOMParser().parseFromString(`<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
|
|
6397
6452
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
|
|
@@ -6428,11 +6483,11 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6428
6483
|
var o = I(r);
|
|
6429
6484
|
function r(t) {
|
|
6430
6485
|
var e;
|
|
6431
|
-
return T(this, r), e = o.call(this, t), _(
|
|
6486
|
+
return T(this, r), e = o.call(this, t), _(m(e), "onPlayerReset", function() {
|
|
6432
6487
|
e.autoPlayStart = !1;
|
|
6433
6488
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6434
6489
|
e.setAttr("data-state", "play"), f.removeClass(e.root, i), e.show();
|
|
6435
|
-
}), _(
|
|
6490
|
+
}), _(m(e), "onAutoplayStart", function() {
|
|
6436
6491
|
if (!e.autoPlayStart) {
|
|
6437
6492
|
var i = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6438
6493
|
f.addClass(e.root, i), e.autoPlayStart = !0, e.onPlayPause("play");
|
|
@@ -6445,10 +6500,10 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6445
6500
|
var e = this, i = this.player, n = this.playerConfig;
|
|
6446
6501
|
this.initIcons(), this.once(ti, function() {
|
|
6447
6502
|
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(
|
|
6503
|
+
}), this.on(Me, this.onAutoplayStart), n.autoplay || this.show(), this.on(ii, function() {
|
|
6449
6504
|
var s = e.config.mode === "auto" ? "auto-hide" : "hide";
|
|
6450
6505
|
e.setAttr("data-state", "play"), f.removeClass(e.root, s), e.show();
|
|
6451
|
-
}), this.on(
|
|
6506
|
+
}), this.on(se, function() {
|
|
6452
6507
|
e.onPlayPause("play");
|
|
6453
6508
|
}), this.on(Xe, function() {
|
|
6454
6509
|
e.onPlayPause("pause");
|
|
@@ -6598,7 +6653,7 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6598
6653
|
};
|
|
6599
6654
|
}
|
|
6600
6655
|
}]), r;
|
|
6601
|
-
}(
|
|
6656
|
+
}(V), xo = /* @__PURE__ */ function(a) {
|
|
6602
6657
|
P(r, a);
|
|
6603
6658
|
var o = I(r);
|
|
6604
6659
|
function r() {
|
|
@@ -6633,8 +6688,8 @@ var So = /* @__PURE__ */ function(a) {
|
|
|
6633
6688
|
};
|
|
6634
6689
|
}
|
|
6635
6690
|
}]), r;
|
|
6636
|
-
}(
|
|
6637
|
-
function
|
|
6691
|
+
}(V);
|
|
6692
|
+
function Ae(a, o, r) {
|
|
6638
6693
|
try {
|
|
6639
6694
|
return ' <div class="xg-tips '.concat(r ? "hide" : " ", '" lang-key="').concat(a.i18nKeys[o], `">
|
|
6640
6695
|
`).concat(a.i18n[o], `
|
|
@@ -6692,7 +6747,7 @@ var Ai = /* @__PURE__ */ function(a) {
|
|
|
6692
6747
|
};
|
|
6693
6748
|
}
|
|
6694
6749
|
}]), r;
|
|
6695
|
-
}(
|
|
6750
|
+
}(V);
|
|
6696
6751
|
function Li(a) {
|
|
6697
6752
|
var o = parseFloat(a), r = a.indexOf("%") === -1 && !Number.isNaN(o);
|
|
6698
6753
|
return r && o;
|
|
@@ -6727,10 +6782,10 @@ function Di(a) {
|
|
|
6727
6782
|
var i = li[e], n = o[i], s = parseFloat(n);
|
|
6728
6783
|
r[i] = Number.isNaN(s) ? 0 : s;
|
|
6729
6784
|
}
|
|
6730
|
-
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,
|
|
6731
|
-
|
|
6785
|
+
var l = r.paddingLeft + r.paddingRight, u = r.paddingTop + r.paddingBottom, c = r.marginLeft + r.marginRight, h = r.marginTop + r.marginBottom, d = r.borderLeftWidth + r.borderRightWidth, p = r.borderTopWidth + r.borderBottomWidth, g = t, v = Li(o.width);
|
|
6786
|
+
v !== !1 && (r.width = v + (g ? 0 : l + d));
|
|
6732
6787
|
var y = Li(o.height);
|
|
6733
|
-
return y !== !1 && (r.height = y + (
|
|
6788
|
+
return y !== !1 && (r.height = y + (g ? 0 : u + p)), r.innerWidth = r.width - (l + d), r.innerHeight = r.height - (u + p), r.outerWidth = r.width + c, r.outerHeight = r.height + h, r;
|
|
6734
6789
|
}
|
|
6735
6790
|
}
|
|
6736
6791
|
function Dt(a, o) {
|
|
@@ -6963,18 +7018,18 @@ var Rt = {
|
|
|
6963
7018
|
var o = I(r);
|
|
6964
7019
|
function r(t) {
|
|
6965
7020
|
var e;
|
|
6966
|
-
T(this, r), e = o.call(this, t), _(
|
|
7021
|
+
T(this, r), e = o.call(this, t), _(m(e), "onCancelClick", function(s) {
|
|
6967
7022
|
e.exitMini(), e.isClose = !0;
|
|
6968
|
-
}), _(
|
|
6969
|
-
var l =
|
|
7023
|
+
}), _(m(e), "onCenterClick", function(s) {
|
|
7024
|
+
var l = m(e), u = l.player;
|
|
6970
7025
|
u.paused ? u.play() : u.pause();
|
|
6971
|
-
}), _(
|
|
7026
|
+
}), _(m(e), "onScroll", function(s) {
|
|
6972
7027
|
if (!(!window.scrollY && window.scrollY !== 0 || Math.abs(window.scrollY - e.pos.scrollY) < 50)) {
|
|
6973
7028
|
var l = parseInt(f.getCss(e.player.root, "height"));
|
|
6974
7029
|
l += e.config.scrollTop, e.pos.scrollY = window.scrollY, window.scrollY > l + 5 ? !e.isMini && !e.isClose && e.getMini() : window.scrollY <= l && (e.isMini && e.exitMini(), e.isClose = !1);
|
|
6975
7030
|
}
|
|
6976
7031
|
}), e.isMini = !1, e.isClose = !1;
|
|
6977
|
-
var i =
|
|
7032
|
+
var i = m(e), n = i.config;
|
|
6978
7033
|
return e.pos = {
|
|
6979
7034
|
left: n.left < 0 ? window.innerWidth - n.width - 20 : n.left,
|
|
6980
7035
|
top: n.top < 0 ? window.innerHeight - n.height - 20 : n.top,
|
|
@@ -6994,7 +7049,7 @@ var Rt = {
|
|
|
6994
7049
|
var e = this;
|
|
6995
7050
|
this.initIcons(), this.on(Xe, function() {
|
|
6996
7051
|
e.setAttr("data-state", "pause");
|
|
6997
|
-
}), this.on(
|
|
7052
|
+
}), this.on(se, function() {
|
|
6998
7053
|
e.setAttr("data-state", "play");
|
|
6999
7054
|
});
|
|
7000
7055
|
}
|
|
@@ -7075,7 +7130,7 @@ var Rt = {
|
|
|
7075
7130
|
return `
|
|
7076
7131
|
<xg-mini-layer class="xg-mini-layer">
|
|
7077
7132
|
<xg-mini-header class="xgplayer-mini-header">
|
|
7078
|
-
`.concat(
|
|
7133
|
+
`.concat(Ae(this, "MINI_DRAG", this.playerConfig.isHideTips), `
|
|
7079
7134
|
</xg-mini-header>
|
|
7080
7135
|
<div class="mini-cancel-btn">
|
|
7081
7136
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
@@ -7108,7 +7163,7 @@ var Rt = {
|
|
|
7108
7163
|
};
|
|
7109
7164
|
}
|
|
7110
7165
|
}]), r;
|
|
7111
|
-
}(
|
|
7166
|
+
}(V), st = {
|
|
7112
7167
|
mouseenter: "onMouseEnter",
|
|
7113
7168
|
mouseleave: "onMouseLeave",
|
|
7114
7169
|
mousemove: "onMouseMove"
|
|
@@ -7120,17 +7175,17 @@ var Rt = {
|
|
|
7120
7175
|
T(this, r);
|
|
7121
7176
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
7122
7177
|
i[n] = arguments[n];
|
|
7123
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
7124
|
-
var l =
|
|
7178
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onMouseMove", function(s) {
|
|
7179
|
+
var l = m(t), u = l.player, c = l.playerConfig;
|
|
7125
7180
|
u.isActive || (u.focus({
|
|
7126
7181
|
autoHide: !c.closeDelayBlur
|
|
7127
7182
|
}), !c.closeFocusVideoFocus && u.media.focus());
|
|
7128
|
-
}), _(
|
|
7129
|
-
var l =
|
|
7183
|
+
}), _(m(t), "onMouseEnter", function(s) {
|
|
7184
|
+
var l = m(t), u = l.playerConfig, c = l.player;
|
|
7130
7185
|
!u.closeFocusVideoFocus && c.media.focus(), u.closeDelayBlur ? c.focus({
|
|
7131
7186
|
autoHide: !1
|
|
7132
7187
|
}) : c.focus(), t.emit(tn);
|
|
7133
|
-
}), _(
|
|
7188
|
+
}), _(m(t), "onMouseLeave", function(s) {
|
|
7134
7189
|
var l = t.playerConfig, u = l.closePlayerBlur, c = l.leavePlayerTime, h = l.closeDelayBlur;
|
|
7135
7190
|
!u && !h && (c ? t.player.focus({
|
|
7136
7191
|
autoHide: !0,
|
|
@@ -7138,24 +7193,24 @@ var Rt = {
|
|
|
7138
7193
|
}) : t.player.blur({
|
|
7139
7194
|
ignorePaused: !0
|
|
7140
7195
|
})), t.emit(en);
|
|
7141
|
-
}), _(
|
|
7142
|
-
var l =
|
|
7196
|
+
}), _(m(t), "onVideoClick", function(s) {
|
|
7197
|
+
var l = m(t), u = l.player, c = l.playerConfig;
|
|
7143
7198
|
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--, pe(
|
|
7199
|
+
t._clickCount && (t._clickCount--, pe(m(t), Ot[0], function(h, d) {
|
|
7145
7200
|
t.switchPlayPause(d.e);
|
|
7146
7201
|
}, {
|
|
7147
7202
|
e: s,
|
|
7148
7203
|
paused: u.paused
|
|
7149
7204
|
}), clearTimeout(t.clickTimer), t.clickTimer = null);
|
|
7150
7205
|
}, 300));
|
|
7151
|
-
}), _(
|
|
7152
|
-
var l =
|
|
7206
|
+
}), _(m(t), "onVideoDblClick", function(s) {
|
|
7207
|
+
var l = m(t), u = l.player, c = l.playerConfig;
|
|
7153
7208
|
if (!(c.closeVideoDblclick || !s.target || s.target !== u.media && s.target !== u.media.__canvas)) {
|
|
7154
7209
|
if (!c.closeVideoClick && t._clickCount < 2) {
|
|
7155
7210
|
t._clickCount = 0;
|
|
7156
7211
|
return;
|
|
7157
7212
|
}
|
|
7158
|
-
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), pe(
|
|
7213
|
+
t._clickCount = 0, t.clickTimer && (clearTimeout(t.clickTimer), t.clickTimer = null), s.preventDefault(), s.stopPropagation(), pe(m(t), Ot[1], function(h, d) {
|
|
7159
7214
|
t.emitUserAction(d.e, "switch_fullscreen", {
|
|
7160
7215
|
props: "fullscreen",
|
|
7161
7216
|
from: u.fullscreen,
|
|
@@ -7176,7 +7231,7 @@ var Rt = {
|
|
|
7176
7231
|
e.__hooks[n] = null;
|
|
7177
7232
|
});
|
|
7178
7233
|
var i = this.playerConfig.isMobileSimulateMode;
|
|
7179
|
-
i === "mobile" ||
|
|
7234
|
+
i === "mobile" || M.device === "mobile" && !M.os.isIpad || this.initEvents();
|
|
7180
7235
|
}
|
|
7181
7236
|
}, {
|
|
7182
7237
|
key: "initEvents",
|
|
@@ -7220,7 +7275,7 @@ var Rt = {
|
|
|
7220
7275
|
return {};
|
|
7221
7276
|
}
|
|
7222
7277
|
}]), r;
|
|
7223
|
-
}(
|
|
7278
|
+
}(xe), be = {
|
|
7224
7279
|
PRESS: "press",
|
|
7225
7280
|
PRESS_END: "pressend",
|
|
7226
7281
|
DOUBlE_CLICK: "doubleclick",
|
|
@@ -7259,15 +7314,15 @@ var Fo = /* @__PURE__ */ function() {
|
|
|
7259
7314
|
};
|
|
7260
7315
|
T(this, a), _(this, "onTouchStart", function(e) {
|
|
7261
7316
|
var i = r._pos, n = r.root, s = Oi(e.touches);
|
|
7262
|
-
i.x = s ? parseInt(s.pageX, 10) : e.pageX, i.y = s ? parseInt(s.pageX, 10) : e.pageX, i.start = !0, r.__setPress(e), n.addEventListener(r.events.end, r.onTouchEnd), n.addEventListener(r.events.cancel, r.onTouchCancel), n.addEventListener(r.events.move, r.onTouchMove), r.trigger(
|
|
7317
|
+
i.x = s ? parseInt(s.pageX, 10) : e.pageX, i.y = s ? parseInt(s.pageX, 10) : e.pageX, i.start = !0, r.__setPress(e), n.addEventListener(r.events.end, r.onTouchEnd), n.addEventListener(r.events.cancel, r.onTouchCancel), n.addEventListener(r.events.move, r.onTouchMove), r.trigger(be.TOUCH_START, e);
|
|
7263
7318
|
}), _(this, "onTouchCancel", function(e) {
|
|
7264
7319
|
r.onTouchEnd(e);
|
|
7265
7320
|
}), _(this, "onTouchEnd", function(e) {
|
|
7266
7321
|
var i = r._pos, n = r.root;
|
|
7267
|
-
r.__clearPress(), n.removeEventListener(r.events.cancel, r.onTouchCancel), n.removeEventListener(r.events.end, r.onTouchEnd), n.removeEventListener(r.events.move, r.onTouchMove), e.moving = i.moving, e.press = i.press, i.press && r.trigger(
|
|
7322
|
+
r.__clearPress(), n.removeEventListener(r.events.cancel, r.onTouchCancel), n.removeEventListener(r.events.end, r.onTouchEnd), n.removeEventListener(r.events.move, r.onTouchMove), e.moving = i.moving, e.press = i.press, i.press && r.trigger(be.PRESS_END, e), r.trigger(be.TOUCH_END, e), !i.press && !i.moving && r.__setDb(e), i.press = !1, i.start = !1, i.moving = !1;
|
|
7268
7323
|
}), _(this, "onTouchMove", function(e) {
|
|
7269
7324
|
var i = r._pos, n = r.config, s = Oi(e.touches), l = s ? parseInt(s.pageX, 10) : e.pageX, u = s ? parseInt(s.pageY, 10) : e.pageX, c = l - i.x, h = u - i.y;
|
|
7270
|
-
Math.abs(h) < n.miniStep && Math.abs(c) < n.miniStep || (r.__clearPress(), i.press && r.trigger(
|
|
7325
|
+
Math.abs(h) < n.miniStep && Math.abs(c) < n.miniStep || (r.__clearPress(), i.press && r.trigger(be.PRESS_END, e), i.press = !1, i.moving = !0, r.trigger(be.TOUCH_MOVE, e));
|
|
7271
7326
|
}), this._pos = {
|
|
7272
7327
|
moving: !1,
|
|
7273
7328
|
start: !1,
|
|
@@ -7287,7 +7342,7 @@ var Fo = /* @__PURE__ */ function() {
|
|
|
7287
7342
|
value: function(r) {
|
|
7288
7343
|
var t = this, e = this.config;
|
|
7289
7344
|
this.pressIntrvalId && this.__clearPress(), this.pressIntrvalId = setTimeout(function() {
|
|
7290
|
-
t.trigger(
|
|
7345
|
+
t.trigger(be.PRESS, r), t._pos.press = !0, t.__clearPress();
|
|
7291
7346
|
}, e.pressDelay);
|
|
7292
7347
|
}
|
|
7293
7348
|
}, {
|
|
@@ -7300,11 +7355,11 @@ var Fo = /* @__PURE__ */ function() {
|
|
|
7300
7355
|
value: function(r) {
|
|
7301
7356
|
var t = this, e = this.config;
|
|
7302
7357
|
if (this.dbIntrvalId) {
|
|
7303
|
-
this.__clearDb(), this.trigger(
|
|
7358
|
+
this.__clearDb(), this.trigger(be.DOUBlE_CLICK, r);
|
|
7304
7359
|
return;
|
|
7305
7360
|
}
|
|
7306
7361
|
this.dbIntrvalId = setTimeout(function() {
|
|
7307
|
-
t.__clearDb(), !t._pos.start && !t._pos.press && !t._pos.moving && t.trigger(
|
|
7362
|
+
t.__clearDb(), !t._pos.start && !t._pos.press && !t._pos.moving && t.trigger(be.CLICK, r);
|
|
7308
7363
|
}, e.dbClickDelay);
|
|
7309
7364
|
}
|
|
7310
7365
|
}, {
|
|
@@ -7373,30 +7428,30 @@ var Ve = {
|
|
|
7373
7428
|
var o = I(r);
|
|
7374
7429
|
function r(t) {
|
|
7375
7430
|
var e;
|
|
7376
|
-
return T(this, r), e = o.call(this, t), _(
|
|
7377
|
-
var n =
|
|
7431
|
+
return T(this, r), e = o.call(this, t), _(m(e), "onTouchStart", function(i) {
|
|
7432
|
+
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = e.getTouche(i);
|
|
7378
7433
|
if (h && !l.disableGesture && e.duration > 0 && !s.ended) {
|
|
7379
7434
|
u.isStart = !0, e.timer && clearTimeout(e.timer), f.checkIsFunction(c.disableSwipeHandler) && c.disableSwipeHandler(), e.find(".xg-dur").innerHTML = f.format(e.duration);
|
|
7380
7435
|
var d = e.root.getBoundingClientRect();
|
|
7381
7436
|
s.rotateDeg === 90 ? (u.top = d.left, u.left = d.top, u.width = d.height, u.height = d.width) : (u.top = d.top, u.left = d.left, u.width = d.width, u.height = d.height);
|
|
7382
|
-
var
|
|
7383
|
-
u.x = s.rotateDeg === 90 ?
|
|
7437
|
+
var p = parseInt(h.pageX - u.left, 10), g = parseInt(h.pageY - u.top, 10);
|
|
7438
|
+
u.x = s.rotateDeg === 90 ? g : p, u.y = s.rotateDeg === 90 ? p : g, u.scopeL = l.scopeL * u.width, u.scopeR = (1 - l.scopeR) * u.width, u.scopeM1 = u.width * (1 - l.scopeM) / 2, u.scopeM2 = u.width - u.scopeM1;
|
|
7384
7439
|
}
|
|
7385
|
-
}), _(
|
|
7386
|
-
var n = e.getTouche(i), s =
|
|
7440
|
+
}), _(m(e), "onTouchMove", function(i) {
|
|
7441
|
+
var n = e.getTouche(i), s = m(e), l = s.pos, u = s.config, c = s.player;
|
|
7387
7442
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
7388
|
-
var h = u.miniMoveStep, d = u.hideControlsActive,
|
|
7389
|
-
if (Math.abs(
|
|
7390
|
-
var
|
|
7391
|
-
if (
|
|
7443
|
+
var h = u.miniMoveStep, d = u.hideControlsActive, p = parseInt(n.pageX - l.left, 10), g = parseInt(n.pageY - l.top, 10), v = c.rotateDeg === 90 ? g : p, y = c.rotateDeg === 90 ? p : g;
|
|
7444
|
+
if (Math.abs(v - l.x) > h || Math.abs(y - l.y) > h) {
|
|
7445
|
+
var C = v - l.x, b = y - l.y, w = l.scope;
|
|
7446
|
+
if (w === -1 && (w = e.checkScope(v, y, C, b, l), w === 0 && (d ? c.blur() : c.focus({
|
|
7392
7447
|
autoHide: !1
|
|
7393
|
-
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope =
|
|
7448
|
+
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = w), w === -1 || w > 0 && !u.gestureY || w === 0 && !u.gestureX)
|
|
7394
7449
|
return;
|
|
7395
|
-
e.executeMove(
|
|
7450
|
+
e.executeMove(C, b, w, l.width, l.height), l.x = v, l.y = y;
|
|
7396
7451
|
}
|
|
7397
7452
|
}
|
|
7398
|
-
}), _(
|
|
7399
|
-
var n =
|
|
7453
|
+
}), _(m(e), "onTouchEnd", function(i) {
|
|
7454
|
+
var n = m(e), s = n.player, l = n.pos, u = n.playerConfig;
|
|
7400
7455
|
if (setTimeout(function() {
|
|
7401
7456
|
s.getPlugin("progress") && s.getPlugin("progress").resetSeekState();
|
|
7402
7457
|
}, 10), !!l.isStart) {
|
|
@@ -7404,9 +7459,9 @@ var Ve = {
|
|
|
7404
7459
|
var c = e.config, h = c.disableGesture, d = c.gestureX;
|
|
7405
7460
|
!h && d ? e.endLastMove(l.scope) : l.time = 0, l.scope = -1, e.resetPos(), f.checkIsFunction(u.enableSwipeHandler) && u.enableSwipeHandler(), e.changeAction(Ve.AUTO);
|
|
7406
7461
|
}
|
|
7407
|
-
}), _(
|
|
7462
|
+
}), _(m(e), "onRootTouchMove", function(i) {
|
|
7408
7463
|
e.config.disableGesture || !e.config.gestureX || e.checkIsRootTarget(i) && (i.stopPropagation(), e.pos.isStart ? e.onTouchMove(i) : e.onTouchStart(i));
|
|
7409
|
-
}), _(
|
|
7464
|
+
}), _(m(e), "onRootTouchEnd", function(i) {
|
|
7410
7465
|
e.pos.scope > -1 && e.onTouchEnd(i);
|
|
7411
7466
|
}), e.pos = {
|
|
7412
7467
|
isStart: !1,
|
|
@@ -7462,12 +7517,12 @@ var Ve = {
|
|
|
7462
7517
|
d.preventDefault();
|
|
7463
7518
|
}), s.root.addEventListener("touchmove", this.onRootTouchMove, !0), s.root.addEventListener("touchend", this.onRootTouchEnd, !0), s.root.addEventListener("touchcancel", this.onRootTouchEnd, !0);
|
|
7464
7519
|
var u = this.player.controls;
|
|
7465
|
-
u && u.center && (u.center.addEventListener("touchmove", this.onRootTouchMove, !0), u.center.addEventListener("touchend", this.onRootTouchEnd, !0), u.center.addEventListener("touchcancel", this.onRootTouchEnd, !0)), this.on(
|
|
7466
|
-
var d = e.player,
|
|
7467
|
-
d.duration * 1e3 <
|
|
7520
|
+
u && u.center && (u.center.addEventListener("touchmove", this.onRootTouchMove, !0), u.center.addEventListener("touchend", this.onRootTouchEnd, !0), u.center.addEventListener("touchcancel", this.onRootTouchEnd, !0)), this.on(Ie, function() {
|
|
7521
|
+
var d = e.player, p = e.config;
|
|
7522
|
+
d.duration * 1e3 < p.moveDuration && (p.moveDuration = d.duration * 1e3);
|
|
7468
7523
|
}), this.on([ve, Be], function() {
|
|
7469
|
-
var d = e.pos,
|
|
7470
|
-
!
|
|
7524
|
+
var d = e.pos, p = d.time, g = d.isStart;
|
|
7525
|
+
!g && p > 0 && (e.pos.time = 0);
|
|
7471
7526
|
});
|
|
7472
7527
|
var c = {
|
|
7473
7528
|
touchstart: "onTouchStart",
|
|
@@ -7479,8 +7534,8 @@ var Ve = {
|
|
|
7479
7534
|
doubleclick: "onDbClick"
|
|
7480
7535
|
};
|
|
7481
7536
|
if (Object.keys(c).map(function(d) {
|
|
7482
|
-
e.touch.on(d, function(
|
|
7483
|
-
e[c[d]](
|
|
7537
|
+
e.touch.on(d, function(p) {
|
|
7538
|
+
e[c[d]](p);
|
|
7484
7539
|
});
|
|
7485
7540
|
}), !n.disableActive) {
|
|
7486
7541
|
var h = s.plugins.progress;
|
|
@@ -7509,12 +7564,12 @@ var Ve = {
|
|
|
7509
7564
|
var e = this.playerConfig || {}, i = e.commonStyle, n = i.playedColor, s = i.progressColor, l = i.timePreviewStyle, u = i.curTimeColor, c = i.durationColor;
|
|
7510
7565
|
if (n && (this.find(".xg-curbar").style.backgroundColor = n), s && (this.find(".xg-bar").style.backgroundColor = s), l) {
|
|
7511
7566
|
var h = this.find(".time-preview");
|
|
7512
|
-
Object.keys(l).forEach(function(
|
|
7513
|
-
h.style[
|
|
7567
|
+
Object.keys(l).forEach(function(g) {
|
|
7568
|
+
h.style[g] = l[g];
|
|
7514
7569
|
});
|
|
7515
7570
|
}
|
|
7516
|
-
var d = u || n,
|
|
7517
|
-
d && (this.find(".xg-cur").style.color = d),
|
|
7571
|
+
var d = u || n, p = c;
|
|
7572
|
+
d && (this.find(".xg-cur").style.color = d), p && (this.find(".xg-dur").style.color = p), this.config.disableTimeProgress && f.addClass(this.find(".xg-timebar"), "hide");
|
|
7518
7573
|
}
|
|
7519
7574
|
}, {
|
|
7520
7575
|
key: "resetPos",
|
|
@@ -7579,7 +7634,7 @@ var Ve = {
|
|
|
7579
7634
|
this.updateBrightness(i / l);
|
|
7580
7635
|
break;
|
|
7581
7636
|
case 2:
|
|
7582
|
-
|
|
7637
|
+
M.os.isIos || this.updateVolume(i / l);
|
|
7583
7638
|
break;
|
|
7584
7639
|
}
|
|
7585
7640
|
}
|
|
@@ -7796,7 +7851,7 @@ var Ve = {
|
|
|
7796
7851
|
};
|
|
7797
7852
|
}
|
|
7798
7853
|
}]), r;
|
|
7799
|
-
}(
|
|
7854
|
+
}(V);
|
|
7800
7855
|
function Bo(a) {
|
|
7801
7856
|
a.preventDefault(), a.returnValue = !1;
|
|
7802
7857
|
}
|
|
@@ -7812,20 +7867,20 @@ var Mi = /* @__PURE__ */ function(a) {
|
|
|
7812
7867
|
T(this, r);
|
|
7813
7868
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
7814
7869
|
i[n] = arguments[n];
|
|
7815
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
7870
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onBodyKeyDown", function(s) {
|
|
7816
7871
|
if (t.player) {
|
|
7817
|
-
var l = s || window.event, u = l.keyCode, c =
|
|
7818
|
-
if (
|
|
7872
|
+
var l = s || window.event, u = l.keyCode, c = m(t), h = c._keyState, d = c.player, p = t.config, g = p.disable, v = p.disableBodyTrigger, y = p.isIgnoreUserActive;
|
|
7873
|
+
if (g || v || !(d.isUserActive || y) || Fi(l.target) || !t.checkIsVisible() || l.metaKey || l.altKey || l.ctrlKey) {
|
|
7819
7874
|
h.isBodyKeyDown = !1;
|
|
7820
7875
|
return;
|
|
7821
7876
|
}
|
|
7822
7877
|
!s.repeat && !h.isKeyDown && ((l.target === document.body || t.config.isGlobalTrigger && !Fi(l.target)) && t.checkCode(u, !0) && (h.isBodyKeyDown = !0), document.addEventListener("keyup", t.onBodyKeyUp)), h.isBodyKeyDown && t.handleKeyDown(l);
|
|
7823
7878
|
}
|
|
7824
|
-
}), _(
|
|
7879
|
+
}), _(m(t), "onBodyKeyUp", function(s) {
|
|
7825
7880
|
t.player && (document.removeEventListener("keyup", t.onBodyKeyUp), t.handleKeyUp(s));
|
|
7826
|
-
}), _(
|
|
7881
|
+
}), _(m(t), "onKeydown", function(s) {
|
|
7827
7882
|
if (t.player) {
|
|
7828
|
-
var l = s || window.event, u =
|
|
7883
|
+
var l = s || window.event, u = m(t), c = u._keyState;
|
|
7829
7884
|
if (!l.repeat) {
|
|
7830
7885
|
if (t.config.disable || t.config.disableRootTrigger || l.metaKey || l.altKey || l.ctrlKey)
|
|
7831
7886
|
return;
|
|
@@ -7833,7 +7888,7 @@ var Mi = /* @__PURE__ */ function(a) {
|
|
|
7833
7888
|
}
|
|
7834
7889
|
c.isKeyDown && t.handleKeyDown(l);
|
|
7835
7890
|
}
|
|
7836
|
-
}), _(
|
|
7891
|
+
}), _(m(t), "onKeyup", function(s) {
|
|
7837
7892
|
t.player && (t.player.root.removeEventListener("keyup", t.onKeyup), t.handleKeyUp(s));
|
|
7838
7893
|
}), t;
|
|
7839
7894
|
}
|
|
@@ -7960,17 +8015,17 @@ var Mi = /* @__PURE__ */ function(a) {
|
|
|
7960
8015
|
}, {
|
|
7961
8016
|
key: "seek",
|
|
7962
8017
|
value: function(e) {
|
|
7963
|
-
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.duration, u = i.offsetDuration, c = i.timeSegments, h = s > -1 ? s : n, d = u || l,
|
|
7964
|
-
h +
|
|
7965
|
-
var
|
|
8018
|
+
var i = this.player, n = i.currentTime, s = i.offsetCurrentTime, l = i.duration, u = i.offsetDuration, c = i.timeSegments, h = s > -1 ? s : n, d = u || l, p = e.repeat && this.seekStep >= 4 ? parseInt(this.seekStep / 2, 10) : this.seekStep;
|
|
8019
|
+
h + p <= d ? h = h + p : h = d;
|
|
8020
|
+
var g = f.getCurrentTimeByOffset(h, c), v = {
|
|
7966
8021
|
currentTime: {
|
|
7967
8022
|
from: n,
|
|
7968
|
-
to:
|
|
8023
|
+
to: g
|
|
7969
8024
|
}
|
|
7970
8025
|
};
|
|
7971
8026
|
this.emitUserAction(e, "seek", {
|
|
7972
|
-
props:
|
|
7973
|
-
}), this.player.currentTime =
|
|
8027
|
+
props: v
|
|
8028
|
+
}), this.player.currentTime = g;
|
|
7974
8029
|
}
|
|
7975
8030
|
}, {
|
|
7976
8031
|
key: "seekBack",
|
|
@@ -8036,11 +8091,11 @@ var Mi = /* @__PURE__ */ function(a) {
|
|
|
8036
8091
|
key: "handleKeyCode",
|
|
8037
8092
|
value: function(e, i, n) {
|
|
8038
8093
|
for (var s = Object.keys(this.keyCodeMap), l = 0; l < s.length; l++) {
|
|
8039
|
-
var u = this.keyCodeMap[s[l]], c = u.action, h = u.keyCode, d = u.disable,
|
|
8094
|
+
var u = this.keyCodeMap[s[l]], c = u.action, h = u.keyCode, d = u.disable, p = u.pressAction, g = u.disablePress;
|
|
8040
8095
|
if (h === e) {
|
|
8041
|
-
if (!d && !(n &&
|
|
8042
|
-
var
|
|
8043
|
-
typeof
|
|
8096
|
+
if (!d && !(n && g)) {
|
|
8097
|
+
var v = n && p || c;
|
|
8098
|
+
typeof v == "function" ? c(i, this.player, n) : typeof v == "string" && typeof this[v] == "function" && this[v](i, this.player, n), this.emit(on, W({
|
|
8044
8099
|
key: s[l],
|
|
8045
8100
|
target: i.target,
|
|
8046
8101
|
isPress: n
|
|
@@ -8087,7 +8142,7 @@ var Mi = /* @__PURE__ */ function(a) {
|
|
|
8087
8142
|
};
|
|
8088
8143
|
}
|
|
8089
8144
|
}]), r;
|
|
8090
|
-
}(
|
|
8145
|
+
}(xe);
|
|
8091
8146
|
function Ho() {
|
|
8092
8147
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">
|
|
8093
8148
|
<path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>
|
|
@@ -8133,7 +8188,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8133
8188
|
};
|
|
8134
8189
|
}
|
|
8135
8190
|
}]), r;
|
|
8136
|
-
}(
|
|
8191
|
+
}(V), zo = [{
|
|
8137
8192
|
tag: "xg-cache",
|
|
8138
8193
|
className: "xgplayer-progress-cache",
|
|
8139
8194
|
styleKey: "cachedColor"
|
|
@@ -8349,73 +8404,73 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8349
8404
|
var o = I(r);
|
|
8350
8405
|
function r(t) {
|
|
8351
8406
|
var e;
|
|
8352
|
-
return T(this, r), e = o.call(this, t), _(
|
|
8353
|
-
var s =
|
|
8407
|
+
return T(this, r), e = o.call(this, t), _(m(e), "onMoveOnly", function(i, n) {
|
|
8408
|
+
var s = m(e), l = s.pos, u = s.config, c = s.player, h = n;
|
|
8354
8409
|
if (i) {
|
|
8355
8410
|
f.event(i);
|
|
8356
|
-
var d = f.getEventPos(i, c.zoom),
|
|
8357
|
-
if (l.moving && Math.abs(l.x -
|
|
8411
|
+
var d = f.getEventPos(i, c.zoom), p = c.rotateDeg === 90 ? d.clientY : d.clientX;
|
|
8412
|
+
if (l.moving && Math.abs(l.x - p) < u.miniMoveStep)
|
|
8358
8413
|
return;
|
|
8359
|
-
l.moving = !0, l.x =
|
|
8414
|
+
l.moving = !0, l.x = p, h = e.computeTime(i, p);
|
|
8360
8415
|
}
|
|
8361
8416
|
e.triggerCallbacks("dragmove", h, i), e._updateInnerFocus(h);
|
|
8362
|
-
}), _(
|
|
8417
|
+
}), _(m(e), "onBodyClick", function(i) {
|
|
8363
8418
|
e.pos.isLocked && (e.pos.isLocked = !1, i.preventDefault(), i.stopPropagation());
|
|
8364
|
-
}), _(
|
|
8419
|
+
}), _(m(e), "_mouseDownHandler", function(i, n) {
|
|
8365
8420
|
e._state.time = n.currentTime, e.updateWidth(n.currentTime, n.seekTime, n.percent, 0), e._updateInnerFocus(n);
|
|
8366
|
-
}), _(
|
|
8367
|
-
var s =
|
|
8421
|
+
}), _(m(e), "_mouseUpHandler", function(i, n) {
|
|
8422
|
+
var s = m(e), l = s.pos;
|
|
8368
8423
|
l.moving && e.updateWidth(n.currentTime, n.seekTime, n.percent, 2);
|
|
8369
|
-
}), _(
|
|
8370
|
-
var s =
|
|
8424
|
+
}), _(m(e), "_mouseMoveHandler", function(i, n) {
|
|
8425
|
+
var s = m(e), l = s._state, u = s.pos, c = s.config, h = s.player;
|
|
8371
8426
|
l.time < n.currentTime ? n.forward = !0 : n.forward = !1, l.time = n.currentTime, u.isDown && !u.moving && (u.moving = !0, c.isPauseMoving && h.pause(), e.triggerCallbacks("dragstart", n, i), e.emitUserAction("drag", "dragstart", n)), e.updateWidth(n.currentTime, n.seekTime, n.percent, 1), e.triggerCallbacks("dragmove", n, i), e._updateInnerFocus(n);
|
|
8372
|
-
}), _(
|
|
8373
|
-
var n =
|
|
8427
|
+
}), _(m(e), "onMouseDown", function(i) {
|
|
8428
|
+
var n = m(e), s = n._state, l = n.player, u = n.pos, c = n.config, h = n.playerConfig, d = f.getEventPos(i, l.zoom), p = l.rotateDeg === 90 ? d.clientY : d.clientX;
|
|
8374
8429
|
if (!(l.isMini || c.closeMoveSeek || !h.allowSeekAfterEnded && l.ended)) {
|
|
8375
8430
|
if (!l.duration && !l.isPlaying) {
|
|
8376
8431
|
l.play();
|
|
8377
8432
|
return;
|
|
8378
8433
|
}
|
|
8379
|
-
i.stopPropagation(), e.focus(), f.checkIsFunction(h.disableSwipeHandler) && h.disableSwipeHandler(), f.checkIsFunction(c.onMoveStart) && c.onMoveStart(), f.event(i), u.x =
|
|
8434
|
+
i.stopPropagation(), e.focus(), f.checkIsFunction(h.disableSwipeHandler) && h.disableSwipeHandler(), f.checkIsFunction(c.onMoveStart) && c.onMoveStart(), f.event(i), u.x = p, u.isDown = !0, u.moving = !1, s.prePlayTime = l.currentTime, l.focus({
|
|
8380
8435
|
autoHide: !1
|
|
8381
8436
|
}), e.isProgressMoving = !0, f.addClass(e.progressBtn, "active");
|
|
8382
|
-
var
|
|
8383
|
-
|
|
8384
|
-
var
|
|
8385
|
-
return
|
|
8437
|
+
var g = e.computeTime(i, p);
|
|
8438
|
+
g.prePlayTime = s.prePlayTime, e._mouseDownHandlerHook(i, g);
|
|
8439
|
+
var v = i.type;
|
|
8440
|
+
return v === "touchstart" ? (e.root.addEventListener("touchmove", e.onMouseMove), e.root.addEventListener("touchend", e.onMouseUp), e.root.addEventListener("touchcancel", e.onMouseUp)) : (e.unbind("mousemove", e.onMoveOnly), document.addEventListener("mousemove", e.onMouseMove, !1), document.addEventListener("mouseup", e.onMouseUp, !1)), !0;
|
|
8386
8441
|
}
|
|
8387
|
-
}), _(
|
|
8388
|
-
var n =
|
|
8442
|
+
}), _(m(e), "onMouseUp", function(i) {
|
|
8443
|
+
var n = m(e), s = n.player, l = n.config, u = n.pos, c = n.playerConfig, h = n._state;
|
|
8389
8444
|
i.stopPropagation(), i.preventDefault(), f.checkIsFunction(c.enableSwipeHandler) && c.enableSwipeHandler(), f.checkIsFunction(l.onMoveEnd) && l.onMoveEnd(), f.event(i), f.removeClass(e.progressBtn, "active");
|
|
8390
8445
|
var d = e.computeTime(i, u.x);
|
|
8391
8446
|
d.prePlayTime = h.prePlayTime, u.moving ? (e.triggerCallbacks("dragend", d, i), e.emitUserAction("drag", "dragend", d)) : (e.triggerCallbacks("click", d, i), e.emitUserAction("click", "click", d)), e._mouseUpHandlerHook(i, d), u.moving = !1, u.isDown = !1, u.x = 0, u.y = 0, u.isLocked = !0, h.prePlayTime = 0, h.time = 0;
|
|
8392
|
-
var
|
|
8393
|
-
|
|
8447
|
+
var p = i.type;
|
|
8448
|
+
p === "touchend" || p === "touchcancel" ? (e.root.removeEventListener("touchmove", e.onMouseMove), e.root.removeEventListener("touchend", e.onMouseUp), e.root.removeEventListener("touchcancel", e.onMouseUp), e.blur()) : (document.removeEventListener("mousemove", e.onMouseMove, !1), document.removeEventListener("mouseup", e.onMouseUp, !1), u.isEnter ? c.isMobileSimulateMode !== "mobile" && e.bind("mousemove", e.onMoveOnly) : e.onMouseLeave(i)), f.setTimeout(m(e), function() {
|
|
8394
8449
|
e.resetSeekState();
|
|
8395
8450
|
}, 1), s.focus();
|
|
8396
|
-
}), _(
|
|
8397
|
-
var n =
|
|
8451
|
+
}), _(m(e), "onMouseMove", function(i) {
|
|
8452
|
+
var n = m(e), s = n._state, l = n.pos, u = n.player, c = n.config;
|
|
8398
8453
|
f.checkTouchSupport() && i.preventDefault(), f.event(i);
|
|
8399
|
-
var h = f.getEventPos(i, u.zoom), d = u.rotateDeg === 90 ? h.clientY : h.clientX,
|
|
8400
|
-
if (!(l.moving &&
|
|
8454
|
+
var h = f.getEventPos(i, u.zoom), d = u.rotateDeg === 90 ? h.clientY : h.clientX, p = Math.abs(l.x - d);
|
|
8455
|
+
if (!(l.moving && p < c.miniMoveStep || !l.moving && p < c.miniStartStep)) {
|
|
8401
8456
|
l.x = d;
|
|
8402
|
-
var
|
|
8403
|
-
|
|
8457
|
+
var g = e.computeTime(i, d);
|
|
8458
|
+
g.prePlayTime = s.prePlayTime, e._mouseMoveHandlerHook(i, g);
|
|
8404
8459
|
}
|
|
8405
|
-
}), _(
|
|
8460
|
+
}), _(m(e), "onMouseOut", function(i) {
|
|
8406
8461
|
e.triggerCallbacks("mouseout", null, i);
|
|
8407
|
-
}), _(
|
|
8462
|
+
}), _(m(e), "onMouseOver", function(i) {
|
|
8408
8463
|
e.triggerCallbacks("mouseover", null, i);
|
|
8409
|
-
}), _(
|
|
8410
|
-
var n =
|
|
8464
|
+
}), _(m(e), "onMouseEnter", function(i) {
|
|
8465
|
+
var n = m(e), s = n.player, l = n.pos;
|
|
8411
8466
|
if (!(l.isDown || l.isEnter || s.isMini || !s.config.allowSeekAfterEnded && s.ended)) {
|
|
8412
8467
|
l.isEnter = !0, e.bind("mousemove", e.onMoveOnly), e.bind("mouseleave", e.onMouseLeave), f.event(i);
|
|
8413
8468
|
var u = f.getEventPos(i, s.zoom), c = s.rotateDeg === 90 ? u.clientY : u.clientX, h = e.computeTime(i, c);
|
|
8414
8469
|
e.triggerCallbacks("mouseenter", h, i), e.focus();
|
|
8415
8470
|
}
|
|
8416
|
-
}), _(
|
|
8471
|
+
}), _(m(e), "onMouseLeave", function(i) {
|
|
8417
8472
|
e.triggerCallbacks("mouseleave", null, i), e.unlock(), e._updateInnerFocus(null);
|
|
8418
|
-
}), _(
|
|
8473
|
+
}), _(m(e), "onVideoResize", function() {
|
|
8419
8474
|
var i = e.pos, n = i.x, s = i.isDown, l = i.isEnter;
|
|
8420
8475
|
if (l && !s) {
|
|
8421
8476
|
var u = e.computeTime(null, n);
|
|
@@ -8502,11 +8557,11 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8502
8557
|
fragAutoFocus: s,
|
|
8503
8558
|
fragClass: l,
|
|
8504
8559
|
style: this.playerConfig.commonStyle || {}
|
|
8505
|
-
}),
|
|
8560
|
+
}), M.device === "mobile" && (this.config.isDragingSeek = !1, this.isMobile = !0), this.progressBtn = this.find(".xgplayer-progress-btn"), this.on(Ie, function() {
|
|
8506
8561
|
e.onMouseLeave();
|
|
8507
|
-
}), this.on(
|
|
8562
|
+
}), this.on(re, function() {
|
|
8508
8563
|
e.onTimeupdate();
|
|
8509
|
-
}), this.on(
|
|
8564
|
+
}), this.on(_e, function() {
|
|
8510
8565
|
e.onTimeupdate(), e.onCacheUpdate();
|
|
8511
8566
|
}), this.on(Zi, function() {
|
|
8512
8567
|
e.onCacheUpdate();
|
|
@@ -8514,7 +8569,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8514
8569
|
e.onCacheUpdate(!0), e.onTimeupdate(!0), e._state.now = 0;
|
|
8515
8570
|
}), this.on(He, function() {
|
|
8516
8571
|
e.onReset();
|
|
8517
|
-
}), this.on(
|
|
8572
|
+
}), this.on(Se, function() {
|
|
8518
8573
|
e.onVideoResize();
|
|
8519
8574
|
}), this.bindDomEvents(), this.initCustomStyle();
|
|
8520
8575
|
}
|
|
@@ -8613,20 +8668,20 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8613
8668
|
}, {
|
|
8614
8669
|
key: "computeTime",
|
|
8615
8670
|
value: function(e, i) {
|
|
8616
|
-
var n = this.player, s = this.root.getBoundingClientRect(), l = s.width, u = s.height, c = s.top, h = s.left, d,
|
|
8617
|
-
n.rotateDeg === 90 ? (d = u,
|
|
8618
|
-
var
|
|
8619
|
-
|
|
8620
|
-
var y =
|
|
8671
|
+
var n = this.player, s = this.root.getBoundingClientRect(), l = s.width, u = s.height, c = s.top, h = s.left, d, p, g = i;
|
|
8672
|
+
n.rotateDeg === 90 ? (d = u, p = c) : (d = l, p = h);
|
|
8673
|
+
var v = g - p;
|
|
8674
|
+
v = v > d ? d : v < 0 ? 0 : v;
|
|
8675
|
+
var y = v / d;
|
|
8621
8676
|
y = y < 0 ? 0 : y > 1 ? 1 : y;
|
|
8622
|
-
var
|
|
8677
|
+
var C = parseInt(y * this.offsetDuration * 1e3, 10) / 1e3, b = f.getCurrentTimeByOffset(C, n.timeSegments);
|
|
8623
8678
|
return {
|
|
8624
8679
|
percent: y,
|
|
8625
|
-
currentTime:
|
|
8680
|
+
currentTime: C,
|
|
8626
8681
|
seekTime: b,
|
|
8627
|
-
offset:
|
|
8682
|
+
offset: v,
|
|
8628
8683
|
width: d,
|
|
8629
|
-
left:
|
|
8684
|
+
left: p,
|
|
8630
8685
|
e
|
|
8631
8686
|
};
|
|
8632
8687
|
}
|
|
@@ -8755,7 +8810,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8755
8810
|
return Ni;
|
|
8756
8811
|
}
|
|
8757
8812
|
}]), r;
|
|
8758
|
-
}(
|
|
8813
|
+
}(V), Ue = /* @__PURE__ */ function(a) {
|
|
8759
8814
|
P(r, a);
|
|
8760
8815
|
var o = I(r);
|
|
8761
8816
|
function r() {
|
|
@@ -8763,11 +8818,11 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8763
8818
|
T(this, r);
|
|
8764
8819
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
8765
8820
|
i[n] = arguments[n];
|
|
8766
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
8821
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "_onMouseenter", function(s) {
|
|
8767
8822
|
t.emit("icon_mouseenter", {
|
|
8768
8823
|
pluginName: t.pluginName
|
|
8769
8824
|
});
|
|
8770
|
-
}), _(
|
|
8825
|
+
}), _(m(t), "_onMouseLeave", function(s) {
|
|
8771
8826
|
t.emit("icon_mouseleave", {
|
|
8772
8827
|
pluginName: t.pluginName
|
|
8773
8828
|
});
|
|
@@ -8784,7 +8839,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8784
8839
|
this.unbind("mouseenter", this._onMouseenter), this.unbind("mouseleave", this._onMouseLeave);
|
|
8785
8840
|
}
|
|
8786
8841
|
}]), r;
|
|
8787
|
-
}(
|
|
8842
|
+
}(V), Wo = /* @__PURE__ */ function(a) {
|
|
8788
8843
|
P(r, a);
|
|
8789
8844
|
var o = I(r);
|
|
8790
8845
|
function r() {
|
|
@@ -8794,11 +8849,11 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8794
8849
|
key: "afterCreate",
|
|
8795
8850
|
value: function() {
|
|
8796
8851
|
var e = this;
|
|
8797
|
-
L(
|
|
8852
|
+
D(L(r.prototype), "afterCreate", this).call(this);
|
|
8798
8853
|
var i = this.player, n = this.config;
|
|
8799
8854
|
n.disable || (this.initIcons(), this.btnClick = this.btnClick.bind(this), this.bind(["touchend", "click"], this.btnClick), this.on([Xe, it, He], function() {
|
|
8800
8855
|
e.animate(i.paused);
|
|
8801
|
-
}), this.on(
|
|
8856
|
+
}), this.on(se, function() {
|
|
8802
8857
|
e.animate(i.paused);
|
|
8803
8858
|
}), this.animate(!0));
|
|
8804
8859
|
}
|
|
@@ -8844,7 +8899,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8844
8899
|
}, {
|
|
8845
8900
|
key: "destroy",
|
|
8846
8901
|
value: function() {
|
|
8847
|
-
L(
|
|
8902
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(["touchend", "click"], this.btnClick);
|
|
8848
8903
|
}
|
|
8849
8904
|
}, {
|
|
8850
8905
|
key: "render",
|
|
@@ -8853,7 +8908,7 @@ var Uo = /* @__PURE__ */ function(a) {
|
|
|
8853
8908
|
return `<xg-icon class="xgplayer-play">
|
|
8854
8909
|
<div class="xgplayer-icon">
|
|
8855
8910
|
</div>
|
|
8856
|
-
`.concat(
|
|
8911
|
+
`.concat(Ae(this, "PLAY_TIPS", this.playerConfig.isHideTips), `
|
|
8857
8912
|
</xg-icon>`);
|
|
8858
8913
|
}
|
|
8859
8914
|
}], [{
|
|
@@ -8939,7 +8994,7 @@ var $o = /* @__PURE__ */ function(a) {
|
|
|
8939
8994
|
};
|
|
8940
8995
|
}
|
|
8941
8996
|
}]), r;
|
|
8942
|
-
}(
|
|
8997
|
+
}(V);
|
|
8943
8998
|
function Ko() {
|
|
8944
8999
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
|
|
8945
9000
|
<path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>
|
|
@@ -8960,7 +9015,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
8960
9015
|
T(this, r);
|
|
8961
9016
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
8962
9017
|
i[n] = arguments[n];
|
|
8963
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9018
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "_onOrientationChange", function(s) {
|
|
8964
9019
|
t.player.fullscreen && t.config.rotateFullscreen && (window.orientation === 90 || window.orientation === -90 ? t.player.setRotateDeg(0) : t.player.setRotateDeg(90));
|
|
8965
9020
|
}), t;
|
|
8966
9021
|
}
|
|
@@ -8968,7 +9023,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
8968
9023
|
key: "afterCreate",
|
|
8969
9024
|
value: function() {
|
|
8970
9025
|
var e = this;
|
|
8971
|
-
L(
|
|
9026
|
+
D(L(r.prototype), "afterCreate", this).call(this);
|
|
8972
9027
|
var i = this.config, n = this.playerConfig;
|
|
8973
9028
|
if (!i.disable) {
|
|
8974
9029
|
i.target && (this.playerConfig.fullscreenTarget = this.config.target);
|
|
@@ -8995,7 +9050,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
8995
9050
|
}
|
|
8996
9051
|
}
|
|
8997
9052
|
}
|
|
8998
|
-
})),
|
|
9053
|
+
})), M.device === "mobile" && window.addEventListener("orientationchange", this._onOrientationChange);
|
|
8999
9054
|
}
|
|
9000
9055
|
}
|
|
9001
9056
|
}, {
|
|
@@ -9015,7 +9070,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9015
9070
|
}, {
|
|
9016
9071
|
key: "destroy",
|
|
9017
9072
|
value: function() {
|
|
9018
|
-
L(
|
|
9073
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", M.device === "mobile" ? "touchend" : "click", this.handleFullscreen), M.device === "mobile" && window.removeEventListener("orientationchange", this._onOrientationChange);
|
|
9019
9074
|
}
|
|
9020
9075
|
}, {
|
|
9021
9076
|
key: "initIcons",
|
|
@@ -9044,7 +9099,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9044
9099
|
return `<xg-icon class="xgplayer-fullscreen">
|
|
9045
9100
|
<div class="xgplayer-icon">
|
|
9046
9101
|
</div>
|
|
9047
|
-
`.concat(
|
|
9102
|
+
`.concat(Ae(this, e, this.playerConfig.isHideTips), `
|
|
9048
9103
|
</xg-icon>`);
|
|
9049
9104
|
}
|
|
9050
9105
|
}
|
|
@@ -9116,7 +9171,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9116
9171
|
key: "afterCreate",
|
|
9117
9172
|
value: function() {
|
|
9118
9173
|
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([
|
|
9174
|
+
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, _e, re], function(n) {
|
|
9120
9175
|
n.eventName === "durationchange" && (e.isActiving = !1), e.onTimeUpdate();
|
|
9121
9176
|
}), this.on(Be, function() {
|
|
9122
9177
|
e.onTimeUpdate(!0);
|
|
@@ -9204,7 +9259,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9204
9259
|
var e = this, i = this.player, n = function() {
|
|
9205
9260
|
e.isActiving = !1;
|
|
9206
9261
|
};
|
|
9207
|
-
this.off(
|
|
9262
|
+
this.off(_e, n), i.isSeeking && i.media.seeking ? this.once(_e, n) : this.isActiving = !1;
|
|
9208
9263
|
}
|
|
9209
9264
|
}, {
|
|
9210
9265
|
key: "destroy",
|
|
@@ -9238,7 +9293,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9238
9293
|
};
|
|
9239
9294
|
}
|
|
9240
9295
|
}]), r;
|
|
9241
|
-
}(
|
|
9296
|
+
}(V), Zo = /* @__PURE__ */ function(a) {
|
|
9242
9297
|
P(r, a);
|
|
9243
9298
|
var o = I(r);
|
|
9244
9299
|
function r() {
|
|
@@ -9246,20 +9301,20 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9246
9301
|
T(this, r);
|
|
9247
9302
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9248
9303
|
i[n] = arguments[n];
|
|
9249
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9304
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "_onDurationChange", function() {
|
|
9250
9305
|
t.updateSegments();
|
|
9251
9306
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9252
9307
|
if (t._checkIfEnabled(u)) {
|
|
9253
9308
|
var c = f.getIndexByTime(l, u), h = f.getOffsetCurrentTime(l, u, c);
|
|
9254
9309
|
t.player.offsetCurrentTime = h, t.changeIndex(c, u);
|
|
9255
9310
|
}
|
|
9256
|
-
}), _(
|
|
9311
|
+
}), _(m(t), "_onLoadedData", function() {
|
|
9257
9312
|
var s = t.player.timeSegments;
|
|
9258
9313
|
if (t._checkIfEnabled(s)) {
|
|
9259
9314
|
var l = f.getOffsetCurrentTime(0, s);
|
|
9260
9315
|
t.player.offsetCurrentTime = l, t.changeIndex(0, s), t.curPos.start > 0 && (t.player.currentTime = t.curPos.start);
|
|
9261
9316
|
}
|
|
9262
|
-
}), _(
|
|
9317
|
+
}), _(m(t), "_onTimeupdate", function() {
|
|
9263
9318
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9264
9319
|
if (t._checkIfEnabled(u)) {
|
|
9265
9320
|
var c = u.length;
|
|
@@ -9268,11 +9323,11 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9268
9323
|
h !== t.curIndex && t.changeIndex(h, u);
|
|
9269
9324
|
var d = f.getOffsetCurrentTime(l, u, h);
|
|
9270
9325
|
if (t.player.offsetCurrentTime = d, !!t.curPos) {
|
|
9271
|
-
var
|
|
9272
|
-
l <
|
|
9326
|
+
var p = t.curPos, g = p.start, v = p.end;
|
|
9327
|
+
l < g ? t.player.currentTime = g : l > v && h >= c - 1 && t.player.pause();
|
|
9273
9328
|
}
|
|
9274
9329
|
}
|
|
9275
|
-
}), _(
|
|
9330
|
+
}), _(m(t), "_onSeeking", function() {
|
|
9276
9331
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9277
9332
|
if (t._checkIfEnabled(u))
|
|
9278
9333
|
if (l < u[0].start)
|
|
@@ -9286,7 +9341,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9286
9341
|
h >= 0 && (t.player.currentTime = h);
|
|
9287
9342
|
}
|
|
9288
9343
|
}
|
|
9289
|
-
}), _(
|
|
9344
|
+
}), _(m(t), "_onPlay", function() {
|
|
9290
9345
|
var s = t.player, l = s.currentTime, u = s.timeSegments;
|
|
9291
9346
|
t._checkIfEnabled(u) && l >= u[u.length - 1].end && (t.player.currentTime = u[0].start);
|
|
9292
9347
|
}), t;
|
|
@@ -9294,7 +9349,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9294
9349
|
return E(r, [{
|
|
9295
9350
|
key: "afterCreate",
|
|
9296
9351
|
value: function() {
|
|
9297
|
-
this.curIndex = -1, this.curPos = null, this.lastCurrentTime = 0, this.updateSegments(), this.on(
|
|
9352
|
+
this.curIndex = -1, this.curPos = null, this.lastCurrentTime = 0, this.updateSegments(), this.on(Ie, this._onDurationChange), this.on(ke, this._onLoadedData), this.on(re, this._onTimeupdate), this.on(kt, this._onSeeking), this.on(se, this._onPlay);
|
|
9298
9353
|
}
|
|
9299
9354
|
}, {
|
|
9300
9355
|
key: "setConfig",
|
|
@@ -9346,8 +9401,8 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9346
9401
|
return l;
|
|
9347
9402
|
var d = e - i;
|
|
9348
9403
|
if (d < 0 && e < c) {
|
|
9349
|
-
var
|
|
9350
|
-
return l = n - 1 >= 0 ? s[n - 1].end + d +
|
|
9404
|
+
var p = i > c ? i - c : 0;
|
|
9405
|
+
return l = n - 1 >= 0 ? s[n - 1].end + d + p : 0, l;
|
|
9351
9406
|
}
|
|
9352
9407
|
return -1;
|
|
9353
9408
|
}
|
|
@@ -9375,7 +9430,7 @@ var Xo = /* @__PURE__ */ function(a) {
|
|
|
9375
9430
|
};
|
|
9376
9431
|
}
|
|
9377
9432
|
}]), r;
|
|
9378
|
-
}(
|
|
9433
|
+
}(xe);
|
|
9379
9434
|
function Jo() {
|
|
9380
9435
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
|
|
9381
9436
|
<path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
|
|
@@ -9405,35 +9460,35 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9405
9460
|
T(this, r);
|
|
9406
9461
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9407
9462
|
i[n] = arguments[n];
|
|
9408
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9409
|
-
var l =
|
|
9463
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onBarMousedown", function(s) {
|
|
9464
|
+
var l = m(t), u = l.player, c = t.find(".xgplayer-bar");
|
|
9410
9465
|
f.event(s);
|
|
9411
|
-
var h = c.getBoundingClientRect(), d = f.getEventPos(s, u.zoom),
|
|
9412
|
-
if (d.h =
|
|
9413
|
-
return t.updateVolumePos(
|
|
9414
|
-
}), _(
|
|
9415
|
-
var l =
|
|
9466
|
+
var h = c.getBoundingClientRect(), d = f.getEventPos(s, u.zoom), p = h.height - (d.clientY - h.top);
|
|
9467
|
+
if (d.h = p, d.barH = h.height, t.pos = d, !(p < -2))
|
|
9468
|
+
return t.updateVolumePos(p, s), document.addEventListener("mouseup", t.onBarMouseUp), t._d.isStart = !0, !1;
|
|
9469
|
+
}), _(m(t), "onBarMouseMove", function(s) {
|
|
9470
|
+
var l = m(t), u = l._d;
|
|
9416
9471
|
if (u.isStart) {
|
|
9417
|
-
var c =
|
|
9472
|
+
var c = m(t), h = c.pos, d = c.player;
|
|
9418
9473
|
s.preventDefault(), s.stopPropagation(), f.event(s);
|
|
9419
|
-
var
|
|
9474
|
+
var p = f.getEventPos(s, d.zoom);
|
|
9420
9475
|
u.isMoving = !0;
|
|
9421
|
-
var
|
|
9422
|
-
|
|
9476
|
+
var g = h.h - p.clientY + h.clientY;
|
|
9477
|
+
g > h.barH || t.updateVolumePos(g, s);
|
|
9423
9478
|
}
|
|
9424
|
-
}), _(
|
|
9479
|
+
}), _(m(t), "onBarMouseUp", function(s) {
|
|
9425
9480
|
f.event(s), document.removeEventListener("mouseup", t.onBarMouseUp);
|
|
9426
|
-
var l =
|
|
9481
|
+
var l = m(t), u = l._d;
|
|
9427
9482
|
u.isStart = !1, u.isMoving = !1;
|
|
9428
|
-
}), _(
|
|
9483
|
+
}), _(m(t), "onMouseenter", function(s) {
|
|
9429
9484
|
t._d.isActive = !0, t.focus(), t.emit("icon_mouseenter", {
|
|
9430
9485
|
pluginName: t.pluginName
|
|
9431
9486
|
});
|
|
9432
|
-
}), _(
|
|
9487
|
+
}), _(m(t), "onMouseleave", function(s) {
|
|
9433
9488
|
t._d.isActive = !1, t.unFocus(100, !1, s), t.emit("icon_mouseleave", {
|
|
9434
9489
|
pluginName: t.pluginName
|
|
9435
9490
|
});
|
|
9436
|
-
}), _(
|
|
9491
|
+
}), _(m(t), "onVolumeChange", function(s) {
|
|
9437
9492
|
if (t.player) {
|
|
9438
9493
|
var l = t.player, u = l.muted, c = l.volume;
|
|
9439
9494
|
t._d.isMoving || (t.find(".xgplayer-drag").style.height = u || c === 0 ? "4px" : "".concat(c * 100, "%"), t.config.showValueLabel && t.updateVolumeValue()), t.animate(u, c);
|
|
@@ -9475,7 +9530,7 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9475
9530
|
pre: function(u) {
|
|
9476
9531
|
u.preventDefault(), u.stopPropagation();
|
|
9477
9532
|
}
|
|
9478
|
-
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave),
|
|
9533
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), M.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(Xi, this.onVolumeChange), this.once(ke, this.onVolumeChange), f.typeOf(s) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
9479
9534
|
}
|
|
9480
9535
|
}
|
|
9481
9536
|
}, {
|
|
@@ -9553,7 +9608,7 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9553
9608
|
}, {
|
|
9554
9609
|
key: "destroy",
|
|
9555
9610
|
value: function() {
|
|
9556
|
-
this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon",
|
|
9611
|
+
this._timerId && (f.clearTimeout(this, this._timerId), this._timerId = null), this.unbind("mouseenter", this.onMouseenter), this.unbind(["blur", "mouseleave"], this.onMouseleave), this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp), document.removeEventListener("mouseup", this.onBarMouseUp), this.unbind(".xgplayer-icon", M.device === "mobile" ? "touchend" : "click", this.changeMutedHandler);
|
|
9557
9612
|
}
|
|
9558
9613
|
}, {
|
|
9559
9614
|
key: "render",
|
|
@@ -9591,7 +9646,7 @@ var ta = /* @__PURE__ */ function(a) {
|
|
|
9591
9646
|
};
|
|
9592
9647
|
}
|
|
9593
9648
|
}]), r;
|
|
9594
|
-
}(
|
|
9649
|
+
}(V);
|
|
9595
9650
|
function ia() {
|
|
9596
9651
|
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">
|
|
9597
9652
|
<g clip-path="url(#clip0)">
|
|
@@ -9618,7 +9673,7 @@ var na = /* @__PURE__ */ function(a) {
|
|
|
9618
9673
|
value: function() {
|
|
9619
9674
|
var e = this;
|
|
9620
9675
|
if (!this.config.disable) {
|
|
9621
|
-
L(
|
|
9676
|
+
D(L(r.prototype), "afterCreate", this).call(this), this.appendChild(".xgplayer-icon", this.icons.rotate), this.onBtnClick = this.onBtnClick.bind(this), this.bind(".xgplayer-icon", ["click", "touchend"], this.onBtnClick), this.on(Se, function() {
|
|
9622
9677
|
e.rotateDeg && e.config.innerRotate && f.setTimeout(e, function() {
|
|
9623
9678
|
e.updateRotateDeg(e.rotateDeg, e.config.innerRotate);
|
|
9624
9679
|
}, 100);
|
|
@@ -9630,7 +9685,7 @@ var na = /* @__PURE__ */ function(a) {
|
|
|
9630
9685
|
}, {
|
|
9631
9686
|
key: "destroy",
|
|
9632
9687
|
value: function() {
|
|
9633
|
-
L(
|
|
9688
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", ["click", "touchend"], this.onBtnClick);
|
|
9634
9689
|
}
|
|
9635
9690
|
}, {
|
|
9636
9691
|
key: "onBtnClick",
|
|
@@ -9644,17 +9699,17 @@ var na = /* @__PURE__ */ function(a) {
|
|
|
9644
9699
|
this.player.videoRotateDeg = e;
|
|
9645
9700
|
return;
|
|
9646
9701
|
}
|
|
9647
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth,
|
|
9648
|
-
(e === 0.75 || e === 0.25) && (
|
|
9649
|
-
var b = "translate(".concat(y, "px,").concat(
|
|
9702
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, p = c && i ? c.offsetHeight : u.offsetHeight, g = s, v = l, y = 0, C = 0;
|
|
9703
|
+
(e === 0.75 || e === 0.25) && (g = "".concat(p, "px"), v = "".concat(d, "px"), y = -(p - d) / 2, C = -(d - p) / 2);
|
|
9704
|
+
var b = "translate(".concat(y, "px,").concat(C, "px) rotate(").concat(e, "turn)"), w = {
|
|
9650
9705
|
transformOrigin: "center center",
|
|
9651
9706
|
transform: b,
|
|
9652
9707
|
webKitTransform: b,
|
|
9653
|
-
height:
|
|
9654
|
-
width:
|
|
9655
|
-
},
|
|
9656
|
-
Object.keys(
|
|
9657
|
-
|
|
9708
|
+
height: v,
|
|
9709
|
+
width: g
|
|
9710
|
+
}, A = i ? h : u, F = i ? n.getPlugin("poster") : null;
|
|
9711
|
+
Object.keys(w).map(function(H) {
|
|
9712
|
+
A.style[H] = w[H], F && F.root && (F.root.style[H] = w[H]);
|
|
9658
9713
|
});
|
|
9659
9714
|
}
|
|
9660
9715
|
}, {
|
|
@@ -9680,7 +9735,7 @@ var na = /* @__PURE__ */ function(a) {
|
|
|
9680
9735
|
<xg-icon class="xgplayer-rotate">
|
|
9681
9736
|
<div class="xgplayer-icon">
|
|
9682
9737
|
</div>
|
|
9683
|
-
`.concat(
|
|
9738
|
+
`.concat(Ae(this, "ROTATE_TIPS", this.playerConfig.isHideTips), `
|
|
9684
9739
|
</xg-icon>`);
|
|
9685
9740
|
}
|
|
9686
9741
|
}], [{
|
|
@@ -9731,7 +9786,7 @@ var je = {
|
|
|
9731
9786
|
T(this, r);
|
|
9732
9787
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
9733
9788
|
i[n] = arguments[n];
|
|
9734
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
9789
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "switchPIP", function(s) {
|
|
9735
9790
|
if (!t.isPIPAvailable())
|
|
9736
9791
|
return !1;
|
|
9737
9792
|
s.stopPropagation && s.stopPropagation(), t.isPip ? (t.exitPIP(), t.emitUserAction(s, "change_pip", {
|
|
@@ -9754,7 +9809,7 @@ var je = {
|
|
|
9754
9809
|
key: "afterCreate",
|
|
9755
9810
|
value: function() {
|
|
9756
9811
|
var e = this;
|
|
9757
|
-
this.isPIPAvailable() && (L(
|
|
9812
|
+
this.isPIPAvailable() && (D(L(r.prototype), "afterCreate", this).call(this), this.pMode = je.INLINE, this.initPipEvents(), this.config.showIcon && this.initIcons(), this.once(Ct, function() {
|
|
9758
9813
|
e.config.showIcon && (f.removeClass(e.find(".xgplayer-icon"), "xg-icon-disable"), e.bind("click", e.switchPIP));
|
|
9759
9814
|
}));
|
|
9760
9815
|
}
|
|
@@ -9827,20 +9882,20 @@ var je = {
|
|
|
9827
9882
|
u.width = c.width, u.height = c.height;
|
|
9828
9883
|
}
|
|
9829
9884
|
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
9830
|
-
var d = s.docPiPNode,
|
|
9885
|
+
var d = s.docPiPNode, p = s.docPiPStyle;
|
|
9831
9886
|
e.enterPIPCallback();
|
|
9832
|
-
var
|
|
9887
|
+
var g = d || i.root, v = g.parentElement, y = g.previousSibling, C = g.nextSibling;
|
|
9833
9888
|
e.copyStyleIntoPiPWindow(h);
|
|
9834
9889
|
var b = document.createElement("style");
|
|
9835
|
-
if (b.append("body{padding:0; margin:0;}"),
|
|
9836
|
-
var
|
|
9837
|
-
typeof
|
|
9890
|
+
if (b.append("body{padding:0; margin:0;}"), p) {
|
|
9891
|
+
var w = "";
|
|
9892
|
+
typeof p == "string" ? w = p : typeof p == "function" && (w = p.call(s)), w && b.append(w);
|
|
9838
9893
|
} else
|
|
9839
|
-
|
|
9894
|
+
g === i.root && b.append(`
|
|
9840
9895
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
9841
9896
|
`);
|
|
9842
|
-
h.document.head.append(b), h.document.body.append(
|
|
9843
|
-
|
|
9897
|
+
h.document.head.append(b), h.document.body.append(g), h.addEventListener("pagehide", function(A) {
|
|
9898
|
+
v && (C ? v.insertBefore(g, C) : y ? v.insertBefore(g, y.nextSibling) : v.appendChild(g)), e.leavePIPCallback();
|
|
9844
9899
|
}, {
|
|
9845
9900
|
once: !0
|
|
9846
9901
|
});
|
|
@@ -9886,7 +9941,7 @@ var je = {
|
|
|
9886
9941
|
}, {
|
|
9887
9942
|
key: "destroy",
|
|
9888
9943
|
value: function() {
|
|
9889
|
-
L(
|
|
9944
|
+
D(L(r.prototype), "destroy", this).call(this);
|
|
9890
9945
|
var e = this.player;
|
|
9891
9946
|
e.media.removeEventListener("enterpictureinpicture", this.enterPIPCallback), e.media.removeEventListener("leavepictureinpicture", this.leavePIPCallback), r.checkWebkitSetPresentationMode(e.media) && e.media.removeEventListener("webkitpresentationmodechanged", this.onWebkitpresentationmodechanged), this.exitPIP(), this.unbind("click", this.btnClick);
|
|
9892
9947
|
}
|
|
@@ -9897,7 +9952,7 @@ var je = {
|
|
|
9897
9952
|
return `<xg-icon class="xgplayer-pip">
|
|
9898
9953
|
<div class="xgplayer-icon xg-icon-disable">
|
|
9899
9954
|
</div>
|
|
9900
|
-
`.concat(
|
|
9955
|
+
`.concat(Ae(this, "PIP", this.playerConfig.isHideTips), `
|
|
9901
9956
|
</xg-icon>`);
|
|
9902
9957
|
}
|
|
9903
9958
|
}], [{
|
|
@@ -9937,8 +9992,8 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
9937
9992
|
var o = I(r);
|
|
9938
9993
|
function r(t) {
|
|
9939
9994
|
var e;
|
|
9940
|
-
return T(this, r), e = o.call(this, t), _(
|
|
9941
|
-
var n =
|
|
9995
|
+
return T(this, r), e = o.call(this, t), _(m(e), "playNext", function(i) {
|
|
9996
|
+
var n = m(e), s = n.player;
|
|
9942
9997
|
i.preventDefault(), i.stopPropagation(), e.idx + 1 < e.config.urlList.length ? (e.idx++, e.nextHandler(e.config.urlList[e.idx], e.idx), s.emit(gt, e.idx + 1)) : (e.nextHandler(), s.emit(gt));
|
|
9943
9998
|
}), e.idx = -1, e;
|
|
9944
9999
|
}
|
|
@@ -9958,7 +10013,7 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
9958
10013
|
key: "initEvents",
|
|
9959
10014
|
value: function() {
|
|
9960
10015
|
this.nextHandler = this.hook("nextClick", this.changeSrc);
|
|
9961
|
-
var e =
|
|
10016
|
+
var e = M.device === "mobile" ? "touchend" : "click";
|
|
9962
10017
|
this.bind(e, this.playNext), this.show();
|
|
9963
10018
|
}
|
|
9964
10019
|
}, {
|
|
@@ -9980,7 +10035,7 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
9980
10035
|
<xg-icon class="xgplayer-playnext">
|
|
9981
10036
|
<div class="xgplayer-icon">
|
|
9982
10037
|
</div>
|
|
9983
|
-
`.concat(
|
|
10038
|
+
`.concat(Ae(this, "PLAYNEXT_TIPS", this.playerConfig.isHideTips), `
|
|
9984
10039
|
</xg-icon>
|
|
9985
10040
|
`);
|
|
9986
10041
|
}
|
|
@@ -10000,7 +10055,7 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
10000
10055
|
};
|
|
10001
10056
|
}
|
|
10002
10057
|
}]), r;
|
|
10003
|
-
}(
|
|
10058
|
+
}(V), yn = { exports: {} };
|
|
10004
10059
|
(function(a, o) {
|
|
10005
10060
|
(function(r, t) {
|
|
10006
10061
|
a.exports = t();
|
|
@@ -10008,39 +10063,39 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
10008
10063
|
return function r(t, e, i) {
|
|
10009
10064
|
var n = window, s = "application/octet-stream", l = i || s, u = t, c = !e && !i && u, h = document.createElement("a"), d = function(R) {
|
|
10010
10065
|
return String(R);
|
|
10011
|
-
},
|
|
10012
|
-
if (
|
|
10013
|
-
var
|
|
10014
|
-
return
|
|
10015
|
-
r(R.target.response,
|
|
10066
|
+
}, p = n.Blob || n.MozBlob || n.WebKitBlob || d, g = e || "download", v, y;
|
|
10067
|
+
if (p = p.call ? p.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (g = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
10068
|
+
var C = new XMLHttpRequest();
|
|
10069
|
+
return C.open("GET", c, !0), C.responseType = "blob", C.onload = function(R) {
|
|
10070
|
+
r(R.target.response, g, s);
|
|
10016
10071
|
}, setTimeout(function() {
|
|
10017
|
-
|
|
10018
|
-
}, 0),
|
|
10072
|
+
C.send();
|
|
10073
|
+
}, 0), C;
|
|
10019
10074
|
}
|
|
10020
10075
|
if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))
|
|
10021
|
-
if (u.length > 1024 * 1024 * 1.999 &&
|
|
10022
|
-
u =
|
|
10076
|
+
if (u.length > 1024 * 1024 * 1.999 && p !== d)
|
|
10077
|
+
u = F(u), l = u.type || s;
|
|
10023
10078
|
else
|
|
10024
10079
|
return navigator.msSaveBlob ? (
|
|
10025
10080
|
// IE10 can't do a[download], only Blobs:
|
|
10026
|
-
navigator.msSaveBlob(
|
|
10027
|
-
) :
|
|
10081
|
+
navigator.msSaveBlob(F(u), g)
|
|
10082
|
+
) : H(u);
|
|
10028
10083
|
else if (/([\x80-\xff])/.test(u)) {
|
|
10029
|
-
var b = 0,
|
|
10030
|
-
for (b; b <
|
|
10031
|
-
|
|
10032
|
-
u = new
|
|
10033
|
-
}
|
|
10034
|
-
|
|
10035
|
-
function
|
|
10036
|
-
var Z = R.split(/[:;,]/),
|
|
10084
|
+
var b = 0, w = new Uint8Array(u.length), A = w.length;
|
|
10085
|
+
for (b; b < A; ++b)
|
|
10086
|
+
w[b] = u.charCodeAt(b);
|
|
10087
|
+
u = new p([w], { type: l });
|
|
10088
|
+
}
|
|
10089
|
+
v = u instanceof p ? u : new p([u], { type: l });
|
|
10090
|
+
function F(R) {
|
|
10091
|
+
var Z = R.split(/[:;,]/), G = Z[1], U = Z[2] == "base64" ? atob : decodeURIComponent, te = U(Z.pop()), ae = te.length, le = 0, Le = new Uint8Array(ae);
|
|
10037
10092
|
for (le; le < ae; ++le)
|
|
10038
|
-
|
|
10039
|
-
return new
|
|
10093
|
+
Le[le] = te.charCodeAt(le);
|
|
10094
|
+
return new p([Le], { type: G });
|
|
10040
10095
|
}
|
|
10041
|
-
function
|
|
10096
|
+
function H(R, Z) {
|
|
10042
10097
|
if ("download" in h)
|
|
10043
|
-
return h.href = R, h.setAttribute("download",
|
|
10098
|
+
return h.href = R, h.setAttribute("download", g), h.className = "download-js-link", h.innerHTML = "downloading...", h.style.display = "none", document.body.appendChild(h), setTimeout(function() {
|
|
10044
10099
|
h.click(), document.body.removeChild(h), Z === !0 && setTimeout(function() {
|
|
10045
10100
|
n.URL.revokeObjectURL(h.href);
|
|
10046
10101
|
}, 250);
|
|
@@ -10049,25 +10104,25 @@ var la = /* @__PURE__ */ function(a) {
|
|
|
10049
10104
|
return /^data:/.test(R) && (R = "data:" + R.replace(/^data:([\w\/\-\+]+)/, s)), window.open(R) || confirm(`Displaying New Document
|
|
10050
10105
|
|
|
10051
10106
|
Use Save As... to download, then click back to return to this page.`) && (location.href = R), !0;
|
|
10052
|
-
var
|
|
10053
|
-
document.body.appendChild(
|
|
10054
|
-
document.body.removeChild(
|
|
10107
|
+
var G = document.createElement("iframe");
|
|
10108
|
+
document.body.appendChild(G), !Z && /^data:/.test(R) && (R = "data:" + R.replace(/^data:([\w\/\-\+]+)/, s)), G.src = R, setTimeout(function() {
|
|
10109
|
+
document.body.removeChild(G);
|
|
10055
10110
|
}, 333);
|
|
10056
10111
|
}
|
|
10057
10112
|
if (navigator.msSaveBlob)
|
|
10058
|
-
return navigator.msSaveBlob(
|
|
10113
|
+
return navigator.msSaveBlob(v, g);
|
|
10059
10114
|
if (n.URL)
|
|
10060
|
-
|
|
10115
|
+
H(n.URL.createObjectURL(v), !0);
|
|
10061
10116
|
else {
|
|
10062
|
-
if (typeof
|
|
10117
|
+
if (typeof v == "string" || v.constructor === d)
|
|
10063
10118
|
try {
|
|
10064
|
-
return
|
|
10119
|
+
return H("data:" + l + ";base64," + n.btoa(v));
|
|
10065
10120
|
} catch {
|
|
10066
|
-
return
|
|
10121
|
+
return H("data:" + l + "," + encodeURIComponent(v));
|
|
10067
10122
|
}
|
|
10068
10123
|
y = new FileReader(), y.onload = function(R) {
|
|
10069
|
-
|
|
10070
|
-
}, y.readAsDataURL(
|
|
10124
|
+
H(this.result);
|
|
10125
|
+
}, y.readAsDataURL(v);
|
|
10071
10126
|
}
|
|
10072
10127
|
return !0;
|
|
10073
10128
|
};
|
|
@@ -10097,7 +10152,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10097
10152
|
var o = I(r);
|
|
10098
10153
|
function r(t) {
|
|
10099
10154
|
var e;
|
|
10100
|
-
return T(this, r), e = o.call(this, t), _(
|
|
10155
|
+
return T(this, r), e = o.call(this, t), _(m(e), "download", function(i) {
|
|
10101
10156
|
if (!e.isLock) {
|
|
10102
10157
|
e.emitUserAction(i, "download");
|
|
10103
10158
|
var n = e.playerConfig.url, s = "";
|
|
@@ -10112,7 +10167,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10112
10167
|
return E(r, [{
|
|
10113
10168
|
key: "afterCreate",
|
|
10114
10169
|
value: function() {
|
|
10115
|
-
L(
|
|
10170
|
+
D(L(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.appendChild(".xgplayer-icon", this.icons.download), this._handler = this.hook("click", this.download, {
|
|
10116
10171
|
pre: function(i) {
|
|
10117
10172
|
i.preventDefault(), i.stopPropagation();
|
|
10118
10173
|
}
|
|
@@ -10137,7 +10192,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10137
10192
|
}, {
|
|
10138
10193
|
key: "destroy",
|
|
10139
10194
|
value: function() {
|
|
10140
|
-
L(
|
|
10195
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.download), window.clearTimeout(this.timer), this.timer = null;
|
|
10141
10196
|
}
|
|
10142
10197
|
}, {
|
|
10143
10198
|
key: "render",
|
|
@@ -10146,7 +10201,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10146
10201
|
return `<xg-icon class="xgplayer-download">
|
|
10147
10202
|
<div class="xgplayer-icon">
|
|
10148
10203
|
</div>
|
|
10149
|
-
`.concat(
|
|
10204
|
+
`.concat(Ae(this, "DOWNLOAD_TIPS", this.playerConfig.isHideTips), `
|
|
10150
10205
|
</xg-icon>`);
|
|
10151
10206
|
}
|
|
10152
10207
|
}], [{
|
|
@@ -10178,11 +10233,11 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10178
10233
|
}, {
|
|
10179
10234
|
key: "afterCreate",
|
|
10180
10235
|
value: function() {
|
|
10181
|
-
L(
|
|
10236
|
+
D(L(r.prototype), "afterCreate", this).call(this), this.appendChild(".xgplayer-icon", this.icons.screenshotIcon);
|
|
10182
10237
|
var e = this.config;
|
|
10183
10238
|
this.initSize = function(i) {
|
|
10184
10239
|
e.fitVideo && (e.width = i.vWidth, e.height = i.vHeight);
|
|
10185
|
-
}, this.once(
|
|
10240
|
+
}, this.once(Se, this.initSize);
|
|
10186
10241
|
}
|
|
10187
10242
|
}, {
|
|
10188
10243
|
key: "onPluginsReady",
|
|
@@ -10229,17 +10284,17 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10229
10284
|
quality: 0.92,
|
|
10230
10285
|
type: "image/png"
|
|
10231
10286
|
}, l = this.config, u = this.player, c = s.quality || l.quality, h = s.type || l.type;
|
|
10232
|
-
return new Promise(function(d,
|
|
10233
|
-
var
|
|
10287
|
+
return new Promise(function(d, p) {
|
|
10288
|
+
var g = null, v;
|
|
10234
10289
|
if (u.media.canvas)
|
|
10235
|
-
|
|
10290
|
+
g = u.media.canvas;
|
|
10236
10291
|
else {
|
|
10237
|
-
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i),
|
|
10238
|
-
var y = u.media.videoWidth / u.media.videoHeight,
|
|
10239
|
-
y >
|
|
10292
|
+
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), g = n.canvas, v = n.canvasCtx;
|
|
10293
|
+
var y = u.media.videoWidth / u.media.videoHeight, C = g.width / g.height, b = 0, w = 0, A = u.media.videoWidth, F = u.media.videoHeight, H, R, Z, G;
|
|
10294
|
+
y > C ? (Z = g.width, G = g.width / y, H = 0, R = Math.round((g.height - G) / 2)) : y === C ? (Z = g.width, G = g.height, H = 0, R = 0) : y < C && (Z = g.height * y, G = g.height, H = Math.round((g.width - Z) / 2), R = 0), v.drawImage(u.media, b, w, A, F, H, R, Z, G);
|
|
10240
10295
|
}
|
|
10241
|
-
var
|
|
10242
|
-
|
|
10296
|
+
var U = g.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
10297
|
+
U = U.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), d(U);
|
|
10243
10298
|
});
|
|
10244
10299
|
}
|
|
10245
10300
|
}, {
|
|
@@ -10252,7 +10307,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10252
10307
|
}, {
|
|
10253
10308
|
key: "destroy",
|
|
10254
10309
|
value: function() {
|
|
10255
|
-
L(
|
|
10310
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.onClickBtn), this.off(Se, this.initSize);
|
|
10256
10311
|
}
|
|
10257
10312
|
}, {
|
|
10258
10313
|
key: "render",
|
|
@@ -10298,7 +10353,7 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10298
10353
|
maxHeight: r
|
|
10299
10354
|
}), this.onItemClick = this.onItemClick.bind(this), this.renderItemList();
|
|
10300
10355
|
var t = this.config.domEventType === "touch" ? "touchend" : "click";
|
|
10301
|
-
this._delegates =
|
|
10356
|
+
this._delegates = V.delegate.call(this, this.root, "li", t, this.onItemClick);
|
|
10302
10357
|
}
|
|
10303
10358
|
return E(a, [{
|
|
10304
10359
|
key: "renderItemList",
|
|
@@ -10373,26 +10428,26 @@ var ha = /* @__PURE__ */ function(a) {
|
|
|
10373
10428
|
function pa(a, o) {
|
|
10374
10429
|
return a === fe.SIDE ? o === j.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
|
|
10375
10430
|
}
|
|
10376
|
-
var
|
|
10431
|
+
var De = M.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
10377
10432
|
P(r, a);
|
|
10378
10433
|
var o = I(r);
|
|
10379
10434
|
function r(t) {
|
|
10380
10435
|
var e;
|
|
10381
|
-
return T(this, r), e = o.call(this, t), _(
|
|
10436
|
+
return T(this, r), e = o.call(this, t), _(m(e), "onEnter", function(i) {
|
|
10382
10437
|
i.stopPropagation(), e.emit("icon_mouseenter", {
|
|
10383
10438
|
pluginName: e.pluginName
|
|
10384
10439
|
}), e.switchActiveState(i);
|
|
10385
|
-
}), _(
|
|
10440
|
+
}), _(m(e), "switchActiveState", function(i) {
|
|
10386
10441
|
i.stopPropagation();
|
|
10387
10442
|
var n = e.config.toggleMode;
|
|
10388
10443
|
n === We.CLICK ? e.toggle(!e.isActive) : e.toggle(!0);
|
|
10389
|
-
}), _(
|
|
10444
|
+
}), _(m(e), "onLeave", function(i) {
|
|
10390
10445
|
i.stopPropagation(), e.emit("icon_mouseleave", {
|
|
10391
10446
|
pluginName: e.pluginName
|
|
10392
10447
|
}), e.config.listType !== fe.SIDE && e.isActive && e.toggle(!1);
|
|
10393
|
-
}), _(
|
|
10448
|
+
}), _(m(e), "onListEnter", function(i) {
|
|
10394
10449
|
e.enterType = 2;
|
|
10395
|
-
}), _(
|
|
10450
|
+
}), _(m(e), "onListLeave", function(i) {
|
|
10396
10451
|
e.enterType = 0, e.isActive && e.toggle(!1);
|
|
10397
10452
|
}), e.isIcons = !1, e.isActive = !1, e.curValue = null, e.curIndex = 0, e;
|
|
10398
10453
|
}
|
|
@@ -10405,13 +10460,13 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10405
10460
|
key: "afterCreate",
|
|
10406
10461
|
value: function() {
|
|
10407
10462
|
var e = this, i = this.config;
|
|
10408
|
-
this.initIcons(),
|
|
10463
|
+
this.initIcons(), De = De || this.domEventType === "touch", De && M.device === "mobile" && i.listType === fe.DEFAULT && (i.listType = fe.SIDE), i.hidePortrait && f.addClass(this.root, "portrait"), this.on([Se, ge], function() {
|
|
10409
10464
|
e._resizeList();
|
|
10410
10465
|
}), this.once(ve, function() {
|
|
10411
10466
|
i.list && i.list.length > 0 && (e.renderItemList(i.list), e.show());
|
|
10412
|
-
}),
|
|
10467
|
+
}), De && this.on(ei, function() {
|
|
10413
10468
|
e.isActive && (e.optionsList && e.optionsList.hide(), e.isActive = !1);
|
|
10414
|
-
}),
|
|
10469
|
+
}), De ? (i.toggleMode = We.CLICK, this.activeEvent = "touchend") : this.activeEvent = i.toggleMode === We.CLICK ? "click" : "mouseenter", i.toggleMode === We.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
10470
|
}
|
|
10416
10471
|
}, {
|
|
10417
10472
|
key: "initIcons",
|
|
@@ -10459,7 +10514,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10459
10514
|
var n = this.config, s = n.listType, l = n.list;
|
|
10460
10515
|
this.curIndex = i.to.index, this.curItem = l[this.curIndex], this.changeCurrentText();
|
|
10461
10516
|
var u = this.config.isItemClickHide;
|
|
10462
|
-
(u ||
|
|
10517
|
+
(u || De || s === fe.SIDE) && this.toggle(!1);
|
|
10463
10518
|
}
|
|
10464
10519
|
}, {
|
|
10465
10520
|
key: "onIconClick",
|
|
@@ -10485,16 +10540,16 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10485
10540
|
config: {
|
|
10486
10541
|
data: e || [],
|
|
10487
10542
|
className: pa(s.listType, s.position),
|
|
10488
|
-
onItemClick: function(
|
|
10489
|
-
n.onItemClick(
|
|
10543
|
+
onItemClick: function(v, y) {
|
|
10544
|
+
n.onItemClick(v, y);
|
|
10490
10545
|
},
|
|
10491
|
-
domEventType:
|
|
10546
|
+
domEventType: De ? "touch" : "mouse"
|
|
10492
10547
|
},
|
|
10493
10548
|
root: s.listType === fe.SIDE ? u.innerContainer || u.root : this.root
|
|
10494
10549
|
};
|
|
10495
10550
|
if (this.config.isShowIcon) {
|
|
10496
|
-
var h = this.player.root.getBoundingClientRect(), d = h.height,
|
|
10497
|
-
|
|
10551
|
+
var h = this.player.root.getBoundingClientRect(), d = h.height, p = s.listType === fe.MIDDLE ? d - 50 : d;
|
|
10552
|
+
p && s.heightLimit && (c.config.maxHeight = "".concat(p, "px")), this.optionsList = new ga(c), this.changeCurrentText(), this.show();
|
|
10498
10553
|
}
|
|
10499
10554
|
this._resizeList();
|
|
10500
10555
|
}
|
|
@@ -10545,7 +10600,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10545
10600
|
};
|
|
10546
10601
|
}
|
|
10547
10602
|
}]), r;
|
|
10548
|
-
}(
|
|
10603
|
+
}(V), va = /* @__PURE__ */ function(a) {
|
|
10549
10604
|
P(r, a);
|
|
10550
10605
|
var o = I(r);
|
|
10551
10606
|
function r(t) {
|
|
@@ -10564,7 +10619,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10564
10619
|
key: "afterCreate",
|
|
10565
10620
|
value: function() {
|
|
10566
10621
|
var e = this;
|
|
10567
|
-
L(
|
|
10622
|
+
D(L(r.prototype), "afterCreate", this).call(this), this.on("resourceReady", function(i) {
|
|
10568
10623
|
e.changeDefinitionList(i);
|
|
10569
10624
|
}), this.on(ri, function(i) {
|
|
10570
10625
|
e.renderItemList(e.config.list, i.to);
|
|
@@ -10600,7 +10655,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10600
10655
|
});
|
|
10601
10656
|
return (c.selected || c.definition && c.definition == s) && (d.selected = !0, l = h), d;
|
|
10602
10657
|
});
|
|
10603
|
-
L(
|
|
10658
|
+
D(L(r.prototype), "renderItemList", this).call(this, u, l);
|
|
10604
10659
|
}
|
|
10605
10660
|
}, {
|
|
10606
10661
|
key: "changeDefinitionList",
|
|
@@ -10618,7 +10673,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10618
10673
|
key: "onItemClick",
|
|
10619
10674
|
value: function(e, i) {
|
|
10620
10675
|
var n = this.player.definitionList;
|
|
10621
|
-
L(
|
|
10676
|
+
D(L(r.prototype), "onItemClick", this).apply(this, arguments), this.emitUserAction(e, "change_definition", {
|
|
10622
10677
|
from: i.from,
|
|
10623
10678
|
to: i.to
|
|
10624
10679
|
});
|
|
@@ -10668,19 +10723,19 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10668
10723
|
key: "afterCreate",
|
|
10669
10724
|
value: function() {
|
|
10670
10725
|
var e = this;
|
|
10671
|
-
L(
|
|
10726
|
+
D(L(r.prototype), "afterCreate", this).call(this), this.on(qi, function() {
|
|
10672
10727
|
e.curValue !== e.player.playbackRate && e.renderItemList();
|
|
10673
10728
|
}), this.renderItemList();
|
|
10674
10729
|
}
|
|
10675
10730
|
}, {
|
|
10676
10731
|
key: "show",
|
|
10677
10732
|
value: function(e) {
|
|
10678
|
-
!this.config.list || this.config.list.length === 0 || L(
|
|
10733
|
+
!this.config.list || this.config.list.length === 0 || D(L(r.prototype), "show", this).call(this);
|
|
10679
10734
|
}
|
|
10680
10735
|
}, {
|
|
10681
10736
|
key: "onItemClick",
|
|
10682
10737
|
value: function(e, i) {
|
|
10683
|
-
L(
|
|
10738
|
+
D(L(r.prototype), "onItemClick", this).call(this, e, i);
|
|
10684
10739
|
var n = e.delegateTarget, s = Number(n.getAttribute("rate"));
|
|
10685
10740
|
if (!s || s === this.curValue)
|
|
10686
10741
|
return !1;
|
|
@@ -10705,7 +10760,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10705
10760
|
};
|
|
10706
10761
|
return c.rate === i && (c.selected = !0, n = u), c.showText = e.getTextByLang(l), c;
|
|
10707
10762
|
});
|
|
10708
|
-
L(
|
|
10763
|
+
D(L(r.prototype), "renderItemList", this).call(this, s, n);
|
|
10709
10764
|
}
|
|
10710
10765
|
}, {
|
|
10711
10766
|
key: "changeCurrentText",
|
|
@@ -10718,7 +10773,7 @@ var Le = F.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10718
10773
|
}, {
|
|
10719
10774
|
key: "destroy",
|
|
10720
10775
|
value: function() {
|
|
10721
|
-
L(
|
|
10776
|
+
D(L(r.prototype), "destroy", this).call(this);
|
|
10722
10777
|
}
|
|
10723
10778
|
}], [{
|
|
10724
10779
|
key: "pluginName",
|
|
@@ -10766,7 +10821,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10766
10821
|
key: "afterCreate",
|
|
10767
10822
|
value: function() {
|
|
10768
10823
|
var e = this;
|
|
10769
|
-
L(
|
|
10824
|
+
D(L(r.prototype), "afterCreate", this).call(this), !this.config.disable && (this.config.target && (this.playerConfig.fullscreenTarget = this.config.target), this.initIcons(), this.on(ht, function(i) {
|
|
10770
10825
|
e.animate(i);
|
|
10771
10826
|
}), this.btnClick = this.btnClick.bind(this), this.handleCssFullscreen = this.hook("cssFullscreen_change", this.btnClick, {
|
|
10772
10827
|
pre: function(n) {
|
|
@@ -10817,7 +10872,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10817
10872
|
}, {
|
|
10818
10873
|
key: "destroy",
|
|
10819
10874
|
value: function() {
|
|
10820
|
-
L(
|
|
10875
|
+
D(L(r.prototype), "destroy", this).call(this), this.unbind(["click", "touchend"], this.btnClick);
|
|
10821
10876
|
}
|
|
10822
10877
|
}, {
|
|
10823
10878
|
key: "render",
|
|
@@ -10826,7 +10881,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10826
10881
|
return `<xg-icon class='xgplayer-cssfullscreen'>
|
|
10827
10882
|
<div class="xgplayer-icon">
|
|
10828
10883
|
</div>
|
|
10829
|
-
`.concat(
|
|
10884
|
+
`.concat(Ae(this, "CSSFULLSCREEN_TIPS", this.playerConfig.isHideTips), `
|
|
10830
10885
|
</xg-icon>`);
|
|
10831
10886
|
}
|
|
10832
10887
|
}], [{
|
|
@@ -10906,7 +10961,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10906
10961
|
return "error";
|
|
10907
10962
|
}
|
|
10908
10963
|
}]), r;
|
|
10909
|
-
}(
|
|
10964
|
+
}(V), Ca = /* @__PURE__ */ function(a) {
|
|
10910
10965
|
P(r, a);
|
|
10911
10966
|
var o = I(r);
|
|
10912
10967
|
function r() {
|
|
@@ -10958,7 +11013,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10958
11013
|
}, {
|
|
10959
11014
|
key: "render",
|
|
10960
11015
|
value: function() {
|
|
10961
|
-
return '<xg-prompt class="xgplayer-prompt '.concat(
|
|
11016
|
+
return '<xg-prompt class="xgplayer-prompt '.concat(k.CONTROLS_FOLLOW, `">
|
|
10962
11017
|
<span class="xgplayer-prompt-detail"></span>
|
|
10963
11018
|
</xg-prompt>`);
|
|
10964
11019
|
}
|
|
@@ -10984,7 +11039,7 @@ var Bi = /* @__PURE__ */ function(a) {
|
|
|
10984
11039
|
};
|
|
10985
11040
|
}
|
|
10986
11041
|
}]), r;
|
|
10987
|
-
}(
|
|
11042
|
+
}(V), Hi = {
|
|
10988
11043
|
time: 0,
|
|
10989
11044
|
text: "",
|
|
10990
11045
|
id: 1,
|
|
@@ -11147,9 +11202,9 @@ function wa(a) {
|
|
|
11147
11202
|
}), a.ispotsInit = !1, a.playerSize = {
|
|
11148
11203
|
left: r.sizeInfo.left,
|
|
11149
11204
|
width: r.sizeInfo.width
|
|
11150
|
-
}, a.on(
|
|
11205
|
+
}, a.on(Ie, function() {
|
|
11151
11206
|
a.ispotsInit ? a.updateDuration() : a.initDots();
|
|
11152
|
-
}), a.on(
|
|
11207
|
+
}), a.on(Se, function() {
|
|
11153
11208
|
a.positionDots();
|
|
11154
11209
|
});
|
|
11155
11210
|
}
|
|
@@ -11165,7 +11220,7 @@ var Ge = {
|
|
|
11165
11220
|
var o = I(r);
|
|
11166
11221
|
function r(t) {
|
|
11167
11222
|
var e;
|
|
11168
|
-
return T(this, r), e = o.call(this, t), _(
|
|
11223
|
+
return T(this, r), e = o.call(this, t), _(m(e), "onMousemove", function(i) {
|
|
11169
11224
|
if (!e.config.disable) {
|
|
11170
11225
|
if (f.hasClass(i.target, "xg-spot-content") && e.config.isHideThumbnailHover) {
|
|
11171
11226
|
e.player.plugins.progress.onMouseLeave(i);
|
|
@@ -11173,20 +11228,20 @@ var Ge = {
|
|
|
11173
11228
|
}
|
|
11174
11229
|
(e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11175
11230
|
}
|
|
11176
|
-
}), _(
|
|
11231
|
+
}), _(m(e), "onMousedown", function(i) {
|
|
11177
11232
|
e.config.disable || (e._state.f || f.hasClass(i.target, "xg-spot-content")) && (f.event(i), i.stopPropagation());
|
|
11178
|
-
}), _(
|
|
11233
|
+
}), _(m(e), "onMouseup", function(i) {
|
|
11179
11234
|
if (e.isDrag) {
|
|
11180
11235
|
var n = e.player.plugins.progress;
|
|
11181
11236
|
n && n.pos && (n.onMouseUp(i), !n.pos.isEnter && n.onMouseLeave(i));
|
|
11182
11237
|
}
|
|
11183
|
-
}), _(
|
|
11238
|
+
}), _(m(e), "onDotMouseLeave", function(i) {
|
|
11184
11239
|
if (!e.config.disable) {
|
|
11185
11240
|
e._curDot.removeEventListener("mouseleave", e.onDotMouseLeave), e.blurDot(i.target), e._curDot = null;
|
|
11186
11241
|
var n = e.player.plugins.progress;
|
|
11187
11242
|
n && n.enableBlur(), e.show();
|
|
11188
11243
|
}
|
|
11189
|
-
}), _(
|
|
11244
|
+
}), _(m(e), "onProgressMouseOver", function(i, n) {
|
|
11190
11245
|
if (!e.config.disable && f.hasClass(n.target, "xgplayer-spot") && !e._curDot) {
|
|
11191
11246
|
e._curDot = n.target, e.focusDot(n.target), e._curDot.children.length > 0 && e.hide();
|
|
11192
11247
|
var s = e.player.plugins.progress;
|
|
@@ -11211,7 +11266,7 @@ var Ge = {
|
|
|
11211
11266
|
n.seekTime && e.player.seek(n.seekTime);
|
|
11212
11267
|
}), this.transformTimeHook = this.hook("transformTime", function(i) {
|
|
11213
11268
|
e.setTimeContent(f.format(i));
|
|
11214
|
-
}), wa(this), this.on(
|
|
11269
|
+
}), wa(this), this.on(Ie, function() {
|
|
11215
11270
|
e.show();
|
|
11216
11271
|
}), this.config.disable && this.disable(), this.extTextRoot = this.find(".xg-spot-ext-text");
|
|
11217
11272
|
}
|
|
@@ -11235,7 +11290,7 @@ var Ge = {
|
|
|
11235
11290
|
var e = this, i = this.player.plugins.progress;
|
|
11236
11291
|
if (i && (Object.keys(Ge).map(function(s) {
|
|
11237
11292
|
e[Ge[s]] = e[Ge[s]].bind(e), i.addCallBack(s, e[Ge[s]]);
|
|
11238
|
-
}),
|
|
11293
|
+
}), M.device !== "mobile")) {
|
|
11239
11294
|
this.bind(".xg-spot-info", "mousemove", this.onMousemove), this.bind(".xg-spot-info", "mousedown", this.onMousedown), this.bind(".xg-spot-info", "mouseup", this.onMouseup);
|
|
11240
11295
|
var n = this.hook("previewClick", function() {
|
|
11241
11296
|
});
|
|
@@ -11272,8 +11327,8 @@ var Ge = {
|
|
|
11272
11327
|
var n = this.root, s = this.previewLine, l = this.player, u = this.config, c = l.controls.mode, h = c === "flex", d = n.getBoundingClientRect().width;
|
|
11273
11328
|
if (!(!d && this._hasThumnail)) {
|
|
11274
11329
|
d = this._hasThumnail && d < u.width ? u.width : d;
|
|
11275
|
-
var
|
|
11276
|
-
|
|
11330
|
+
var p = e - d / 2, g;
|
|
11331
|
+
p < 0 && !h ? (p = 0, g = e - d / 2) : p > i - d && !h ? (g = p - (i - d), p = i - d) : g = 0, g !== void 0 && (s.style.transform = "translateX(".concat(g.toFixed(2), "px)")), n.style.transform = "translateX(".concat(p.toFixed(2), "px) translateZ(0)");
|
|
11277
11332
|
}
|
|
11278
11333
|
}
|
|
11279
11334
|
}, {
|
|
@@ -11311,7 +11366,7 @@ var Ge = {
|
|
|
11311
11366
|
key: "registerThumbnail",
|
|
11312
11367
|
value: function() {
|
|
11313
11368
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11314
|
-
if (
|
|
11369
|
+
if (M.device !== "mobile") {
|
|
11315
11370
|
var i = this.player, n = this.config, s = i.getPlugin("thumbnail");
|
|
11316
11371
|
if (s && s.setConfig(e), !s || !s.usable || !n.isShowThumbnail) {
|
|
11317
11372
|
f.addClass(this.root, "short-line no-thumbnail");
|
|
@@ -11399,7 +11454,7 @@ var Ge = {
|
|
|
11399
11454
|
}, {
|
|
11400
11455
|
key: "render",
|
|
11401
11456
|
value: function() {
|
|
11402
|
-
return
|
|
11457
|
+
return M.device === "mobile" || this.playerConfig.isMobileSimulateMode === "mobile" ? "" : '<div class="xg-spot-info hide '.concat(this.config.mode === "short" ? "short-line" : "", `">
|
|
11403
11458
|
<div class="xg-spot-content">
|
|
11404
11459
|
<div class="xg-spot-thumbnail">
|
|
11405
11460
|
<span class="xg-spot-time"></span>
|
|
@@ -11435,7 +11490,7 @@ var Ge = {
|
|
|
11435
11490
|
};
|
|
11436
11491
|
}
|
|
11437
11492
|
}]), r;
|
|
11438
|
-
}(
|
|
11493
|
+
}(V), Ta = /* @__PURE__ */ function(a) {
|
|
11439
11494
|
P(r, a);
|
|
11440
11495
|
var o = I(r);
|
|
11441
11496
|
function r(t) {
|
|
@@ -11446,7 +11501,7 @@ var Ge = {
|
|
|
11446
11501
|
key: "afterCreate",
|
|
11447
11502
|
value: function() {
|
|
11448
11503
|
var e = this;
|
|
11449
|
-
this.usable && this.initThumbnail(), this.on([
|
|
11504
|
+
this.usable && this.initThumbnail(), this.on([Ie], function() {
|
|
11450
11505
|
var i = e.config, n = i.pic_num, s = i.interval;
|
|
11451
11506
|
e.usable && (e.interval = s > 0 ? s : Math.round(e.player.duration * 1e3 / n) / 1e3);
|
|
11452
11507
|
});
|
|
@@ -11497,28 +11552,28 @@ var Ge = {
|
|
|
11497
11552
|
value: function(e) {
|
|
11498
11553
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = this.config, l = s.pic_num, u = s.row, c = s.col, h = s.width, d = s.height;
|
|
11499
11554
|
this.interval = Math.round(this.player.duration / l);
|
|
11500
|
-
var
|
|
11501
|
-
|
|
11502
|
-
var
|
|
11555
|
+
var p = Math.ceil(e / this.interval);
|
|
11556
|
+
p = p > l ? l : p;
|
|
11557
|
+
var g = p < u * c ? 0 : Math.ceil(p / (u * c)) - 1, v = p - g * (c * u), y = v > 0 ? Math.ceil(v / c) - 1 : 0, C = v > 0 ? v - y * c - 1 : 0, b = 0, w = 0;
|
|
11503
11558
|
if (i && n) {
|
|
11504
|
-
var
|
|
11505
|
-
|
|
11559
|
+
var A = i / n;
|
|
11560
|
+
A < h / d ? (w = n, b = w * (h / d)) : (b = i, w = b / (h / d));
|
|
11506
11561
|
} else
|
|
11507
|
-
n ? i || (
|
|
11508
|
-
var
|
|
11562
|
+
n ? i || (w = n || d, b = w * (h / d)) : (b = i || h, w = b / (h / d));
|
|
11563
|
+
var F = this.getUrlByIndex(g);
|
|
11509
11564
|
return {
|
|
11510
|
-
urlIndex:
|
|
11565
|
+
urlIndex: g,
|
|
11511
11566
|
rowIndex: y,
|
|
11512
|
-
colIndex:
|
|
11513
|
-
url:
|
|
11514
|
-
height:
|
|
11567
|
+
colIndex: C,
|
|
11568
|
+
url: F,
|
|
11569
|
+
height: w,
|
|
11515
11570
|
width: b,
|
|
11516
11571
|
style: {
|
|
11517
|
-
backgroundImage: "url(".concat(
|
|
11572
|
+
backgroundImage: "url(".concat(F, ")"),
|
|
11518
11573
|
backgroundSize: "".concat(b * c, "px auto"),
|
|
11519
|
-
backgroundPosition: "-".concat(
|
|
11574
|
+
backgroundPosition: "-".concat(C * b, "px -").concat(y * w, "px"),
|
|
11520
11575
|
width: "".concat(b, "px"),
|
|
11521
|
-
height: "".concat(
|
|
11576
|
+
height: "".concat(w, "px")
|
|
11522
11577
|
}
|
|
11523
11578
|
};
|
|
11524
11579
|
}
|
|
@@ -11528,10 +11583,10 @@ var Ge = {
|
|
|
11528
11583
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", u = this.config, c = u.pic_num, h = u.urls;
|
|
11529
11584
|
if (!(c <= 0 || !h || h.length === 0)) {
|
|
11530
11585
|
var d = this.getPosition(i, n, s);
|
|
11531
|
-
this.preload(d.urlIndex), Object.keys(d.style).map(function(
|
|
11532
|
-
e.style[
|
|
11533
|
-
}), Object.keys(l).map(function(
|
|
11534
|
-
e.style[
|
|
11586
|
+
this.preload(d.urlIndex), Object.keys(d.style).map(function(p) {
|
|
11587
|
+
e.style[p] = d.style[p];
|
|
11588
|
+
}), Object.keys(l).map(function(p) {
|
|
11589
|
+
e.style[p] = l[p];
|
|
11535
11590
|
});
|
|
11536
11591
|
}
|
|
11537
11592
|
}
|
|
@@ -11569,7 +11624,7 @@ var Ge = {
|
|
|
11569
11624
|
};
|
|
11570
11625
|
}
|
|
11571
11626
|
}]), r;
|
|
11572
|
-
}(
|
|
11627
|
+
}(V);
|
|
11573
11628
|
function Nt(a) {
|
|
11574
11629
|
return a ? "background:".concat(a, ";") : "";
|
|
11575
11630
|
}
|
|
@@ -11581,8 +11636,8 @@ var Ea = /* @__PURE__ */ function(a) {
|
|
|
11581
11636
|
T(this, r);
|
|
11582
11637
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
11583
11638
|
i[n] = arguments[n];
|
|
11584
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
11585
|
-
var s = t.player.ended, l =
|
|
11639
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onTimeupdate", function() {
|
|
11640
|
+
var s = t.player.ended, l = m(t), u = l.offsetDuration, c = t.currentTime;
|
|
11586
11641
|
c = f.adjustTimeByDuration(c, u, s), t.update({
|
|
11587
11642
|
played: c
|
|
11588
11643
|
}, u);
|
|
@@ -11603,7 +11658,7 @@ var Ea = /* @__PURE__ */ function(a) {
|
|
|
11603
11658
|
key: "afterCreate",
|
|
11604
11659
|
value: function() {
|
|
11605
11660
|
var e = this;
|
|
11606
|
-
this.root && (this.on(
|
|
11661
|
+
this.root && (this.on(re, this.onTimeupdate), this.on(He, function() {
|
|
11607
11662
|
e.reset();
|
|
11608
11663
|
}));
|
|
11609
11664
|
}
|
|
@@ -11655,7 +11710,7 @@ var Ea = /* @__PURE__ */ function(a) {
|
|
|
11655
11710
|
};
|
|
11656
11711
|
}
|
|
11657
11712
|
}]), r;
|
|
11658
|
-
}(
|
|
11713
|
+
}(V), $e = {
|
|
11659
11714
|
REAL_TIME: "realtime",
|
|
11660
11715
|
FIRST_FRAME: "firstframe",
|
|
11661
11716
|
FRAME_RATE: "framerate",
|
|
@@ -11684,23 +11739,23 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11684
11739
|
T(this, r);
|
|
11685
11740
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
11686
11741
|
i[n] = arguments[n];
|
|
11687
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
11688
|
-
t.player && (t._frameCount = t.config.startFrameCount, t.stop(), t.renderOnTimeupdate(s), t.off(
|
|
11689
|
-
}), _(
|
|
11742
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onLoadedData", function(s) {
|
|
11743
|
+
t.player && (t._frameCount = t.config.startFrameCount, t.stop(), t.renderOnTimeupdate(s), t.off(re, t.renderOnTimeupdate), t.on(re, t.renderOnTimeupdate));
|
|
11744
|
+
}), _(m(t), "onVisibilitychange", function(s) {
|
|
11690
11745
|
document.visibilityState === "visible" ? t._checkIfCanStart() && t.start() : document.visibilityState === "hidden" && t.stop();
|
|
11691
|
-
}), _(
|
|
11746
|
+
}), _(m(t), "renderOnTimeupdate", function(s) {
|
|
11692
11747
|
if (t._frameCount > 0)
|
|
11693
11748
|
t.renderOnce(), t._frameCount--;
|
|
11694
11749
|
else {
|
|
11695
|
-
t._isLoaded = !0, t.off(
|
|
11750
|
+
t._isLoaded = !0, t.off(re, t.renderOnTimeupdate);
|
|
11696
11751
|
var l = t.config.startInterval;
|
|
11697
11752
|
!t.player.paused && t._checkIfCanStart() && t.start(0, l);
|
|
11698
11753
|
}
|
|
11699
|
-
}), _(
|
|
11754
|
+
}), _(m(t), "start", function(s, l) {
|
|
11700
11755
|
var u = t.player.video, c = Sa(), h = t.checkVideoIsSupport(u);
|
|
11701
|
-
!h || !t.canvasCtx || (l || (l = t.interval), t.stop(), u.videoWidth && u.videoHeight && (t.videoPI = u.videoHeight > 0 ? parseInt(u.videoWidth / u.videoHeight * 100, 10) : 0, (t.config.mode === $e.REAL_TIME || c - t.preTime >= l) && (u && u.videoWidth && t.update(h, t.videoPI), t.preTime = c)), t.frameId = t._loopType === "timer" ? f.setTimeout(
|
|
11702
|
-
}), _(
|
|
11703
|
-
t.frameId && (t._loopType === "timer" ? f.clearTimeout(
|
|
11756
|
+
!h || !t.canvasCtx || (l || (l = t.interval), t.stop(), u.videoWidth && u.videoHeight && (t.videoPI = u.videoHeight > 0 ? parseInt(u.videoWidth / u.videoHeight * 100, 10) : 0, (t.config.mode === $e.REAL_TIME || c - t.preTime >= l) && (u && u.videoWidth && t.update(h, t.videoPI), t.preTime = c)), t.frameId = t._loopType === "timer" ? f.setTimeout(m(t), t.start, l) : f.requestAnimationFrame(t.start));
|
|
11757
|
+
}), _(m(t), "stop", function() {
|
|
11758
|
+
t.frameId && (t._loopType === "timer" ? f.clearTimeout(m(t), t.frameId) : f.cancelAnimationFrame(t.frameId), t.frameId = null);
|
|
11704
11759
|
}), t;
|
|
11705
11760
|
}
|
|
11706
11761
|
return E(r, [{
|
|
@@ -11721,12 +11776,12 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11721
11776
|
e.player && (e.init(), e.renderByPoster(), e.player.paused || e.start());
|
|
11722
11777
|
}), s !== $e.POSTER && (s !== $e.FIRST_FRAME && (this.on(He, function() {
|
|
11723
11778
|
e.stop();
|
|
11724
|
-
}), this.on(
|
|
11779
|
+
}), this.on(se, function() {
|
|
11725
11780
|
var u = e.config.startInterval;
|
|
11726
11781
|
e._checkIfCanStart() && e.start(0, u);
|
|
11727
11782
|
}), this.on(Xe, function() {
|
|
11728
11783
|
e.stop();
|
|
11729
|
-
})), this.on(
|
|
11784
|
+
})), this.on(ke, this.onLoadedData), this.on(Qt, function() {
|
|
11730
11785
|
e._isLoaded = !1, e.stop();
|
|
11731
11786
|
}), document.addEventListener("visibilitychange", this.onVisibilitychange)));
|
|
11732
11787
|
}
|
|
@@ -11773,7 +11828,7 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11773
11828
|
if (!e)
|
|
11774
11829
|
return null;
|
|
11775
11830
|
var i = e && e instanceof window.HTMLVideoElement ? e : e.canvas ? e.canvas : e.flyVideo ? e.flyVideo : null;
|
|
11776
|
-
if (i && !(
|
|
11831
|
+
if (i && !(M.browser === "safari" && f.isMSE(i)))
|
|
11777
11832
|
return i;
|
|
11778
11833
|
var n = i ? i.tagName.toLowerCase() : "";
|
|
11779
11834
|
return n === "canvas" || n === "img" ? i : null;
|
|
@@ -11827,12 +11882,12 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11827
11882
|
if (u !== n.width || c !== n.height || n.pi !== i) {
|
|
11828
11883
|
var h = parseInt(u / c * 100, 10);
|
|
11829
11884
|
n.pi = i, n.width !== u && (n.width = this.canvas.width = u), n.height !== c && (n.height = this.canvas.height = c);
|
|
11830
|
-
var d = c,
|
|
11831
|
-
h < i ?
|
|
11885
|
+
var d = c, p = u;
|
|
11886
|
+
h < i ? p = parseInt(c * i / 100, 10) : h > i && (d = parseInt(u * 100 / i, 10)), n.rwidth = p * s.multiple, n.rheight = d * s.multiple, n.x = (u - n.rwidth) / 2, n.y = (c - n.rheight) / 2;
|
|
11832
11887
|
}
|
|
11833
11888
|
this.canvasFilter && (this.canvasCtx.filter = s.filter), this.canvasCtx.drawImage(e, n.x, n.y, n.rwidth, n.rheight);
|
|
11834
|
-
} catch (
|
|
11835
|
-
N.logError("plugin:DynamicBg",
|
|
11889
|
+
} catch (g) {
|
|
11890
|
+
N.logError("plugin:DynamicBg", g);
|
|
11836
11891
|
}
|
|
11837
11892
|
}
|
|
11838
11893
|
}, {
|
|
@@ -11875,10 +11930,10 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11875
11930
|
}, {
|
|
11876
11931
|
key: "supportCanvasFilter",
|
|
11877
11932
|
value: function() {
|
|
11878
|
-
return !(
|
|
11933
|
+
return !(M.browser === "safari" || M.browser === "firefox");
|
|
11879
11934
|
}
|
|
11880
11935
|
}]), r;
|
|
11881
|
-
}(
|
|
11936
|
+
}(V), Ia = {
|
|
11882
11937
|
LANG: "zh-cn",
|
|
11883
11938
|
TEXT: {
|
|
11884
11939
|
ERROR_TYPES: {
|
|
@@ -11961,7 +12016,7 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11961
12016
|
T(this, r);
|
|
11962
12017
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
11963
12018
|
i[n] = arguments[n];
|
|
11964
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12019
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "_recordUserActions", function(s) {
|
|
11965
12020
|
var l = t._getTime(), u = Object.assign({}, s, {
|
|
11966
12021
|
msg: s.msg || s.action
|
|
11967
12022
|
});
|
|
@@ -11970,11 +12025,11 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
11970
12025
|
}, l), {}, {
|
|
11971
12026
|
payload: u
|
|
11972
12027
|
}));
|
|
11973
|
-
}), _(
|
|
12028
|
+
}), _(m(t), "_onReset", function() {
|
|
11974
12029
|
t.reset();
|
|
11975
|
-
}), _(
|
|
12030
|
+
}), _(m(t), "_recordInfo", function(s) {
|
|
11976
12031
|
t.info(s);
|
|
11977
|
-
}), _(
|
|
12032
|
+
}), _(m(t), "_downloadStats", function() {
|
|
11978
12033
|
var s = t.getStats(), l = new Blob([JSON.stringify(s)], {
|
|
11979
12034
|
type: "application/json"
|
|
11980
12035
|
}), u = window.URL.createObjectURL(l), c = document.createElement("a");
|
|
@@ -12097,7 +12152,7 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12097
12152
|
return {};
|
|
12098
12153
|
}
|
|
12099
12154
|
}]), r;
|
|
12100
|
-
}(
|
|
12155
|
+
}(xe), kn = /* @__PURE__ */ function(a) {
|
|
12101
12156
|
P(r, a);
|
|
12102
12157
|
var o = I(r);
|
|
12103
12158
|
function r() {
|
|
@@ -12105,8 +12160,8 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12105
12160
|
T(this, r);
|
|
12106
12161
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12107
12162
|
i[n] = arguments[n];
|
|
12108
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12109
|
-
var s =
|
|
12163
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onGapJump", function() {
|
|
12164
|
+
var s = m(t), l = s.player, u = s.config;
|
|
12110
12165
|
if (l.media.readyState !== HTMLMediaElement.HAVE_NOTHING) {
|
|
12111
12166
|
if (l.media.seeking) {
|
|
12112
12167
|
if (!t.seekingEventReceived)
|
|
@@ -12114,18 +12169,18 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12114
12169
|
} else
|
|
12115
12170
|
t.seekingEventReceived = !1;
|
|
12116
12171
|
if (!(l.media.paused && l.media.currentTime !== 0 && t.hasPlayed)) {
|
|
12117
|
-
var c = l.media.buffered, h = u.smallGapLimit || 0.5, d = u.gapDetectionThreshold || 0.3,
|
|
12118
|
-
if (!(
|
|
12119
|
-
console.log("GapJump bufferRange ", c.start(
|
|
12120
|
-
var
|
|
12121
|
-
if (!(
|
|
12122
|
-
var
|
|
12123
|
-
|
|
12172
|
+
var c = l.media.buffered, h = u.smallGapLimit || 0.5, d = u.gapDetectionThreshold || 0.3, p = l.media.currentTime, g = t._getIndex(c, p, d);
|
|
12173
|
+
if (!(g === null || g === 0)) {
|
|
12174
|
+
console.log("GapJump bufferRange ", c.start(g), c.end(g));
|
|
12175
|
+
var v = c.start(g) + 0.1, y = l.media.duration;
|
|
12176
|
+
if (!(v > y)) {
|
|
12177
|
+
var C = v - p, b = C <= h;
|
|
12178
|
+
C < r.BROWSER_GAP_TOLERANCE || b && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? v + 0.1 : v), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", g, " isGapSamll:", b, " currentTime:", l.media.currentTime, " jumpSize:", p - l.media.currentTime), v !== 0.08 && l && l.emit("log", {
|
|
12124
12179
|
type: "oneevent",
|
|
12125
12180
|
end_type: "gap",
|
|
12126
12181
|
vid: l.config.vid,
|
|
12127
12182
|
ext: {
|
|
12128
|
-
video_postion: Math.floor(
|
|
12183
|
+
video_postion: Math.floor(v * 1e3)
|
|
12129
12184
|
}
|
|
12130
12185
|
}));
|
|
12131
12186
|
}
|
|
@@ -12138,7 +12193,7 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12138
12193
|
key: "afterCreate",
|
|
12139
12194
|
value: function() {
|
|
12140
12195
|
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(nt, this.onGapJump), this.on(
|
|
12196
|
+
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(nt, this.onGapJump), this.on(se, function() {
|
|
12142
12197
|
e.hasPlayed = !0;
|
|
12143
12198
|
}), this.on(kt, function() {
|
|
12144
12199
|
e.seekingEventReceived = !0;
|
|
@@ -12185,7 +12240,7 @@ var ot = null, Pa = /* @__PURE__ */ function(a) {
|
|
|
12185
12240
|
};
|
|
12186
12241
|
}
|
|
12187
12242
|
}]), r;
|
|
12188
|
-
}(
|
|
12243
|
+
}(V);
|
|
12189
12244
|
kn.BROWSER_GAP_TOLERANCE = 1e-3;
|
|
12190
12245
|
var La = /* @__PURE__ */ function(a) {
|
|
12191
12246
|
P(r, a);
|
|
@@ -12195,11 +12250,11 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12195
12250
|
T(this, r);
|
|
12196
12251
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12197
12252
|
i[n] = arguments[n];
|
|
12198
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12199
|
-
var s =
|
|
12253
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "onWaiting", function() {
|
|
12254
|
+
var s = m(t), l = s.config;
|
|
12200
12255
|
t.jumpCnt > l.jumpCntMax || t.timer || l.useWaitingTimeoutJump === !1 || (t.timer = setTimeout(t.onJump, l.waitingTime * 1e3));
|
|
12201
|
-
}), _(
|
|
12202
|
-
var s =
|
|
12256
|
+
}), _(m(t), "onJump", function() {
|
|
12257
|
+
var s = m(t), l = s.player, u = s.config;
|
|
12203
12258
|
if (clearTimeout(t.timer), t.timer = null, !(t.jumpCnt > u.jumpCntMax || u.useWaitingTimeoutJump === !1) && !(l.media.paused && l.media.currentTime !== 0 && t.hasPlayed)) {
|
|
12204
12259
|
t.jumpSize = u.jumpSize * (t.jumpCnt + 1), t.jumpCnt === u.jumpSize && t.jumpSize < 6 && (t.jumpSize = 6);
|
|
12205
12260
|
var c = l.currentTime + t.jumpSize, h = l.media.duration;
|
|
@@ -12213,7 +12268,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12213
12268
|
var e = this, i = this.config, n = i.useWaitingTimeoutJump, s = i.jumpSize;
|
|
12214
12269
|
n !== !1 && (this.hasPlayed = !1, this.jumpCnt = 0, this.timer = null, this.jumpSize = s, this.on(nt, this.onWaiting), this.on([Jt, ve], function() {
|
|
12215
12270
|
clearTimeout(e.timer), e.timer = null, e.jumpSize = e.config.jumpSize;
|
|
12216
|
-
}), this.on(
|
|
12271
|
+
}), this.on(se, function() {
|
|
12217
12272
|
e.hasPlayed = !0;
|
|
12218
12273
|
}));
|
|
12219
12274
|
}
|
|
@@ -12233,7 +12288,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12233
12288
|
};
|
|
12234
12289
|
}
|
|
12235
12290
|
}]), r;
|
|
12236
|
-
}(
|
|
12291
|
+
}(V), Ke = "cdn", at = ["cdn"], Da = /* @__PURE__ */ function(a) {
|
|
12237
12292
|
P(r, a);
|
|
12238
12293
|
var o = I(r);
|
|
12239
12294
|
function r() {
|
|
@@ -12241,7 +12296,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12241
12296
|
T(this, r);
|
|
12242
12297
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
12243
12298
|
i[n] = arguments[n];
|
|
12244
|
-
return t = o.call.apply(o, [this].concat(i)), _(
|
|
12299
|
+
return t = o.call.apply(o, [this].concat(i)), _(m(t), "getSpeed", function() {
|
|
12245
12300
|
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ke;
|
|
12246
12301
|
if (!t.speedListCache || !t.speedListCache[s] || t.speedListCache[s].length <= 0)
|
|
12247
12302
|
return 0;
|
|
@@ -12249,47 +12304,47 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12249
12304
|
return t.speedListCache[s].map(function(u) {
|
|
12250
12305
|
l += u;
|
|
12251
12306
|
}), Math.floor(l / t.speedListCache[s].length);
|
|
12252
|
-
}), _(
|
|
12307
|
+
}), _(m(t), "startTimer", function() {
|
|
12253
12308
|
f.isMSE(t.player.video) || (t.initSpeedList(), t.cnt = 0, t.timer = setTimeout(t.testSpeed, t.config.testTimeStep));
|
|
12254
|
-
}), _(
|
|
12309
|
+
}), _(m(t), "initSpeedList", function() {
|
|
12255
12310
|
t.speedListCache = {}, at.forEach(function(s) {
|
|
12256
12311
|
t.speedListCache[s] = [];
|
|
12257
12312
|
});
|
|
12258
|
-
}), _(
|
|
12313
|
+
}), _(m(t), "_onRealSpeedChange", function(s) {
|
|
12259
12314
|
s.speed && t.appendList(s.speed, s.type || Ke);
|
|
12260
|
-
}), _(
|
|
12315
|
+
}), _(m(t), "testSpeed", function() {
|
|
12261
12316
|
if (clearTimeout(t.timer), t.timer = null, !(!t.player || !t.config.openSpeed)) {
|
|
12262
12317
|
var s = t.config, l = s.url, u = s.loadSize, c = s.testCnt, h = s.testTimeStep, d = l + (l.indexOf("?") < 0 ? "?testst=" : "&testst=") + Date.now();
|
|
12263
12318
|
if (!(t.cnt >= c)) {
|
|
12264
12319
|
t.cnt++;
|
|
12265
12320
|
try {
|
|
12266
|
-
var
|
|
12267
|
-
t.xhr =
|
|
12268
|
-
var y = {},
|
|
12269
|
-
y.Range = "bytes=" +
|
|
12270
|
-
|
|
12271
|
-
}),
|
|
12272
|
-
if (
|
|
12273
|
-
t.xhr = null,
|
|
12274
|
-
var b =
|
|
12275
|
-
t.appendList(
|
|
12321
|
+
var p = (/* @__PURE__ */ new Date()).getTime(), g = null, v = new XMLHttpRequest();
|
|
12322
|
+
t.xhr = v, v.open("GET", d);
|
|
12323
|
+
var y = {}, C = Math.floor(Math.random() * 10);
|
|
12324
|
+
y.Range = "bytes=" + C + "-" + (u + C), y && Object.keys(y).forEach(function(b) {
|
|
12325
|
+
v.setRequestHeader(b, y[b]);
|
|
12326
|
+
}), v.onreadystatechange = function() {
|
|
12327
|
+
if (v.readyState === 4) {
|
|
12328
|
+
t.xhr = null, g = (/* @__PURE__ */ new Date()).getTime();
|
|
12329
|
+
var b = v.getResponseHeader("Content-Length") / 1024 * 8, w = Math.round(b * 1e3 / (g - p));
|
|
12330
|
+
t.appendList(w), t.timer = setTimeout(t.testSpeed, h);
|
|
12276
12331
|
}
|
|
12277
|
-
},
|
|
12332
|
+
}, v.send();
|
|
12278
12333
|
} catch (b) {
|
|
12279
12334
|
console.error(b);
|
|
12280
12335
|
}
|
|
12281
12336
|
}
|
|
12282
12337
|
}
|
|
12283
|
-
}), _(
|
|
12338
|
+
}), _(m(t), "appendList", function(s) {
|
|
12284
12339
|
var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ke;
|
|
12285
12340
|
if (!(!t.speedListCache || !t.speedListCache[l])) {
|
|
12286
12341
|
var u = t.config.saveSpeedMax;
|
|
12287
12342
|
t.speedListCache[l].length >= u && t.speedListCache[l].shift(), t.speedListCache[l].push(s);
|
|
12288
|
-
var c =
|
|
12343
|
+
var c = m(t), h = c.player;
|
|
12289
12344
|
h && (l === Ke ? h.realTimeSpeed = s : h[t.getSpeedName("realTime", l)] = s), t.updateSpeed(l);
|
|
12290
12345
|
}
|
|
12291
|
-
}), _(
|
|
12292
|
-
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ke, l = t.getSpeed(s), u =
|
|
12346
|
+
}), _(m(t), "updateSpeed", function() {
|
|
12347
|
+
var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ke, l = t.getSpeed(s), u = m(t), c = u.player;
|
|
12293
12348
|
if (c)
|
|
12294
12349
|
if (s === Ke)
|
|
12295
12350
|
(!c.avgSpeed || l !== c.avgSpeed) && (c.avgSpeed = l, c.emit(Wt, {
|
|
@@ -12309,7 +12364,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12309
12364
|
key: "afterCreate",
|
|
12310
12365
|
value: function() {
|
|
12311
12366
|
var e = this.config, i = e.openSpeed, n = e.addSpeedTypeList;
|
|
12312
|
-
(n == null ? void 0 : n.length) > 0 && at.push.apply(at, ue(n)), this.initSpeedList(), this.on("real_time_speed", this._onRealSpeedChange), this.timer = null, this.cnt = 0, this.xhr = null, i && this.on([
|
|
12367
|
+
(n == null ? void 0 : n.length) > 0 && at.push.apply(at, ue(n)), this.initSpeedList(), this.on("real_time_speed", this._onRealSpeedChange), this.timer = null, this.cnt = 0, this.xhr = null, i && this.on([ke, ft], this.startTimer);
|
|
12313
12368
|
}
|
|
12314
12369
|
}, {
|
|
12315
12370
|
key: "getSpeedName",
|
|
@@ -12336,7 +12391,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12336
12391
|
key: "destroy",
|
|
12337
12392
|
value: function() {
|
|
12338
12393
|
var e = this;
|
|
12339
|
-
this.off("real_time_speed", this._onRealSpeedChange), this.off([
|
|
12394
|
+
this.off("real_time_speed", this._onRealSpeedChange), this.off([ke, ft], this.startTimer), at.forEach(function(i) {
|
|
12340
12395
|
e.speedListCache && e.speedListCache[i] && (e.speedListCache[i] = []);
|
|
12341
12396
|
}), 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
12397
|
}
|
|
@@ -12359,7 +12414,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12359
12414
|
};
|
|
12360
12415
|
}
|
|
12361
12416
|
}]), r;
|
|
12362
|
-
}(
|
|
12417
|
+
}(V), Ra = /* @__PURE__ */ function(a) {
|
|
12363
12418
|
P(r, a);
|
|
12364
12419
|
var o = I(r);
|
|
12365
12420
|
function r() {
|
|
@@ -12371,7 +12426,7 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12371
12426
|
var e = this, i = this.player, n = this.config, s = i.media || i.video;
|
|
12372
12427
|
if (this.timer = null, this._lastDecodedFrames = 0, this._currentStuckCount = 0, this._lastCheckPoint = null, this._payload = [], !n.disabled) {
|
|
12373
12428
|
var l = s.getVideoPlaybackQuality;
|
|
12374
|
-
l && (this.on(
|
|
12429
|
+
l && (this.on(se, function() {
|
|
12375
12430
|
e._startTick();
|
|
12376
12431
|
}), this.on(Xe, function() {
|
|
12377
12432
|
e._stopTick();
|
|
@@ -12416,10 +12471,10 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12416
12471
|
}, {
|
|
12417
12472
|
key: "_checkStuck",
|
|
12418
12473
|
value: function(e, i, n, s) {
|
|
12419
|
-
var l = this.player.media || this.player.video, u = document.hidden, c = l.paused, h = l.readyState, d = l.currentTime,
|
|
12474
|
+
var l = this.player.media || this.player.video, u = document.hidden, c = l.paused, h = l.readyState, d = l.currentTime, p = l.buffered;
|
|
12420
12475
|
if (!(u || c || h < 4)) {
|
|
12421
|
-
var
|
|
12422
|
-
|
|
12476
|
+
var g = this._checkBuffer(d, p), v = g.enoughBuffer, y = g.buffers;
|
|
12477
|
+
v && (e <= this.config.reportFrame ? (this._currentStuckCount++, this._payload.push({
|
|
12423
12478
|
currentTime: d,
|
|
12424
12479
|
buffers: y,
|
|
12425
12480
|
curDecodedFrames: e,
|
|
@@ -12468,14 +12523,14 @@ var La = /* @__PURE__ */ function(a) {
|
|
|
12468
12523
|
};
|
|
12469
12524
|
}
|
|
12470
12525
|
}]), r;
|
|
12471
|
-
}(
|
|
12526
|
+
}(V);
|
|
12472
12527
|
Ye.use(Ia);
|
|
12473
12528
|
var Oa = /* @__PURE__ */ E(function a(o, r) {
|
|
12474
12529
|
var t, e, i;
|
|
12475
12530
|
T(this, a);
|
|
12476
12531
|
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [Zo, jo, Ea, ba, qo], u = [].concat(l, [Wo, Xo, na, la, va, ma, ha, da, ta, oa]), c = [bo, To, So, Uo, xo, ka, Ca, Ta, Lo];
|
|
12477
12532
|
this.plugins = [Aa, Co].concat(ue(u), c, [kn, La]);
|
|
12478
|
-
var h = n ? "mobile" :
|
|
12533
|
+
var h = n ? "mobile" : M.device;
|
|
12479
12534
|
switch (h) {
|
|
12480
12535
|
case "pc":
|
|
12481
12536
|
(t = this.plugins).push.apply(t, [Mi, Ft, Bi, Da, Ra]);
|
|
@@ -12486,7 +12541,7 @@ var Oa = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12486
12541
|
default:
|
|
12487
12542
|
(i = this.plugins).push.apply(i, [Mi, Ft, Bi]);
|
|
12488
12543
|
}
|
|
12489
|
-
(
|
|
12544
|
+
(M.os.isIpad || h === "pc") && this.plugins.push(Pa), M.os.isIpad && this.plugins.push(Ft), this.ignores = [], this.i18n = [];
|
|
12490
12545
|
}), ce = /* @__PURE__ */ function(a) {
|
|
12491
12546
|
P(r, a);
|
|
12492
12547
|
var o = I(r);
|
|
@@ -12497,13 +12552,13 @@ var Oa = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12497
12552
|
}(Tt);
|
|
12498
12553
|
_(ce, "defaultPreset", Oa);
|
|
12499
12554
|
_(ce, "Util", f);
|
|
12500
|
-
_(ce, "Sniffer",
|
|
12555
|
+
_(ce, "Sniffer", M);
|
|
12501
12556
|
_(ce, "Errors", ct);
|
|
12502
12557
|
_(ce, "Events", Ys);
|
|
12503
|
-
_(ce, "Plugin",
|
|
12504
|
-
_(ce, "BasePlugin",
|
|
12558
|
+
_(ce, "Plugin", V);
|
|
12559
|
+
_(ce, "BasePlugin", xe);
|
|
12505
12560
|
_(ce, "I18N", Ye);
|
|
12506
|
-
_(ce, "STATE_CLASS",
|
|
12561
|
+
_(ce, "STATE_CLASS", k);
|
|
12507
12562
|
_(ce, "InstManager", vn);
|
|
12508
12563
|
const Fa = ["id"], Ma = /* @__PURE__ */ oe({
|
|
12509
12564
|
name: "ElImageViewer",
|
|
@@ -12559,21 +12614,21 @@ const Fa = ["id"], Ma = /* @__PURE__ */ oe({
|
|
|
12559
12614
|
function d() {
|
|
12560
12615
|
l("close"), u.value = !1, r.destroy();
|
|
12561
12616
|
}
|
|
12562
|
-
return Yt(() => u.value, (
|
|
12563
|
-
|
|
12617
|
+
return Yt(() => u.value, (p) => {
|
|
12618
|
+
p && zi(() => {
|
|
12564
12619
|
r = new ce({
|
|
12565
12620
|
id: c,
|
|
12566
12621
|
url: i.value,
|
|
12567
12622
|
...s.value
|
|
12568
12623
|
});
|
|
12569
12624
|
});
|
|
12570
|
-
}), (
|
|
12571
|
-
const
|
|
12572
|
-
return u.value ? (x(),
|
|
12625
|
+
}), (p, g) => {
|
|
12626
|
+
const v = Ne("el-icon");
|
|
12627
|
+
return u.value ? (x(), ye(En, {
|
|
12573
12628
|
key: 0,
|
|
12574
12629
|
to: "body"
|
|
12575
12630
|
}, [
|
|
12576
|
-
|
|
12631
|
+
K(Sn, {
|
|
12577
12632
|
name: "viewer-fade",
|
|
12578
12633
|
appear: ""
|
|
12579
12634
|
}, {
|
|
@@ -12583,38 +12638,38 @@ const Fa = ["id"], Ma = /* @__PURE__ */ oe({
|
|
|
12583
12638
|
{
|
|
12584
12639
|
ref: "wrapper",
|
|
12585
12640
|
tabindex: -1,
|
|
12586
|
-
class: Q(
|
|
12587
|
-
style:
|
|
12641
|
+
class: Q(z(h).e("wrapper")),
|
|
12642
|
+
style: ie({ zIndex: a.zIndex })
|
|
12588
12643
|
},
|
|
12589
12644
|
[
|
|
12590
12645
|
S(
|
|
12591
12646
|
"div",
|
|
12592
12647
|
{
|
|
12593
|
-
class: Q(
|
|
12648
|
+
class: Q(z(h).e("mask"))
|
|
12594
12649
|
},
|
|
12595
12650
|
null,
|
|
12596
12651
|
2
|
|
12597
12652
|
/* CLASS */
|
|
12598
12653
|
),
|
|
12599
|
-
|
|
12654
|
+
ee(" CANVAS "),
|
|
12600
12655
|
S(
|
|
12601
12656
|
"div",
|
|
12602
12657
|
{
|
|
12603
|
-
class: Q(
|
|
12658
|
+
class: Q(z(h).e("canvas"))
|
|
12604
12659
|
},
|
|
12605
12660
|
[
|
|
12606
|
-
S("div", { id:
|
|
12607
|
-
|
|
12661
|
+
S("div", { id: z(c) }, null, 8, Fa),
|
|
12662
|
+
ee(" CLOSE "),
|
|
12608
12663
|
S(
|
|
12609
12664
|
"span",
|
|
12610
12665
|
{
|
|
12611
|
-
class: Q([
|
|
12666
|
+
class: Q([z(h).e("btn"), z(h).e("close")]),
|
|
12612
12667
|
onClick: d
|
|
12613
12668
|
},
|
|
12614
12669
|
[
|
|
12615
|
-
|
|
12670
|
+
K(v, { onClick: d }, {
|
|
12616
12671
|
default: de(() => [
|
|
12617
|
-
|
|
12672
|
+
K(z(Ur))
|
|
12618
12673
|
]),
|
|
12619
12674
|
_: 1
|
|
12620
12675
|
/* STABLE */
|
|
@@ -12627,7 +12682,7 @@ const Fa = ["id"], Ma = /* @__PURE__ */ oe({
|
|
|
12627
12682
|
2
|
|
12628
12683
|
/* CLASS */
|
|
12629
12684
|
),
|
|
12630
|
-
|
|
12685
|
+
Fe(p.$slots, "default", {}, void 0, !0)
|
|
12631
12686
|
],
|
|
12632
12687
|
6
|
|
12633
12688
|
/* CLASS, STYLE */
|
|
@@ -12636,11 +12691,11 @@ const Fa = ["id"], Ma = /* @__PURE__ */ oe({
|
|
|
12636
12691
|
_: 3
|
|
12637
12692
|
/* FORWARDED */
|
|
12638
12693
|
})
|
|
12639
|
-
])) :
|
|
12694
|
+
])) : ee("v-if", !0);
|
|
12640
12695
|
};
|
|
12641
12696
|
}
|
|
12642
12697
|
});
|
|
12643
|
-
const Na = /* @__PURE__ */ tt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba =
|
|
12698
|
+
const Na = /* @__PURE__ */ tt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = Pe(Na), Ha = (a) => (xn("data-v-6a92bbab"), a = a(), Pn(), a), Ua = {
|
|
12644
12699
|
key: 0,
|
|
12645
12700
|
class: "preview-files"
|
|
12646
12701
|
}, za = {
|
|
@@ -12700,51 +12755,51 @@ const Na = /* @__PURE__ */ tt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = xe(N
|
|
|
12700
12755
|
// row.originName
|
|
12701
12756
|
}, t.value = !0;
|
|
12702
12757
|
}, n = (u) => {
|
|
12703
|
-
var c, h, d,
|
|
12704
|
-
return (c = u == null ? void 0 : u.suffix) != null && c.includes("pdf") ? "iksvg_pdf" : (h = u == null ? void 0 : u.suffix) != null && h.includes("doc") ? "iksvg_word" : (d = u == null ? void 0 : u.suffix) != null && d.includes("xls") ? "iksvg_excel" : (
|
|
12758
|
+
var c, h, d, p, g;
|
|
12759
|
+
return (c = u == null ? void 0 : u.suffix) != null && c.includes("pdf") ? "iksvg_pdf" : (h = u == null ? void 0 : u.suffix) != null && h.includes("doc") ? "iksvg_word" : (d = u == null ? void 0 : u.suffix) != null && d.includes("xls") ? "iksvg_excel" : (p = u == null ? void 0 : u.suffix) != null && p.includes("mov") ? "iksvg_mov" : (g = u == null ? void 0 : u.suffix) != null && g.includes("zip") ? "iksvg_zip" : "icon-jpg";
|
|
12705
12760
|
}, s = (u) => {
|
|
12706
|
-
var c, h, d,
|
|
12707
|
-
return (c = u == null ? void 0 : u.suffix) != null && c.includes("pdf") ? "#FA4E4E" : (h = u == null ? void 0 : u.suffix) != null && h.includes("doc") ? "#2c69e0" : (d = u.suffix) != null && d.includes("xls") ? "#39BFBF" : (
|
|
12761
|
+
var c, h, d, p, g;
|
|
12762
|
+
return (c = u == null ? void 0 : u.suffix) != null && c.includes("pdf") ? "#FA4E4E" : (h = u == null ? void 0 : u.suffix) != null && h.includes("doc") ? "#2c69e0" : (d = u.suffix) != null && d.includes("xls") ? "#39BFBF" : (p = u.suffix) != null && p.includes("txt") ? "#2c69e0" : (g = u.suffix) != null && g.includes("zip") ? "#FF9000" : "#32CD79";
|
|
12708
12763
|
}, l = (u) => {
|
|
12709
12764
|
const c = document.createElement("a");
|
|
12710
12765
|
c.href = Dn.assembleUrl(o.loadUrl, u.url), c.download = u.name, c.click();
|
|
12711
12766
|
};
|
|
12712
12767
|
return (u, c) => {
|
|
12713
|
-
var d,
|
|
12714
|
-
const h =
|
|
12715
|
-
return x(),
|
|
12716
|
-
o.fileType === "file" ? (x(),
|
|
12717
|
-
(x(!0),
|
|
12718
|
-
|
|
12768
|
+
var d, p;
|
|
12769
|
+
const h = Ne("el-image");
|
|
12770
|
+
return x(), O("div", null, [
|
|
12771
|
+
o.fileType === "file" ? (x(), O("div", Ua, [
|
|
12772
|
+
(x(!0), O(
|
|
12773
|
+
Oe,
|
|
12719
12774
|
null,
|
|
12720
|
-
lt(r.value, (
|
|
12775
|
+
lt(r.value, (g, v) => (x(), O(
|
|
12721
12776
|
"div",
|
|
12722
12777
|
{
|
|
12723
|
-
key:
|
|
12778
|
+
key: v,
|
|
12724
12779
|
class: "files-item",
|
|
12725
|
-
style:
|
|
12780
|
+
style: ie({
|
|
12726
12781
|
width: o.fileWidth,
|
|
12727
12782
|
"margin-right": o.fileWidth === "100%" ? "0px" : ""
|
|
12728
12783
|
})
|
|
12729
12784
|
},
|
|
12730
12785
|
[
|
|
12731
12786
|
S("div", za, [
|
|
12732
|
-
|
|
12733
|
-
name: n(
|
|
12734
|
-
style:
|
|
12787
|
+
K(z(Te), {
|
|
12788
|
+
name: n(g),
|
|
12789
|
+
style: ie(`color:${s(g)}`),
|
|
12735
12790
|
size: 36
|
|
12736
12791
|
}, null, 8, ["name", "style"]),
|
|
12737
12792
|
S("div", {
|
|
12738
12793
|
class: "file-name",
|
|
12739
|
-
onClick: (y) => l(
|
|
12794
|
+
onClick: (y) => l(g)
|
|
12740
12795
|
}, [
|
|
12741
12796
|
S("p", {
|
|
12742
|
-
title:
|
|
12743
|
-
},
|
|
12797
|
+
title: g.name
|
|
12798
|
+
}, Ee(g.name), 9, ja),
|
|
12744
12799
|
S(
|
|
12745
12800
|
"p",
|
|
12746
12801
|
Wa,
|
|
12747
|
-
|
|
12802
|
+
Ee((g.size / 1024).toFixed(2)) + "KB",
|
|
12748
12803
|
1
|
|
12749
12804
|
/* TEXT */
|
|
12750
12805
|
)
|
|
@@ -12752,9 +12807,9 @@ const Na = /* @__PURE__ */ tt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = xe(N
|
|
|
12752
12807
|
]),
|
|
12753
12808
|
S("div", {
|
|
12754
12809
|
class: "file-preview",
|
|
12755
|
-
onClick: (y) => i(
|
|
12810
|
+
onClick: (y) => i(g)
|
|
12756
12811
|
}, [
|
|
12757
|
-
|
|
12812
|
+
K(z(Te), { name: "iksvg_yulan" }),
|
|
12758
12813
|
$a
|
|
12759
12814
|
], 8, Ga)
|
|
12760
12815
|
],
|
|
@@ -12764,39 +12819,39 @@ const Na = /* @__PURE__ */ tt(Ma, [["__scopeId", "data-v-b301aa7d"]]), Ba = xe(N
|
|
|
12764
12819
|
128
|
|
12765
12820
|
/* KEYED_FRAGMENT */
|
|
12766
12821
|
))
|
|
12767
|
-
])) :
|
|
12768
|
-
o.fileType === "img" ? (x(),
|
|
12769
|
-
(x(!0),
|
|
12770
|
-
|
|
12822
|
+
])) : ee("v-if", !0),
|
|
12823
|
+
o.fileType === "img" ? (x(), O("div", Ka, [
|
|
12824
|
+
(x(!0), O(
|
|
12825
|
+
Oe,
|
|
12771
12826
|
null,
|
|
12772
|
-
lt(r.value, (
|
|
12773
|
-
key:
|
|
12827
|
+
lt(r.value, (g, v) => (x(), O("div", {
|
|
12828
|
+
key: v,
|
|
12774
12829
|
class: "preview-img"
|
|
12775
12830
|
}, [
|
|
12776
|
-
|
|
12831
|
+
K(h, {
|
|
12777
12832
|
class: "show-img",
|
|
12778
|
-
src: a.loadUrl +
|
|
12779
|
-
"preview-src-list": [a.loadUrl +
|
|
12833
|
+
src: a.loadUrl + g.url,
|
|
12834
|
+
"preview-src-list": [a.loadUrl + g.url],
|
|
12780
12835
|
fit: "cover"
|
|
12781
12836
|
}, null, 8, ["src", "preview-src-list"])
|
|
12782
12837
|
]))),
|
|
12783
12838
|
128
|
|
12784
12839
|
/* KEYED_FRAGMENT */
|
|
12785
12840
|
))
|
|
12786
|
-
])) :
|
|
12787
|
-
|
|
12841
|
+
])) : ee("v-if", !0),
|
|
12842
|
+
K(z(qr), {
|
|
12788
12843
|
modelValue: t.value,
|
|
12789
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
12844
|
+
"onUpdate:modelValue": c[0] || (c[0] = (g) => t.value = g),
|
|
12790
12845
|
"load-url": o.loadUrl,
|
|
12791
12846
|
url: (d = e.value) == null ? void 0 : d.url,
|
|
12792
12847
|
"kk-url": a.kkUrl,
|
|
12793
|
-
"file-name": (
|
|
12848
|
+
"file-name": (p = e.value) == null ? void 0 : p.name
|
|
12794
12849
|
}, null, 8, ["modelValue", "load-url", "url", "kk-url", "file-name"])
|
|
12795
12850
|
]);
|
|
12796
12851
|
};
|
|
12797
12852
|
}
|
|
12798
12853
|
});
|
|
12799
|
-
const Xa = /* @__PURE__ */ tt(Ya, [["__scopeId", "data-v-6a92bbab"]]), Qa =
|
|
12854
|
+
const Xa = /* @__PURE__ */ tt(Ya, [["__scopeId", "data-v-6a92bbab"]]), Qa = Pe(Xa);
|
|
12800
12855
|
export {
|
|
12801
12856
|
Qa as IKDetailPreviewFiles,
|
|
12802
12857
|
Qa as default
|