fix(suboptimal): ignore mobile browsers in whitelists/blacklists
This commit is contained in:
parent
033aa0dd6e
commit
d5e0dea469
|
@ -66,11 +66,10 @@ export function isSupportedBrowser() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isBlacklistedBrowser = _isCurrentBrowserInList(
|
// Blacklists apply to desktop browsers only right now.
|
||||||
|
if (!_isMobileBrowser() && _isCurrentBrowserInList(
|
||||||
interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
|
interfaceConfig.UNSUPPORTED_BROWSERS || DEFAULT_UNSUPPORTED_BROWSERS
|
||||||
);
|
)) {
|
||||||
|
|
||||||
if (isBlacklistedBrowser) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,9 +77,7 @@ export function isSupportedBrowser() {
|
||||||
// - the WelcomePage is mobile ready;
|
// - the WelcomePage is mobile ready;
|
||||||
// - if the URL points to a conference then deep-linking will take
|
// - if the URL points to a conference then deep-linking will take
|
||||||
// care of it.
|
// care of it.
|
||||||
return Platform.OS === 'android'
|
return _isMobileBrowser() || JitsiMeetJS.isWebRtcSupported();
|
||||||
|| Platform.OS === 'ios'
|
|
||||||
|| JitsiMeetJS.isWebRtcSupported();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,3 +96,13 @@ function _isCurrentBrowserInList(list) {
|
||||||
return checkFunction ? checkFunction.call(browser) : false;
|
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';
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue