mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-04-28 14:54:52 +02:00
feat(alwaysontop): Implement
This commit is contained in:
parent
2fe1b9acd4
commit
f443eec56f
19
main.js
19
main.js
|
@ -4,6 +4,10 @@ const electron = require("electron");
|
|||
const APP = electron.app;
|
||||
const BrowserWindow = electron.BrowserWindow;
|
||||
|
||||
const {
|
||||
setupAlwaysOnTopMain
|
||||
} = require("jitsi-meet-electron-utils");
|
||||
|
||||
const path = require("path");
|
||||
const url = require("url");
|
||||
|
||||
|
@ -31,7 +35,10 @@ const jitsiMeetWindowOptions = {
|
|||
height: 600,
|
||||
minWidth: 800,
|
||||
minHeight: 600,
|
||||
titleBarStyle: 'hidden'
|
||||
titleBarStyle: 'hidden',
|
||||
webPreferences: {
|
||||
nativeWindowOpen: true
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -69,11 +76,15 @@ function createJitsiMeetWindow () {
|
|||
jitsiMeetWindow = new BrowserWindow(jitsiMeetWindowOptions);
|
||||
jitsiMeetWindow.loadURL(indexURL);
|
||||
|
||||
jitsiMeetWindow.webContents.on('new-window', function(event, url) {
|
||||
event.preventDefault();
|
||||
electron.shell.openExternal(url);
|
||||
jitsiMeetWindow.webContents.on('new-window', (event, url, frameName) => {
|
||||
if (frameName !== 'AlwaysOnTop') {
|
||||
event.preventDefault();
|
||||
electron.shell.openExternal(url);
|
||||
}
|
||||
});
|
||||
|
||||
setupAlwaysOnTopMain(jitsiMeetWindow);
|
||||
|
||||
jitsiMeetWindow.on("closed", () => {
|
||||
jitsiMeetWindow = null;
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"jitsi-meet-electron-utils": "jitsi/jitsi-meet-electron-utils"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "1.4.13",
|
||||
"electron": "1.7.5",
|
||||
"electron-packager": "*",
|
||||
"electron-rebuild": "^1.5.6",
|
||||
"eslint": ">=3",
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/* global process, JitsiMeetExternalAPI */
|
||||
const {
|
||||
RemoteControl,
|
||||
setupScreenSharingForWindow
|
||||
setupScreenSharingForWindow,
|
||||
setupAlwaysOnTopRender
|
||||
} = require("jitsi-meet-electron-utils");
|
||||
const { jitsiMeetDomain } = require("../../config.js");
|
||||
|
||||
|
@ -32,4 +33,5 @@ loadScript(`https://${jitsiMeetDomain}/external_api.js`, () => {
|
|||
const iframe = api.getIFrame();
|
||||
setupScreenSharingForWindow(iframe);
|
||||
new RemoteControl(iframe);
|
||||
setupAlwaysOnTopRender(api);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue