Skip to content

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

feat(react-native-sdk): null error fix for ios

Calin-Teodor71658a5de6a6
diff --git a/react/features/mobile/react-native-sdk/middleware.js b/react/features/mobile/react-native-sdk/middleware.js
index 6051af9a25..a27185986c 100644
--- a/react/features/mobile/react-native-sdk/middleware.js
+++ b/react/features/mobile/react-native-sdk/middleware.js
@@ -1,4 +1,4 @@
-import { NativeModules } from 'react-native';
+import { NativeModules, Platform } from 'react-native';
import { getAppProp } from '../../base/app/functions';
import {
@@ -72,9 +72,10 @@ const { JMOngoingConference } = NativeModules;
});
/**
- * Check if native modules are being used or not.
+ * Before enabling media projection service control on Android,
+ * we need to check if native modules are being used or not.
*/
-!externalAPIEnabled && StateListenerRegistry.register(
+Platform.OS === 'android' && !externalAPIEnabled && StateListenerRegistry.register(
state => state['features/base/conference'].conference,
(conference, previousConference) => {
if (!conference) {