eli-video-interview 1.2.42-alpha.63 → 1.2.42-alpha.65

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.
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ export interface VideoProps {
3
+ /** 视频源URL */
4
+ src: string;
5
+ /** 封面图片URL */
6
+ poster?: string;
7
+ /** 视频宽度 */
8
+ width?: number | string;
9
+ /** 视频高度 */
10
+ height?: number | string;
11
+ /** 是否自动播放 */
12
+ autoPlay?: boolean;
13
+ /** 是否静音 */
14
+ muted?: boolean;
15
+ /** 是否循环播放 */
16
+ loop?: boolean;
17
+ /** 容器点击回调 */
18
+ onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
19
+ /** 播放开始回调 */
20
+ onPlay?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
21
+ /** 暂停回调 */
22
+ onPause?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
23
+ /** 播放结束回调 */
24
+ onEnded?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
25
+ }
26
+ declare const Video: FC<VideoProps>;
27
+ export default Video;
@@ -0,0 +1,208 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var __read = (this && this.__read) || function (o, n) {
49
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
50
+ if (!m) return o;
51
+ var i = m.call(o), r, ar = [], e;
52
+ try {
53
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54
+ }
55
+ catch (error) { e = { error: error }; }
56
+ finally {
57
+ try {
58
+ if (r && !r.done && (m = i["return"])) m.call(i);
59
+ }
60
+ finally { if (e) throw e.error; }
61
+ }
62
+ return ar;
63
+ };
64
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
65
+ import PauseIcon from '@mui/icons-material/Pause';
66
+ import PlayArrowIcon from '@mui/icons-material/PlayArrow';
67
+ import { Box, IconButton } from 'fbm-ui';
68
+ import { styled } from 'fbm-ui';
69
+ import { useCallback, useRef, useState } from 'react';
70
+ var VideoContainer = styled(Box)(function (_a) {
71
+ var theme = _a.theme;
72
+ return ({
73
+ position: 'relative',
74
+ display: 'inline-block',
75
+ backgroundColor: '#000',
76
+ borderRadius: theme.spacing(1),
77
+ overflow: 'hidden',
78
+ cursor: 'pointer',
79
+ '&:hover .play-button': {
80
+ opacity: '0.9 !important',
81
+ transform: 'translate(-50%, -50%) scale(1.1)',
82
+ },
83
+ });
84
+ });
85
+ var StyledVideo = styled('video')({
86
+ width: '100%',
87
+ height: '100%',
88
+ display: 'block',
89
+ });
90
+ var PlayButton = styled(IconButton)(function (_a) {
91
+ var theme = _a.theme;
92
+ return ({
93
+ position: 'absolute',
94
+ top: '50%',
95
+ left: '50%',
96
+ transform: 'translate(-50%, -50%)',
97
+ backgroundColor: 'rgba(0, 0, 0, 0.7)',
98
+ color: '#fff',
99
+ width: 48,
100
+ height: 48,
101
+ transition: 'all 0.3s ease',
102
+ zIndex: 2,
103
+ '&:hover': {
104
+ backgroundColor: 'rgba(0, 0, 0, 0.8)',
105
+ },
106
+ '& .MuiSvgIcon-root': {
107
+ fontSize: 32,
108
+ },
109
+ });
110
+ });
111
+ var PosterImage = styled('img')({
112
+ position: 'absolute',
113
+ top: 0,
114
+ left: 0,
115
+ width: '100%',
116
+ height: '100%',
117
+ objectFit: 'cover',
118
+ zIndex: 1,
119
+ });
120
+ var Video = function (_a) {
121
+ var src = _a.src, poster = _a.poster, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? 240 : _c, _d = _a.autoPlay, autoPlay = _d === void 0 ? true : _d, _e = _a.muted, muted = _e === void 0 ? false : _e, _f = _a.loop, loop = _f === void 0 ? false : _f, onClick = _a.onClick, onPlay = _a.onPlay, onPause = _a.onPause, onEnded = _a.onEnded;
122
+ var videoRef = useRef(null);
123
+ var _g = __read(useState(false), 2), isPlaying = _g[0], setIsPlaying = _g[1];
124
+ var _h = __read(useState(true), 2), showPoster = _h[0], setShowPoster = _h[1];
125
+ var _j = __read(useState(false), 2), isLoading = _j[0], setIsLoading = _j[1];
126
+ var _k = __read(useState(false), 2), videoLoaded = _k[0], setVideoLoaded = _k[1]; // 控制视频是否已加载
127
+ var handlePlayClick = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
128
+ var error_1;
129
+ return __generator(this, function (_a) {
130
+ switch (_a.label) {
131
+ case 0:
132
+ setVideoLoaded(true); // 视频开始加载时设置为已加载
133
+ if (!videoRef.current)
134
+ return [2 /*return*/];
135
+ _a.label = 1;
136
+ case 1:
137
+ _a.trys.push([1, 5, , 6]);
138
+ if (!isPlaying) return [3 /*break*/, 2];
139
+ videoRef.current.pause();
140
+ return [3 /*break*/, 4];
141
+ case 2:
142
+ setIsLoading(true);
143
+ return [4 /*yield*/, videoRef.current.play()];
144
+ case 3:
145
+ _a.sent();
146
+ setShowPoster(false);
147
+ _a.label = 4;
148
+ case 4: return [3 /*break*/, 6];
149
+ case 5:
150
+ error_1 = _a.sent();
151
+ console.error('视频播放失败:', error_1);
152
+ setIsLoading(false);
153
+ return [3 /*break*/, 6];
154
+ case 6: return [2 /*return*/];
155
+ }
156
+ });
157
+ }); }, [isPlaying]);
158
+ var handlePlay = useCallback(function (event) {
159
+ setIsPlaying(true);
160
+ setIsLoading(false);
161
+ setShowPoster(false);
162
+ onPlay === null || onPlay === void 0 ? void 0 : onPlay(event);
163
+ }, [onPlay]);
164
+ var handlePause = useCallback(function (event) {
165
+ setIsPlaying(false);
166
+ onPause === null || onPause === void 0 ? void 0 : onPause(event);
167
+ }, [onPause]);
168
+ var handleEnded = useCallback(function (event) {
169
+ setIsPlaying(false);
170
+ setShowPoster(true);
171
+ onEnded === null || onEnded === void 0 ? void 0 : onEnded(event);
172
+ }, [onEnded]);
173
+ var handleContainerClick = useCallback(function (e) {
174
+ // 避免点击播放按钮时触发容器点击事件
175
+ if (e.target.closest('.play-button')) {
176
+ return;
177
+ }
178
+ e.stopPropagation();
179
+ // 如果传入了外部onClick回调,优先执行
180
+ if (onClick) {
181
+ onClick(e);
182
+ return;
183
+ }
184
+ // 默认行为:切换播放/暂停状态
185
+ handlePlayClick();
186
+ }, [onClick, handlePlayClick]);
187
+ return (_jsxs(VideoContainer, __assign({ sx: { width: width, height: height }, onClick: handleContainerClick }, { children: [videoLoaded && (_jsx(StyledVideo, { ref: videoRef, src: src, poster: poster, autoPlay: autoPlay, muted: muted, loop: loop, controls: true, onPlay: handlePlay, onPause: handlePause, onEnded: handleEnded, style: {
188
+ visibility: showPoster ? 'hidden' : 'visible',
189
+ } })), showPoster && poster && _jsx(PosterImage, { src: poster, alt: "\u89C6\u9891\u5C01\u9762" }), _jsx(PlayButton, __assign({ className: "play-button", onClick: handlePlayClick, disabled: isLoading, sx: {
190
+ opacity: showPoster || !isPlaying ? 1 : 0,
191
+ '&:hover': {
192
+ opacity: 0.9,
193
+ },
194
+ transition: 'opacity 0.3s ease',
195
+ } }, { children: isLoading ? (_jsx(Box, { sx: {
196
+ width: 24,
197
+ height: 24,
198
+ border: '2px solid rgba(255, 255, 255, 0.3)',
199
+ borderTop: '2px solid #fff',
200
+ borderRadius: '50%',
201
+ animation: 'spin 1s linear infinite',
202
+ '@keyframes spin': {
203
+ '0%': { transform: 'rotate(0deg)' },
204
+ '100%': { transform: 'rotate(360deg)' },
205
+ },
206
+ } })) : isPlaying ? (_jsx(PauseIcon, {})) : (_jsx(PlayArrowIcon, {})) }))] })));
207
+ };
208
+ export default Video;
@@ -47,7 +47,7 @@ import { useCallback, useMemo, useState } from 'react';
47
47
  var isShowVideoMessage = function (type) { return [QUESTION_TYPE.SINGLECHIOCE, QUESTION_TYPE.ALPHABETIC_DICTATION, QUESTION_TYPE.COLOR_BLINDNESS].includes(type); };
