forked from 77media/video-flow
再次修复问题
This commit is contained in:
parent
96e5630b7c
commit
da58f7c508
@ -154,7 +154,7 @@ export default function SignupPage() {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="my-6 relative flex items-center">
|
{/* <div className="my-6 relative flex items-center">
|
||||||
<div className="flex-grow border-t border-gray-500/30"></div>
|
<div className="flex-grow border-t border-gray-500/30"></div>
|
||||||
<span className="flex-shrink mx-4 text-gray-400">or</span>
|
<span className="flex-shrink mx-4 text-gray-400">or</span>
|
||||||
<div className="flex-grow border-t border-gray-500/30"></div>
|
<div className="flex-grow border-t border-gray-500/30"></div>
|
||||||
@ -166,7 +166,7 @@ export default function SignupPage() {
|
|||||||
>
|
>
|
||||||
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" className="w-5 h-5" alt="Google" />
|
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" className="w-5 h-5" alt="Google" />
|
||||||
Continue with Google
|
Continue with Google
|
||||||
</button>
|
</button> */}
|
||||||
|
|
||||||
<div className="text-center mt-4">
|
<div className="text-center mt-4">
|
||||||
<p style={{ color: "rgba(255, 255, 255, 0.6)" }}>
|
<p style={{ color: "rgba(255, 255, 255, 0.6)" }}>
|
||||||
|
|||||||
@ -34,9 +34,9 @@ function useVideoPreloader() {
|
|||||||
/** 预加载单个视频 */
|
/** 预加载单个视频 */
|
||||||
const preloadVideo = (src: string): Promise<void> => {
|
const preloadVideo = (src: string): Promise<void> => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const video = document.createElement('video');
|
const video = document.createElement("video");
|
||||||
video.muted = true;
|
video.muted = true;
|
||||||
video.preload = 'auto';
|
video.preload = "auto";
|
||||||
|
|
||||||
// 设置超时,避免某个视频卡住整个预加载过程
|
// 设置超时,避免某个视频卡住整个预加载过程
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
@ -111,7 +111,10 @@ function useVideoPreloader() {
|
|||||||
const processBatch = () => {
|
const processBatch = () => {
|
||||||
if (index >= otherVideos.length) return;
|
if (index >= otherVideos.length) return;
|
||||||
|
|
||||||
const batch = otherVideos.slice(index, Math.min(index + 3, otherVideos.length));
|
const batch = otherVideos.slice(
|
||||||
|
index,
|
||||||
|
Math.min(index + 3, otherVideos.length)
|
||||||
|
);
|
||||||
batch.forEach(preloadVideo);
|
batch.forEach(preloadVideo);
|
||||||
index += batch.length;
|
index += batch.length;
|
||||||
|
|
||||||
@ -124,7 +127,7 @@ function useVideoPreloader() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 如果浏览器不支持 requestIdleCallback,使用 setTimeout
|
// 如果浏览器不支持 requestIdleCallback,使用 setTimeout
|
||||||
if (typeof requestIdleCallback !== 'undefined') {
|
if (typeof requestIdleCallback !== "undefined") {
|
||||||
preloadRemaining();
|
preloadRemaining();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -135,16 +138,15 @@ function useVideoPreloader() {
|
|||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('视频预加载过程中出现错误:', error);
|
console.error("视频预加载过程中出现错误:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 使用 requestIdleCallback 在浏览器空闲时开始预加载
|
// 使用 requestIdleCallback 在浏览器空闲时开始预加载
|
||||||
// 如果浏览器不支持,则使用 setTimeout 延迟执行
|
// 如果浏览器不支持,则使用 setTimeout 延迟执行
|
||||||
if (typeof requestIdleCallback !== 'undefined') {
|
if (typeof requestIdleCallback !== "undefined") {
|
||||||
requestIdleCallback(() => preloadAllVideos(), { timeout: 2000 });
|
requestIdleCallback(() => preloadAllVideos(), { timeout: 2000 });
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => preloadAllVideos(), 100);
|
setTimeout(() => preloadAllVideos(), 100);
|
||||||
@ -268,13 +270,10 @@ function HomeModule2() {
|
|||||||
className="center z-10 flex flex-col items-center mb-[8rem]"
|
className="center z-10 flex flex-col items-center mb-[8rem]"
|
||||||
>
|
>
|
||||||
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[3rem]">
|
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[3rem]">
|
||||||
Just Give Us Your Ideas
|
Just Drop A Thought
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-white text-[1.125rem] leading-[140%] font-normal text-center">
|
<p className="text-white text-[1.125rem] leading-[140%] font-normal text-center">
|
||||||
Input your idea in one sentence and MovieFlow will bring
|
Say your idea in a single line,and MovieFlow will bring it to life.
|
||||||
</p>
|
|
||||||
<p className="text-white text-[1.125rem] leading-[140%] font-normal text-center">
|
|
||||||
your creativity to life
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -343,10 +342,10 @@ function HomeModule3() {
|
|||||||
<div className="home-module3 h-[1360px] relative flex flex-col items-center justify-center w-full bg-black snap-start">
|
<div className="home-module3 h-[1360px] relative flex flex-col items-center justify-center w-full bg-black snap-start">
|
||||||
<div className="center z-10 flex flex-col items-center mb-[4rem]">
|
<div className="center z-10 flex flex-col items-center mb-[4rem]">
|
||||||
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[3rem]">
|
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[3rem]">
|
||||||
Create Anything
|
Ideas Made Real
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-white text-[1.125rem] leading-[140%] font-normal text-center">
|
<p className="text-white text-[1.125rem] leading-[140%] font-normal text-center">
|
||||||
MovieFlow can make any kind of film in high quality for you
|
High-quality films, any style, made with MovieFlow.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{/* 3x3网格布局 */}
|
{/* 3x3网格布局 */}
|
||||||
@ -435,28 +434,27 @@ function HomeModule3() {
|
|||||||
/**电影制作工序介绍 */
|
/**电影制作工序介绍 */
|
||||||
function HomeModule4() {
|
function HomeModule4() {
|
||||||
const [activeTab, setActiveTab] = useState(0);
|
const [activeTab, setActiveTab] = useState(0);
|
||||||
|
|
||||||
const processSteps = [
|
const processSteps = [
|
||||||
{
|
{
|
||||||
title: "The Narrative Engine",
|
title:" The Story Agent",
|
||||||
description:
|
description:
|
||||||
" From a single thought, it builds entire worlds and compelling plots.",
|
" From a single thought, it builds entire worlds and compelling plots.",
|
||||||
video: "https://cdn.qikongjian.com/videos/module4 (3).mp4",
|
video: "https://cdn.qikongjian.com/videos/module4 (3).mp4",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "AI Character Engine",
|
title:" AI Character Agent",
|
||||||
description:
|
description:
|
||||||
"Cast your virtual actors. Lock them in once, for the entire story.",
|
"Cast your virtual actors. Lock them in once, for the entire story.",
|
||||||
video: "https://cdn.qikongjian.com/videos/module4 (1).mp4",
|
video: "https://cdn.qikongjian.com/videos/module4 (1).mp4",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "AI vision engine",
|
title:" The Shot Agent",
|
||||||
description:
|
description:
|
||||||
"It translates your aesthetic into art, light, and cinematography for every single shot.",
|
"It translates your aesthetic into art, light, and cinematography for every single shot.",
|
||||||
video: "https://cdn.qikongjian.com/videos/module4 (4).mp4",
|
video: "https://cdn.qikongjian.com/videos/module4 (4).mp4",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Intelligent Editing Engine",
|
title:" Intelligent Clip Agent",
|
||||||
description:
|
description:
|
||||||
"An editing AI drives the final cut, for a story told seamlessly.",
|
"An editing AI drives the final cut, for a story told seamlessly.",
|
||||||
video: "https://cdn.qikongjian.com/videos/module4 (2).mp4",
|
video: "https://cdn.qikongjian.com/videos/module4 (2).mp4",
|
||||||
@ -477,7 +475,7 @@ function HomeModule4() {
|
|||||||
className="center z-10 flex flex-col items-center mb-[14rem]"
|
className="center z-10 flex flex-col items-center mb-[14rem]"
|
||||||
>
|
>
|
||||||
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal ">
|
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal ">
|
||||||
Edit like you think
|
Create Your Way
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -621,7 +619,7 @@ function HomeModule5() {
|
|||||||
className="center z-10 flex flex-col items-center mb-[8rem]"
|
className="center z-10 flex flex-col items-center mb-[8rem]"
|
||||||
>
|
>
|
||||||
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[1.5rem]">
|
<h2 className="text-white text-[3.375rem] leading-[100%] font-normal mb-[1.5rem]">
|
||||||
Start Creating
|
Pick a plan and make it yours
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{/* 计费切换 */}
|
{/* 计费切换 */}
|
||||||
|
|||||||
@ -103,7 +103,7 @@ export default function Login() {
|
|||||||
<div className="relative bottom-4 z-10 flex items-center justify-center min-h-screen p-4">
|
<div className="relative bottom-4 z-10 flex items-center justify-center min-h-screen p-4">
|
||||||
<div className="auth-container max-w-md w-full bg-black/40 backdrop-blur-lg border border-white/20 rounded-2xl p-8 shadow-2xl">
|
<div className="auth-container max-w-md w-full bg-black/40 backdrop-blur-lg border border-white/20 rounded-2xl p-8 shadow-2xl">
|
||||||
<div className="auth-header text-center mb-6">
|
<div className="auth-header text-center mb-6">
|
||||||
<h2 className="text-2xl font-bold text-white mb-4">Login</h2>
|
<h2 className="text-2xl font-bold text-white pb-4">Login</h2>
|
||||||
<p className="text-gray-300">Enter your credentials to access your account</p>
|
<p className="text-gray-300">Enter your credentials to access your account</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ export default function Login() {
|
|||||||
>
|
>
|
||||||
{isSubmitting ? 'Logging in...' : 'Login'}
|
{isSubmitting ? 'Logging in...' : 'Login'}
|
||||||
</button>
|
</button>
|
||||||
|
{/*
|
||||||
<div className="my-4 relative flex items-center">
|
<div className="my-4 relative flex items-center">
|
||||||
<div className="flex-grow border-t border-gray-500/30"></div>
|
<div className="flex-grow border-t border-gray-500/30"></div>
|
||||||
<span className="flex-shrink mx-4 text-gray-400">or</span>
|
<span className="flex-shrink mx-4 text-gray-400">or</span>
|
||||||
@ -177,7 +177,7 @@ export default function Login() {
|
|||||||
>
|
>
|
||||||
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" className="w-5 h-5" alt="Google" />
|
<img src="https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg" className="w-5 h-5" alt="Google" />
|
||||||
<span>Continue with Google</span>
|
<span>Continue with Google</span>
|
||||||
</button>
|
</button> */}
|
||||||
|
|
||||||
<div className="text-center mt-4">
|
<div className="text-center mt-4">
|
||||||
<p style={{ color: "rgba(255, 255, 255, 0.6)" }}>
|
<p style={{ color: "rgba(255, 255, 255, 0.6)" }}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user