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:
+3
-3
@@ -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); };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user