mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-08-08 10:12:50 +00:00
Receivers: Store connection state in main process
This commit is contained in:
parent
75f2f3dded
commit
5782fcc3ca
8 changed files with 32 additions and 16 deletions
|
@ -25,6 +25,7 @@ if (TARGET === 'electron') {
|
|||
electronAPI.contextBridge.exposeInMainWorld('targetAPI', {
|
||||
onDeviceInfo: (callback: any) => electronAPI.ipcRenderer.on('device-info', callback),
|
||||
getDeviceInfo: () => preloadData.deviceInfo,
|
||||
getSessions: () => electronAPI.ipcRenderer.invoke('get-sessions'),
|
||||
sendSessionMessage: (opcode: Opcode, message: any) => electronAPI.ipcRenderer.send('send-session-message', { opcode: opcode, message: message }),
|
||||
disconnectDevice: (session: string) => electronAPI.ipcRenderer.send('disconnect-device', session),
|
||||
onConnect: (callback: any) => electronAPI.ipcRenderer.on('connect', callback),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue