2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
2021-09-16 15:52:56 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import { contextBridge, ipcRenderer } from 'electron';
|
2023-04-20 21:23:19 +00:00
|
|
|
import { MinimalSignalContext } from '../minimalContext';
|
2021-09-16 15:52:56 +00:00
|
|
|
|
2023-04-20 21:23:19 +00:00
|
|
|
const params = new URLSearchParams(document.location.search);
|
2021-09-16 15:52:56 +00:00
|
|
|
|
2023-04-20 21:23:19 +00:00
|
|
|
const Signal = {
|
|
|
|
ScreenShareWindowProps: {
|
|
|
|
onStopSharing: () => {
|
|
|
|
ipcRenderer.send('stop-screen-share');
|
|
|
|
},
|
|
|
|
presentedSourceName: params.get('sourceName'),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
contextBridge.exposeInMainWorld('Signal', Signal);
|
|
|
|
contextBridge.exposeInMainWorld('SignalContext', MinimalSignalContext);
|