48
48
  var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
49
49
  var QuestionItem = function (props) {
50
- var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
50
+ var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, posterUrl = _a.posterUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
51
51
  var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
52
52
  var _e = useAiReportStore(function (store) { return [
53
53
  store.reportResult,
@@ -107,6 +107,13 @@ var QuestionItem = function (props) {
107
107
  score: score,
108
108
  });
109
109
  }, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
110
+ var handleVideoClick = useCallback(function () {
111
+ // 如果没有视频URL且符合显示错误消息的条件,则显示错误提示
112
+ if (!videoUrl && isShowVideoMessage(type)) {
113
+ Message.error('因候选人回答时长过短,未获取到题目视频。');
114
+ }
115
+ // 其他视频点击逻辑可以在这里处理
116
+ }, [videoUrl, type]);
110
117
  return (_jsxs(Stack, __assign({ component: Paper, elevation: 1, sx: {
111
118
  padding: '16px 16px',
112
119
  mt: 2,
@@ -128,7 +135,7 @@ var QuestionItem = function (props) {
128
135
  justifyContent: 'center',
129
136
  } }, { children: index + 1 })), _jsx(Typography, __assign({ ml: 5, variant: "body1", color: theme.palette.primary.main }, { children: desc }))] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "body2", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "body2", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
130
137
  return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, variant: "body1", color: theme.palette.primary.main }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), _jsx(Typography, __assign({ variant: "body2", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
131
- })] })), _jsxs(Box, __assign({ position: "relative" }, { children: [isExportPdf && (_jsx(ExportButton, __assign({ href: videoUrl, target: "_blank" }, { children: _jsx("img", { src: "//webcdn.fbmms.cn/assets/htyk/jjn4TDJ1eW5akU_lblzYe", alt: "", style: { width: 166, height: 296 } }) }))), !isExportPdf && (_jsx(Video, { src: videoUrl, controls: true, onClick: function () { return (!videoUrl && isShowVideoMessage(type) ? Message.error('因候选人回答时长过短,未获取到题目视频。') : ''); }, onPlay: function (event) {
138
+ })] })), _jsxs(Box, __assign({ position: "relative" }, { children: [isExportPdf && (_jsx(ExportButton, __assign({ href: videoUrl, target: "_blank" }, { children: _jsx("img", { src: "//webcdn.fbmms.cn/assets/htyk/jjn4TDJ1eW5akU_lblzYe", alt: "", style: { width: 166, height: 296 } }) }))), !isExportPdf && (_jsx(Video, { src: videoUrl, poster: posterUrl, onClick: handleVideoClick, width: 135, onPlay: function (event) {
132
139
  document.querySelectorAll('video').forEach(function (v) { return v !== event.target && v.pause(); });
133
140
  } }))] }))] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7', position: 'relative', borderRadius: 3 }, p: 2 }, { children: [canEditAiDimension && ((workplaceEvaluation && !isSimulated) || (isSimulated && abilities.length > 0)) && (_jsx("img", { onClick: handleModeChange, src: "//webcdn.fbmms.cn/assets/CVlD/V8fHAovf4X6wfXN75KkI9", alt: "", style: { width: 36, height: 36, position: 'absolute', top: 0, right: 0, cursor: 'pointer' } })), workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body1", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body1" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), isSimulated && (_jsx(_Fragment, { children: abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token, mode: internalMode, token: token }))); }) })), workplaceEvaluation && !isSimulated && (_jsx(_Fragment, { children: _jsx(Evaluate, { token: token, evaluation: workplaceEvaluation, title: " AI\u8BC4\u4EF7", mode: internalMode }) }))] })))] }), token));
134
141
  };
