Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Fix iOS lockups / resprings

Saúl Ibarra Corretgé4e4a9012c271
diff --git a/package.json b/package.json
index ecc2c5cde0..08a8949671 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,7 @@
"react-dom": "15.4.2",
"react-i18next": "4.1.0",
"react-native": "0.42.3",
- "react-native-background-timer": "1.0.2",
+ "react-native-background-timer": "saghul/react-native-background-timer#ios-end-task",
"react-native-immersive": "0.0.5",
"react-native-keep-awake": "2.0.4",
"react-native-locale-detector": "1.0.1",
diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
index 9bde778e19..3107e576df 100644
--- a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
+++ b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
@@ -372,9 +372,13 @@ function _visitNode(node, callback) {
// Required by:
// - lib-jitsi-meet
// - Strophe
- global.clearTimeout = window.clearTimeout = BackgroundTimer.clearTimeout;
- global.clearInterval = window.clearInterval = BackgroundTimer.clearInterval;
- global.setInterval = window.setInterval = BackgroundTimer.setInterval;
- global.setTimeout = window.setTimeout = BackgroundTimer.setTimeout;
+ global.clearTimeout = window.clearTimeout
+ = BackgroundTimer.clearTimeout.bind(BackgroundTimer);
+ global.clearInterval = window.clearInterval
+ = BackgroundTimer.clearInterval.bind(BackgroundTimer);
+ global.setInterval = window.setInterval
+ = BackgroundTimer.setInterval.bind(BackgroundTimer);
+ global.setTimeout = window.setTimeout
+ = BackgroundTimer.setTimeout.bind(BackgroundTimer);
})(global || window || this); // eslint-disable-line no-invalid-this