This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* By default, Electron (well, underlying Chrome browser) will reject loading external URLs | |
* to an <iframe>. To circumvent this limitation, we can manipulate response headers from any | |
* http request and feed them to the Electron window. | |
* | |
* The 'onHeadersReceived' listener is documented here: | |
* http://electron.atom.io/docs/api/session/#webrequestonheadersreceivedfilter-listener | |
*/ | |
app.on('ready', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* By default, the Electron (or underlying Chrome instance, to be more precise) will not allow | |
* javascript communication between parent window and an <iframe>. Which makes it hard to cover | |
* scenarios when you want to do something after an action has been performed inside the <iframe>. | |
* This example shows how to react on web reqest from within <iframe>. | |
* | |
* The 'onBeforeRequest' listener is documented here: | |
* http://electron.atom.io/docs/api/session/#webrequestonbeforerequestfilter-listener | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var voxioConnector = (function() { | |
var clients = [], | |
clientTimeout = 15000, // 15 seconds | |
clientTimeoutId, | |
clientState = { DISCONNECTED: "disconnected", CONNECTED: "connected", CONNECTING: "connecting" }, | |
currentClientIndex = -1, | |
active = false; | |
function handleError(e) { | |
console.log(e); |