@@ -32,7 +32,9 @@ export declare const ReportEvaluate: import("@emotion/styled").StyledComponent<i
32
32
  export declare const Podium: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
33
33
  children?: import("react").ReactNode;
34
34
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
35
- export declare const Video: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
35
+ export declare const Video: import("@emotion/styled").StyledComponent<import("../../ai-report/components/VideoQuestion/Video").VideoProps & {
36
+ children?: import("react").ReactNode;
37
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
36
38
  export declare const ExportButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
37
39
  export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
38
40
  children?: import("react").ReactNode;
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ import VideoPlayer from '../../ai-report/components/VideoQuestion/Video';
12
13
  import { Box, styled, Typography } from 'fbm-ui';
13
14
  export var ReportHeader = styled(Box)({
14
15
  height: '595px',
@@ -105,7 +106,7 @@ export var Podium = styled(Box)({
105
106
  backgroundSize: 'cover',
106
107
  color: '#119E45',
107
108
  });
108
- export var Video = styled('video')(function (_a) {
109
+ export var Video = styled(VideoPlayer)(function (_a) {
109
110
  var theme = _a.theme;
110
111
  return ({
111
112
  width: 166,
@@ -46,6 +46,7 @@ export interface AnalysisResult {
46
46
  selected?: number[];
47
47
  }
48
48
  export interface Answer {
49
+ posterUrl?: string;
49
50
  videoUrl: string;
50
51
  media: {
51
52
  durationTime: number;
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ export interface VideoProps {
3
+ /** 视频源URL */
4
+ src: string;
5
+ /** 封面图片URL */
6
+ poster?: string;
7
+ /** 视频宽度 */
8
+ width?: number | string;
9
+ /** 视频高度 */
10
+ height?: number | string;
11
+ /** 是否自动播放 */
12
+ autoPlay?: boolean;
13
+ /** 是否静音 */
14
+ muted?: boolean;
15
+ /** 是否循环播放 */
16
+ loop?: boolean;
17
+ /** 容器点击回调 */
18
+ onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
19
+ /** 播放开始回调 */
20
+ onPlay?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
21
+ /** 暂停回调 */
22
+ onPause?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
23
+ /** 播放结束回调 */
24
+ onEnded?: (event: React.SyntheticEvent<HTMLVideoElement>) => void;
25
+ }
26
+ declare const Video: FC<VideoProps>;
27
+ export default Video;
@@ -0,0 +1,213 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ var __read = (this && this.__read) || function (o, n) {
50
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
51
+ if (!m) return o;
52
+ var i = m.call(o), r, ar = [], e;
53
+ try {
54
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
+ }
56
+ catch (error) { e = { error: error }; }
57
+ finally {
58
+ try {
59
+ if (r && !r.done && (m = i["return"])) m.call(i);
60
+ }
61
+ finally { if (e) throw e.error; }
62
+ }
63
+ return ar;
64
+ };
65
+ var __importDefault = (this && this.__importDefault) || function (mod) {
66
+ return (mod && mod.__esModule) ? mod : { "default": mod };
67
+ };
68
+ Object.defineProperty(exports, "__esModule", { value: true });
69
+ var jsx_runtime_1 = require("react/jsx-runtime");
70
+ var Pause_1 = __importDefault(require("@mui/icons-material/Pause"));
71
+ var PlayArrow_1 = __importDefault(require("@mui/icons-material/PlayArrow"));
72
+ var fbm_ui_1 = require("fbm-ui");
73
+ var fbm_ui_2 = require("fbm-ui");
74
+ var react_1 = require("react");
75
+ var VideoContainer = (0, fbm_ui_2.styled)(fbm_ui_1.Box)(function (_a) {
76
+ var theme = _a.theme;
77
+ return ({
78
+ position: 'relative',
79
+ display: 'inline-block',
80
+ backgroundColor: '#000',
81
+ borderRadius: theme.spacing(1),
82
+ overflow: 'hidden',
83
+ cursor: 'pointer',
84
+ '&:hover .play-button': {
85
+ opacity: '0.9 !important',
86
+ transform: 'translate(-50%, -50%) scale(1.1)',
87
+ },
88
+ });
89
+ });
90
+ var StyledVideo = (0, fbm_ui_2.styled)('video')({
91
+ width: '100%',
92
+ height: '100%',
93
+ display: 'block',
94
+ });
95
+ var PlayButton = (0, fbm_ui_2.styled)(fbm_ui_1.IconButton)(function (_a) {
96
+ var theme = _a.theme;
97
+ return ({
98
+ position: 'absolute',
99
+ top: '50%',
100
+ left: '50%',
101
+ transform: 'translate(-50%, -50%)',
102
+ backgroundColor: 'rgba(0, 0, 0, 0.7)',
103
+ color: '#fff',
104
+ width: 48,
105
+ height: 48,
106
+ transition: 'all 0.3s ease',
107
+ zIndex: 2,
108
+ '&:hover': {
109
+ backgroundColor: 'rgba(0, 0, 0, 0.8)',
110
+ },
111
+ '& .MuiSvgIcon-root': {
112
+ fontSize: 32,
113
+ },
114
+ });
115
+ });
116
+ var PosterImage = (0, fbm_ui_2.styled)('img')({
117
+ position: 'absolute',
118
+ top: 0,
119
+ left: 0,
120
+ width: '100%',
121
+ height: '100%',
122
+ objectFit: 'cover',
123
+ zIndex: 1,
124
+ });
125
+ var Video = function (_a) {
126
+ var src = _a.src, poster = _a.poster, _b = _a.width, width = _b === void 0 ? '100%' : _b, _c = _a.height, height = _c === void 0 ? 240 : _c, _d = _a.autoPlay, autoPlay = _d === void 0 ? true : _d, _e = _a.muted, muted = _e === void 0 ? false : _e, _f = _a.loop, loop = _f === void 0 ? false : _f, onClick = _a.onClick, onPlay = _a.onPlay, onPause = _a.onPause, onEnded = _a.onEnded;
127
+ var videoRef = (0, react_1.useRef)(null);
128
+ var _g = __read((0, react_1.useState)(false), 2), isPlaying = _g[0], setIsPlaying = _g[1];
129
+ var _h = __read((0, react_1.useState)(true), 2), showPoster = _h[0], setShowPoster = _h[1];
130
+ var _j = __read((0, react_1.useState)(false), 2), isLoading = _j[0], setIsLoading = _j[1];
131
+ var _k = __read((0, react_1.useState)(false), 2), videoLoaded = _k[0], setVideoLoaded = _k[1]; // 控制视频是否已加载
132
+ var handlePlayClick = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
133
+ var error_1;
134
+ return __generator(this, function (_a) {
135
+ switch (_a.label) {
136
+ case 0:
137
+ setVideoLoaded(true); // 视频开始加载时设置为已加载
138
+ if (!videoRef.current)
139
+ return [2 /*return*/];
140
+ _a.label = 1;
141
+ case 1:
142
+ _a.trys.push([1, 5, , 6]);
143
+ if (!isPlaying) return [3 /*break*/, 2];
144
+ videoRef.current.pause();
145
+ return [3 /*break*/, 4];
146
+ case 2:
147
+ setIsLoading(true);
148
+ return [4 /*yield*/, videoRef.current.play()];
149
+ case 3:
150
+ _a.sent();
151
+ setShowPoster(false);
152
+ _a.label = 4;
153
+ case 4: return [3 /*break*/, 6];
154
+ case 5:
155
+ error_1 = _a.sent();
156
+ console.error('视频播放失败:', error_1);
157
+ setIsLoading(false);
158
+ return [3 /*break*/, 6];
159
+ case 6: return [2 /*return*/];
160
+ }
161
+ });
162
+ }); }, [isPlaying]);
163
+ var handlePlay = (0, react_1.useCallback)(function (event) {
164
+ setIsPlaying(true);
165
+ setIsLoading(false);
166
+ setShowPoster(false);
167
+ onPlay === null || onPlay === void 0 ? void 0 : onPlay(event);
168
+ }, [onPlay]);
169
+ var handlePause = (0, react_1.useCallback)(function (event) {
170
+ setIsPlaying(false);
171
+ onPause === null || onPause === void 0 ? void 0 : onPause(event);
172
+ }, [onPause]);
173
+ var handleEnded = (0, react_1.useCallback)(function (event) {
174
+ setIsPlaying(false);
175
+ setShowPoster(true);
176
+ onEnded === null || onEnded === void 0 ? void 0 : onEnded(event);
177
+ }, [onEnded]);
178
+ var handleContainerClick = (0, react_1.useCallback)(function (e) {
179
+ // 避免点击播放按钮时触发容器点击事件
180
+ if (e.target.closest('.play-button')) {
181
+ return;
182
+ }
183
+ e.stopPropagation();
184
+ // 如果传入了外部onClick回调,优先执行
185
+ if (onClick) {
186
+ onClick(e);
187
+ return;
188
+ }
189
+ // 默认行为:切换播放/暂停状态
190
+ handlePlayClick();
191
+ }, [onClick, handlePlayClick]);
192
+ return ((0, jsx_runtime_1.jsxs)(VideoContainer, __assign({ sx: { width: width, height: height }, onClick: handleContainerClick }, { children: [videoLoaded && ((0, jsx_runtime_1.jsx)(StyledVideo, { ref: videoRef, src: src, poster: poster, autoPlay: autoPlay, muted: muted, loop: loop, controls: true, onPlay: handlePlay, onPause: handlePause, onEnded: handleEnded, style: {
193
+ visibility: showPoster ? 'hidden' : 'visible',
194
+ } })), showPoster && poster && (0, jsx_runtime_1.jsx)(PosterImage, { src: poster, alt: "\u89C6\u9891\u5C01\u9762" }), (0, jsx_runtime_1.jsx)(PlayButton, __assign({ className: "play-button", onClick: handlePlayClick, disabled: isLoading, sx: {
195
+ opacity: showPoster || !isPlaying ? 1 : 0,
196
+ '&:hover': {
197
+ opacity: 0.9,
198
+ },
199
+ transition: 'opacity 0.3s ease',
200
+ } }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { sx: {
201
+ width: 24,
202
+ height: 24,
203
+ border: '2px solid rgba(255, 255, 255, 0.3)',
204
+ borderTop: '2px solid #fff',
205
+ borderRadius: '50%',
206
+ animation: 'spin 1s linear infinite',
207
+ '@keyframes spin': {
208
+ '0%': { transform: 'rotate(0deg)' },
209
+ '100%': { transform: 'rotate(360deg)' },
210
+ },
211
+ } })) : isPlaying ? ((0, jsx_runtime_1.jsx)(Pause_1.default, {})) : ((0, jsx_runtime_1.jsx)(PlayArrow_1.default, {})) }))] })));
212
+ };
213
+ exports.default = Video;
@@ -52,7 +52,7 @@ var react_2 = require("react");
52
52
  var isShowVideoMessage = function (type) { return [ai_question_1.QUESTION_TYPE.SINGLECHIOCE, ai_question_1.QUESTION_TYPE.ALPHABETIC_DICTATION, ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS].includes(type); };
53
53
  var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
54
54
  var QuestionItem = function (props) {
55
- var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
55
+ var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, posterUrl = _a.posterUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities, workplaceEvaluation = _c.workplaceEvaluation, workplaceName = _c.workplaceName, isExportPdf = props.isExportPdf;
56
56
  var _d = __read((0, react_2.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
57
57
  var _e = (0, global_store_1.useAiReportStore)(function (store) { return [
58
58
  store.reportResult,
@@ -112,6 +112,13 @@ var QuestionItem = function (props) {
112
112
  score: score,
113
113
  });
114
114
  }, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
115
+ var handleVideoClick = (0, react_2.useCallback)(function () {
116
+ // 如果没有视频URL且符合显示错误消息的条件,则显示错误提示
117
+ if (!videoUrl && isShowVideoMessage(type)) {
118
+ fbm_ui_1.Message.error('因候选人回答时长过短,未获取到题目视频。');
119
+ }
120
+ // 其他视频点击逻辑可以在这里处理
121
+ }, [videoUrl, type]);
115
122
  return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ component: mui_1.Paper, elevation: 1, sx: {
116
123
  padding: '16px 16px',
117
124
  mt: 2,
@@ -133,7 +140,7 @@ var QuestionItem = function (props) {
133
140
  justifyContent: 'center',
134
141
  } }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ ml: 5, variant: "body1", color: ThemeProvider_1.theme.palette.primary.main }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "body2", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
135
142
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, variant: "body1", color: ThemeProvider_1.theme.palette.primary.main }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_2.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)("img", { className: "MuiSvgIcon-root", src: "//webcdn.fbmms.cn/assets/OYDO/1-c2bdx4v1upzLDJ4Ko-c", alt: "", width: 18, height: 11 }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
136
- })] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ position: "relative" }, { children: [isExportPdf && ((0, jsx_runtime_1.jsx)(styled_1.ExportButton, __assign({ href: videoUrl, target: "_blank" }, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/htyk/jjn4TDJ1eW5akU_lblzYe", alt: "", style: { width: 166, height: 296 } }) }))), !isExportPdf && ((0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true, onClick: function () { return (!videoUrl && isShowVideoMessage(type) ? fbm_ui_1.Message.error('因候选人回答时长过短,未获取到题目视频。') : ''); }, onPlay: function (event) {
143
+ })] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ position: "relative" }, { children: [isExportPdf && ((0, jsx_runtime_1.jsx)(styled_1.ExportButton, __assign({ href: videoUrl, target: "_blank" }, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/assets/htyk/jjn4TDJ1eW5akU_lblzYe", alt: "", style: { width: 166, height: 296 } }) }))), !isExportPdf && ((0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, poster: posterUrl, onClick: handleVideoClick, width: 135, onPlay: function (event) {
137
144
  document.querySelectorAll('video').forEach(function (v) { return v !== event.target && v.pause(); });
138
145
  } }))] }))] })), isExistWeight && status !== STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7', position: 'relative', borderRadius: 3 }, p: 2 }, { children: [canEditAiDimension && ((workplaceEvaluation && !isSimulated) || (isSimulated && abilities.length > 0)) && ((0, jsx_runtime_1.jsx)("img", { onClick: handleModeChange, src: "//webcdn.fbmms.cn/assets/CVlD/V8fHAovf4X6wfXN75KkI9", alt: "", style: { width: 36, height: 36, position: 'absolute', top: 0, right: 0, cursor: 'pointer' } })), workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body1", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1" }, { children: workplaceName }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500, noWrap: true, display: "flex" }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), isSimulated && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token, mode: internalMode, token: token }))); }) })), workplaceEvaluation && !isSimulated && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Evaluate_1.default, { token: token, evaluation: workplaceEvaluation, title: " AI\u8BC4\u4EF7", mode: internalMode }) }))] })))] }), token));
