feat: send screen recordings (#128)
* first pass implementation * remove screenrecord shortcut hint * refactor * fix: prevent mirror review of screen recording * feat: allow recording with webcam overlay * fix: review screen recording without clipped content * tidy keyboard hints consistent position * refactor: re-use one component for screen picker huddles and screen clips use same picker component now. We had to make sure that tailwind works for both of them. * fix: improve visibility of keyboard hints During compose video or screen recording, the keyboard hints were invisible if the content was super bright.
This commit was merged in pull request #128.
This commit is contained in:
@@ -41,6 +41,26 @@ contextBridge.exposeInMainWorld('electronAutoplay', {
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('electronScreen', {
|
||||
getScreenSources: () => ipcRenderer.invoke('screen:get-sources'),
|
||||
startRecordingWindow: (data: { includeCamera: boolean }) => ipcRenderer.send('screen-record:start', data),
|
||||
stopRecordingWindow: () => ipcRenderer.send('screen-record:cancel'),
|
||||
onStopRequested: (callback: () => void) => {
|
||||
const handler = () => callback();
|
||||
ipcRenderer.on('screen-record:stopped', handler);
|
||||
return () => { ipcRenderer.removeListener('screen-record:stopped', handler); };
|
||||
},
|
||||
});
|
||||
|
||||
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);
|
||||
ipcRenderer.on('screen-record:init', handler);
|
||||
return () => { ipcRenderer.removeListener('screen-record:init', handler); };
|
||||
},
|
||||
});
|
||||
|
||||
contextBridge.exposeInMainWorld('electronLink', {
|
||||
fetchMetadata: (url: string) => ipcRenderer.invoke('link:fetch-metadata', url),
|
||||
openExternal: (url: string) => ipcRenderer.invoke('link:open-external', url),
|
||||
|
||||
Reference in New Issue
Block a user