2022-11-23 09:12:26 +00:00
|
|
|
import { browser } from '../base/lib-jitsi-meet';
|
2020-04-09 00:41:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
}
|
|
|
|
|
|
|
|
const match = navigator.userAgent.match(/(JitsiMeet)\s*\/\s*((\d+)\.[^\s]*)/);
|
|
|
|
|
|
|
|
if (!Array.isArray(match) || match.length < 3) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
const majorVersion = Number(match[3]);
|
|
|
|
|
2022-07-24 16:39:57 +00:00
|
|
|
if (isNaN(majorVersion) || majorVersion >= 2022) {
|
2020-04-09 00:41:32 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|