fix: freezes during longer screen recordings
Closes #131 Fundamentally, we cannot afford to composite webcam and screen on the client. We should create two streams and then combine them with ffmpeg processing in the backend / orion.
This commit is contained in:
+4
-5
@@ -209,13 +209,12 @@ ipcMain.handle('screen:get-sources', async () => {
|
||||
});
|
||||
|
||||
// Screen recording IPC handlers
|
||||
ipcMain.on('screen-record:start', (_event, data: { includeCamera: boolean }) => {
|
||||
ipcMain.on('screen-record:start', () => {
|
||||
createScreenRecordWindow();
|
||||
if (!screenRecordWindow) return;
|
||||
|
||||
// Resize based on whether camera preview is shown
|
||||
const winW = data.includeCamera ? 200 : 240;
|
||||
const winH = data.includeCamera ? 176 : 48;
|
||||
const winW = 240;
|
||||
const winH = 48;
|
||||
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
|
||||
screenRecordWindow.setSize(winW, winH);
|
||||
screenRecordWindow.setPosition(
|
||||
@@ -224,7 +223,7 @@ ipcMain.on('screen-record:start', (_event, data: { includeCamera: boolean }) =>
|
||||
);
|
||||
|
||||
const send = () => {
|
||||
screenRecordWindow?.webContents.send('screen-record:init', data);
|
||||
screenRecordWindow?.webContents.send('screen-record:init');
|
||||
screenRecordWindow?.showInactive();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user