armcord/utils/bridge.js
2021-11-07 15:12:42 +01:00

19 lines
655 B
JavaScript

const { contextBridge, remote } = require("electron");
const currentWindow = remote.getCurrentWindow();
const {getDisplayMediaSelector} = require('./capturer')
const ArmCord = require("./ArmCord.js");
const version = require("../package.json").version;
contextBridge.exposeInMainWorld("electron", {
window: {
show: () => currentWindow.show(),
hide: () => currentWindow.hide(),
minimize: () => currentWindow.minimize(),
maximize: () => currentWindow.maximize(),
on : () => currentWindow.on(),
},
electron: process.versions.electron,
version: version,
ArmCord: ArmCord,
getDisplayMediaSelector: getDisplayMediaSelector,
});