) => {
if (e.code === "Space") {
@@ -175,6 +275,8 @@ export default function VideoPreview({ file, recipe, videoRef }: Props) {
}
};
+ if (!file) return null;
+
return (
setIsLoading(false)}
playsInline
/>
+
{/* Letterbox / Crop overlay */}
{overlay && (
diff --git a/src/hooks/useVideoEditor.ts b/src/hooks/useVideoEditor.ts
index a2283128..7cef5cbb 100644
--- a/src/hooks/useVideoEditor.ts
+++ b/src/hooks/useVideoEditor.ts
@@ -182,7 +182,7 @@ export function useVideoEditor() {
} catch (e) {
// ignore
}
- }, [recipe.preset, recipe.quality, recipe.speed, recipe.customWidth, recipe.customHeight]);
+ }, [recipe]);
const recommendedPreset = useMemo(() => {
if (!videoMetadata) return null;