Skip to content

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

ios: stop using react-native-background-timer

Saúl Ibarra Corretgé56da400f19e3
diff --git a/react/features/mobile/polyfills/browser.js b/react/features/mobile/polyfills/browser.js
index 3ce8a65682..3b24ccbe2b 100644
--- a/react/features/mobile/polyfills/browser.js
+++ b/react/features/mobile/polyfills/browser.js
@@ -415,10 +415,12 @@ function _visitNode(node, callback) {
// Required by:
// - lib-jitsi-meet
// - Strophe
- global.clearTimeout = BackgroundTimer.clearTimeout.bind(BackgroundTimer);
- global.clearInterval = BackgroundTimer.clearInterval.bind(BackgroundTimer);
- global.setInterval = BackgroundTimer.setInterval.bind(BackgroundTimer);
- global.setTimeout = (fn, ms = 0) => BackgroundTimer.setTimeout(fn, ms);
+ if (Platform.OS === 'android') {
+ global.clearTimeout = BackgroundTimer.clearTimeout.bind(BackgroundTimer);
+ global.clearInterval = BackgroundTimer.clearInterval.bind(BackgroundTimer);
+ global.setInterval = BackgroundTimer.setInterval.bind(BackgroundTimer);
+ global.setTimeout = (fn, ms = 0) => BackgroundTimer.setTimeout(fn, ms);
+ }
// localStorage
if (typeof global.localStorage === 'undefined') {