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:
talksik
2026-04-09 08:31:23 -07:00
parent 5fadc6c8fe
commit f91068a4c1
6 changed files with 28 additions and 223 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ contextBridge.exposeInMainWorld('electronAutoplay', {
contextBridge.exposeInMainWorld('electronScreen', {
getScreenSources: () => ipcRenderer.invoke('screen:get-sources'),
startRecordingWindow: (data: { includeCamera: boolean }) => ipcRenderer.send('screen-record:start', data),
startRecordingWindow: () => ipcRenderer.send('screen-record:start'),
stopRecordingWindow: () => ipcRenderer.send('screen-record:cancel'),
onStopRequested: (callback: () => void) => {
const handler = () => callback();
@@ -54,8 +54,8 @@ contextBridge.exposeInMainWorld('electronScreen', {
contextBridge.exposeInMainWorld('electronScreenRecord', {
stop: () => ipcRenderer.send('screen-record:stop'),
onInit: (callback: (data: { includeCamera: boolean }) => void) => {
const handler = (_event: Electron.IpcRendererEvent, data: { includeCamera: boolean }) => callback(data);
onInit: (callback: () => void) => {
const handler = () => callback();
ipcRenderer.on('screen-record:init', handler);
return () => { ipcRenderer.removeListener('screen-record:init', handler); };
},