Align preview typography with FFmpeg output, add video/song title split, and ship OSS updates.
Separate YouTube video titles from on-video song/artist fields with Pro gating, serve curated fonts and watermark assets for 1:1 preview parity, and include billing/API/docs/deploy stack for self-hosted release. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
682020ff5a
commit
c8015937f9
@@ -0,0 +1,30 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export function useMockupProgress(
|
||||
active: boolean,
|
||||
phaseOneMs = 3000,
|
||||
phaseTwoMs = 2000,
|
||||
) {
|
||||
const [phase, setPhase] = useState<0 | 1 | 2>(0);
|
||||
const [processed, setProcessed] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (!active) return;
|
||||
|
||||
const startFrame = requestAnimationFrame(() => setPhase(1));
|
||||
const midTimer = setTimeout(() => setPhase(2), phaseOneMs);
|
||||
const doneTimer = setTimeout(() => setProcessed(true), phaseOneMs + phaseTwoMs);
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(startFrame);
|
||||
clearTimeout(midTimer);
|
||||
clearTimeout(doneTimer);
|
||||
};
|
||||
}, [active, phaseOneMs, phaseTwoMs]);
|
||||
|
||||
const transitionMs = phase === 1 ? phaseOneMs : phase === 2 ? phaseTwoMs : 0;
|
||||
|
||||
return { phase, processed, transitionMs };
|
||||
}
|
||||
Reference in New Issue
Block a user