default to 4 / 3 aspect ratio for videos

This also sets the default window size to adhere to the default aspect
ratio
This commit is contained in:
talksik
2026-03-30 12:35:48 -07:00
parent 9f6633bf1f
commit 14285575e4
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -62,7 +62,9 @@ export function useRecorder({
const startRecording = useCallback(async () => { const startRecording = useCallback(async () => {
try { try {
const constraints = const constraints =
mode === "video" ? { video: true, audio: true } : { audio: true }; mode === "video"
? { video: { aspectRatio: { ideal: 4 / 3 } }, audio: true }
: { audio: true };
const mediaStream = const mediaStream =
await navigator.mediaDevices.getUserMedia(constraints); await navigator.mediaDevices.getUserMedia(constraints);
+3 -3
View File
@@ -25,9 +25,9 @@ if (process.platform === 'darwin' && !app.isPackaged) {
const createWindow = () => { const createWindow = () => {
// Create the browser window. // Create the browser window.
const mainWindow = new BrowserWindow({ const mainWindow = new BrowserWindow({
width: 715, width: 800,
height: 550, height: 600,
resizable: false, resizable: true,
fullscreenable: true, fullscreenable: true,
frame: false, frame: false,
webPreferences: { webPreferences: {