@@ -133,6 +133,11 @@ export function HomePage2() {
className={`absolute top-[4rem] w-full transition-all duration-500
${activeTool === "stretch" ? "opacity-100 translate-x-0" : "opacity-0 translate-x-[-100%] pointer-events-none"}
`}
+ style={{
+ height: 'calc(100% - 8rem)',
+ display: 'flex',
+ alignItems: 'center'
+ }}
>
@@ -177,7 +182,7 @@ export function HomePage2() {
)}
- {isCreating ? "Creating..." : "Create"}
+ {isCreating ? "Action..." : "Action"}
diff --git a/components/video-screen-layout.tsx b/components/video-screen-layout.tsx
index b7a5b0c..c04016d 100644
--- a/components/video-screen-layout.tsx
+++ b/components/video-screen-layout.tsx
@@ -22,6 +22,10 @@ function VideoScreenLayoutComponent({ videos }: VideoScreenLayoutProps) {
const containerRef = useRef
(null);
const videoRefs = useRef<(HTMLVideoElement | null)[]>([]);
+ useEffect(() => {
+ setCurrentIndex(videos.length > 2 ? 1 : 0);
+ }, [videos.length]);
+
// 确保视频refs数组长度与videos数组一致
useEffect(() => {
videoRefs.current = videoRefs.current.slice(0, videos.length);
@@ -139,7 +143,7 @@ function VideoScreenLayoutComponent({ videos }: VideoScreenLayoutProps) {
};
return (
-
+
{/* 视频面板容器 */}
{
if (index === currentIndex && videoRefs.current[index]) {
applyVolumeSettings(videoRefs.current[index]!);