iking-web-ui-pro 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IKPreviewFile/ik.index.es.js +262 -261
- package/dist/IKPreviewFile/ik.index.umd.js +44 -44
- package/dist/IkApprovalProcessDetail/ik.index.es.js +845 -844
- package/dist/IkApprovalProcessDetail/ik.index.umd.js +38 -38
- package/dist/IkDescription/ik.index.es.js +295 -294
- package/dist/IkDescription/ik.index.umd.js +45 -45
- package/dist/IkDetailPreviewFiles/ik.index.es.js +898 -897
- package/dist/IkDetailPreviewFiles/ik.index.umd.js +39 -39
- package/dist/IkUploadFile/ik.index.es.js +5 -5
- package/dist/IkUploadFile/ik.index.umd.js +1 -1
- package/dist/IkUploadFile/style.css +1 -1
- package/dist/index.es.js +4396 -4395
- package/dist/index.umd.js +64 -64
- package/dist/src/components/IKPreviewFile/index.d.ts +16 -4
- package/dist/src/components/IKPreviewFile/src/IkPreviewFile.vue.d.ts +6 -2
- package/dist/src/components/IkUploadFile/index.d.ts +6 -0
- package/dist/src/components/IkUploadFile/src/index.vue.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as se, computed as K, openBlock as I, createElementBlock as
|
|
1
|
+
import { defineComponent as se, computed as K, openBlock as I, createElementBlock as N, createElementVNode as S, inject as Ze, ref as Xe, resolveComponent as Ee, Fragment as Ge, renderList as Ht, normalizeStyle as le, toDisplayString as _e, normalizeClass as ee, createVNode as X, unref as V, withModifiers as ui, renderSlot as ge, createBlock as pe, withCtx as q, createCommentVNode as ue, mergeModels as ut, useModel as Yt, reactive as bn, watch as zi, nextTick as Vi, createTextVNode as Ye, h as wn, mergeProps as Ut, createSlots as Tn, Teleport as En, Transition as Sn, useCssVars as xn } from "vue";
|
|
2
2
|
import { useNamespace as Pn, ElTag as In } from "element-plus";
|
|
3
3
|
import { paramType as An, ikFile as Ln, buildUUID as ji, ikColor as Dn } from "iking-utils-pro";
|
|
4
4
|
const Pe = (a, o) => {
|
|
@@ -620,7 +620,7 @@ const Pe = (a, o) => {
|
|
|
620
620
|
},
|
|
621
621
|
setup(a) {
|
|
622
622
|
const o = a, r = K(() => o.file ? zt(o.file, o.fields) : o.type);
|
|
623
|
-
return (t, e) => r.value === "image" ? (I(),
|
|
623
|
+
return (t, e) => r.value === "image" ? (I(), N("svg", Fn, Un)) : r.value === "zip" ? (I(), N("svg", zn, Wn)) : r.value === "ppt" ? (I(), N("svg", Gn, Yn)) : r.value === "word" ? (I(), N("svg", Xn, Jn)) : r.value === "pdf" ? (I(), N("svg", Qn, ir)) : r.value === "txt" ? (I(), N("svg", nr, or)) : r.value === "audio" ? (I(), N("svg", ar, cr)) : r.value === "video" ? (I(), N("svg", fr, gr)) : r.value === "excel" ? (I(), N("svg", pr, _r)) : r.value === "exe" ? (I(), N("svg", Cr, Er)) : r.value === "json" ? (I(), N("svg", Sr, Ar)) : (I(), N("svg", Lr, Fr));
|
|
624
624
|
}
|
|
625
625
|
}), Nr = Pe(Mr);
|
|
626
626
|
/*! Element Plus Icons Vue v2.3.1 */
|
|
@@ -628,7 +628,7 @@ var Br = /* @__PURE__ */ se({
|
|
|
628
628
|
name: "Close",
|
|
629
629
|
__name: "close",
|
|
630
630
|
setup(a) {
|
|
631
|
-
return (o, r) => (I(),
|
|
631
|
+
return (o, r) => (I(), N("svg", {
|
|
632
632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
633
|
viewBox: "0 0 1024 1024"
|
|
634
634
|
}, [
|
|
@@ -735,55 +735,56 @@ const it = (a, o) => {
|
|
|
735
735
|
default: !1
|
|
736
736
|
}
|
|
737
737
|
},
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
emits: ["handPreview"],
|
|
739
|
+
setup(a, { emit: o }) {
|
|
740
|
+
const r = a, { cLoadUrl: t, cOnlyofficeConfig: e } = Wi(r), i = o, n = K(() => ({
|
|
740
741
|
name: "name",
|
|
741
742
|
url: "url",
|
|
742
743
|
suffix: "suffix",
|
|
743
744
|
size: "size",
|
|
744
|
-
...
|
|
745
|
-
})),
|
|
746
|
-
var
|
|
747
|
-
|
|
748
|
-
...
|
|
749
|
-
name:
|
|
745
|
+
...r.field
|
|
746
|
+
})), s = Xe({}), l = Xe(!1), u = (g) => {
|
|
747
|
+
var p, m;
|
|
748
|
+
s.value = {
|
|
749
|
+
...g,
|
|
750
|
+
name: g.name,
|
|
750
751
|
url: et(
|
|
751
|
-
|
|
752
|
-
|
|
752
|
+
t.value,
|
|
753
|
+
g.url || ((m = (p = g == null ? void 0 : g.response) == null ? void 0 : p.data) == null ? void 0 : m.id) || (g == null ? void 0 : g.id)
|
|
753
754
|
)
|
|
754
|
-
},
|
|
755
|
-
},
|
|
755
|
+
}, r.isOnlyOfficePreview && (l.value = !0), i("handPreview", s.value);
|
|
756
|
+
}, c = (g) => {
|
|
756
757
|
Ln.downloadFile(
|
|
757
758
|
et(
|
|
758
|
-
|
|
759
|
-
|
|
759
|
+
t.value,
|
|
760
|
+
g[n.value.url] || g.attachmentId || g.id
|
|
760
761
|
),
|
|
761
|
-
|
|
762
|
+
g[n.value.name] || g.attachmentName
|
|
762
763
|
);
|
|
763
|
-
},
|
|
764
|
-
...
|
|
765
|
-
name:
|
|
766
|
-
size:
|
|
767
|
-
suffix:
|
|
764
|
+
}, h = K(() => An.isNumber(r.width) ? `${r.width}px` : r.width), d = K(() => r.list.map((g) => ({
|
|
765
|
+
...g,
|
|
766
|
+
name: g[n.value.name] || g.attachmentName,
|
|
767
|
+
size: g[n.value.size] || g.fileSize || g.attachmentSize,
|
|
768
|
+
suffix: g[n.value.suffix] || g.attachmentSuffix
|
|
768
769
|
})));
|
|
769
|
-
return (
|
|
770
|
-
var
|
|
771
|
-
const
|
|
772
|
-
return I(),
|
|
770
|
+
return (g, p) => {
|
|
771
|
+
var _, b, w;
|
|
772
|
+
const m = Ee("tmplate");
|
|
773
|
+
return I(), N(
|
|
773
774
|
Ge,
|
|
774
775
|
null,
|
|
775
776
|
[
|
|
776
|
-
(
|
|
777
|
+
(_ = a.list) != null && _.length ? (I(), N(
|
|
777
778
|
Ge,
|
|
778
779
|
{ key: 0 },
|
|
779
780
|
[
|
|
780
|
-
a.simple ? (I(!0),
|
|
781
|
+
a.simple ? (I(!0), N(
|
|
781
782
|
Ge,
|
|
782
783
|
{ key: 0 },
|
|
783
|
-
Ht(
|
|
784
|
+
Ht(d.value, (C, F) => (I(), N("div", {
|
|
784
785
|
class: "iking-privew-annex simple",
|
|
785
|
-
onClick: (
|
|
786
|
-
style: le({ width:
|
|
786
|
+
onClick: (R) => u(C),
|
|
787
|
+
style: le({ width: h.value })
|
|
787
788
|
}, [
|
|
788
789
|
S(
|
|
789
790
|
"div",
|
|
@@ -798,19 +799,19 @@ const it = (a, o) => {
|
|
|
798
799
|
class: ee(["flex flex-center", { "hover-show": a.iconHoverShow }])
|
|
799
800
|
},
|
|
800
801
|
[
|
|
801
|
-
X(
|
|
802
|
+
X(V($e), {
|
|
802
803
|
name: "iksvg_daochu",
|
|
803
|
-
onClick: ui((
|
|
804
|
+
onClick: ui((R) => c(C), ["stop"]),
|
|
804
805
|
size: 20,
|
|
805
806
|
active: ""
|
|
806
807
|
}, null, 8, ["onClick"]),
|
|
807
|
-
X(
|
|
808
|
+
X(V($e), {
|
|
808
809
|
name: "iksvg_yulan",
|
|
809
810
|
size: 20,
|
|
810
811
|
active: ""
|
|
811
812
|
}),
|
|
812
|
-
ge(
|
|
813
|
-
data: { ...C, findex:
|
|
813
|
+
ge(g.$slots, "operation", {
|
|
814
|
+
data: { ...C, findex: F }
|
|
814
815
|
})
|
|
815
816
|
],
|
|
816
817
|
2
|
|
@@ -819,33 +820,33 @@ const it = (a, o) => {
|
|
|
819
820
|
], 12, Vr))),
|
|
820
821
|
256
|
|
821
822
|
/* UNKEYED_FRAGMENT */
|
|
822
|
-
)) : (I(), pe(
|
|
823
|
+
)) : (I(), pe(m, { key: 1 }, {
|
|
823
824
|
default: q(() => [
|
|
824
|
-
(I(!0),
|
|
825
|
+
(I(!0), N(
|
|
825
826
|
Ge,
|
|
826
827
|
null,
|
|
827
|
-
Ht(
|
|
828
|
-
var
|
|
829
|
-
return I(),
|
|
828
|
+
Ht(d.value, (C, F) => {
|
|
829
|
+
var R;
|
|
830
|
+
return I(), N(
|
|
830
831
|
"div",
|
|
831
832
|
{
|
|
832
833
|
class: ee(["iking-privew-annex", { "is-bg": a.showBg }]),
|
|
833
|
-
key:
|
|
834
|
+
key: F,
|
|
834
835
|
style: le({
|
|
835
|
-
marginBottom:
|
|
836
|
-
width:
|
|
836
|
+
marginBottom: F == ((R = a.list) == null ? void 0 : R.length) - 1 ? "0" : "10px",
|
|
837
|
+
width: h.value
|
|
837
838
|
})
|
|
838
839
|
},
|
|
839
840
|
[
|
|
840
841
|
S("div", {
|
|
841
842
|
class: "file-card",
|
|
842
|
-
onClick: (
|
|
843
|
+
onClick: (z) => u(C)
|
|
843
844
|
}, [
|
|
844
|
-
X(
|
|
845
|
+
X(V(Nr), {
|
|
845
846
|
file: C,
|
|
846
847
|
style: le({ height: `${a.iconSize}px` }),
|
|
847
848
|
class: "ikui-w-auto",
|
|
848
|
-
fields:
|
|
849
|
+
fields: n.value
|
|
849
850
|
}, null, 8, ["file", "style", "fields"]),
|
|
850
851
|
S("div", Gr, [
|
|
851
852
|
S(
|
|
@@ -858,7 +859,7 @@ const it = (a, o) => {
|
|
|
858
859
|
S(
|
|
859
860
|
"div",
|
|
860
861
|
Kr,
|
|
861
|
-
_e(
|
|
862
|
+
_e(V(Ur)(C.size)),
|
|
862
863
|
1
|
|
863
864
|
/* TEXT */
|
|
864
865
|
)
|
|
@@ -869,21 +870,21 @@ const it = (a, o) => {
|
|
|
869
870
|
class: ee(["flex flex-center", { "hover-show": a.iconHoverShow }])
|
|
870
871
|
},
|
|
871
872
|
[
|
|
872
|
-
X(
|
|
873
|
+
X(V($e), {
|
|
873
874
|
name: "iksvg_daochu",
|
|
874
|
-
onClick: ui((
|
|
875
|
+
onClick: ui((z) => c(C), ["stop"]),
|
|
875
876
|
bg: a.showBg,
|
|
876
877
|
size: a.showBg ? "default" : 20,
|
|
877
878
|
title: "下载"
|
|
878
879
|
}, null, 8, ["onClick", "bg", "size"]),
|
|
879
|
-
X(
|
|
880
|
+
X(V($e), {
|
|
880
881
|
name: "iksvg_yulan",
|
|
881
882
|
bg: a.showBg,
|
|
882
883
|
size: a.showBg ? "default" : 20,
|
|
883
884
|
title: "预览"
|
|
884
885
|
}, null, 8, ["bg", "size"]),
|
|
885
|
-
ge(
|
|
886
|
-
data: { ...C, findex:
|
|
886
|
+
ge(g.$slots, "operation", {
|
|
887
|
+
data: { ...C, findex: F }
|
|
887
888
|
})
|
|
888
889
|
],
|
|
889
890
|
2
|
|
@@ -906,14 +907,14 @@ const it = (a, o) => {
|
|
|
906
907
|
64
|
|
907
908
|
/* STABLE_FRAGMENT */
|
|
908
909
|
)) : ue("v-if", !0),
|
|
909
|
-
X(
|
|
910
|
-
show:
|
|
911
|
-
"onUpdate:show":
|
|
912
|
-
loadUrl:
|
|
913
|
-
file:
|
|
914
|
-
onlyofficeServer: ((
|
|
915
|
-
onlyOfficeConfig:
|
|
916
|
-
onlyOfficeAccept: ((
|
|
910
|
+
X(V(Zr), {
|
|
911
|
+
show: l.value,
|
|
912
|
+
"onUpdate:show": p[0] || (p[0] = (C) => l.value = C),
|
|
913
|
+
loadUrl: V(t),
|
|
914
|
+
file: s.value,
|
|
915
|
+
onlyofficeServer: ((b = V(e)) == null ? void 0 : b.serverUrl) || a.onlyofficeServer,
|
|
916
|
+
onlyOfficeConfig: V(e),
|
|
917
|
+
onlyOfficeAccept: ((w = V(e)) == null ? void 0 : w.accept) || a.onlyOfficeAccept
|
|
917
918
|
}, null, 8, ["show", "loadUrl", "file", "onlyofficeServer", "onlyOfficeConfig", "onlyOfficeAccept"])
|
|
918
919
|
],
|
|
919
920
|
64
|
|
@@ -972,7 +973,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
972
973
|
}), s = (u) => {
|
|
973
974
|
var c, h, d, g, p, m, _;
|
|
974
975
|
try {
|
|
975
|
-
const
|
|
976
|
+
const b = ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u, w = b[t.value.url] || (b == null ? void 0 : b.id) || b.attachmentId, C = (h = b[t.value.suffix] || b.attachmentSuffix) == null ? void 0 : h.toLowerCase(), F = b[t.value.name] || (b == null ? void 0 : b.attachmentName) || (b == null ? void 0 : b.originName);
|
|
976
977
|
if (i.value = {
|
|
977
978
|
...u,
|
|
978
979
|
name: u[t.value.name],
|
|
@@ -983,7 +984,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
983
984
|
} else if (u && zt(u, t.value) === "video") {
|
|
984
985
|
n.video = !0;
|
|
985
986
|
return;
|
|
986
|
-
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(
|
|
987
|
+
} else if ((((d = o.onlyOfficeConfig) == null ? void 0 : d.accept) || o.onlyOfficeAccept).includes(C)) {
|
|
987
988
|
n.office = !0, e.value = {
|
|
988
989
|
...o.onlyOfficeConfig,
|
|
989
990
|
editorConfig: {
|
|
@@ -997,17 +998,17 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
997
998
|
},
|
|
998
999
|
document: {
|
|
999
1000
|
key: ji(),
|
|
1000
|
-
title:
|
|
1001
|
+
title: F,
|
|
1001
1002
|
url: et(o.loadUrl, w),
|
|
1002
|
-
fileType:
|
|
1003
|
+
fileType: C,
|
|
1003
1004
|
...((_ = o.onlyOfficeConfig) == null ? void 0 : _.document) || {}
|
|
1004
1005
|
},
|
|
1005
|
-
documentType: On(
|
|
1006
|
+
documentType: On(C)
|
|
1006
1007
|
};
|
|
1007
1008
|
return;
|
|
1008
1009
|
}
|
|
1009
|
-
} catch (
|
|
1010
|
-
console.info("预览错误: ",
|
|
1010
|
+
} catch (b) {
|
|
1011
|
+
console.info("预览错误: ", b);
|
|
1011
1012
|
}
|
|
1012
1013
|
};
|
|
1013
1014
|
zi([r, o.file], ([u, c]) => {
|
|
@@ -1021,7 +1022,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
1021
1022
|
return (u, c) => {
|
|
1022
1023
|
var d, g, p;
|
|
1023
1024
|
const h = Ee("el-image-viewer");
|
|
1024
|
-
return r.value ? (I(),
|
|
1025
|
+
return r.value ? (I(), N(
|
|
1025
1026
|
Ge,
|
|
1026
1027
|
{ key: 0 },
|
|
1027
1028
|
[
|
|
@@ -1034,12 +1035,12 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
1034
1035
|
}, null, 8, ["url-list"])) : ue("v-if", !0),
|
|
1035
1036
|
ue(' <IkPreviewVideo :file="fileData" v-model:show="modal.video" />'),
|
|
1036
1037
|
ue(" 文档类 "),
|
|
1037
|
-
X(
|
|
1038
|
+
X(V(Na), {
|
|
1038
1039
|
modelValue: n.video,
|
|
1039
1040
|
"onUpdate:modelValue": c[1] || (c[1] = (m) => n.video = m),
|
|
1040
1041
|
url: (p = i.value) == null ? void 0 : p.url
|
|
1041
1042
|
}, null, 8, ["modelValue", "url"]),
|
|
1042
|
-
X(
|
|
1043
|
+
X(V(fs), {
|
|
1043
1044
|
modelValue: n.office,
|
|
1044
1045
|
"onUpdate:modelValue": c[2] || (c[2] = (m) => n.office = m),
|
|
1045
1046
|
draggable: "",
|
|
@@ -1057,7 +1058,7 @@ const Xr = Pe(Yr), qr = /* @__PURE__ */ se({
|
|
|
1057
1058
|
default: q(() => {
|
|
1058
1059
|
var m;
|
|
1059
1060
|
return [
|
|
1060
|
-
X(
|
|
1061
|
+
X(V(Cs), {
|
|
1061
1062
|
"config-options": e.value,
|
|
1062
1063
|
"document-server-url": ((m = a.onlyOfficeConfig) == null ? void 0 : m.serverUrl) || a.onlyofficeServer
|
|
1063
1064
|
}, null, 8, ["config-options", "document-server-url"])
|
|
@@ -1144,8 +1145,8 @@ const Zr = Pe(qr), Jr = {
|
|
|
1144
1145
|
});
|
|
1145
1146
|
return (i, n) => {
|
|
1146
1147
|
const s = Ee("el-tooltip"), l = Ee("el-button");
|
|
1147
|
-
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (I(),
|
|
1148
|
-
r.value.notip || !r.value.title ? (I(),
|
|
1148
|
+
return r.value.tableIconType === "icon" || !r.value.tableIconType ? (I(), N("span", Jr, [
|
|
1149
|
+
r.value.notip || !r.value.title ? (I(), N(
|
|
1149
1150
|
"i",
|
|
1150
1151
|
{
|
|
1151
1152
|
key: 0,
|
|
@@ -1166,7 +1167,7 @@ const Zr = Pe(qr), Jr = {
|
|
|
1166
1167
|
},
|
|
1167
1168
|
[
|
|
1168
1169
|
ue(` <Icon v-if="outputType === 'iconify'" :icon="name" /> `),
|
|
1169
|
-
t.value === "iksig" ? (I(),
|
|
1170
|
+
t.value === "iksig" ? (I(), N(
|
|
1170
1171
|
"i",
|
|
1171
1172
|
{
|
|
1172
1173
|
key: 0,
|
|
@@ -1176,15 +1177,15 @@ const Zr = Pe(qr), Jr = {
|
|
|
1176
1177
|
null,
|
|
1177
1178
|
6
|
|
1178
1179
|
/* CLASS, STYLE */
|
|
1179
|
-
)) : t.value === "svg" ? (I(),
|
|
1180
|
+
)) : t.value === "svg" ? (I(), N("svg", Qr, [
|
|
1180
1181
|
S("use", {
|
|
1181
1182
|
"xlink:href": `#${r.value.name}`
|
|
1182
1183
|
}, null, 8, es)
|
|
1183
|
-
])) : t.value === "img" ? (I(),
|
|
1184
|
+
])) : t.value === "img" ? (I(), N("img", {
|
|
1184
1185
|
key: 2,
|
|
1185
1186
|
src: r.value.name,
|
|
1186
1187
|
class: "h-[1em] w-[1em]"
|
|
1187
|
-
}, null, 8, ts)) : (I(),
|
|
1188
|
+
}, null, 8, ts)) : (I(), N(
|
|
1188
1189
|
"i",
|
|
1189
1190
|
{
|
|
1190
1191
|
key: 3,
|
|
@@ -1222,7 +1223,7 @@ const Zr = Pe(qr), Jr = {
|
|
|
1222
1223
|
style: le(e.value)
|
|
1223
1224
|
},
|
|
1224
1225
|
[
|
|
1225
|
-
t.value === "iksig" ? (I(),
|
|
1226
|
+
t.value === "iksig" ? (I(), N(
|
|
1226
1227
|
"i",
|
|
1227
1228
|
{
|
|
1228
1229
|
key: 0,
|
|
@@ -1232,15 +1233,15 @@ const Zr = Pe(qr), Jr = {
|
|
|
1232
1233
|
null,
|
|
1233
1234
|
6
|
|
1234
1235
|
/* CLASS, STYLE */
|
|
1235
|
-
)) : t.value === "svg" ? (I(),
|
|
1236
|
+
)) : t.value === "svg" ? (I(), N("svg", is, [
|
|
1236
1237
|
S("use", {
|
|
1237
1238
|
"xlink:href": `#${r.value.name}`
|
|
1238
1239
|
}, null, 8, ns)
|
|
1239
|
-
])) : t.value === "img" ? (I(),
|
|
1240
|
+
])) : t.value === "img" ? (I(), N("img", {
|
|
1240
1241
|
key: 2,
|
|
1241
1242
|
src: r.value.name,
|
|
1242
1243
|
class: "h-[1em] w-[1em]"
|
|
1243
|
-
}, null, 8, rs)) : (I(),
|
|
1244
|
+
}, null, 8, rs)) : (I(), N(
|
|
1244
1245
|
"i",
|
|
1245
1246
|
{
|
|
1246
1247
|
key: 3,
|
|
@@ -1289,13 +1290,13 @@ const os = /* @__PURE__ */ it(ss, [["__scopeId", "data-v-52806adf"]]), $e = Pe(o
|
|
|
1289
1290
|
}
|
|
1290
1291
|
},
|
|
1291
1292
|
setup(a) {
|
|
1292
|
-
return (o, r) => (I(),
|
|
1293
|
+
return (o, r) => (I(), N(
|
|
1293
1294
|
"div",
|
|
1294
1295
|
{
|
|
1295
1296
|
class: ee({ "exit-main-page-maximize": a.showBg && a.fullscreen })
|
|
1296
1297
|
},
|
|
1297
1298
|
[
|
|
1298
|
-
X(
|
|
1299
|
+
X(V($e), {
|
|
1299
1300
|
name: "iksvg_guanbidanchuang",
|
|
1300
1301
|
title: "关闭",
|
|
1301
1302
|
size: 20,
|
|
@@ -1344,7 +1345,7 @@ const ls = /* @__PURE__ */ it(as, [["__scopeId", "data-v-da39e979"]]), us = { cl
|
|
|
1344
1345
|
modelValue: r.value,
|
|
1345
1346
|
"onUpdate:modelValue": s[0] || (s[0] = (u) => r.value = u)
|
|
1346
1347
|
}, n.$attrs, {
|
|
1347
|
-
"close-icon":
|
|
1348
|
+
"close-icon": V(i),
|
|
1348
1349
|
class: `ik-base-dialog ${n.noHeader ? "no-header" : ""} ${n.noFooter ? "no-footer" : ""}`,
|
|
1349
1350
|
fullscreen: t.value,
|
|
1350
1351
|
"modal-class": "baseDialog"
|
|
@@ -1368,7 +1369,7 @@ const ls = /* @__PURE__ */ it(as, [["__scopeId", "data-v-da39e979"]]), us = { cl
|
|
|
1368
1369
|
)
|
|
1369
1370
|
])
|
|
1370
1371
|
]),
|
|
1371
|
-
n.$attrs.showClose ? (I(), pe(
|
|
1372
|
+
n.$attrs.showClose ? (I(), pe(V($e), {
|
|
1372
1373
|
key: 0,
|
|
1373
1374
|
onClick: e,
|
|
1374
1375
|
name: t.value ? "iksvg_tuichuquanping" : "iksvg_quanping-daohang",
|
|
@@ -1696,7 +1697,7 @@ var ps = function(a, o) {
|
|
|
1696
1697
|
});
|
|
1697
1698
|
const vs = ["id"];
|
|
1698
1699
|
function ms(a, o, r, t, e, i) {
|
|
1699
|
-
return I(),
|
|
1700
|
+
return I(), N("div", { id: a.id }, null, 8, vs);
|
|
1700
1701
|
}
|
|
1701
1702
|
qt.render = ms;
|
|
1702
1703
|
qt.__file = "src/components/DocumentEditor.vue";
|
|
@@ -1729,13 +1730,13 @@ const ys = /* @__PURE__ */ se({
|
|
|
1729
1730
|
}), t = () => {
|
|
1730
1731
|
console.info("文档加载完成", o.configOptions);
|
|
1731
1732
|
};
|
|
1732
|
-
return (e, i) => (I(),
|
|
1733
|
+
return (e, i) => (I(), N(
|
|
1733
1734
|
"div",
|
|
1734
1735
|
{
|
|
1735
1736
|
style: le({ height: o.officeHeight })
|
|
1736
1737
|
},
|
|
1737
1738
|
[
|
|
1738
|
-
X(
|
|
1739
|
+
X(V(qt), {
|
|
1739
1740
|
id: `${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
1740
1741
|
ref: "editorRef",
|
|
1741
1742
|
"document-server-url": a.documentServerUrl,
|
|
@@ -1966,9 +1967,9 @@ var $i = { exports: {} };
|
|
|
1966
1967
|
var m = r ? r + u : u;
|
|
1967
1968
|
if (!this._events[m])
|
|
1968
1969
|
return !1;
|
|
1969
|
-
var _ = this._events[m],
|
|
1970
|
+
var _ = this._events[m], b = arguments.length, w, C;
|
|
1970
1971
|
if (_.fn) {
|
|
1971
|
-
switch (_.once && this.removeListener(u, _.fn, void 0, !0),
|
|
1972
|
+
switch (_.once && this.removeListener(u, _.fn, void 0, !0), b) {
|
|
1972
1973
|
case 1:
|
|
1973
1974
|
return _.fn.call(_.context), !0;
|
|
1974
1975
|
case 2:
|
|
@@ -1982,30 +1983,30 @@ var $i = { exports: {} };
|
|
|
1982
1983
|
case 6:
|
|
1983
1984
|
return _.fn.call(_.context, c, h, d, g, p), !0;
|
|
1984
1985
|
}
|
|
1985
|
-
for (
|
|
1986
|
-
w[
|
|
1986
|
+
for (C = 1, w = new Array(b - 1); C < b; C++)
|
|
1987
|
+
w[C - 1] = arguments[C];
|
|
1987
1988
|
_.fn.apply(_.context, w);
|
|
1988
1989
|
} else {
|
|
1989
|
-
var
|
|
1990
|
-
for (
|
|
1991
|
-
switch (_[
|
|
1990
|
+
var F = _.length, R;
|
|
1991
|
+
for (C = 0; C < F; C++)
|
|
1992
|
+
switch (_[C].once && this.removeListener(u, _[C].fn, void 0, !0), b) {
|
|
1992
1993
|
case 1:
|
|
1993
|
-
_[
|
|
1994
|
+
_[C].fn.call(_[C].context);
|
|
1994
1995
|
break;
|
|
1995
1996
|
case 2:
|
|
1996
|
-
_[
|
|
1997
|
+
_[C].fn.call(_[C].context, c);
|
|
1997
1998
|
break;
|
|
1998
1999
|
case 3:
|
|
1999
|
-
_[
|
|
2000
|
+
_[C].fn.call(_[C].context, c, h);
|
|
2000
2001
|
break;
|
|
2001
2002
|
case 4:
|
|
2002
|
-
_[
|
|
2003
|
+
_[C].fn.call(_[C].context, c, h, d);
|
|
2003
2004
|
break;
|
|
2004
2005
|
default:
|
|
2005
2006
|
if (!w)
|
|
2006
|
-
for (
|
|
2007
|
-
w[
|
|
2008
|
-
_[
|
|
2007
|
+
for (R = 1, w = new Array(b - 1); R < b; R++)
|
|
2008
|
+
w[R - 1] = arguments[R];
|
|
2009
|
+
_[C].fn.apply(_[C].context, w);
|
|
2009
2010
|
}
|
|
2010
2011
|
}
|
|
2011
2012
|
return !0;
|
|
@@ -2023,7 +2024,7 @@ var $i = { exports: {} };
|
|
|
2023
2024
|
if (p.fn)
|
|
2024
2025
|
p.fn === c && (!d || p.once) && (!h || p.context === h) && n(this, g);
|
|
2025
2026
|
else {
|
|
2026
|
-
for (var m = 0, _ = [],
|
|
2027
|
+
for (var m = 0, _ = [], b = p.length; m < b; m++)
|
|
2027
2028
|
(p[m].fn !== c || d && !p[m].once || h && p[m].context !== h) && _.push(p[m]);
|
|
2028
2029
|
_.length ? this._events[g] = _.length === 1 ? _[0] : _ : n(this, g);
|
|
2029
2030
|
}
|
|
@@ -2039,7 +2040,7 @@ var Ps = typeof window < "u" && window.location && window.location.href.indexOf(
|
|
|
2039
2040
|
info: "color: #525252; background-color: #90ee90;",
|
|
2040
2041
|
error: "color: #525252; background-color: red;",
|
|
2041
2042
|
warn: "color: #525252; background-color: yellow; "
|
|
2042
|
-
}, St = "%c[xgplayer]",
|
|
2043
|
+
}, St = "%c[xgplayer]", M = {
|
|
2043
2044
|
config: {
|
|
2044
2045
|
debug: Ps ? 3 : 0
|
|
2045
2046
|
},
|
|
@@ -2063,7 +2064,7 @@ var Ps = typeof window < "u" && window.location && window.location.href.indexOf(
|
|
|
2063
2064
|
}
|
|
2064
2065
|
};
|
|
2065
2066
|
function Is(a) {
|
|
2066
|
-
a.logInfo =
|
|
2067
|
+
a.logInfo = M.logInfo.bind(a), a.logWarn = M.logWarn.bind(a), a.logError = M.logError.bind(a);
|
|
2067
2068
|
}
|
|
2068
2069
|
var As = /* @__PURE__ */ function() {
|
|
2069
2070
|
function a(o) {
|
|
@@ -2103,7 +2104,7 @@ f.createDomFromHtml = function(a) {
|
|
|
2103
2104
|
e.setAttribute(i, o[i]);
|
|
2104
2105
|
}), e) : null;
|
|
2105
2106
|
} catch (i) {
|
|
2106
|
-
return
|
|
2107
|
+
return M.logError("util.createDomFromHtml", i), null;
|
|
2107
2108
|
}
|
|
2108
2109
|
};
|
|
2109
2110
|
f.hasClass = function(a, o) {
|
|
@@ -2160,7 +2161,7 @@ f.findDom = function() {
|
|
|
2160
2161
|
try {
|
|
2161
2162
|
r = a.querySelector(o);
|
|
2162
2163
|
} catch (t) {
|
|
2163
|
-
|
|
2164
|
+
M.logError("util.findDom", t), o.indexOf("#") === 0 && (r = a.getElementById(o.slice(1)));
|
|
2164
2165
|
}
|
|
2165
2166
|
return r;
|
|
2166
2167
|
};
|
|
@@ -2531,47 +2532,47 @@ function Ds(a, o, r) {
|
|
|
2531
2532
|
return window.cancelAnimationFrame(H);
|
|
2532
2533
|
clearTimeout(H);
|
|
2533
2534
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return u = H, s = m(
|
|
2535
|
+
function b(H) {
|
|
2536
|
+
return u = H, s = m(F, o), c ? p(H) : n;
|
|
2536
2537
|
}
|
|
2537
2538
|
function w(H) {
|
|
2538
2539
|
var te = H - l, oe = H - u, ae = o - te;
|
|
2539
2540
|
return h ? Math.min(ae, i - oe) : ae;
|
|
2540
2541
|
}
|
|
2541
|
-
function
|
|
2542
|
+
function C(H) {
|
|
2542
2543
|
var te = H - l, oe = H - u;
|
|
2543
2544
|
return l === void 0 || te >= o || te < 0 || h && oe >= i;
|
|
2544
2545
|
}
|
|
2545
|
-
function
|
|
2546
|
+
function F() {
|
|
2546
2547
|
var H = Date.now();
|
|
2547
|
-
if (
|
|
2548
|
-
return
|
|
2549
|
-
s = m(
|
|
2548
|
+
if (C(H))
|
|
2549
|
+
return R(H);
|
|
2550
|
+
s = m(F, w(H));
|
|
2550
2551
|
}
|
|
2551
|
-
function
|
|
2552
|
+
function R(H) {
|
|
2552
2553
|
return s = void 0, d && t ? p(H) : (t = e = void 0, n);
|
|
2553
2554
|
}
|
|
2554
|
-
function
|
|
2555
|
+
function z() {
|
|
2555
2556
|
s !== void 0 && _(s), u = 0, t = l = e = s = void 0;
|
|
2556
2557
|
}
|
|
2557
2558
|
function D() {
|
|
2558
|
-
return s === void 0 ? n :
|
|
2559
|
+
return s === void 0 ? n : R(Date.now());
|
|
2559
2560
|
}
|
|
2560
2561
|
function J() {
|
|
2561
2562
|
return s !== void 0;
|
|
2562
2563
|
}
|
|
2563
2564
|
function G() {
|
|
2564
|
-
for (var H = Date.now(), te =
|
|
2565
|
+
for (var H = Date.now(), te = C(H), oe = arguments.length, ae = new Array(oe), Le = 0; Le < oe; Le++)
|
|
2565
2566
|
ae[Le] = arguments[Le];
|
|
2566
2567
|
if (t = ae, e = this, l = H, te) {
|
|
2567
2568
|
if (s === void 0)
|
|
2568
|
-
return
|
|
2569
|
+
return b(l);
|
|
2569
2570
|
if (h)
|
|
2570
|
-
return s = m(
|
|
2571
|
+
return s = m(F, o), p(l);
|
|
2571
2572
|
}
|
|
2572
|
-
return s === void 0 && (s = m(
|
|
2573
|
+
return s === void 0 && (s = m(F, o)), n;
|
|
2573
2574
|
}
|
|
2574
|
-
return G.cancel =
|
|
2575
|
+
return G.cancel = z, G.flush = D, G.pending = J, G;
|
|
2575
2576
|
}
|
|
2576
2577
|
function Rs(a, o, r) {
|
|
2577
2578
|
var t = !0, e = !0;
|
|
@@ -2596,9 +2597,9 @@ function Fs(a, o, r) {
|
|
|
2596
2597
|
var gi = {
|
|
2597
2598
|
android: /(Android)\s([\d.]+)/,
|
|
2598
2599
|
ios: /(Version)\/([\d.]+)/
|
|
2599
|
-
}, Ms = ["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"],
|
|
2600
|
+
}, Ms = ["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"], O = {
|
|
2600
2601
|
get device() {
|
|
2601
|
-
var a =
|
|
2602
|
+
var a = O.os;
|
|
2602
2603
|
return a.isPc ? "pc" : "mobile";
|
|
2603
2604
|
},
|
|
2604
2605
|
get browser() {
|
|
@@ -2749,8 +2750,8 @@ var gi = {
|
|
|
2749
2750
|
for (var m = {
|
|
2750
2751
|
playerVersion: Wt,
|
|
2751
2752
|
domain: document.domain
|
|
2752
|
-
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"],
|
|
2753
|
-
m[_[
|
|
2753
|
+
}, _ = ["errorType", "currentTime", "duration", "networkState", "readyState", "src", "currentSrc", "ended", "errd", "errorCode", "mediaError"], b = 0; b < arguments.length; b++)
|
|
2754
|
+
m[_[b]] = arguments[b];
|
|
2754
2755
|
return m.ex = t ? (t[arguments[0]] || {}).msg : "", m;
|
|
2755
2756
|
}
|
|
2756
2757
|
}
|
|
@@ -2880,7 +2881,7 @@ var Xs = /* @__PURE__ */ function(a) {
|
|
|
2880
2881
|
"data-index": -1
|
|
2881
2882
|
}, t.videoConfig, t.videoAttributes);
|
|
2882
2883
|
var i = t["x5-video-player-type"] || t.x5VideoPlayerType;
|
|
2883
|
-
return
|
|
2884
|
+
return O.isWeixin && O.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;
|
|
2884
2885
|
}
|
|
2885
2886
|
return E(r, [{
|
|
2886
2887
|
key: "setEventsMiddleware",
|
|
@@ -3455,7 +3456,7 @@ function me(a, o, r) {
|
|
|
3455
3456
|
return r.call.apply(r, [a, a].concat(e));
|
|
3456
3457
|
}
|
|
3457
3458
|
function Pt(a, o) {
|
|
3458
|
-
|
|
3459
|
+
M.logError("[".concat(a, "] event or callback cant be undefined or null when call ").concat(o));
|
|
3459
3460
|
}
|
|
3460
3461
|
var xe = /* @__PURE__ */ function() {
|
|
3461
3462
|
function a(o) {
|
|
@@ -3715,11 +3716,11 @@ function Ti(a, o) {
|
|
|
3715
3716
|
try {
|
|
3716
3717
|
return i = a(), i instanceof window.Element ? (f.addClass(i, r), Object.keys(t).map(function(n) {
|
|
3717
3718
|
i.setAttribute(n, t[n]);
|
|
3718
|
-
}), i) : (
|
|
3719
|
+
}), i) : (M.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is a function mast return an Element Object")), null);
|
|
3719
3720
|
} catch (n) {
|
|
3720
|
-
return
|
|
3721
|
+
return M.logError("Plugin named [".concat(e, "]:createIcon"), n), null;
|
|
3721
3722
|
}
|
|
3722
|
-
return typeof a == "string" ? f.createDomFromHtml(a, t, r) : (
|
|
3723
|
+
return typeof a == "string" ? f.createDomFromHtml(a, t, r) : (M.logWarn("warn>>icons.".concat(o, " in config of plugin named [").concat(e, "] is invalid")), null);
|
|
3723
3724
|
}
|
|
3724
3725
|
function ao(a, o) {
|
|
3725
3726
|
var r = o.config.icons || o.playerConfig.icons;
|
|
@@ -3759,7 +3760,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3759
3760
|
try {
|
|
3760
3761
|
u = this.render();
|
|
3761
3762
|
} catch (d) {
|
|
3762
|
-
throw
|
|
3763
|
+
throw M.logError("Plugin:".concat(this.pluginName, ":render"), d), new Error("Plugin:".concat(this.pluginName, ":render:").concat(d.message));
|
|
3763
3764
|
}
|
|
3764
3765
|
if (u)
|
|
3765
3766
|
n = r.insert(u, i, e.index), n.setAttribute("data-index", e.index);
|
|
@@ -3957,7 +3958,7 @@ var U = /* @__PURE__ */ function(a) {
|
|
|
3957
3958
|
try {
|
|
3958
3959
|
return typeof e == "string" ? this.find(e).appendChild(i) : e.appendChild(i);
|
|
3959
3960
|
} catch (n) {
|
|
3960
|
-
return
|
|
3961
|
+
return M.logError("Plugin:appendChild", n), null;
|
|
3961
3962
|
}
|
|
3962
3963
|
}
|
|
3963
3964
|
}, {
|
|
@@ -4444,7 +4445,7 @@ var ho = function(o, r) {
|
|
|
4444
4445
|
return E(r, [{
|
|
4445
4446
|
key: "beforeCreate",
|
|
4446
4447
|
value: function(e) {
|
|
4447
|
-
!e.config.mode &&
|
|
4448
|
+
!e.config.mode && O.device === "mobile" && (e.config.mode = "flex"), e.player.config.marginControls && (e.config.autoHide = !1);
|
|
4448
4449
|
}
|
|
4449
4450
|
}, {
|
|
4450
4451
|
key: "afterCreate",
|
|
@@ -4461,7 +4462,7 @@ var ho = function(o, r) {
|
|
|
4461
4462
|
h ? f.addClass(e.root, "mini-controls") : f.removeClass(e.root, "mini-controls");
|
|
4462
4463
|
});
|
|
4463
4464
|
var c = this.playerConfig.isMobileSimulateMode;
|
|
4464
|
-
|
|
4465
|
+
O.device !== "mobile" && c !== "mobile" && (this.bind("mouseenter", this.onMouseEnter), this.bind("mouseleave", this.onMouseLeave));
|
|
4465
4466
|
}
|
|
4466
4467
|
}
|
|
4467
4468
|
}, {
|
|
@@ -4541,7 +4542,7 @@ var ho = function(o, r) {
|
|
|
4541
4542
|
}, {
|
|
4542
4543
|
key: "destroy",
|
|
4543
4544
|
value: function() {
|
|
4544
|
-
|
|
4545
|
+
O.device !== "mobile" && (this.unbind("mouseenter", this.onMouseEnter), this.unbind("mouseleave", this.onMouseLeave));
|
|
4545
4546
|
}
|
|
4546
4547
|
}, {
|
|
4547
4548
|
key: "render",
|
|
@@ -4728,7 +4729,7 @@ var Ke = {
|
|
|
4728
4729
|
extend: vo,
|
|
4729
4730
|
use: si,
|
|
4730
4731
|
init: mo
|
|
4731
|
-
},
|
|
4732
|
+
}, B = {
|
|
4732
4733
|
INITIAL: 1,
|
|
4733
4734
|
READY: 2,
|
|
4734
4735
|
ATTACHING: 3,
|
|
@@ -4842,14 +4843,14 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4842
4843
|
e = o.call(this, i), y(v(e), "canPlayFunc", function() {
|
|
4843
4844
|
if (e.config) {
|
|
4844
4845
|
var p = e.config, m = p.autoplay, _ = p.defaultPlaybackRate;
|
|
4845
|
-
|
|
4846
|
+
M.logInfo("player", "canPlayFunc, startTime", e.__startTime), e.__startTime > 0 && e.duration > 0 && (e.currentTime = e.__startTime > e.duration ? e.duration : e.__startTime, e.__startTime = -1), e.playbackRate = _, (m || e._useAutoplay) && e.mediaPlay(), e.off(ye, e.canPlayFunc), e.removeClass(k.ENTER);
|
|
4846
4847
|
}
|
|
4847
4848
|
}), y(v(e), "onFullscreenChange", function(p, m) {
|
|
4848
4849
|
var _ = function() {
|
|
4849
4850
|
f.setTimeout(v(e), function() {
|
|
4850
4851
|
e.resize();
|
|
4851
4852
|
}, 100);
|
|
4852
|
-
},
|
|
4853
|
+
}, b = f.getFullScreenEl();
|
|
4853
4854
|
e._fullActionFrom ? e._fullActionFrom = "" : e.emit(pt, {
|
|
4854
4855
|
eventType: "system",
|
|
4855
4856
|
action: "switch_fullscreen",
|
|
@@ -4862,19 +4863,19 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4862
4863
|
to: !1
|
|
4863
4864
|
}]
|
|
4864
4865
|
});
|
|
4865
|
-
var w = Fs(
|
|
4866
|
-
if (m ||
|
|
4867
|
-
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root,
|
|
4866
|
+
var w = Fs(b, e.playerId, Re);
|
|
4867
|
+
if (m || b && (b === e._fullscreenEl || w))
|
|
4868
|
+
_(), !e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !0, e.changeFullStyle(e.root, b, k.FULLSCREEN), e.emit(ve, !0, e._fullScreenOffset), e.cssfullscreen && e.exitCssFullscreen();
|
|
4868
4869
|
else if (e.fullscreen) {
|
|
4869
4870
|
_();
|
|
4870
|
-
var
|
|
4871
|
-
if (
|
|
4871
|
+
var C = v(e), F = C._fullScreenOffset, R = C.config;
|
|
4872
|
+
if (R.needFullscreenScroll ? (window.scrollTo(F.left, F.top), f.setTimeout(v(e), function() {
|
|
4872
4873
|
e.fullscreen = !1, e._fullScreenOffset = null;
|
|
4873
4874
|
}, 100)) : (!e.config.closeFocusVideoFocus && e.media.focus(), e.fullscreen = !1, e._fullScreenOffset = null), e.cssfullscreen)
|
|
4874
4875
|
e.removeClass(k.FULLSCREEN);
|
|
4875
4876
|
else {
|
|
4876
|
-
var
|
|
4877
|
-
!
|
|
4877
|
+
var z = e._fullscreenEl;
|
|
4878
|
+
!z && (e.root.contains(p.target) || p.target === e.root) && (z = p.target), e.recoverFullStyle(e.root, z, k.FULLSCREEN);
|
|
4878
4879
|
}
|
|
4879
4880
|
e._fullscreenEl = null, e.emit(ve, !1);
|
|
4880
4881
|
}
|
|
@@ -4889,7 +4890,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4889
4890
|
s >= 0 && n && (e.config.presets[s] = n);
|
|
4890
4891
|
} else
|
|
4891
4892
|
n && e.config.presets.push(n);
|
|
4892
|
-
e.userTimer = null, e.waitTimer = null, e.handleSource = !0, e._state =
|
|
4893
|
+
e.userTimer = null, e.waitTimer = null, e.handleSource = !0, e._state = B.INITIAL, e.isError = !1, e._hasStart = !1, e.isSeeking = !1, e.isCanplay = !1, e._useAutoplay = !1, e.__startTime = -1, e.rotateDeg = 0, e.isActive = !1, e.fullscreen = !1, e.cssfullscreen = !1, e.isRotateFullscreen = !1, e._fullscreenEl = null, e.timeSegments = [], e._cssfullscreenEl = null, e.curDefinition = null, e._orgCss = "", e._fullScreenOffset = null, e._videoHeight = 0, e._videoWidth = 0, e.videoPos = {
|
|
4893
4894
|
pi: 1,
|
|
4894
4895
|
scale: 0,
|
|
4895
4896
|
rotate: -1,
|
|
@@ -4911,7 +4912,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4911
4912
|
}, e._offsetInfo = {
|
|
4912
4913
|
currentTime: -1,
|
|
4913
4914
|
duration: 0
|
|
4914
|
-
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Ke.init(e._pluginInfoId),
|
|
4915
|
+
}, e.innerContainer = null, e.controls = null, e.topBar = null, e.root = null, e.__i18n = Ke.init(e._pluginInfoId), O.os.isAndroid && O.osVersion > 0 && O.osVersion < 6 && (e.config.autoplay = !1), e.database = new qs(), e.isUserActive = !1, e._onceSeekCanplay = null, e._isPauseBeforeSeek = 0, e.innerStates = {
|
|
4915
4916
|
isActiveLocked: !1
|
|
4916
4917
|
}, e.instManager = be;
|
|
4917
4918
|
var l = e._initDOM();
|
|
@@ -4924,9 +4925,9 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4924
4925
|
});
|
|
4925
4926
|
g || (h.defaultDefinition = h.list[0].definition, g = h.list[0]), e.config.url = g.url, e.curDefinition = g;
|
|
4926
4927
|
}
|
|
4927
|
-
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), $.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(
|
|
4928
|
+
return e._bindEvents(), e._registerPresets(), e._registerPlugins(), $.onPluginsReady(v(e)), e.getInitDefinition(), e.setState(B.READY), f.setTimeout(v(e), function() {
|
|
4928
4929
|
e.emit(ti);
|
|
4929
|
-
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state <
|
|
4930
|
+
}, 0), e.onReady && e.onReady(), (e.config.videoInit || e.config.autoplay) && (!e.hasStart || e.state < B.ATTACHED) && e.start(), e;
|
|
4930
4931
|
}
|
|
4931
4932
|
return E(r, [{
|
|
4932
4933
|
key: "_initDOM",
|
|
@@ -4944,7 +4945,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4944
4945
|
})), console.error("this.confg.id or this.config.el can't be empty"), !1;
|
|
4945
4946
|
}
|
|
4946
4947
|
var s = yo(this.root);
|
|
4947
|
-
s && (
|
|
4948
|
+
s && (M.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"), s.destroy()), this.root.setAttribute(Re, this.playerId), (e = be) === null || e === void 0 || e.add(this), $.init(this), this._initBaseDoms();
|
|
4948
4949
|
var l = this.constructor.XgVideoProxy;
|
|
4949
4950
|
if (l && this.mediaConfig.mediaType === l.mediaType) {
|
|
4950
4951
|
var u = this.innerContainer || this.root;
|
|
@@ -4958,25 +4959,25 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4958
4959
|
});
|
|
4959
4960
|
this.controls = d;
|
|
4960
4961
|
}
|
|
4961
|
-
var g = this.config.isMobileSimulateMode === "mobile" ? "mobile" :
|
|
4962
|
+
var g = this.config.isMobileSimulateMode === "mobile" ? "mobile" : O.device;
|
|
4962
4963
|
if (this.addClass("".concat(k.DEFAULT, " ").concat(k.INACTIVE, " xgplayer-").concat(g, " ").concat(this.config.controls ? "" : k.NO_CONTROLS)), this.config.autoplay ? this.addClass(k.ENTER) : this.addClass(k.NO_START), this.config.fluid) {
|
|
4963
4964
|
var p = this.config, m = p.width, _ = p.height;
|
|
4964
4965
|
(typeof m != "number" || typeof _ != "number") && (m = 600, _ = 337.5);
|
|
4965
|
-
var
|
|
4966
|
+
var b = {
|
|
4966
4967
|
width: "100%",
|
|
4967
4968
|
height: "0",
|
|
4968
4969
|
"max-width": "100%",
|
|
4969
4970
|
"padding-top": "".concat(_ * 100 / m, "%")
|
|
4970
4971
|
};
|
|
4971
|
-
Object.keys(
|
|
4972
|
-
i.root.style[D] =
|
|
4972
|
+
Object.keys(b).forEach(function(D) {
|
|
4973
|
+
i.root.style[D] = b[D];
|
|
4973
4974
|
});
|
|
4974
4975
|
} else
|
|
4975
4976
|
["width", "height"].forEach(function(D) {
|
|
4976
4977
|
i.config[D] && (typeof i.config[D] != "number" ? i.root.style[D] = i.config[D] : i.root.style[D] = "".concat(i.config[D], "px"));
|
|
4977
4978
|
});
|
|
4978
|
-
var w = this.root.getBoundingClientRect(),
|
|
4979
|
-
return this.sizeInfo.width =
|
|
4979
|
+
var w = this.root.getBoundingClientRect(), C = w.width, F = w.height, R = w.left, z = w.top;
|
|
4980
|
+
return this.sizeInfo.width = C, this.sizeInfo.height = F, this.sizeInfo.left = R, this.sizeInfo.top = z, !0;
|
|
4980
4981
|
}
|
|
4981
4982
|
}, {
|
|
4982
4983
|
key: "_initBaseDoms",
|
|
@@ -4993,7 +4994,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
4993
4994
|
e.on(i, e["on" + i.charAt(0).toUpperCase() + i.slice(1)]);
|
|
4994
4995
|
}), mi.forEach(function(i) {
|
|
4995
4996
|
document && document.addEventListener(i, e.onFullscreenChange);
|
|
4996
|
-
}),
|
|
4997
|
+
}), O.os.isIos && (this.media.addEventListener("webkitbeginfullscreen", this._onWebkitbeginfullscreen), this.media.addEventListener("webkitendfullscreen", this._onWebkitendfullscreen)), this.once(ke, this.resize), this.playFunc = function() {
|
|
4997
4998
|
e.config.closeFocusVideoFocus || e.media.focus();
|
|
4998
4999
|
}, this.once(re, this.playFunc);
|
|
4999
5000
|
}
|
|
@@ -5014,14 +5015,14 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5014
5015
|
key: "_startInit",
|
|
5015
5016
|
value: function(e) {
|
|
5016
5017
|
var i = this;
|
|
5017
|
-
if (this.media && !((!e || e === "" || f.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(en),
|
|
5018
|
+
if (this.media && !((!e || e === "" || f.typeOf(e) === "Array" && e.length === 0) && (e = "", this.emit(en), M.logWarn("config.url is null, please get url and run player._startInit(url)"), this.config.nullUrlStart))) {
|
|
5018
5019
|
this.handleSource && (this._detachSourceEvents(this.media), f.typeOf(e) === "Array" && e.length > 0 ? this._attachSourceEvents(this.media, e) : !this.media.src || this.media.src !== e ? this.media.src = e : e || this.media.removeAttribute("src")), f.typeOf(this.config.volume) === "Number" && (this.volume = this.config.volume);
|
|
5019
5020
|
var n = this.innerContainer ? this.innerContainer : this.root;
|
|
5020
5021
|
this.media instanceof window.Element && !n.contains(this.media) && n.insertBefore(this.media, n.firstChild);
|
|
5021
5022
|
var s = this.media.readyState;
|
|
5022
|
-
|
|
5023
|
+
M.logInfo("_startInit readyState", s), this.config.autoplay && (!f.isMSE(this.media) && this.load(), (O.os.isIpad || O.os.isPhone) && this.mediaPlay());
|
|
5023
5024
|
var l = this.config.startTime;
|
|
5024
|
-
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ye, this.canPlayFunc), (!this.hasStart || this.state <
|
|
5025
|
+
this.__startTime = l > 0 ? l : -1, this.config.startTime = 0, s >= 2 && this.duration > 0 ? this.canPlayFunc() : this.on(ye, this.canPlayFunc), (!this.hasStart || this.state < B.ATTACHED) && $.afterInit(this), this.hasStart = !0, this.setState(B.ATTACHED), f.setTimeout(this, function() {
|
|
5025
5026
|
i.emit(kt);
|
|
5026
5027
|
}, 0);
|
|
5027
5028
|
}
|
|
@@ -5046,13 +5047,13 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5046
5047
|
h.forceBeforeInit && (g.then(function() {
|
|
5047
5048
|
e._loadingPlugins.splice(e._loadingPlugins.indexOf(g), 1);
|
|
5048
5049
|
}).catch(function(p) {
|
|
5049
|
-
|
|
5050
|
+
M.logError("_registerPlugins:loadingPlugin", p), e._loadingPlugins.splice(e._loadingPlugins.indexOf(g), 1);
|
|
5050
5051
|
}), e._loadingPlugins.push(g));
|
|
5051
5052
|
return;
|
|
5052
5053
|
}
|
|
5053
5054
|
return e.registerPlugin(h);
|
|
5054
5055
|
} catch (p) {
|
|
5055
|
-
|
|
5056
|
+
M.logError("_registerPlugins:", p);
|
|
5056
5057
|
}
|
|
5057
5058
|
});
|
|
5058
5059
|
}
|
|
@@ -5159,15 +5160,15 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5159
5160
|
key: "start",
|
|
5160
5161
|
value: function(e) {
|
|
5161
5162
|
var i = this;
|
|
5162
|
-
if (!(this.state >
|
|
5163
|
-
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(
|
|
5163
|
+
if (!(this.state > B.ATTACHING))
|
|
5164
|
+
return !e && !this.config.url && this.getInitDefinition(), this.hasStart = !0, this.setState(B.ATTACHING), this._registerPlugins(!1), $.beforeInit(this).then(function() {
|
|
5164
5165
|
if (i.config) {
|
|
5165
5166
|
e || (e = i.url || i.config.url);
|
|
5166
5167
|
var n = i._preProcessUrl(e), s = i._startInit(n.url);
|
|
5167
5168
|
return s;
|
|
5168
5169
|
}
|
|
5169
5170
|
}).catch(function(n) {
|
|
5170
|
-
throw n.fileName = "player", n.lineNumber = "236",
|
|
5171
|
+
throw n.fileName = "player", n.lineNumber = "236", M.logError("start:beforeInit:", n), n;
|
|
5171
5172
|
});
|
|
5172
5173
|
}
|
|
5173
5174
|
}, {
|
|
@@ -5191,7 +5192,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5191
5192
|
});
|
|
5192
5193
|
return;
|
|
5193
5194
|
}
|
|
5194
|
-
|
|
5195
|
+
O.os.isAndroid ? n.once("timeupdate", g) : n.once("canplay", g), n.play();
|
|
5195
5196
|
});
|
|
5196
5197
|
}
|
|
5197
5198
|
}, {
|
|
@@ -5203,23 +5204,23 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5203
5204
|
key: "mediaPlay",
|
|
5204
5205
|
value: function() {
|
|
5205
5206
|
var e = this;
|
|
5206
|
-
if (!this.hasStart && this.state <
|
|
5207
|
+
if (!this.hasStart && this.state < B.ATTACHED) {
|
|
5207
5208
|
this.removeClass(k.NO_START), this.addClass(k.ENTER), this.start(), this._useAutoplay = !0;
|
|
5208
5209
|
return;
|
|
5209
5210
|
}
|
|
5210
|
-
this.state <
|
|
5211
|
+
this.state < B.RUNNING && (this.removeClass(k.NO_START), !this.isCanplay && this.addClass(k.ENTER));
|
|
5211
5212
|
var i = L(A(r.prototype), "play", this).call(this);
|
|
5212
5213
|
return i !== void 0 && i && i.then ? i.then(function() {
|
|
5213
|
-
e.removeClass(k.NOT_ALLOW_AUTOPLAY), e.addClass(k.PLAYING), e.state <
|
|
5214
|
+
e.removeClass(k.NOT_ALLOW_AUTOPLAY), e.addClass(k.PLAYING), e.state < B.RUNNING && (M.logInfo(">>>>playPromise.then"), e.setState(B.RUNNING), e.emit(Oe));
|
|
5214
5215
|
}).catch(function(n) {
|
|
5215
|
-
if (
|
|
5216
|
+
if (M.logWarn(">>>>playPromise.catch", n.name), e.media && e.media.error) {
|
|
5216
5217
|
e.onError(), e.removeClass(k.ENTER);
|
|
5217
5218
|
return;
|
|
5218
5219
|
}
|
|
5219
5220
|
n.name === "NotAllowedError" && (e._errorTimer = f.setTimeout(e, function() {
|
|
5220
|
-
e._errorTimer = null, e.emit(ii), e.addClass(k.NOT_ALLOW_AUTOPLAY), e.removeClass(k.ENTER), e.pause(), e.setState(
|
|
5221
|
+
e._errorTimer = null, e.emit(ii), e.addClass(k.NOT_ALLOW_AUTOPLAY), e.removeClass(k.ENTER), e.pause(), e.setState(B.NOTALLOW);
|
|
5221
5222
|
}, 0));
|
|
5222
|
-
}) : (
|
|
5223
|
+
}) : (M.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(Oe))), i;
|
|
5223
5224
|
}
|
|
5224
5225
|
}, {
|
|
5225
5226
|
key: "mediaPause",
|
|
@@ -5265,7 +5266,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5265
5266
|
n._isPauseBeforeSeek > 1 || n.paused ? n.pause() : n.play();
|
|
5266
5267
|
}
|
|
5267
5268
|
n._isPauseBeforeSeek = 0, n._onceSeekCanplay = null;
|
|
5268
|
-
}, this.once(Ce, this._onceSeekCanplay), this.state <
|
|
5269
|
+
}, this.once(Ce, this._onceSeekCanplay), this.state < B.RUNNING ? (this.removeClass(k.NO_START), this.currentTime = e, this.play()) : this.currentTime = e;
|
|
5269
5270
|
}
|
|
5270
5271
|
}
|
|
5271
5272
|
}, {
|
|
@@ -5552,7 +5553,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5552
5553
|
}, {
|
|
5553
5554
|
key: "onPlay",
|
|
5554
5555
|
value: function() {
|
|
5555
|
-
this.state ===
|
|
5556
|
+
this.state === B.ENDED && this.setState(B.RUNNING), this.removeClass(k.PAUSED), this.ended && this.removeClass(k.ENDED), !this.config.closePlayVideoFocus && this.focus();
|
|
5556
5557
|
}
|
|
5557
5558
|
}, {
|
|
5558
5559
|
key: "onPause",
|
|
@@ -5562,7 +5563,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5562
5563
|
}, {
|
|
5563
5564
|
key: "onEnded",
|
|
5564
5565
|
value: function() {
|
|
5565
|
-
this.updateAcc("ended"), this.addClass(k.ENDED), this.setState(
|
|
5566
|
+
this.updateAcc("ended"), this.addClass(k.ENDED), this.setState(B.ENDED);
|
|
5566
5567
|
}
|
|
5567
5568
|
}, {
|
|
5568
5569
|
key: "onError",
|
|
@@ -5600,7 +5601,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5600
5601
|
}, {
|
|
5601
5602
|
key: "onTimeupdate",
|
|
5602
5603
|
value: function() {
|
|
5603
|
-
!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 ===
|
|
5604
|
+
!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(Oe)), !this._accPlayed.t && !this.paused && !this.ended && (this._accPlayed.t = (/* @__PURE__ */ new Date()).getTime());
|
|
5604
5605
|
}
|
|
5605
5606
|
}, {
|
|
5606
5607
|
key: "onVolumechange",
|
|
@@ -5659,13 +5660,13 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5659
5660
|
this.videoPos.pi = c, u = u < 0 ? 0 : u;
|
|
5660
5661
|
var h = {
|
|
5661
5662
|
rotate: u
|
|
5662
|
-
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root,
|
|
5663
|
+
}, d = 0, g = 0, p = 1, m = Math.abs(u / 90), _ = this.root, b = this.innerContainer, w = _.offsetWidth, C = b ? b.offsetHeight : _.offsetHeight, F = C, R = w;
|
|
5663
5664
|
if (m % 2 === 0)
|
|
5664
|
-
p = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = p, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, g = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - g : g, this.media.style.width = "".concat(
|
|
5665
|
+
p = s > 0 ? 100 / s : l > 0 ? 100 / l : 1, h.scale = p, d = i > 0 ? (100 - s) / 2 - i : 0, h.y = m === 2 ? 0 - d : d, g = n > 0 ? (100 - l) / 2 - n : 0, h.x = m === 2 ? 0 - g : g, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(F, "px");
|
|
5665
5666
|
else if (m % 2 === 1) {
|
|
5666
|
-
|
|
5667
|
-
var
|
|
5668
|
-
g = -
|
|
5667
|
+
R = C, F = w;
|
|
5668
|
+
var z = C - w;
|
|
5669
|
+
g = -z / 2 / R * 100, h.x = m === 3 ? g + i / 2 : g - i / 2, d = z / 2 / F * 100, h.y = m === 3 ? d + n / 2 : d - n / 2, h.scale = p, this.media.style.width = "".concat(R, "px"), this.media.style.height = "".concat(F, "px");
|
|
5669
5670
|
}
|
|
5670
5671
|
var D = f.getTransformStyle(h, this.media.style.transform || this.media.style.webkitTransform);
|
|
5671
5672
|
this.media.style.transform = D, this.media.style.webkitTransform = D;
|
|
@@ -5716,18 +5717,18 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5716
5717
|
var n = this.media, s = n.videoWidth, l = n.videoHeight, u = this.config, c = u.fitVideoSize, h = u.videoFillMode;
|
|
5717
5718
|
if ((h === "fill" || h === "cover" || h === "contain") && this.setAttribute("data-xgfill", h), !(!l || !s)) {
|
|
5718
5719
|
this._videoHeight = l, this._videoWidth = s;
|
|
5719
|
-
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10),
|
|
5720
|
-
c === "auto" && _ > m || c === "fixWidth" ? (w = g / m * 1e3, this.config.fluid ?
|
|
5721
|
-
e.root.style[
|
|
5720
|
+
var d = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0, g = i.width, p = i.height - d, m = parseInt(s / l * 1e3, 10), _ = parseInt(g / p * 1e3, 10), b = g, w = p, C = {};
|
|
5721
|
+
c === "auto" && _ > m || c === "fixWidth" ? (w = g / m * 1e3, this.config.fluid ? C.paddingTop = "".concat(w * 100 / b, "%") : C.height = "".concat(w + d, "px")) : (c === "auto" && _ < m || c === "fixHeight") && (b = m * p / 1e3, C.width = "".concat(b, "px")), !this.fullscreen && !this.cssfullscreen && Object.keys(C).forEach(function(R) {
|
|
5722
|
+
e.root.style[R] = C[R];
|
|
5722
5723
|
}), (h === "fillHeight" && _ < m || h === "fillWidth" && _ > m) && this.setAttribute("data-xgfill", "cover");
|
|
5723
|
-
var
|
|
5724
|
+
var F = {
|
|
5724
5725
|
videoScale: m,
|
|
5725
|
-
vWidth:
|
|
5726
|
+
vWidth: b,
|
|
5726
5727
|
vHeight: w,
|
|
5727
|
-
cWidth:
|
|
5728
|
+
cWidth: b,
|
|
5728
5729
|
cHeight: w + d
|
|
5729
5730
|
};
|
|
5730
|
-
this.resizePosition(), this.emit(Se,
|
|
5731
|
+
this.resizePosition(), this.emit(Se, F);
|
|
5731
5732
|
}
|
|
5732
5733
|
}
|
|
5733
5734
|
}
|
|
@@ -5744,7 +5745,7 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5744
5745
|
}, {
|
|
5745
5746
|
key: "setState",
|
|
5746
5747
|
value: function(e) {
|
|
5747
|
-
|
|
5748
|
+
M.logInfo("setState", "state from:".concat(Si[this.state], " to:").concat(Si[e])), this._state = e;
|
|
5748
5749
|
}
|
|
5749
5750
|
}, {
|
|
5750
5751
|
key: "_preProcessUrl",
|
|
@@ -5775,15 +5776,15 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5775
5776
|
return this._hasStart;
|
|
5776
5777
|
},
|
|
5777
5778
|
set: function(e) {
|
|
5778
|
-
typeof e == "boolean" && (this._hasStart = e, e === !1 && this.setState(
|
|
5779
|
+
typeof e == "boolean" && (this._hasStart = e, e === !1 && this.setState(B.READY), this.emit("hasstart"));
|
|
5779
5780
|
}
|
|
5780
5781
|
}, {
|
|
5781
5782
|
key: "isPlaying",
|
|
5782
5783
|
get: function() {
|
|
5783
|
-
return this._state ===
|
|
5784
|
+
return this._state === B.RUNNING || this._state === B.ENDED;
|
|
5784
5785
|
},
|
|
5785
5786
|
set: function(e) {
|
|
5786
|
-
e ? this.setState(
|
|
5787
|
+
e ? this.setState(B.RUNNING) : this._state >= B.RUNNING && this.setState(B.ATTACHED);
|
|
5787
5788
|
}
|
|
5788
5789
|
}, {
|
|
5789
5790
|
key: "definitionList",
|
|
@@ -5977,10 +5978,10 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
5977
5978
|
}], [{
|
|
5978
5979
|
key: "debugger",
|
|
5979
5980
|
get: function() {
|
|
5980
|
-
return
|
|
5981
|
+
return M.config.debug;
|
|
5981
5982
|
},
|
|
5982
5983
|
set: function(e) {
|
|
5983
|
-
|
|
5984
|
+
M.config.debug = e;
|
|
5984
5985
|
}
|
|
5985
5986
|
}, {
|
|
5986
5987
|
key: "instManager",
|
|
@@ -6005,12 +6006,12 @@ var _o = ["play", "pause", "replay", "retry"], xi = 0, Pi = 0, be = null, Tt = /
|
|
|
6005
6006
|
}, {
|
|
6006
6007
|
key: "isHevcSupported",
|
|
6007
6008
|
value: function() {
|
|
6008
|
-
return
|
|
6009
|
+
return O.isHevcSupported();
|
|
6009
6010
|
}
|
|
6010
6011
|
}, {
|
|
6011
6012
|
key: "probeConfigSupported",
|
|
6012
6013
|
value: function(e) {
|
|
6013
|
-
return
|
|
6014
|
+
return O.probeConfigSupported(e);
|
|
6014
6015
|
}
|
|
6015
6016
|
}, {
|
|
6016
6017
|
key: "install",
|
|
@@ -6047,9 +6048,9 @@ var we = {
|
|
|
6047
6048
|
for (var e = arguments.length, i = new Array(e), n = 0; n < e; n++)
|
|
6048
6049
|
i[n] = arguments[n];
|
|
6049
6050
|
return t = o.call.apply(o, [this].concat(i)), y(v(t), "_onTimeupdate", function() {
|
|
6050
|
-
t._state.isTimeUpdate = !0, t._state.autoplayStart && (
|
|
6051
|
+
t._state.isTimeUpdate = !0, t._state.autoplayStart && (M.logInfo("[xgLogger]".concat(t.player.playerId, " _onTimeupdate")), t._sendFF("onTimeupdate"));
|
|
6051
6052
|
}), y(v(t), "_onAutoplayStart", function() {
|
|
6052
|
-
|
|
6053
|
+
M.logInfo("[xgLogger]".concat(t.player.playerId, " _onAutoplayStart")), t._state.autoplayStart = !0, t.vt && t._sendFF("onAutoplayStart");
|
|
6053
6054
|
}), y(v(t), "_onReset", function() {
|
|
6054
6055
|
t._state = {
|
|
6055
6056
|
autoplayStart: !1,
|
|
@@ -6092,17 +6093,17 @@ var we = {
|
|
|
6092
6093
|
var e = this;
|
|
6093
6094
|
this._onReset(), this._waitType = "firstFrame", this._initOnceEvents(), this.newPointTime = Y(), this.loadedCostTime = 0, this.startCostTime = 0, this.on(Qt, function() {
|
|
6094
6095
|
var i = e._state, n = i.autoplayStart, s = i.isFFSend;
|
|
6095
|
-
e.startCostTime = Y() - e.newPointTime,
|
|
6096
|
+
e.startCostTime = Y() - e.newPointTime, M.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());
|
|
6096
6097
|
}), this.on(ke, function() {
|
|
6097
6098
|
e.vt = Y(), e.fvt = e.vt - e.pt, e.loadedCostTime = e.vt - e.newPointTime;
|
|
6098
6099
|
var i = e._state, n = i.isTimeUpdate, s = i.isFFSend, l = i.autoplayStart;
|
|
6099
|
-
|
|
6100
|
+
M.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");
|
|
6100
6101
|
}), this.on(Ct, this._onSeeking), this.on(Ce, this._onSeeked), this.on(ni, function() {
|
|
6101
6102
|
e.endState("destroy");
|
|
6102
6103
|
}), this.on(bt, function() {
|
|
6103
|
-
e.endState("urlChange"),
|
|
6104
|
+
e.endState("urlChange"), M.logInfo("[xgLogger]".concat(e.player.playerId, " URL_CHANGE")), e._state.isFFSend && e._onReset();
|
|
6104
6105
|
}), this.on([Jt, ye], this._onPlaying), this.on(rt, this._onWaiting), this.on(nt, this._onError), this.on(wt, function() {
|
|
6105
|
-
|
|
6106
|
+
M.logInfo("[xgLogger]".concat(e.player.playerId, " RESET")), e.endState("reset"), e._initOnceEvents(), e._onReset();
|
|
6106
6107
|
});
|
|
6107
6108
|
}
|
|
6108
6109
|
}, {
|
|
@@ -6115,7 +6116,7 @@ var we = {
|
|
|
6115
6116
|
value: function(e) {
|
|
6116
6117
|
this.s = Y();
|
|
6117
6118
|
var i = this._state, n = i.isFFLoading, s = i.isFFSend;
|
|
6118
|
-
|
|
6119
|
+
M.logInfo("[xgLogger]".concat(this.player.playerId, " _sendFF"), "".concat(e, " fvt:").concat(this.fvt, " isFFLoading:").concat(n, " !isFFSend:").concat(!s)), this.vt > 0 && n && !s && (M.logInfo("[xgLogger]".concat(this.player.playerId, " emitLog_firstFrame"), e), this._state.isFFLoading = !1, this._state.isFFSend = !0, this.emitLog(we.FIRST_FRAME, {
|
|
6119
6120
|
fvt: this.fvt,
|
|
6120
6121
|
costTime: this.fvt,
|
|
6121
6122
|
vt: this.vt,
|
|
@@ -6531,16 +6532,16 @@ var Eo = /* @__PURE__ */ function(a) {
|
|
|
6531
6532
|
key: "switchPausePlay",
|
|
6532
6533
|
value: function(e) {
|
|
6533
6534
|
var i = this.player;
|
|
6534
|
-
if (e.cancelable && e.preventDefault(), e.stopPropagation(), !(i.state <
|
|
6535
|
+
if (e.cancelable && e.preventDefault(), e.stopPropagation(), !(i.state < B.READY)) {
|
|
6535
6536
|
var n = this.player.paused;
|
|
6536
|
-
!n && i.state ===
|
|
6537
|
+
!n && i.state === B.RUNNING ? i.pause() : i.play();
|
|
6537
6538
|
}
|
|
6538
6539
|
}
|
|
6539
6540
|
}, {
|
|
6540
6541
|
key: "onPlayPause",
|
|
6541
6542
|
value: function(e) {
|
|
6542
6543
|
var i = this.config, n = this.player;
|
|
6543
|
-
if (!(!n || n.state <
|
|
6544
|
+
if (!(!n || n.state < B.RUNNING || !this.autoPlayStart)) {
|
|
6544
6545
|
if (i.mode === "show") {
|
|
6545
6546
|
this.switchStatus(), this.show();
|
|
6546
6547
|
return;
|
|
@@ -7174,7 +7175,7 @@ var Rt = {
|
|
|
7174
7175
|
e.__hooks[n] = null;
|
|
7175
7176
|
});
|
|
7176
7177
|
var i = this.playerConfig.isMobileSimulateMode;
|
|
7177
|
-
i === "mobile" ||
|
|
7178
|
+
i === "mobile" || O.device === "mobile" && !O.os.isIpad || this.initEvents();
|
|
7178
7179
|
}
|
|
7179
7180
|
}, {
|
|
7180
7181
|
key: "initEvents",
|
|
@@ -7385,12 +7386,12 @@ var He = {
|
|
|
7385
7386
|
if (!(!n || u.disableGesture || !e.duration || !l.isStart)) {
|
|
7386
7387
|
var h = u.miniMoveStep, d = u.hideControlsActive, g = parseInt(n.pageX - l.left, 10), p = parseInt(n.pageY - l.top, 10), m = c.rotateDeg === 90 ? p : g, _ = c.rotateDeg === 90 ? g : p;
|
|
7387
7388
|
if (Math.abs(m - l.x) > h || Math.abs(_ - l.y) > h) {
|
|
7388
|
-
var
|
|
7389
|
-
if (
|
|
7389
|
+
var b = m - l.x, w = _ - l.y, C = l.scope;
|
|
7390
|
+
if (C === -1 && (C = e.checkScope(m, _, b, w, l), C === 0 && (d ? c.blur() : c.focus({
|
|
7390
7391
|
autoHide: !1
|
|
7391
|
-
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope =
|
|
7392
|
+
}), !l.time && (l.time = parseInt(c.currentTime * 1e3, 10) + e.timeOffset * 1e3)), l.scope = C), C === -1 || C > 0 && !u.gestureY || C === 0 && !u.gestureX)
|
|
7392
7393
|
return;
|
|
7393
|
-
e.executeMove(
|
|
7394
|
+
e.executeMove(b, w, C, l.width, l.height), l.x = m, l.y = _;
|
|
7394
7395
|
}
|
|
7395
7396
|
}
|
|
7396
7397
|
}), y(v(e), "onTouchEnd", function(i) {
|
|
@@ -7577,7 +7578,7 @@ var He = {
|
|
|
7577
7578
|
this.updateBrightness(i / l);
|
|
7578
7579
|
break;
|
|
7579
7580
|
case 2:
|
|
7580
|
-
|
|
7581
|
+
O.os.isIos || this.updateVolume(i / l);
|
|
7581
7582
|
break;
|
|
7582
7583
|
}
|
|
7583
7584
|
}
|
|
@@ -7614,7 +7615,7 @@ var He = {
|
|
|
7614
7615
|
key: "clickHandler",
|
|
7615
7616
|
value: function(e) {
|
|
7616
7617
|
var i = this.player, n = this.config, s = this.playerConfig;
|
|
7617
|
-
if (i.state <
|
|
7618
|
+
if (i.state < B.RUNNING) {
|
|
7618
7619
|
s.closeVideoClick || (this.sendUseAction(f.createEvent("click")), i.play());
|
|
7619
7620
|
return;
|
|
7620
7621
|
}
|
|
@@ -7624,7 +7625,7 @@ var He = {
|
|
|
7624
7625
|
key: "dbClickHandler",
|
|
7625
7626
|
value: function(e) {
|
|
7626
7627
|
var i = this.config, n = this.player;
|
|
7627
|
-
!i.closedbClick && n.state >=
|
|
7628
|
+
!i.closedbClick && n.state >= B.RUNNING && (this.sendUseAction(f.createEvent("dblclick")), this.switchPlayPause());
|
|
7628
7629
|
}
|
|
7629
7630
|
}, {
|
|
7630
7631
|
key: "onClick",
|
|
@@ -7713,7 +7714,7 @@ var He = {
|
|
|
7713
7714
|
key: "switchPlayPause",
|
|
7714
7715
|
value: function() {
|
|
7715
7716
|
var e = this.player;
|
|
7716
|
-
if (e.state <
|
|
7717
|
+
if (e.state < B.ATTACHED)
|
|
7717
7718
|
return !1;
|
|
7718
7719
|
e.ended || (e.paused ? e.play() : e.pause());
|
|
7719
7720
|
}
|
|
@@ -8500,7 +8501,7 @@ var Ho = /* @__PURE__ */ function(a) {
|
|
|
8500
8501
|
fragAutoFocus: s,
|
|
8501
8502
|
fragClass: l,
|
|
8502
8503
|
style: this.playerConfig.commonStyle || {}
|
|
8503
|
-
}),
|
|
8504
|
+
}), O.device === "mobile" && (this.config.isDragingSeek = !1, this.isMobile = !0), this.progressBtn = this.find(".xgplayer-progress-btn"), this.on(Ie, function() {
|
|
8504
8505
|
e.onMouseLeave();
|
|
8505
8506
|
}), this.on(ne, function() {
|
|
8506
8507
|
e.onTimeupdate();
|
|
@@ -8617,10 +8618,10 @@ var Ho = /* @__PURE__ */ function(a) {
|
|
|
8617
8618
|
m = m > d ? d : m < 0 ? 0 : m;
|
|
8618
8619
|
var _ = m / d;
|
|
8619
8620
|
_ = _ < 0 ? 0 : _ > 1 ? 1 : _;
|
|
8620
|
-
var
|
|
8621
|
+
var b = parseInt(_ * this.offsetDuration * 1e3, 10) / 1e3, w = f.getCurrentTimeByOffset(b, n.timeSegments);
|
|
8621
8622
|
return {
|
|
8622
8623
|
percent: _,
|
|
8623
|
-
currentTime:
|
|
8624
|
+
currentTime: b,
|
|
8624
8625
|
seekTime: w,
|
|
8625
8626
|
offset: m,
|
|
8626
8627
|
width: d,
|
|
@@ -8993,7 +8994,7 @@ var Yo = /* @__PURE__ */ function(a) {
|
|
|
8993
8994
|
}
|
|
8994
8995
|
}
|
|
8995
8996
|
}
|
|
8996
|
-
})),
|
|
8997
|
+
})), O.device === "mobile" && window.addEventListener("orientationchange", this._onOrientationChange);
|
|
8997
8998
|
}
|
|
8998
8999
|
}
|
|
8999
9000
|
}, {
|
|
@@ -9013,7 +9014,7 @@ var Yo = /* @__PURE__ */ function(a) {
|
|
|
9013
9014
|
}, {
|
|
9014
9015
|
key: "destroy",
|
|
9015
9016
|
value: function() {
|
|
9016
|
-
L(A(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon",
|
|
9017
|
+
L(A(r.prototype), "destroy", this).call(this), this.unbind(".xgplayer-icon", O.device === "mobile" ? "touchend" : "click", this.handleFullscreen), O.device === "mobile" && window.removeEventListener("orientationchange", this._onOrientationChange);
|
|
9017
9018
|
}
|
|
9018
9019
|
}, {
|
|
9019
9020
|
key: "initIcons",
|
|
@@ -9473,7 +9474,7 @@ var ea = /* @__PURE__ */ function(a) {
|
|
|
9473
9474
|
pre: function(u) {
|
|
9474
9475
|
u.preventDefault(), u.stopPropagation();
|
|
9475
9476
|
}
|
|
9476
|
-
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave),
|
|
9477
|
+
}), this._onMouseenterHandler = this.hook("mouseenter", this.onMouseenter), this._onMouseleaveHandler = this.hook("mouseleave", this.onMouseleave), O.device !== "mobile" && this.playerConfig.isMobileSimulateMode !== "mobile" && (this.bind("mouseenter", this._onMouseenterHandler), this.bind(["blur", "mouseleave"], this._onMouseleaveHandler), this.bind(".xgplayer-slider", "mousedown", this.onBarMousedown), this.bind(".xgplayer-slider", "mousemove", this.onBarMouseMove), this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)), this.bind(".xgplayer-icon", ["touchend", "click"], this.changeMutedHandler), this.on(qi, this.onVolumeChange), this.once(ke, this.onVolumeChange), f.typeOf(s) !== "Number" && (this.player.volume = this.config.default), this.onVolumeChange();
|
|
9477
9478
|
}
|
|
9478
9479
|
}
|
|
9479
9480
|
}, {
|
|
@@ -9551,7 +9552,7 @@ var ea = /* @__PURE__ */ function(a) {
|
|
|
9551
9552
|
}, {
|
|
9552
9553
|
key: "destroy",
|
|
9553
9554
|
value: function() {
|
|
9554
|
-
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",
|
|
9555
|
+
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", O.device === "mobile" ? "touchend" : "click", this.changeMutedHandler);
|
|
9555
9556
|
}
|
|
9556
9557
|
}, {
|
|
9557
9558
|
key: "render",
|
|
@@ -9642,17 +9643,17 @@ var ia = /* @__PURE__ */ function(a) {
|
|
|
9642
9643
|
this.player.videoRotateDeg = e;
|
|
9643
9644
|
return;
|
|
9644
9645
|
}
|
|
9645
|
-
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0,
|
|
9646
|
-
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2,
|
|
9647
|
-
var w = "translate(".concat(_, "px,").concat(
|
|
9646
|
+
var n = this.player, s = this.rootWidth, l = this.rootHeight, u = n.root, c = n.innerContainer, h = n.media, d = u.offsetWidth, g = c && i ? c.offsetHeight : u.offsetHeight, p = s, m = l, _ = 0, b = 0;
|
|
9647
|
+
(e === 0.75 || e === 0.25) && (p = "".concat(g, "px"), m = "".concat(d, "px"), _ = -(g - d) / 2, b = -(d - g) / 2);
|
|
9648
|
+
var w = "translate(".concat(_, "px,").concat(b, "px) rotate(").concat(e, "turn)"), C = {
|
|
9648
9649
|
transformOrigin: "center center",
|
|
9649
9650
|
transform: w,
|
|
9650
9651
|
webKitTransform: w,
|
|
9651
9652
|
height: m,
|
|
9652
9653
|
width: p
|
|
9653
|
-
},
|
|
9654
|
-
Object.keys(
|
|
9655
|
-
|
|
9654
|
+
}, F = i ? h : u, R = i ? n.getPlugin("poster") : null;
|
|
9655
|
+
Object.keys(C).map(function(z) {
|
|
9656
|
+
F.style[z] = C[z], R && R.root && (R.root.style[z] = C[z]);
|
|
9656
9657
|
});
|
|
9657
9658
|
}
|
|
9658
9659
|
}, {
|
|
@@ -9827,18 +9828,18 @@ var Ue = {
|
|
|
9827
9828
|
documentPictureInPicture.requestWindow(u).then(function(h) {
|
|
9828
9829
|
var d = s.docPiPNode, g = s.docPiPStyle;
|
|
9829
9830
|
e.enterPIPCallback();
|
|
9830
|
-
var p = d || i.root, m = p.parentElement, _ = p.previousSibling,
|
|
9831
|
+
var p = d || i.root, m = p.parentElement, _ = p.previousSibling, b = p.nextSibling;
|
|
9831
9832
|
e.copyStyleIntoPiPWindow(h);
|
|
9832
9833
|
var w = document.createElement("style");
|
|
9833
9834
|
if (w.append("body{padding:0; margin:0;}"), g) {
|
|
9834
|
-
var
|
|
9835
|
-
typeof g == "string" ?
|
|
9835
|
+
var C = "";
|
|
9836
|
+
typeof g == "string" ? C = g : typeof g == "function" && (C = g.call(s)), C && w.append(C);
|
|
9836
9837
|
} else
|
|
9837
9838
|
p === i.root && w.append(`
|
|
9838
9839
|
.xgplayer{width: 100%!important; height: 100%!important;}
|
|
9839
9840
|
`);
|
|
9840
|
-
h.document.head.append(w), h.document.body.append(p), h.addEventListener("pagehide", function(
|
|
9841
|
-
m && (
|
|
9841
|
+
h.document.head.append(w), h.document.body.append(p), h.addEventListener("pagehide", function(F) {
|
|
9842
|
+
m && (b ? m.insertBefore(p, b) : _ ? m.insertBefore(p, _.nextSibling) : m.appendChild(p)), e.leavePIPCallback();
|
|
9842
9843
|
}, {
|
|
9843
9844
|
once: !0
|
|
9844
9845
|
});
|
|
@@ -9956,7 +9957,7 @@ var aa = /* @__PURE__ */ function(a) {
|
|
|
9956
9957
|
key: "initEvents",
|
|
9957
9958
|
value: function() {
|
|
9958
9959
|
this.nextHandler = this.hook("nextClick", this.changeSrc);
|
|
9959
|
-
var e =
|
|
9960
|
+
var e = O.device === "mobile" ? "touchend" : "click";
|
|
9960
9961
|
this.bind(e, this.playNext), this.show();
|
|
9961
9962
|
}
|
|
9962
9963
|
}, {
|
|
@@ -10008,35 +10009,35 @@ var aa = /* @__PURE__ */ function(a) {
|
|
|
10008
10009
|
return String(D);
|
|
10009
10010
|
}, g = n.Blob || n.MozBlob || n.WebKitBlob || d, p = e || "download", m, _;
|
|
10010
10011
|
if (g = g.call ? g.bind(n) : Blob, String(this) === "true" && (u = [u, l], l = u[0], u = u[1]), c && c.length < 2048 && (p = c.split("/").pop().split("?")[0], h.href = c, h.href.indexOf(c) !== -1)) {
|
|
10011
|
-
var
|
|
10012
|
-
return
|
|
10012
|
+
var b = new XMLHttpRequest();
|
|
10013
|
+
return b.open("GET", c, !0), b.responseType = "blob", b.onload = function(D) {
|
|
10013
10014
|
r(D.target.response, p, s);
|
|
10014
10015
|
}, setTimeout(function() {
|
|
10015
|
-
|
|
10016
|
-
}, 0),
|
|
10016
|
+
b.send();
|
|
10017
|
+
}, 0), b;
|
|
10017
10018
|
}
|
|
10018
10019
|
if (/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))
|
|
10019
10020
|
if (u.length > 1024 * 1024 * 1.999 && g !== d)
|
|
10020
|
-
u =
|
|
10021
|
+
u = R(u), l = u.type || s;
|
|
10021
10022
|
else
|
|
10022
10023
|
return navigator.msSaveBlob ? (
|
|
10023
10024
|
// IE10 can't do a[download], only Blobs:
|
|
10024
|
-
navigator.msSaveBlob(
|
|
10025
|
-
) :
|
|
10025
|
+
navigator.msSaveBlob(R(u), p)
|
|
10026
|
+
) : z(u);
|
|
10026
10027
|
else if (/([\x80-\xff])/.test(u)) {
|
|
10027
|
-
var w = 0,
|
|
10028
|
-
for (w; w <
|
|
10029
|
-
|
|
10030
|
-
u = new g([
|
|
10028
|
+
var w = 0, C = new Uint8Array(u.length), F = C.length;
|
|
10029
|
+
for (w; w < F; ++w)
|
|
10030
|
+
C[w] = u.charCodeAt(w);
|
|
10031
|
+
u = new g([C], { type: l });
|
|
10031
10032
|
}
|
|
10032
10033
|
m = u instanceof g ? u : new g([u], { type: l });
|
|
10033
|
-
function
|
|
10034
|
+
function R(D) {
|
|
10034
10035
|
var J = D.split(/[:;,]/), G = J[1], H = J[2] == "base64" ? atob : decodeURIComponent, te = H(J.pop()), oe = te.length, ae = 0, Le = new Uint8Array(oe);
|
|
10035
10036
|
for (ae; ae < oe; ++ae)
|
|
10036
10037
|
Le[ae] = te.charCodeAt(ae);
|
|
10037
10038
|
return new g([Le], { type: G });
|
|
10038
10039
|
}
|
|
10039
|
-
function
|
|
10040
|
+
function z(D, J) {
|
|
10040
10041
|
if ("download" in h)
|
|
10041
10042
|
return h.href = D, h.setAttribute("download", p), h.className = "download-js-link", h.innerHTML = "downloading...", h.style.display = "none", document.body.appendChild(h), setTimeout(function() {
|
|
10042
10043
|
h.click(), document.body.removeChild(h), J === !0 && setTimeout(function() {
|
|
@@ -10055,16 +10056,16 @@ Use Save As... to download, then click back to return to this page.`) && (locati
|
|
|
10055
10056
|
if (navigator.msSaveBlob)
|
|
10056
10057
|
return navigator.msSaveBlob(m, p);
|
|
10057
10058
|
if (n.URL)
|
|
10058
|
-
|
|
10059
|
+
z(n.URL.createObjectURL(m), !0);
|
|
10059
10060
|
else {
|
|
10060
10061
|
if (typeof m == "string" || m.constructor === d)
|
|
10061
10062
|
try {
|
|
10062
|
-
return
|
|
10063
|
+
return z("data:" + l + ";base64," + n.btoa(m));
|
|
10063
10064
|
} catch {
|
|
10064
|
-
return
|
|
10065
|
+
return z("data:" + l + "," + encodeURIComponent(m));
|
|
10065
10066
|
}
|
|
10066
10067
|
_ = new FileReader(), _.onload = function(D) {
|
|
10067
|
-
|
|
10068
|
+
z(this.result);
|
|
10068
10069
|
}, _.readAsDataURL(m);
|
|
10069
10070
|
}
|
|
10070
10071
|
return !0;
|
|
@@ -10233,8 +10234,8 @@ var fa = /* @__PURE__ */ function(a) {
|
|
|
10233
10234
|
p = u.media.canvas;
|
|
10234
10235
|
else {
|
|
10235
10236
|
n.canvas ? (n.canvas.width = e || l.width, n.canvas.height = i || l.height) : n.createCanvas(e, i), p = n.canvas, m = n.canvasCtx;
|
|
10236
|
-
var _ = u.media.videoWidth / u.media.videoHeight,
|
|
10237
|
-
_ >
|
|
10237
|
+
var _ = u.media.videoWidth / u.media.videoHeight, b = p.width / p.height, w = 0, C = 0, F = u.media.videoWidth, R = u.media.videoHeight, z, D, J, G;
|
|
10238
|
+
_ > b ? (J = p.width, G = p.width / _, z = 0, D = Math.round((p.height - G) / 2)) : _ === b ? (J = p.width, G = p.height, z = 0, D = 0) : _ < b && (J = p.height * _, G = p.height, z = Math.round((p.width - J) / 2), D = 0), m.drawImage(u.media, w, C, F, R, z, D, J, G);
|
|
10238
10239
|
}
|
|
10239
10240
|
var H = p.toDataURL(h, c).replace(h, "image/octet-stream");
|
|
10240
10241
|
H = H.replace(/^data:image\/[^;]+/, "data:application/octet-stream"), d(H);
|
|
@@ -10371,7 +10372,7 @@ var fa = /* @__PURE__ */ function(a) {
|
|
|
10371
10372
|
function ga(a, o) {
|
|
10372
10373
|
return a === he.SIDE ? o === j.CONTROLS_LEFT ? "xg-side-list xg-left-side" : "xg-side-list xg-right-side" : "";
|
|
10373
10374
|
}
|
|
10374
|
-
var De =
|
|
10375
|
+
var De = O.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
10375
10376
|
x(r, a);
|
|
10376
10377
|
var o = P(r);
|
|
10377
10378
|
function r(t) {
|
|
@@ -10403,7 +10404,7 @@ var De = R.device === "mobile", _t = /* @__PURE__ */ function(a) {
|
|
|
10403
10404
|
key: "afterCreate",
|
|
10404
10405
|
value: function() {
|
|
10405
10406
|
var e = this, i = this.config;
|
|
10406
|
-
this.initIcons(), De = De || this.domEventType === "touch", De &&
|
|
10407
|
+
this.initIcons(), De = De || this.domEventType === "touch", De && O.device === "mobile" && i.listType === he.DEFAULT && (i.listType = he.SIDE), i.hidePortrait && f.addClass(this.root, "portrait"), this.on([Se, ve], function() {
|
|
10407
10408
|
e._resizeList();
|
|
10408
10409
|
}), this.once(ye, function() {
|
|
10409
10410
|
i.list && i.list.length > 0 && (e.renderItemList(i.list), e.show());
|
|
@@ -11233,7 +11234,7 @@ var Ve = {
|
|
|
11233
11234
|
var e = this, i = this.player.plugins.progress;
|
|
11234
11235
|
if (i && (Object.keys(Ve).map(function(s) {
|
|
11235
11236
|
e[Ve[s]] = e[Ve[s]].bind(e), i.addCallBack(s, e[Ve[s]]);
|
|
11236
|
-
}),
|
|
11237
|
+
}), O.device !== "mobile")) {
|
|
11237
11238
|
this.bind(".xg-spot-info", "mousemove", this.onMousemove), this.bind(".xg-spot-info", "mousedown", this.onMousedown), this.bind(".xg-spot-info", "mouseup", this.onMouseup);
|
|
11238
11239
|
var n = this.hook("previewClick", function() {
|
|
11239
11240
|
});
|
|
@@ -11309,7 +11310,7 @@ var Ve = {
|
|
|
11309
11310
|
key: "registerThumbnail",
|
|
11310
11311
|
value: function() {
|
|
11311
11312
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11312
|
-
if (
|
|
11313
|
+
if (O.device !== "mobile") {
|
|
11313
11314
|
var i = this.player, n = this.config, s = i.getPlugin("thumbnail");
|
|
11314
11315
|
if (s && s.setConfig(e), !s || !s.usable || !n.isShowThumbnail) {
|
|
11315
11316
|
f.addClass(this.root, "short-line no-thumbnail");
|
|
@@ -11397,7 +11398,7 @@ var Ve = {
|
|
|
11397
11398
|
}, {
|
|
11398
11399
|
key: "render",
|
|
11399
11400
|
value: function() {
|
|
11400
|
-
return
|
|
11401
|
+
return O.device === "mobile" || this.playerConfig.isMobileSimulateMode === "mobile" ? "" : '<div class="xg-spot-info hide '.concat(this.config.mode === "short" ? "short-line" : "", `">
|
|
11401
11402
|
<div class="xg-spot-content">
|
|
11402
11403
|
<div class="xg-spot-thumbnail">
|
|
11403
11404
|
<span class="xg-spot-time"></span>
|
|
@@ -11497,26 +11498,26 @@ var Ve = {
|
|
|
11497
11498
|
this.interval = Math.round(this.player.duration / l);
|
|
11498
11499
|
var g = Math.ceil(e / this.interval);
|
|
11499
11500
|
g = g > l ? l : g;
|
|
11500
|
-
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0,
|
|
11501
|
+
var p = g < u * c ? 0 : Math.ceil(g / (u * c)) - 1, m = g - p * (c * u), _ = m > 0 ? Math.ceil(m / c) - 1 : 0, b = m > 0 ? m - _ * c - 1 : 0, w = 0, C = 0;
|
|
11501
11502
|
if (i && n) {
|
|
11502
|
-
var
|
|
11503
|
-
|
|
11503
|
+
var F = i / n;
|
|
11504
|
+
F < h / d ? (C = n, w = C * (h / d)) : (w = i, C = w / (h / d));
|
|
11504
11505
|
} else
|
|
11505
|
-
n ? i || (
|
|
11506
|
-
var
|
|
11506
|
+
n ? i || (C = n || d, w = C * (h / d)) : (w = i || h, C = w / (h / d));
|
|
11507
|
+
var R = this.getUrlByIndex(p);
|
|
11507
11508
|
return {
|
|
11508
11509
|
urlIndex: p,
|
|
11509
11510
|
rowIndex: _,
|
|
11510
|
-
colIndex:
|
|
11511
|
-
url:
|
|
11512
|
-
height:
|
|
11511
|
+
colIndex: b,
|
|
11512
|
+
url: R,
|
|
11513
|
+
height: C,
|
|
11513
11514
|
width: w,
|
|
11514
11515
|
style: {
|
|
11515
|
-
backgroundImage: "url(".concat(
|
|
11516
|
+
backgroundImage: "url(".concat(R, ")"),
|
|
11516
11517
|
backgroundSize: "".concat(w * c, "px auto"),
|
|
11517
|
-
backgroundPosition: "-".concat(
|
|
11518
|
+
backgroundPosition: "-".concat(b * w, "px -").concat(_ * C, "px"),
|
|
11518
11519
|
width: "".concat(w, "px"),
|
|
11519
|
-
height: "".concat(
|
|
11520
|
+
height: "".concat(C, "px")
|
|
11520
11521
|
}
|
|
11521
11522
|
};
|
|
11522
11523
|
}
|
|
@@ -11746,7 +11747,7 @@ var at = null, xa = /* @__PURE__ */ function(a) {
|
|
|
11746
11747
|
s || (s = n.isInnerRender && i.innerContainer || i.root), s.insertAdjacentHTML("afterbegin", '<div class="xgplayer-dynamic-bg" data-index="'.concat(n.index, `"><canvas>
|
|
11747
11748
|
</canvas><xgmask></xgmask></div>`)), this.root = s.children[0], this.canvas = this.find("canvas"), this.canvasFilter || (this.canvas.style.filter = n.filter, this.canvas.style.webkitFilter = n.filter), this.mask = this.find("xgmask"), n.addMask && (this.mask.style.background = n.maskBg), this.canvasCtx = this.canvas.getContext("2d");
|
|
11748
11749
|
} catch (l) {
|
|
11749
|
-
|
|
11750
|
+
M.logError("plugin:DynamicBg", l);
|
|
11750
11751
|
}
|
|
11751
11752
|
}
|
|
11752
11753
|
}, {
|
|
@@ -11771,7 +11772,7 @@ var at = null, xa = /* @__PURE__ */ function(a) {
|
|
|
11771
11772
|
if (!e)
|
|
11772
11773
|
return null;
|
|
11773
11774
|
var i = e && e instanceof window.HTMLVideoElement ? e : e.canvas ? e.canvas : e.flyVideo ? e.flyVideo : null;
|
|
11774
|
-
if (i && !(
|
|
11775
|
+
if (i && !(O.browser === "safari" && f.isMSE(i)))
|
|
11775
11776
|
return i;
|
|
11776
11777
|
var n = i ? i.tagName.toLowerCase() : "";
|
|
11777
11778
|
return n === "canvas" || n === "img" ? i : null;
|
|
@@ -11830,7 +11831,7 @@ var at = null, xa = /* @__PURE__ */ function(a) {
|
|
|
11830
11831
|
}
|
|
11831
11832
|
this.canvasFilter && (this.canvasCtx.filter = s.filter), this.canvasCtx.drawImage(e, n.x, n.y, n.rwidth, n.rheight);
|
|
11832
11833
|
} catch (p) {
|
|
11833
|
-
|
|
11834
|
+
M.logError("plugin:DynamicBg", p);
|
|
11834
11835
|
}
|
|
11835
11836
|
}
|
|
11836
11837
|
}, {
|
|
@@ -11873,7 +11874,7 @@ var at = null, xa = /* @__PURE__ */ function(a) {
|
|
|
11873
11874
|
}, {
|
|
11874
11875
|
key: "supportCanvasFilter",
|
|
11875
11876
|
value: function() {
|
|
11876
|
-
return !(
|
|
11877
|
+
return !(O.browser === "safari" || O.browser === "firefox");
|
|
11877
11878
|
}
|
|
11878
11879
|
}]), r;
|
|
11879
11880
|
}(U), Pa = {
|
|
@@ -12117,8 +12118,8 @@ var at = null, xa = /* @__PURE__ */ function(a) {
|
|
|
12117
12118
|
console.log("GapJump bufferRange ", c.start(p), c.end(p));
|
|
12118
12119
|
var m = c.start(p) + 0.1, _ = l.media.duration;
|
|
12119
12120
|
if (!(m > _)) {
|
|
12120
|
-
var
|
|
12121
|
-
|
|
12121
|
+
var b = m - g, w = b <= h;
|
|
12122
|
+
b < r.BROWSER_GAP_TOLERANCE || w && (u.useGapJump !== !1 && (l.media.currentTime = t.isSafari ? m + 0.1 : m), t.player && t.player.emit("detectGap"), console.log("gapJump gapIndex", p, " isGapSamll:", w, " currentTime:", l.media.currentTime, " jumpSize:", g - l.media.currentTime), m !== 0.08 && l && l.emit("log", {
|
|
12122
12123
|
type: "oneevent",
|
|
12123
12124
|
end_type: "gap",
|
|
12124
12125
|
vid: l.config.vid,
|
|
@@ -12263,14 +12264,14 @@ var Aa = /* @__PURE__ */ function(a) {
|
|
|
12263
12264
|
try {
|
|
12264
12265
|
var g = (/* @__PURE__ */ new Date()).getTime(), p = null, m = new XMLHttpRequest();
|
|
12265
12266
|
t.xhr = m, m.open("GET", d);
|
|
12266
|
-
var _ = {},
|
|
12267
|
-
_.Range = "bytes=" +
|
|
12267
|
+
var _ = {}, b = Math.floor(Math.random() * 10);
|
|
12268
|
+
_.Range = "bytes=" + b + "-" + (u + b), _ && Object.keys(_).forEach(function(w) {
|
|
12268
12269
|
m.setRequestHeader(w, _[w]);
|
|
12269
12270
|
}), m.onreadystatechange = function() {
|
|
12270
12271
|
if (m.readyState === 4) {
|
|
12271
12272
|
t.xhr = null, p = (/* @__PURE__ */ new Date()).getTime();
|
|
12272
|
-
var w = m.getResponseHeader("Content-Length") / 1024 * 8,
|
|
12273
|
-
t.appendList(
|
|
12273
|
+
var w = m.getResponseHeader("Content-Length") / 1024 * 8, C = Math.round(w * 1e3 / (p - g));
|
|
12274
|
+
t.appendList(C), t.timer = setTimeout(t.testSpeed, h);
|
|
12274
12275
|
}
|
|
12275
12276
|
}, m.send();
|
|
12276
12277
|
} catch (w) {
|
|
@@ -12473,7 +12474,7 @@ var Ra = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12473
12474
|
T(this, a);
|
|
12474
12475
|
var n = r && r.isMobileSimulateMode === "mobile", s = r.isLive, l = s ? [] : [qo, Vo, Ta, ba, Xo], u = [].concat(l, [jo, Yo, ia, aa, pa, va, fa, ha, ea, sa]), c = [bo, wo, Eo, Ho, So, _a, Ca, wa, Ao];
|
|
12475
12476
|
this.plugins = [Ia, Co].concat(ce(u), c, [kn, Aa]);
|
|
12476
|
-
var h = n ? "mobile" :
|
|
12477
|
+
var h = n ? "mobile" : O.device;
|
|
12477
12478
|
switch (h) {
|
|
12478
12479
|
case "pc":
|
|
12479
12480
|
(t = this.plugins).push.apply(t, [Mi, Ft, Bi, La, Da]);
|
|
@@ -12484,7 +12485,7 @@ var Ra = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12484
12485
|
default:
|
|
12485
12486
|
(i = this.plugins).push.apply(i, [Mi, Ft, Bi]);
|
|
12486
12487
|
}
|
|
12487
|
-
(
|
|
12488
|
+
(O.os.isIpad || h === "pc") && this.plugins.push(xa), O.os.isIpad && this.plugins.push(Ft), this.ignores = [], this.i18n = [];
|
|
12488
12489
|
}), fe = /* @__PURE__ */ function(a) {
|
|
12489
12490
|
x(r, a);
|
|
12490
12491
|
var o = P(r);
|
|
@@ -12495,7 +12496,7 @@ var Ra = /* @__PURE__ */ E(function a(o, r) {
|
|
|
12495
12496
|
}(Tt);
|
|
12496
12497
|
y(fe, "defaultPreset", Ra);
|
|
12497
12498
|
y(fe, "Util", f);
|
|
12498
|
-
y(fe, "Sniffer",
|
|
12499
|
+
y(fe, "Sniffer", O);
|
|
12499
12500
|
y(fe, "Errors", ct);
|
|
12500
12501
|
y(fe, "Events", Ks);
|
|
12501
12502
|
y(fe, "Plugin", U);
|
|
@@ -12581,14 +12582,14 @@ const Oa = ["id"], Fa = /* @__PURE__ */ se({
|
|
|
12581
12582
|
{
|
|
12582
12583
|
ref: "wrapper",
|
|
12583
12584
|
tabindex: -1,
|
|
12584
|
-
class: ee(
|
|
12585
|
+
class: ee(V(h).e("wrapper")),
|
|
12585
12586
|
style: le({ zIndex: a.zIndex })
|
|
12586
12587
|
},
|
|
12587
12588
|
[
|
|
12588
12589
|
S(
|
|
12589
12590
|
"div",
|
|
12590
12591
|
{
|
|
12591
|
-
class: ee(
|
|
12592
|
+
class: ee(V(h).e("mask"))
|
|
12592
12593
|
},
|
|
12593
12594
|
null,
|
|
12594
12595
|
2
|
|
@@ -12598,21 +12599,21 @@ const Oa = ["id"], Fa = /* @__PURE__ */ se({
|
|
|
12598
12599
|
S(
|
|
12599
12600
|
"div",
|
|
12600
12601
|
{
|
|
12601
|
-
class: ee(
|
|
12602
|
+
class: ee(V(h).e("canvas"))
|
|
12602
12603
|
},
|
|
12603
12604
|
[
|
|
12604
|
-
S("div", { id:
|
|
12605
|
+
S("div", { id: V(c) }, null, 8, Oa),
|
|
12605
12606
|
ue(" CLOSE "),
|
|
12606
12607
|
S(
|
|
12607
12608
|
"span",
|
|
12608
12609
|
{
|
|
12609
|
-
class: ee([
|
|
12610
|
+
class: ee([V(h).e("btn"), V(h).e("close")]),
|
|
12610
12611
|
onClick: d
|
|
12611
12612
|
},
|
|
12612
12613
|
[
|
|
12613
12614
|
X(m, { onClick: d }, {
|
|
12614
12615
|
default: q(() => [
|
|
12615
|
-
X(
|
|
12616
|
+
X(V(Hr))
|
|
12616
12617
|
]),
|
|
12617
12618
|
_: 1
|
|
12618
12619
|
/* STABLE */
|
|
@@ -12719,7 +12720,7 @@ const Ma = /* @__PURE__ */ it(Fa, [["__scopeId", "data-v-b301aa7d"]]), Na = Pe(M
|
|
|
12719
12720
|
ge(e.$slots, "extra", {}, void 0, !0)
|
|
12720
12721
|
]),
|
|
12721
12722
|
default: q(() => [
|
|
12722
|
-
(I(!0),
|
|
12723
|
+
(I(!0), N(
|
|
12723
12724
|
Ge,
|
|
12724
12725
|
null,
|
|
12725
12726
|
Ht(a.listData, (l) => (I(), pe(
|
|
@@ -12746,7 +12747,7 @@ const Ma = /* @__PURE__ */ it(Fa, [["__scopeId", "data-v-b301aa7d"]]), Na = Pe(M
|
|
|
12746
12747
|
/* TEXT */
|
|
12747
12748
|
),
|
|
12748
12749
|
l[r.tag] ? (I(), pe(
|
|
12749
|
-
|
|
12750
|
+
V(In),
|
|
12750
12751
|
{
|
|
12751
12752
|
key: 0,
|
|
12752
12753
|
size: "small"
|
|
@@ -12765,7 +12766,7 @@ const Ma = /* @__PURE__ */ it(Fa, [["__scopeId", "data-v-b301aa7d"]]), Na = Pe(M
|
|
|
12765
12766
|
1024
|
|
12766
12767
|
/* DYNAMIC_SLOTS */
|
|
12767
12768
|
)) : ue("v-if", !0),
|
|
12768
|
-
X(
|
|
12769
|
+
X(V(Xr), {
|
|
12769
12770
|
list: l[r.fileList],
|
|
12770
12771
|
field: a.fileField,
|
|
12771
12772
|
"load-url": a.loadUrl,
|