eli-video-interview 1.2.28-beta.3 → 1.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.
@@ -40,12 +40,14 @@ var BootVideo = function (props) {
40
40
  onSuccess: function (_a) {
41
41
  var data = _a.data;
42
42
  var item = data[0];
43
- setMediaList(__spreadArray(__spreadArray([], mediaList, true), [
43
+ var OfficialMedia = mediaList[0];
44
+ setMediaList([
45
+ OfficialMedia,
44
46
  {
45
47
  videoUrl: item.url,
46
48
  frameUrl: item.mineExtra.firstFrameUrl,
47
49
  },
48
- ], false));
50
+ ]);
49
51
  setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
50
52
  },
51
53
  }), loading = _d.loading, postCommonUpload = _d.run;
@@ -61,7 +63,7 @@ var BootVideo = function (props) {
61
63
  type: 'custom',
62
64
  showUploadList: false,
63
65
  accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
64
- maxCount: 1,
66
+ maxCount: 7,
65
67
  customRequest: function (_a) {
66
68
  var file = _a.file;
67
69
  console.log('customRequest file', file);
@@ -74,21 +76,16 @@ var BootVideo = function (props) {
74
76
  postCommonUpload(formData);
75
77
  }
76
78
  },
77
- onSelect: function (r) {
78
- console.log('onSelect', r);
79
- },
80
- onChange: function (_a) {
81
- var file = _a.file;
82
- console.log('onChange', file);
83
- if (isExceedMaxVideoFileSize(file.size)) {
84
- Message.error('视频大小超过500M,请重新上传!');
85
- }
86
- else {
87
- var formData = new FormData();
88
- formData.append('files', file.originFileObj);
89
- postCommonUpload(formData);
90
- }
91
- },
79
+ // onChange: ({ file }: any) => {
80
+ // console.log('onChange', file);
81
+ // if (isExceedMaxVideoFileSize(file.size)) {
82
+ // Message.error('视频大小超过500M,请重新上传!');
83
+ // } else {
84
+ // const formData = new FormData();
85
+ // formData.append('files', file.originFileObj);
86
+ // postCommonUpload(formData);
87
+ // }
88
+ // },
92
89
  };
93
90
  useEffect(function () {
94
91
  if (open) {
@@ -108,7 +105,7 @@ var BootVideo = function (props) {
108
105
  }
109
106
  // eslint-disable-next-line react-hooks/exhaustive-deps
110
107
  }, [open]);
111
- return (_jsx(Dialog, __assign({ open: open, title: "\u66F4\u6362\u5F15\u5BFC\u89C6\u9891", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto' } }, { children: [(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 180, height: 330, margin: '0 auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 180, height: 330, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))), mediaList.length < 2 && (_jsxs(CustomUploadButtonRoot, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), _jsx(Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: _jsx(InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] })), _jsx(Divider, {}), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
108
+ return (_jsx(Dialog, __assign({ open: open, title: "\u66F4\u6362\u5F15\u5BFC\u89C6\u9891", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: _jsxs(Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto' } }, { children: [(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? (_jsx(Box, __assign({ loading: loading, sx: { width: 180, height: 330, margin: '0 auto', cursor: 'pointer' } }, { children: _jsx("video", { width: 180, height: 330, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : (_jsx(Upload, __assign({}, uploadProps, { children: _jsxs(CustomUploadCardRoot, { children: [_jsxs(CustomUploadCardTitle, { children: [_jsx(SvgIcon, { name: "video" }), _jsx(Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), _jsx(Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))), _jsxs(CustomUploadButtonRoot, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), _jsx(Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: _jsx(InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] }), _jsx(Divider, {}), _jsx(CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
112
109
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
113
110
  return (_jsx("img", { src: frameUrl, height: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? 70 : 64, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
114
111
  }) }), _jsx(Divider, {}), _jsx(Box, __assign({ ml: 0.5 }, { children: _jsx(Checkbox, { checked: mediaState.appliedAllPosition, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] })) }) })));
