From 9e0d91f144072e667252014fb8e9a3a180f74542 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 4 Nov 2020 12:34:48 -1000 Subject: [PATCH] Disable background throttling Reference: https://github.com/webtorrent/webtorrent-desktop/pull/1720#issuecomment-722011487 I actually think we want backgroundThrottling: false so our timers and intervals aren't throttled when the app is backgrounded. --- src/main/windows/about.js | 3 ++- src/main/windows/main.js | 3 ++- src/main/windows/webtorrent.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/windows/about.js b/src/main/windows/about.js index 3e0e3e6b..b6b2364e 100644 --- a/src/main/windows/about.js +++ b/src/main/windows/about.js @@ -27,7 +27,8 @@ function init () { webPreferences: { nodeIntegration: true, enableBlinkFeatures: 'AudioVideoTracks', - enableRemoteModule: true + enableRemoteModule: true, + backgroundThrottling: false }, width: 300 }) diff --git a/src/main/windows/main.js b/src/main/windows/main.js index 2bff63b4..b245b659 100644 --- a/src/main/windows/main.js +++ b/src/main/windows/main.js @@ -45,7 +45,8 @@ function init (state, options) { webPreferences: { nodeIntegration: true, enableBlinkFeatures: 'AudioVideoTracks', - enableRemoteModule: true + enableRemoteModule: true, + backgroundThrottling: false }, x: initialBounds.x, y: initialBounds.y diff --git a/src/main/windows/webtorrent.js b/src/main/windows/webtorrent.js index a0828a61..b8129f26 100644 --- a/src/main/windows/webtorrent.js +++ b/src/main/windows/webtorrent.js @@ -27,7 +27,8 @@ function init () { webPreferences: { nodeIntegration: true, enableBlinkFeatures: 'AudioVideoTracks', - enableRemoteModule: true + enableRemoteModule: true, + backgroundThrottling: false }, width: 150 })