139
146
  };
@@ -32,7 +32,9 @@ export declare const ReportEvaluate: import("@emotion/styled").StyledComponent<i
32
32
  export declare const Podium: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
33
33
  children?: import("react").ReactNode;
34
34
  } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
35
- export declare const Video: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, {}>;
35
+ export declare const Video: import("@emotion/styled").StyledComponent<import("../../ai-report/components/VideoQuestion/Video").VideoProps & {
36
+ children?: import("react").ReactNode;
37
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
36
38
  export declare const ExportButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
37
39
  export declare const BeatProgressBar: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
38
40
  children?: import("react").ReactNode;
@@ -10,8 +10,12 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
13
16
  Object.defineProperty(exports, "__esModule", { value: true });
14
17
  exports.BeatProgressBar = exports.ExportButton = exports.Video = exports.Podium = exports.ReportEvaluate = exports.ReportTag = exports.DinTypography = exports.ReportAvatar = exports.ReportLabel = exports.ReportBadge = exports.ReportHeader = void 0;
18
+ var Video_1 = __importDefault(require("../../ai-report/components/VideoQuestion/Video"));
15
19
  var fbm_ui_1 = require("fbm-ui");
16
20
  exports.ReportHeader = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
17
21
  height: '595px',
@@ -108,7 +112,7 @@ exports.Podium = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
108
112
  backgroundSize: 'cover',
109
113
  color: '#119E45',
110
114
  });
111
- exports.Video = (0, fbm_ui_1.styled)('video')(function (_a) {
115
+ exports.Video = (0, fbm_ui_1.styled)(Video_1.default)(function (_a) {
112
116
  var theme = _a.theme;
113
117
  return ({
114
118
  width: 166,
@@ -46,6 +46,7 @@ export interface AnalysisResult {
46
46
  selected?: number[];
47
47
  }
48
48
  export interface Answer {
49
+ posterUrl?: string;
49
50
  videoUrl: string;
50
51
  media: {
51
52
  durationTime: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.42-alpha.63",
3
+ "version": "1.2.42-alpha.65",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",