@@ -45,12 +45,14 @@ var BootVideo = function (props) {
45
45
  onSuccess: function (_a) {
46
46
  var data = _a.data;
47
47
  var item = data[0];
48
- setMediaList(__spreadArray(__spreadArray([], mediaList, true), [
48
+ var OfficialMedia = mediaList[0];
49
+ setMediaList([
50
+ OfficialMedia,
49
51
  {
50
52
  videoUrl: item.url,
51
53
  frameUrl: item.mineExtra.firstFrameUrl,
52
54
  },
53
- ], false));
55
+ ]);
54
56
  setMediaState({ mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
55
57
  },
56
58
  }), loading = _d.loading, postCommonUpload = _d.run;
@@ -66,7 +68,7 @@ var BootVideo = function (props) {
66
68
  type: 'custom',
67
69
  showUploadList: false,
68
70
  accept: '.mp4,.mov,.m4v,.3gp,.avi,.webm',
69
- maxCount: 1,
71
+ maxCount: 7,
70
72
  customRequest: function (_a) {
71
73
  var file = _a.file;
72
74
  console.log('customRequest file', file);
@@ -79,21 +81,16 @@ var BootVideo = function (props) {
79
81
  postCommonUpload(formData);
80
82
  }
81
83
  },
82
- onSelect: function (r) {
83
- console.log('onSelect', r);
84
- },
85
- onChange: function (_a) {
86
- var file = _a.file;
87
- console.log('onChange', file);
88
- if ((0, utils_1.isExceedMaxVideoFileSize)(file.size)) {
89
- fbm_ui_1.Message.error('视频大小超过500M,请重新上传!');
90
- }
91
- else {
92
- var formData = new FormData();
93
- formData.append('files', file.originFileObj);
94
- postCommonUpload(formData);
95
- }
96
- },
84
+ // onChange: ({ file }: any) => {
85
+ // console.log('onChange', file);
86
+ // if (isExceedMaxVideoFileSize(file.size)) {
87
+ // Message.error('视频大小超过500M,请重新上传!');
88
+ // } else {
89
+ // const formData = new FormData();
90
+ // formData.append('files', file.originFileObj);
91
+ // postCommonUpload(formData);
92
+ // }
93
+ // },
97
94
  };
98
95
  (0, react_1.useEffect)(function () {
99
96
  if (open) {
@@ -113,7 +110,7 @@ var BootVideo = function (props) {
113
110
  }
114
111
  // eslint-disable-next-line react-hooks/exhaustive-deps
115
112
  }, [open]);
116
- return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u66F4\u6362\u5F15\u5BFC\u89C6\u9891", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto' } }, { children: [(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 180, height: 330, margin: '0 auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 180, height: 330, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))), mediaList.length < 2 && ((0, jsx_runtime_1.jsxs)(styled_1.CustomUploadButtonRoot, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
113
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u66F4\u6362\u5F15\u5BFC\u89C6\u9891", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { maxHeight: 'calc(100vh - 150px)', overflow: 'auto' } }, { children: [(mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) || loading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: loading, sx: { width: 180, height: 330, margin: '0 auto', cursor: 'pointer' } }, { children: (0, jsx_runtime_1.jsx)("video", { width: 180, height: 330, src: mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl, controls: true }) }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardRoot, { children: [(0, jsx_runtime_1.jsxs)(styled_1.CustomUploadCardTitle, { children: [(0, jsx_runtime_1.jsx)(SvgIcon_1.default, { name: "video" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", color: "secondary" }, { children: "\u4E0A\u4F20\u89C6\u9891" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "disabled", sx: { mt: 1 } }, { children: "\u62D6\u62FD\u89C6\u9891\u5230\u6B64\u5904\u4E5F\u53EF\u4E0A\u4F20" }))] }) }))), (0, jsx_runtime_1.jsxs)(styled_1.CustomUploadButtonRoot, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u4E0A\u4F20\u89C6\u9891" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u8BF7\u52FF\u4E0A\u4F20\u8272\u60C5\u53CA\u53CD\u52A8\u8FDD\u89C4\u89C6\u9891\uFF0C\u5EFA\u8BAE\u4F7F\u7528360\u6D4F\u89C8\u5668\u3002 \u5EFA\u8BAE\u4E0A\u4F20mp4\u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8981\u8D85\u8FC7500M\uFF0C\u652F\u6301\u89C6\u9891\u683C\u5F0F\uFF1Amp4\u3001mov\u3001m4v\u30013gp\u3001avi\u3001webm\uFF0C\u652F\u6301\u7F16\u7801\u683C\u5F0F\uFF1AH.264\u3001HEV4\u3001 MPRG-4\u3001VP9" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: 8 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 18, color: 'rgb(118, 118, 118)' } }) })) }))] }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(styled_1.CustomUploadedImgRoot, { children: mediaList.map(function (_a) {
117
114
  var videoUrl = _a.videoUrl, frameUrl = _a.frameUrl;
118
115
  return ((0, jsx_runtime_1.jsx)("img", { src: frameUrl, height: (mediaState === null || mediaState === void 0 ? void 0 : mediaState.mediaUrl) === videoUrl ? 70 : 64, alt: "", onClick: function () { return handleSelectVideo(videoUrl, frameUrl); } }, videoUrl));
119
116
  }) }), (0, jsx_runtime_1.jsx)(mui_1.Divider, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ml: 0.5 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: mediaState.appliedAllPosition, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5E94\u7528\u5230\u6240\u6709AI\u89C6\u9891" })), onChange: function (e, checked) { return setMediaState({ appliedAllPosition: checked }); } }) }))] })) }) })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.28-beta.3",
3
+ "version": "1.2.28",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "axios": "^0.27.2",
22
22
  "dayjs": "^1.11.4",
23
23
  "echarts": "^5.3.3",
24
- "fbm-ui": "^1.4.116",
24
+ "fbm-ui": "^1.4.161",
25
25
  "hox": "^2.1.0",
26
26
  "immutability-helper": "^3.1.1",
27
27
  "react-svg": "^15.1.3",