Sfoglia il codice sorgente

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

master
Leonard Kim 6 anni fa
parent
commit
d5e0dea469
1 ha cambiato i file con 14 aggiunte e 7 eliminazioni
  1. 14
    7
      react/features/base/environment/environment.js

+ 14
- 7
react/features/base/environment/environment.js Vedi File

66
         return false;
66
         return false;
67
     }
67
     }
68
 
68
 
69
-    const isBlacklistedBrowser = _isCurrentBrowserInList(
69
+    // Blacklists apply to desktop browsers only right now.
70
+    if (!_isMobileBrowser() && _isCurrentBrowserInList(
70
         interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
71
         interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
71
-    );
72
-
73
-    if (isBlacklistedBrowser) {
72
+    )) {
74
         return false;
73
         return false;
75
     }
74
     }
76
 
75
 
78
     // - the WelcomePage is mobile ready;
77
     // - the WelcomePage is mobile ready;
79
     // - if the URL points to a conference then deep-linking will take
78
     // - if the URL points to a conference then deep-linking will take
80
     //   care of it.
79
     //   care of it.
81
-    return Platform.OS === 'android'
82
-        || Platform.OS === 'ios'
83
-        || JitsiMeetJS.isWebRtcSupported();
80
+    return _isMobileBrowser() || JitsiMeetJS.isWebRtcSupported();
84
 }
81
 }
85
 
82
 
86
 /**
83
 /**
99
         return checkFunction ? checkFunction.call(browser) : false;
96
         return checkFunction ? checkFunction.call(browser) : false;
100
     }));
97
     }));
101
 }
98
 }
99
+
100
+/**
101
+ * Returns whether or not the current environment is a mobile device.
102
+ *
103
+ * @private
104
+ * @returns {boolean}
105
+ */
106
+function _isMobileBrowser() {
107
+    return Platform.OS === 'android' || Platform.OS === 'ios';
108
+}

Loading…
Annulla
Salva