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:
@@ -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
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user