From 14285575e456a76073905695bdd2862fdeb4f7f9 Mon Sep 17 00:00:00 2001 From: talksik Date: Mon, 30 Mar 2026 12:35:48 -0700 Subject: [PATCH] default to 4 / 3 aspect ratio for videos This also sets the default window size to adhere to the default aspect ratio --- js/src/features/compose/use-recorder.ts | 4 +++- js/src/main.ts | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/src/features/compose/use-recorder.ts b/js/src/features/compose/use-recorder.ts index f0e0e0f..041dc1d 100644 --- a/js/src/features/compose/use-recorder.ts +++ b/js/src/features/compose/use-recorder.ts @@ -62,7 +62,9 @@ export function useRecorder({ const startRecording = useCallback(async () => { try { const constraints = - mode === "video" ? { video: true, audio: true } : { audio: true }; + mode === "video" + ? { video: { aspectRatio: { ideal: 4 / 3 } }, audio: true } + : { audio: true }; const mediaStream = await navigator.mediaDevices.getUserMedia(constraints); diff --git a/js/src/main.ts b/js/src/main.ts index fdf888e..d79a084 100644 --- a/js/src/main.ts +++ b/js/src/main.ts @@ -25,9 +25,9 @@ if (process.platform === 'darwin' && !app.isPackaged) { const createWindow = () => { // Create the browser window. const mainWindow = new BrowserWindow({ - width: 715, - height: 550, - resizable: false, + width: 800, + height: 600, + resizable: true, fullscreenable: true, frame: false, webPreferences: {