瀏覽代碼

fix(browser-compatibility) hide launch in web for unsupported mobile browsers (#10569)

master
Avram Tudor 4 年之前
父節點
當前提交
51b827ebb0
沒有連結到貢獻者的電子郵件帳戶。

+ 2
- 1
lang/main.json 查看文件

@@ -180,7 +180,8 @@
180 180
         "joinInApp": "Join this meeting using the app",
181 181
         "launchWebButton": "Launch in web",
182 182
         "title": "Launching your meeting in {{app}}...",
183
-        "tryAgainButton": "Try again in desktop"
183
+        "tryAgainButton": "Try again in desktop",
184
+        "unsupportedBrowser": "It looks like you're using a browser we don't support."
184 185
     },
185 186
     "defaultLink": "e.g. {{url}}",
186 187
     "defaultNickname": "ex. Jane Pink",

+ 3
- 8
react/features/base/environment/environment.js 查看文件

@@ -94,11 +94,7 @@ export function isSupportedBrowser() {
94 94
         return false;
95 95
     }
96 96
 
97
-    // We are intentionally allow mobile browsers because:
98
-    // - the WelcomePage is mobile ready;
99
-    // - if the URL points to a conference then deep-linking will take
100
-    //   care of it.
101
-    return isMobileBrowser() || JitsiMeetJS.isWebRtcSupported();
97
+    return isMobileBrowser() ? isSupportedMobileBrowser() : JitsiMeetJS.isWebRtcSupported();
102 98
 }
103 99
 
104 100
 /**
@@ -108,9 +104,8 @@ export function isSupportedBrowser() {
108 104
  * @returns {boolean}
109 105
  */
110 106
 export function isSupportedMobileBrowser() {
111
-    return (Platform.OS === 'android' && browser.isChromiumBased())
112
-        || (Platform.OS === 'android' && browser.isFirefox())
113
-        || (Platform.OS === 'ios' && browser.isWebKitBased());
107
+    return (Platform.OS === 'android' && browser.isSupportedAndroidBrowser())
108
+        || (Platform.OS === 'ios' && browser.isSupportedIOSBrowser());
114 109
 }
115 110
 
116 111
 /**

+ 13
- 7
react/features/deep-linking/components/DeepLinkingMobilePage.web.js 查看文件

@@ -163,13 +163,19 @@ class DeepLinkingMobilePage extends Component<Props> {
163 163
                     </a>
164 164
                     {
165 165
                         isSupportedMobileBrowser()
166
-                            && <a
167
-                                onClick = { this._onLaunchWeb }
168
-                                target = '_top'>
169
-                                <button className = { downloadButtonClassName }>
170
-                                    { t(`${_TNS}.launchWebButton`) }
171
-                                </button>
172
-                            </a>
166
+                            ? (
167
+                                <a
168
+                                    onClick = { this._onLaunchWeb }
169
+                                    target = '_top'>
170
+                                    <button className = { downloadButtonClassName }>
171
+                                        { t(`${_TNS}.launchWebButton`) }
172
+                                    </button>
173
+                                </a>
174
+                            ) : (
175
+                                <b>
176
+                                    { t(`${_TNS}.unsupportedBrowser`) }
177
+                                </b>
178
+                            )
173 179
                     }
174 180
                     { renderPromotionalFooter() }
175 181
                     <DialInSummary

Loading…
取消
儲存