Skip to content

Commit

Permalink
Open WebRTC internals when in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Feb 23, 2021
1 parent ebdd32a commit 1c6b603
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions main.js
Expand Up @@ -72,6 +72,8 @@ if (isDev) {
*/
let mainWindow = null;

let webrtcInternalsWindow = null;

/**
* Add protocol data
*/
Expand Down Expand Up @@ -230,6 +232,20 @@ function createJitsiMeetWindow() {
handleProtocolCall(process.argv.pop());
}

/**
* 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.
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1c6b603

Please sign in to comment.