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 () => {
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);