mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-04-27 06:24:52 +02:00
94f39ce107
Release this ~3 months after 2.9.0 was released (21 Sep 2021) so that users had 3 months to migrate to local storage Signed-off-by: Christoph Settgast <csett86@web.de>
40 lines
1 KiB
JavaScript
40 lines
1 KiB
JavaScript
/* global process */
|
|
|
|
const { ipcRenderer } = require('electron');
|
|
const os = require('os');
|
|
const jitsiMeetElectronUtils = require('@jitsi/electron-sdk');
|
|
const { openExternalLink } = require('../features/utils/openExternalLink');
|
|
|
|
|
|
const whitelistedIpcChannels = [ 'protocol-data-msg', 'renderer-ready' ];
|
|
|
|
window.jitsiNodeAPI = {
|
|
osUserInfo: os.userInfo,
|
|
openExternalLink,
|
|
platform: process.platform,
|
|
jitsiMeetElectronUtils,
|
|
ipc: {
|
|
on: (channel, listener) => {
|
|
if (!whitelistedIpcChannels.includes(channel)) {
|
|
return;
|
|
}
|
|
|
|
return ipcRenderer.on(channel, listener);
|
|
},
|
|
send: channel => {
|
|
if (!whitelistedIpcChannels.includes(channel)) {
|
|
return;
|
|
}
|
|
|
|
return ipcRenderer.send(channel);
|
|
},
|
|
removeListener: (channel, listener) => {
|
|
if (!whitelistedIpcChannels.includes(channel)) {
|
|
return;
|
|
}
|
|
|
|
return ipcRenderer.removeListener(channel, listener);
|
|
}
|
|
}
|
|
};
|