Create polished demo videos without editing skills. Mac/Windows/Linux
file dialog choose location
Siddharth8c5517f4abc6
diff --git a/dist-electron/main.js b/dist-electron/main.jsindex fce12884..7343b29f 100644--- a/dist-electron/main.js+++ b/dist-electron/main.js@@ -1,4 +1,4 @@-import { BrowserWindow, screen, ipcMain, desktopCapturer, shell, app, nativeImage, Tray, Menu } from "electron";+import { BrowserWindow, screen, ipcMain, desktopCapturer, shell, app, dialog, nativeImage, Tray, Menu } from "electron";import { fileURLToPath } from "node:url";import path from "node:path";import fs from "node:fs/promises";@@ -202,12 +202,25 @@ function registerIpcHandlers(createEditorWindow2, createSourceSelectorWindow2, g});ipcMain.handle("save-exported-video", async (_, videoData, fileName) => {try {- const downloadsPath = app.getPath("downloads");- const videoPath = path.join(downloadsPath, fileName);- await fs.writeFile(videoPath, Buffer.from(videoData));+ const result = await dialog.showSaveDialog({+ title: "Save Exported Video",+ defaultPath: path.join(app.getPath("downloads"), fileName),+ filters: [+ { name: "MP4 Video", extensions: ["mp4"] }+ ],+ properties: ["createDirectory", "showOverwriteConfirmation"]+ });+ if (result.canceled || !result.filePath) {+ return {+ success: false,+ cancelled: true,+ message: "Export cancelled"+ };+ }+ await fs.writeFile(result.filePath, Buffer.from(videoData));return {success: true,- path: videoPath,+ path: result.filePath,message: "Video exported successfully"};} catch (error) {diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.tsindex c2d40ea7..2b817e67 100644--- a/electron/electron-env.d.ts+++ b/electron/electron-env.d.ts@@ -35,7 +35,7 @@ interface Window {setRecordingState: (recording: boolean) => Promise<void>onStopRecordingFromTray: (callback: () => void) => () => voidopenExternalUrl: (url: string) => Promise<{ success: boolean; error?: string }>- saveExportedVideo: (videoData: ArrayBuffer, fileName: string) => Promise<{ success: boolean; path?: string; message?: string }>+ saveExportedVideo: (videoData: ArrayBuffer, fileName: string) => Promise<{ success: boolean; path?: string; message?: string; cancelled?: boolean }>}}diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex 5f92ed37..2a4267c2 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -1,4 +1,4 @@-import { ipcMain, desktopCapturer, BrowserWindow, shell, app } from 'electron'+import { ipcMain, desktopCapturer, BrowserWindow, shell, app, dialog } from 'electron'import fs from 'node:fs/promises'import path from 'node:path'@@ -128,22 +128,40 @@ export function registerIpcHandlers(ipcMain.handle('save-exported-video', async (_, videoData: ArrayBuffer, fileName: string) => {try {- const downloadsPath = app.getPath('downloads')- const videoPath = path.join(downloadsPath, fileName)- await fs.writeFile(videoPath, Buffer.from(videoData))+ // Show save dialog to let user choose location and filename+ const result = await dialog.showSaveDialog({+ title: 'Save Exported Video',+ defaultPath: path.join(app.getPath('downloads'), fileName),+ filters: [+ { name: 'MP4 Video', extensions: ['mp4'] }+ ],+ properties: ['createDirectory', 'showOverwriteConfirmation']+ });++ // User cancelled the dialog+ if (result.canceled || !result.filePath) {+ return {+ success: false,+ cancelled: true,+ message: 'Export cancelled'+ };+ }++ // Write the file to the chosen location+ await fs.writeFile(result.filePath, Buffer.from(videoData));return {success: true,- path: videoPath,+ path: result.filePath,message: 'Video exported successfully'- }+ };} catch (error) {- console.error('Failed to save exported video:', error)+ console.error('Failed to save exported video:', error);return {success: false,message: 'Failed to save exported video',error: String(error)- }+ };}})}diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsxindex f49315ac..22b3b770 100644--- a/src/components/video-editor/VideoEditor.tsx+++ b/src/components/video-editor/VideoEditor.tsx@@ -248,8 +248,10 @@ export default function VideoEditor() {const saveResult = await window.electronAPI.saveExportedVideo(arrayBuffer, fileName);- if (saveResult.success) {- toast.success('Video exported successfully!');+ if (saveResult.cancelled) {+ toast.info('Export cancelled');+ } else if (saveResult.success) {+ toast.success(`Video exported successfully to ${saveResult.path}`);} else {setExportError(saveResult.message || 'Failed to save video');toast.error(saveResult.message || 'Failed to save video');diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsxindex 06d51c15..f0e2546a 100644--- a/src/components/video-editor/VideoPlayback.tsx+++ b/src/components/video-editor/VideoPlayback.tsx@@ -724,7 +724,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(({className="absolute inset-0 bg-cover bg-center"style={{...backgroundStyle,- filter: showBlur ? 'blur(3px)' : 'none',+ filter: showBlur ? 'blur(2px)' : 'none',}}/><divdiff --git a/src/lib/exporter/frameRenderer.ts b/src/lib/exporter/frameRenderer.tsindex 56bb2813..3f9531ce 100644--- a/src/lib/exporter/frameRenderer.ts+++ b/src/lib/exporter/frameRenderer.ts@@ -435,7 +435,7 @@ export class FrameRenderer {if (this.config.showBlur) {ctx.save();- ctx.filter = 'blur(3px)';+ ctx.filter = 'blur(6px)'; // Canvas blur is weaker than CSSctx.drawImage(bgCanvas, 0, 0, w, h);ctx.restore();} else {diff --git a/src/vite-env.d.ts b/src/vite-env.d.tsindex 257c1e34..ae0edeaf 100644--- a/src/vite-env.d.ts+++ b/src/vite-env.d.ts@@ -36,6 +36,7 @@ interface Window {success: booleanpath?: stringmessage?: string+ cancelled?: boolean}>}}\ No newline at end of file