dsr/src/preload.ts
2023-07-30 01:40:06 +02:00

11 lines
446 B
TypeScript

import { contextBridge, ipcRenderer } from "electron";
/* Context bridge */
contextBridge.exposeInMainWorld("internals", {
ffmpeg: () => ipcRenderer.invoke("ffmpeg"),
argv: () => ipcRenderer.invoke("argv"),
allowedExtensions: () => ipcRenderer.invoke("allowedExtensions"),
askFile: () => ipcRenderer.invoke("askFile"),
mergeAudio: (file: string) => ipcRenderer.invoke("mergeAudio", file),
exit: () => ipcRenderer.invoke("exit"),
});