mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-03 14:51:18 +01:00
Rename files
This commit is contained in:
25
ts/windows/calling-tools/preload.preload.ts
Normal file
25
ts/windows/calling-tools/preload.preload.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2024 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
import type { Event } from 'electron/renderer';
|
||||
import { MinimalSignalContext } from '../minimalContext.preload.js';
|
||||
|
||||
type RtcStatsReport = {
|
||||
conversationId: string;
|
||||
callId: string;
|
||||
reportJson: string;
|
||||
};
|
||||
|
||||
const Signal = {
|
||||
CallingToolsProps: {
|
||||
onRtcStatsReport: (
|
||||
callback: (event: Event, value: RtcStatsReport) => void
|
||||
) => ipcRenderer.on('calling:rtc-stats-report', callback),
|
||||
setRtcStatsInterval: (intervalMillis: number) => {
|
||||
ipcRenderer.send('calling:set-rtc-stats-interval', intervalMillis);
|
||||
},
|
||||
},
|
||||
};
|
||||
contextBridge.exposeInMainWorld('Signal', Signal);
|
||||
contextBridge.exposeInMainWorld('SignalContext', MinimalSignalContext);
|
||||
Reference in New Issue
Block a user