Skip to content

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

fix(suboptimal): ignore mobile browsers in whitelists/blacklists

Leonard Kimd5e0dea4692b
diff --git a/react/features/base/environment/environment.js b/react/features/base/environment/environment.js
index 511938546b..cbde9bd865 100644
--- a/react/features/base/environment/environment.js
+++ b/react/features/base/environment/environment.js
@@ -66,11 +66,10 @@ export function isSupportedBrowser() {
return false;
}
- const isBlacklistedBrowser = _isCurrentBrowserInList(
+ // Blacklists apply to desktop browsers only right now.
+ if (!_isMobileBrowser() && _isCurrentBrowserInList(
interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
- );
-
- if (isBlacklistedBrowser) {
+ )) {
return false;
}
@@ -78,9 +77,7 @@ export function isSupportedBrowser() {
// - the WelcomePage is mobile ready;
// - if the URL points to a conference then deep-linking will take
// care of it.
- return Platform.OS === 'android'
- || Platform.OS === 'ios'
- || JitsiMeetJS.isWebRtcSupported();
+ return _isMobileBrowser() || JitsiMeetJS.isWebRtcSupported();
}
/**
@@ -99,3 +96,13 @@ function _isCurrentBrowserInList(list) {
return checkFunction ? checkFunction.call(browser) : false;
}));
}
+
+/**
+ * Returns whether or not the current environment is a mobile device.
+ *
+ * @private
+ * @returns {boolean}
+ */
+function _isMobileBrowser() {
+ return Platform.OS === 'android' || Platform.OS === 'ios';
+}