snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
31
react/features/base/environment/utils.any.ts
Normal file
31
react/features/base/environment/utils.any.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import Platform from '../react/Platform';
|
||||
|
||||
/**
|
||||
* Returns whether or not the current environment is a mobile device.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isMobileBrowser() {
|
||||
return Platform.OS === 'android' || Platform.OS === 'ios';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether or not the current environment is an ios mobile device.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isIosMobileBrowser() {
|
||||
return Platform.OS === 'ios';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the current environment is an ipad device.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isIpadMobileBrowser() {
|
||||
|
||||
// @ts-ignore
|
||||
return isIosMobileBrowser() && Platform.isPad;
|
||||
}
|
||||
Reference in New Issue
Block a user