diff --git a/src/components/ImageOverlay.tsx b/src/components/ImageOverlay.tsx
index ae090992..69ebfedf 100644
--- a/src/components/ImageOverlay.tsx
+++ b/src/components/ImageOverlay.tsx
@@ -1,7 +1,7 @@
import { useRef, useState, useEffect } from "react";
import { OverlayPosition } from "@/lib/types";
import { ArrowUpLeft, ArrowUpRight, ArrowDownLeft, ArrowDownRight, Upload, Trash2, FileImage } from "lucide-react";
-
+import Image from "next/image";
interface ImageOverlayPanelProps {
overlayFile: File | null;
setOverlayFile: (file: File | null) => void;
@@ -70,11 +70,14 @@ export default function ImageOverlayPanel({
: "border-dashed border-[#2d4266] hover:bg-white/5 text-[#c7d8f7] hover:text-white cursor-pointer"
}`}>
{thumbUrl ? (
-
+
+
+
) : (
<>
diff --git a/src/components/ThumbnailStrip.tsx b/src/components/ThumbnailStrip.tsx
index c4a186ef..8fc0e8cf 100644
--- a/src/components/ThumbnailStrip.tsx
+++ b/src/components/ThumbnailStrip.tsx
@@ -1,6 +1,7 @@
"use client";
import { useEffect, useRef, useState, useCallback } from "react";
+import Image from "next/image";
interface Thumbnail {
time: number;
@@ -84,7 +85,10 @@ export default function ThumbnailStrip({
const onSeeked = () => {
video.removeEventListener("seeked", onSeeked);
ctx.drawImage(video, 0, 0, thumbW, thumbH);
- captured.push({ time, dataUrl: canvas.toDataURL("image/jpeg", 0.7) });
+ captured.push({
+ time,
+ dataUrl: canvas.toDataURL("image/jpeg", 0.7),
+ });
setThumbnails([...captured]);
setProgress(Math.round(((i + 1) / times.length) * 100));
resolve();
@@ -100,13 +104,14 @@ export default function ThumbnailStrip({
}, [videoSrc, duration, intervalSeconds]);
useEffect(() => {
- if (videoSrc && duration > 0) {
- generateThumbnails();
- }
- return () => {
- abortRef.current = true;
- };
- }, [generateThumbnails]);
+ if (videoSrc && duration > 0) {
+ generateThumbnails();
+ }
+
+ return () => {
+ abortRef.current = true;
+ };
+}, [videoSrc, duration, generateThumbnails]);
const formatTime = (seconds: number) => {
const m = Math.floor(seconds / 60);
@@ -125,14 +130,8 @@ export default function ThumbnailStrip({
return (
-
-
- Frames
-
+
Frames
+
{isGenerating && (
{progress}%
)}
+
{!isGenerating && thumbnails.length > 0 && (
{thumbnails.length} frames ยท every {intervalSeconds}s
@@ -153,7 +153,7 @@ export default function ThumbnailStrip({
{thumbnails.length === 0 && isGenerating && (
{Array.from({ length: 8 }).map((_, i) => (
-
+
))}
)}
@@ -163,26 +163,30 @@ export default function ThumbnailStrip({
{thumbnails.map((thumb, i) => {
const isActive = i === activeIndex;
const inTrimRange =
- thumb.time >= trimStart && thumb.time <= effectiveTrimEnd;
- const isHovered = hoveredIndex === i;
+ thumb.time >= trimStart &&
+ thumb.time <= effectiveTrimEnd;
return (
);
@@ -190,208 +194,6 @@ export default function ThumbnailStrip({
)}
-
-
);
}
\ No newline at end of file
diff --git a/src/components/VideoEditor.tsx b/src/components/VideoEditor.tsx
index 6e297539..165ed4b4 100644
--- a/src/components/VideoEditor.tsx
+++ b/src/components/VideoEditor.tsx
@@ -194,10 +194,16 @@ export default function VideoEditor() {
{!file && (
+ fix-remove-console-log
+
+
Upload a video to get started
+
Supports MP4, MOV, WebM and more
+
Upload a video to get started
+ main
)}
{file && (