Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/old-client-notification/functions.ts

27 lines
708 B

import { browser } from '../base/lib-jitsi-meet';
/**
* Returns true if Jitsi Meet is running in too old jitsi-meet-electron app and false otherwise.
*
* @returns {boolean} - True if Jitsi Meet is running in too old jitsi-meet-electron app and false otherwise.
*/
export function isOldJitsiMeetElectronApp() {
if (!browser.isElectron()) {
return false;
}
// @ts-ignore
const match = navigator.userAgent.match(/(JitsiMeet)\s*\/\s*((\d+)\.[^\s]*)/);
if (!Array.isArray(match) || match.length < 3) {
return false;
}
const majorVersion = Number(match[3]);
if (isNaN(majorVersion) || majorVersion >= 2022) {
return false;
}
return true;
}