forked from 77media/video-flow
- [ ] H5生成完成不显示进度条
This commit is contained in:
parent
428ecc154f
commit
fff358b2d8
@ -139,7 +139,7 @@ Please process this video editing request.`;
|
||||
selectedView={selectedView}
|
||||
currentLoadingText={currentLoadingText}
|
||||
/>
|
||||
{taskObject.currentStage !== 'init' && (
|
||||
{taskObject.currentStage !== 'init' && taskObject.status !== 'COMPLETED' && (
|
||||
<H5ProgressBar
|
||||
taskObject={taskObject}
|
||||
scriptData={scriptData}
|
||||
@ -253,6 +253,7 @@ Please process this video editing request.`;
|
||||
onVideoEditDescriptionSubmit={handleVideoEditDescriptionSubmit}
|
||||
projectId={episodeId}
|
||||
aspectRatio={aspectRatio === 'VIDEO_ASPECT_RATIO_LANDSCAPE' ? '16:9' : '9:16'}
|
||||
showProgress={taskObject.currentStage !== 'init' && taskObject.status !== 'COMPLETED'}
|
||||
/>
|
||||
|
||||
{['scene', 'character', 'video', 'final_video'].includes(taskObject.currentStage) && (
|
||||
|
||||
@ -53,6 +53,8 @@ interface H5MediaViewerProps {
|
||||
projectId?: string;
|
||||
/** 视频比例 */
|
||||
aspectRatio?: string;
|
||||
/** 是否显示进度条 */
|
||||
showProgress?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,7 +81,8 @@ export function H5MediaViewer({
|
||||
enableVideoEdit,
|
||||
onVideoEditDescriptionSubmit,
|
||||
projectId,
|
||||
aspectRatio
|
||||
aspectRatio,
|
||||
showProgress
|
||||
}: H5MediaViewerProps) {
|
||||
const carouselRef = useRef<CarouselRef>(null);
|
||||
const videoRefs = useRef<Array<HTMLVideoElement | null>>([]);
|
||||
@ -103,15 +106,26 @@ export function H5MediaViewer({
|
||||
|
||||
/** 根据浏览器类型获取最大高度值 */
|
||||
const maxHeight = useMemo(() => {
|
||||
let h = 10.5;
|
||||
switch (browserType) {
|
||||
case 'Edge':
|
||||
return 'calc(100vh - 10.5rem)';
|
||||
h = 10.5;
|
||||
break;
|
||||
case 'Chrome':
|
||||
return 'calc(100vh - 17rem)';
|
||||
h = 17;
|
||||
break;
|
||||
case 'Safari':
|
||||
h = 15;
|
||||
break;
|
||||
default:
|
||||
return 'calc(100vh - 15rem)';
|
||||
h = 17;
|
||||
break;
|
||||
}
|
||||
}, [browserType]);
|
||||
if (!showProgress) {
|
||||
h = h - 1.5;
|
||||
}
|
||||
return `calc(100vh - ${h}rem)`;
|
||||
}, [browserType, showProgress]);
|
||||
|
||||
/** 视频轮播容器高度:按 aspectRatio 计算(基于视口宽度) */
|
||||
const videoWrapperHeight = useMemo(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user