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