diff options
author | Saúl Ibarra Corretgé <s@saghul.net> | 2021-02-23 11:24:45 +0100 |
---|---|---|
committer | Saúl Ibarra Corretgé <s@saghul.net> | 2021-02-23 11:24:45 +0100 |
commit | 1c6b603d2f95b7e617b818baae3a540db37d6388 (patch) | |
tree | 34a3bbd65c381c38233afe53801309c135b645ee /main.js | |
parent | ebdd32a79527621fe3fbd1e3bfa3b8bab76be56c (diff) |
Open WebRTC internals when in dev mode
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -72,6 +72,8 @@ if (isDev) { */ let mainWindow = null; +let webrtcInternalsWindow = null; + /** * Add protocol data */ @@ -231,6 +233,20 @@ function createJitsiMeetWindow() { } /** + * Opens new window with WebRTC internals. + */ +function createWebRTCInternalsWindow() { + const options = { + minWidth: 800, + minHeight: 600, + show: true + }; + + webrtcInternalsWindow = new BrowserWindow(options); + webrtcInternalsWindow.loadURL('chrome://webrtc-internals'); +} + +/** * Handler for application protocol links to initiate a conference. */ function handleProtocolCall(fullProtocolCall) { @@ -292,6 +308,10 @@ app.on('certificate-error', app.on('ready', createJitsiMeetWindow); +if (isDev) { + app.on('ready', createWebRTCInternalsWindow); +} + app.on('second-instance', (event, commandLine) => { /** * If someone creates second instance of the application, set focus on |