summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/export-button.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-08-28 21:52:03 +0200
committerMaze Winther <mazewinther@gmail.com>2025-08-28 21:52:03 +0200
commit70a9bfebb196d5c0bde35ce0a165b696bb9ae1d0 (patch)
tree3c84f88db66f518a8bd7d79a123cf3181fa93801 /apps/web/src/components/editor/export-button.tsx
parentd4e08bb7e3ecfe944f683a26f063e6d7a487c992 (diff)
downloadopencut-70a9bfebb196d5c0bde35ce0a165b696bb9ae1d0.tar.gz
feat: add audio support for export
Diffstat (limited to 'apps/web/src/components/editor/export-button.tsx')
-rw-r--r--apps/web/src/components/editor/export-button.tsx22
1 files changed, 22 insertions, 0 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<ExportQuality>(
DEFAULT_EXPORT_OPTIONS.quality
);
+ const [includeAudio, setIncludeAudio] = useState<boolean>(
+ DEFAULT_EXPORT_OPTIONS.includeAudio || true
+ );
const [isExporting, setIsExporting] = useState(false);
const [progress, setProgress] = useState(0);
const [exportResult, setExportResult] = useState<ExportResult | null>(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({
</div>
</RadioGroup>
</PropertyGroup>
+
+ <PropertyGroup
+ title="Audio"
+ titleClassName="text-sm"
+ defaultExpanded={false}
+ >
+ <div className="flex items-center space-x-2">
+ <Checkbox
+ id="include-audio"
+ checked={includeAudio}
+ onCheckedChange={(checked) => setIncludeAudio(!!checked)}
+ />
+ <Label htmlFor="include-audio">
+ Include audio in export
+ </Label>
+ </div>
+ </PropertyGroup>
</div>
<Button onClick={handleExport} className="w-full gap-2">