diff --git a/src/components/video-editor.tsx b/src/components/video-editor.tsx index ac07d99..cdfef46 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"; @@ -141,6 +141,13 @@ export function VideoEditor() { setIsTrimming(false); }; + const handleReset = () => { + setTrimValues([0, duration]); + if (videoRef.current) { + videoRef.current.currentTime = 0; + } + }; + return ( @@ -214,6 +221,10 @@ export function VideoEditor() { {videoSrc && ( +