aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/features/conference/components/Conference.js18
-rw-r--r--app/features/redux/store.js3
-rw-r--r--app/features/settings/reducer.js4
-rw-r--r--app/features/utils/functions.js3
-rw-r--r--app/preload/preload.js13
5 files changed, 25 insertions, 16 deletions
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js
index a432102..a26ff9c 100644
--- a/app/features/conference/components/Conference.js
+++ b/app/features/conference/components/Conference.js
@@ -7,15 +7,6 @@ import type { Dispatch } from 'redux';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
-import {
- RemoteControl,
- setupScreenSharingRender,
- setupAlwaysOnTopRender,
- initPopupsConfigurationRender,
- setupWiFiStats,
- setupPowerMonitorRender
-} from 'jitsi-meet-electron-utils';
-
import config from '../../config';
import { setEmail, setName } from '../../settings';
@@ -259,6 +250,15 @@ class Conference extends Component<Props, State> {
parentNode,
roomName: this._conference.room
});
+
+ const { RemoteControl,
+ setupScreenSharingRender,
+ setupAlwaysOnTopRender,
+ initPopupsConfigurationRender,
+ setupWiFiStats,
+ setupPowerMonitorRender
+ } = window.jitsiNodeAPI.jitsiMeetElectronUtils;
+
initPopupsConfigurationRender(this._api);
const iframe = this._api.getIFrame();
diff --git a/app/features/redux/store.js b/app/features/redux/store.js
index b9469b9..3700012 100644
--- a/app/features/redux/store.js
+++ b/app/features/redux/store.js
@@ -2,14 +2,13 @@
import { createStore } from 'redux';
import { persistReducer } from 'redux-persist';
-import createElectronStorage from 'redux-persist-electron-storage';
import middleware from './middleware';
import reducers from './reducers';
const persistConfig = {
key: 'root',
- storage: createElectronStorage(),
+ storage: window.jitsiNodeAPI.createElectronStorage(),
whitelist: [
'onboarding',
'recentList',
diff --git a/app/features/settings/reducer.js b/app/features/settings/reducer.js
index 11fea6d..b30c9f9 100644
--- a/app/features/settings/reducer.js
+++ b/app/features/settings/reducer.js
@@ -1,7 +1,5 @@
// @flow
-import os from 'os';
-
import { getAvatarURL } from 'js-utils';
import {
@@ -22,7 +20,7 @@ type State = {
startWithVideoMuted: boolean
};
-const username = os.userInfo().username;
+const username = window.jitsiNodeAPI.osUserInfo().username;
const DEFAULT_STATE = {
avatarURL: getAvatarURL({ id: username }),
diff --git a/app/features/utils/functions.js b/app/features/utils/functions.js
index 2b86d2e..50b10a2 100644
--- a/app/features/utils/functions.js
+++ b/app/features/utils/functions.js
@@ -2,7 +2,6 @@
// @flow
-import { shell } from 'electron';
import config from '../config';
/**
@@ -53,5 +52,5 @@ export function normalizeServerURL(url: string) {
* @returns {void}
*/
export function openExternalLink(link: string) {
- shell.openExternal(link);
+ window.jitsiNodeAPI.shellOpenExternal(link);
}
diff --git a/app/preload/preload.js b/app/preload/preload.js
new file mode 100644
index 0000000..16cf79a
--- /dev/null
+++ b/app/preload/preload.js
@@ -0,0 +1,13 @@
+const createElectronStorage = require('redux-persist-electron-storage');
+const { shell } = require('electron');
+const os = require('os');
+
+const jitsiMeetElectronUtils = require('jitsi-meet-electron-utils');
+
+window.jitsiNodeAPI = {
+ createElectronStorage,
+ osUserInfo: os.userInfo,
+ shellOpenExternal: shell.openExternal,
+ jitsiMeetElectronUtils
+};
+