diff --git a/src/components/DownloadResult.tsx b/src/components/DownloadResult.tsx index 35bb9460..78b342c6 100644 --- a/src/components/DownloadResult.tsx +++ b/src/components/DownloadResult.tsx @@ -3,7 +3,7 @@ import { useState, useEffect } from "react"; import { ExportResult } from "@/lib/types"; import { formatBytes } from "@/lib/utils"; -import { Download, RotateCcw, Share2, AlertCircle } from "lucide-react"; +import { Download, RotateCcw, Share2, AlertCircle, Volume2, VolumeX } from "lucide-react"; import LottiePlayer from "./LottiePlayer"; import successAnim from "@/lib/lottie/success.json"; import { cn } from "@/lib/utils"; @@ -15,9 +15,10 @@ interface Props { result: ExportResult; onReset: () => void; soundOnCompletion: boolean; + onToggleSound: () => void; } -export default function DownloadResult({ result, onReset, soundOnCompletion }: Props) { +export default function DownloadResult({ result, onReset, soundOnCompletion, onToggleSound }: Props) { const defaultName = `reframe_${result.width}x${result.height}`; const [name, setName] = useState(defaultName); @@ -41,15 +42,26 @@ export default function DownloadResult({ result, onReset, soundOnCompletion }: P return (
-
-
- -
-
-

Export complete

-

Ready to download

-
-
+
+
+
+ +
+
+

Export complete

+

Ready to download

+
+
+ +
diff --git a/src/components/VideoEditor.tsx b/src/components/VideoEditor.tsx index 3da8006b..bfcb6e9f 100644 --- a/src/components/VideoEditor.tsx +++ b/src/components/VideoEditor.tsx @@ -59,6 +59,7 @@ export default function VideoEditor() { overlaySize, setOverlaySize, overlayOpacity, setOverlayOpacity, recommendedPreset, + toggleSound, } = useVideoEditor(); const [copied, setCopied] = useState(false); const downloadRef = useRef(null); @@ -305,7 +306,7 @@ export default function VideoEditor() { {status === "done" && result && (
- +
)}
diff --git a/src/hooks/useVideoEditor.ts b/src/hooks/useVideoEditor.ts index a2283128..8bbbe649 100644 --- a/src/hooks/useVideoEditor.ts +++ b/src/hooks/useVideoEditor.ts @@ -438,6 +438,10 @@ export function useVideoEditor() { } }, []); + const toggleSound = useCallback(() => { + updateRecipe({ soundOnCompletion: !recipe.soundOnCompletion }); +}, [recipe.soundOnCompletion, updateRecipe]); + return { file, duration, @@ -472,5 +476,6 @@ export function useVideoEditor() { overlayOpacity, setOverlayOpacity, recommendedPreset, + toggleSound, }; } \ No newline at end of file