Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var _ = require('underscore');
var ipc = require('electron').ipcRenderer;
var remote = require('electron').remote;
var shell = require('electron').shell;
var desktopCapturer = require('electron').desktopCapturer;

/**
* Defines methods with which to extend the `Electron` module defined in `client.js`.
Expand Down Expand Up @@ -81,5 +82,10 @@ ElectronImplementation = {
listeners.push(callback);
},

_eventListeners: {}
_eventListeners: {},

/**
* Expose Electrons desktopCapturer API used to enable screen capture.
*/
desktopCapturer: desktopCapturer,
};
7 changes: 6 additions & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ Electron = {
* @param {Function} callback - A function to invoke when `event` is triggered. Takes no arguments
* and returns no value.
*/
onWindowEvent: function() {}
onWindowEvent: function() {},

/**
* Expose Electrons desktopCapturer API used to enable screen capture.
*/
desktopCapturer: {}
};

// Read `ElectronImplementation` from the window vs. doing `typeof ElectronImplementation` because
Expand Down