From 52edd3e450832a82ac9aa059ecc7d4d5ea452b9a Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Fri, 30 Jan 2026 08:22:34 +0100 Subject: [PATCH] [dyad] Add reset button for video trimming - wrote 1 file(s) --- src/components/video-editor.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/video-editor.tsx b/src/components/video-editor.tsx index 26f99ac..8f5ed36 100644 --- a/src/components/video-editor.tsx +++ b/src/components/video-editor.tsx @@ -7,7 +7,7 @@ import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Slider } from "@/components/ui/slider"; import { Progress } from "@/components/ui/progress"; -import { UploadCloud, Scissors, Download, Loader2 } from "lucide-react"; +import { UploadCloud, Scissors, Download, Loader2, RotateCcw } from "lucide-react"; import { getFFmpeg } from "@/lib/ffmpeg"; import { fetchFile } from "@ffmpeg/util"; @@ -101,6 +101,12 @@ export function VideoEditor() { setIsTrimming(false); }; + const handleUntrim = () => { + setTrimmedVideoUrl(null); + setTrimValues([0, duration]); + setProgress(0); + }; + return ( @@ -175,6 +181,12 @@ export function VideoEditor() { {videoSrc && ( + {trimmedVideoUrl && ( + + )}