Screensharing rework
Split Linux screensharing audio tracks, Rework screensharing functionality and layout This will need some refactoring soon
This commit is contained in:
@@ -7,6 +7,14 @@ import {
|
||||
} from 'electron';
|
||||
import * as fs from 'fs';
|
||||
import * as fsp from 'fs/promises';
|
||||
import { getDesktopSettingsSnapshot, updateDesktopSettings } from '../desktop-settings';
|
||||
import {
|
||||
activateLinuxScreenShareAudioRouting,
|
||||
deactivateLinuxScreenShareAudioRouting,
|
||||
prepareLinuxScreenShareAudioRouting,
|
||||
startLinuxScreenShareMonitorCapture,
|
||||
stopLinuxScreenShareMonitorCapture
|
||||
} from '../audio/linux-screen-share-routing';
|
||||
|
||||
export function setupSystemHandlers(): void {
|
||||
ipcMain.handle('open-external', async (_event, url: string) => {
|
||||
@@ -31,8 +39,40 @@ export function setupSystemHandlers(): void {
|
||||
}));
|
||||
});
|
||||
|
||||
ipcMain.handle('prepare-linux-screen-share-audio-routing', async () => {
|
||||
return await prepareLinuxScreenShareAudioRouting();
|
||||
});
|
||||
|
||||
ipcMain.handle('activate-linux-screen-share-audio-routing', async () => {
|
||||
return await activateLinuxScreenShareAudioRouting();
|
||||
});
|
||||
|
||||
ipcMain.handle('deactivate-linux-screen-share-audio-routing', async () => {
|
||||
return await deactivateLinuxScreenShareAudioRouting();
|
||||
});
|
||||
|
||||
ipcMain.handle('start-linux-screen-share-monitor-capture', async (event) => {
|
||||
return await startLinuxScreenShareMonitorCapture(event.sender);
|
||||
});
|
||||
|
||||
ipcMain.handle('stop-linux-screen-share-monitor-capture', async (_event, captureId?: string) => {
|
||||
return await stopLinuxScreenShareMonitorCapture(captureId);
|
||||
});
|
||||
|
||||
ipcMain.handle('get-app-data-path', () => app.getPath('userData'));
|
||||
|
||||
ipcMain.handle('get-desktop-settings', () => getDesktopSettingsSnapshot());
|
||||
|
||||
ipcMain.handle('set-desktop-settings', (_event, patch: { hardwareAcceleration?: boolean }) => {
|
||||
return updateDesktopSettings(patch);
|
||||
});
|
||||
|
||||
ipcMain.handle('relaunch-app', () => {
|
||||
app.relaunch();
|
||||
app.exit(0);
|
||||
return true;
|
||||
});
|
||||
|
||||
ipcMain.handle('file-exists', async (_event, filePath: string) => {
|
||||
try {
|
||||
await fsp.access(filePath, fs.constants.F_OK);
|
||||
|
||||
Reference in New Issue
Block a user