瀏覽代碼

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

master
Leonard Kim 6 年之前
父節點
當前提交
d5e0dea469
共有 1 個檔案被更改,包括 14 行新增7 行删除
  1. 14
    7
      react/features/base/environment/environment.js

+ 14
- 7
react/features/base/environment/environment.js 查看文件

@@ -66,11 +66,10 @@ export function isSupportedBrowser() {
66 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 71
         interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
71
-    );
72
-
73
-    if (isBlacklistedBrowser) {
72
+    )) {
74 73
         return false;
75 74
     }
76 75
 
@@ -78,9 +77,7 @@ export function isSupportedBrowser() {
78 77
     // - the WelcomePage is mobile ready;
79 78
     // - if the URL points to a conference then deep-linking will take
80 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,3 +96,13 @@ function _isCurrentBrowserInList(list) {
99 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…
取消
儲存