From 70a9bfebb196d5c0bde35ce0a165b696bb9ae1d0 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Thu, 28 Aug 2025 21:52:03 +0200 Subject: [PATCH] feat: add audio support for export --- .../src/components/editor/export-button.tsx | 22 + apps/web/src/lib/export.ts | 443 ++++++++++++------ apps/web/src/types/export.ts | 35 +- 3 files changed, 336 insertions(+), 164 deletions(-) diff --git a/apps/web/src/components/editor/export-button.tsx b/apps/web/src/components/editor/export-button.tsx index e24d20df..c9738e81 100644 --- a/apps/web/src/components/editor/export-button.tsx +++ b/apps/web/src/components/editor/export-button.tsx @@ -7,6 +7,7 @@ import { Button } from "../ui/button"; import { Label } from "../ui/label"; import { RadioGroup, RadioGroupItem } from "../ui/radio-group"; import { Progress } from "../ui/progress"; +import { Checkbox } from "../ui/checkbox"; import { cn } from "@/lib/utils"; import { exportProject, @@ -75,6 +76,9 @@ function ExportPopover({ const [quality, setQuality] = useState( DEFAULT_EXPORT_OPTIONS.quality ); + const [includeAudio, setIncludeAudio] = useState( + DEFAULT_EXPORT_OPTIONS.includeAudio || true + ); const [isExporting, setIsExporting] = useState(false); const [progress, setProgress] = useState(0); const [exportResult, setExportResult] = useState(null); @@ -90,6 +94,7 @@ function ExportPopover({ format, quality, fps: activeProject.fps, + includeAudio, onProgress: setProgress, onCancel: () => false, // TODO: Add cancel functionality }); @@ -197,6 +202,23 @@ function ExportPopover({ + + +
+ setIncludeAudio(!!checked)} + /> + +
+