4d6f4b3ded
* Refactor: Make bundle using webpack * Fix: restore after install codes and a few settings * Fix: build script folder permission * Refactor: Remove support to async import on audio bridges * Upgrade npm using nvm * Avoid questions on npm ci execution * Let npm ci install dev dependencies (as we need the build tools here) * Fix: enconding * Fix: old lock files * Remove: bbb-config dependency to bbb-html5 service, bbb-html5 isn't a service anymore * Fix: TS errors * Fix: eslint * Fix: chat styles * npm install with "lockfileVersion": 3 (newer npm) * build: allow nodejs 22 * node 22; drop meteor from CI and bbb-conf * TEMP: use bbb-install without mongo but with node 22 and newer image * build: relax nodejs condition to not trip 22.6 * build: ensure dir /usr/share/bigbluebutton/nginx exists * init sites-available/bbb; drop disable-transparent- * nginx complaining of missing file and ; * TMP: print status of services * WIP: tweak nginx location to debug * Fix: webcam widgets alignments * akka-apps -- update location of settings.yml * build: add locales path for nginx * docs and config changes for removal of meteor * Fix: build encoding and locales enpoint folder path * build: set wss url for media * Add: Enable minimizer and modify to Terser * Fix: TS errors --------- Co-authored-by: Tiago Jacobs <tiago.jacobs@gmail.com> Co-authored-by: Anton Georgiev <anto.georgiev@gmail.com> Co-authored-by: Anton Georgiev <antobinary@users.noreply.github.com>
31 lines
959 B
JavaScript
Executable File
31 lines
959 B
JavaScript
Executable File
import Bowser from 'bowser';
|
|
|
|
export const userAgent = window.navigator.userAgent;
|
|
export const BOWSER_RESULTS = Bowser.parse(userAgent);
|
|
|
|
const isPhone = BOWSER_RESULTS.platform.type === 'mobile';
|
|
// we need a 'hack' to correctly detect ipads with ios > 13
|
|
export const isTablet = BOWSER_RESULTS.platform.type === 'tablet' || (BOWSER_RESULTS.os.name === 'macOS' && window.navigator.maxTouchPoints > 0);
|
|
export const isMobile = isPhone || isTablet;
|
|
export const hasMediaDevices = !!navigator.mediaDevices;
|
|
export const osName = BOWSER_RESULTS.os.name;
|
|
export const isIos = osName === 'iOS' || (isTablet && osName=="macOS");
|
|
export const isMacos = osName === 'macOS';
|
|
export const isIphone = !!(userAgent.match(/iPhone/i));
|
|
|
|
export const isPortrait = () => window.innerHeight > window.innerWidth;
|
|
|
|
const deviceInfo = {
|
|
isTablet,
|
|
isPhone,
|
|
isMobile,
|
|
hasMediaDevices,
|
|
osName,
|
|
isPortrait,
|
|
isIos,
|
|
isMacos,
|
|
isIphone,
|
|
};
|
|
|
|
export default deviceInfo;
|