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

This commit is contained in:
Avram Tudor 2021-12-09 13:16:08 +02:00 committed by GitHub
parent 16a2c729e0
commit 51b827ebb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 16 deletions

View File

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

View File

@ -94,11 +94,7 @@ export function isSupportedBrowser() {
return false;
}
// We are intentionally allow mobile browsers because:
// - the WelcomePage is mobile ready;
// - if the URL points to a conference then deep-linking will take
// care of it.
return isMobileBrowser() || JitsiMeetJS.isWebRtcSupported();
return isMobileBrowser() ? isSupportedMobileBrowser() : JitsiMeetJS.isWebRtcSupported();
}
/**
@ -108,9 +104,8 @@ export function isSupportedBrowser() {
* @returns {boolean}
*/
export function isSupportedMobileBrowser() {
return (Platform.OS === 'android' && browser.isChromiumBased())
|| (Platform.OS === 'android' && browser.isFirefox())
|| (Platform.OS === 'ios' && browser.isWebKitBased());
return (Platform.OS === 'android' && browser.isSupportedAndroidBrowser())
|| (Platform.OS === 'ios' && browser.isSupportedIOSBrowser());
}
/**

View File

@ -163,13 +163,19 @@ class DeepLinkingMobilePage extends Component<Props> {
</a>
{
isSupportedMobileBrowser()
&& <a
onClick = { this._onLaunchWeb }
target = '_top'>
<button className = { downloadButtonClassName }>
{ t(`${_TNS}.launchWebButton`) }
</button>
</a>
? (
<a
onClick = { this._onLaunchWeb }
target = '_top'>
<button className = { downloadButtonClassName }>
{ t(`${_TNS}.launchWebButton`) }
</button>
</a>
) : (
<b>
{ t(`${_TNS}.unsupportedBrowser`) }
</b>
)
}
{ renderPromotionalFooter() }
<DialInSummary