2022-10-20 12:11:27 +03:00
|
|
|
import { IReduxState } from '../../app/types';
|
2023-04-18 13:55:31 -04:00
|
|
|
import JitsiMeetJS from '../../base/lib-jitsi-meet';
|
2023-07-20 13:25:40 +03:00
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
IConfig,
|
|
|
|
|
IDeeplinkingConfig,
|
2024-01-21 21:02:16 +01:00
|
|
|
IDeeplinkingDesktopConfig,
|
2024-03-08 09:59:02 -06:00
|
|
|
IDeeplinkingMobileConfig
|
2023-07-20 13:25:40 +03:00
|
|
|
} from './configType';
|
2021-03-10 17:39:35 +02:00
|
|
|
|
2019-04-30 12:24:12 +02:00
|
|
|
export * from './functions.any';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Removes all analytics related options from the given configuration, in case of a libre build.
|
|
|
|
|
*
|
2022-12-20 19:03:57 +02:00
|
|
|
* @param {*} _config - The configuration which needs to be cleaned up.
|
2019-04-30 12:24:12 +02:00
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2022-12-20 19:03:57 +02:00
|
|
|
export function _cleanupConfig(_config: IConfig) {
|
|
|
|
|
return;
|
2019-04-30 12:24:12 +02:00
|
|
|
}
|
2020-05-14 15:30:24 +03:00
|
|
|
|
2021-06-16 14:08:18 +03:00
|
|
|
/**
|
|
|
|
|
* Returns the replaceParticipant config.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The state of the app.
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
*/
|
2022-10-20 12:11:27 +03:00
|
|
|
export function getReplaceParticipant(state: IReduxState): string | undefined {
|
2021-06-16 14:08:18 +03:00
|
|
|
return state['features/base/config'].replaceParticipant;
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-17 10:24:29 +02:00
|
|
|
/**
|
|
|
|
|
* Returns the configuration value of web-hid feature.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The state of the app.
|
|
|
|
|
* @returns {boolean} True if web-hid feature should be enabled, otherwise false.
|
|
|
|
|
*/
|
|
|
|
|
export function getWebHIDFeatureConfig(state: IReduxState): boolean {
|
|
|
|
|
return state['features/base/config'].enableWebHIDFeature || false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-11 11:08:36 -05:00
|
|
|
/**
|
|
|
|
|
* Returns whether audio level measurement is enabled or not.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The state of the app.
|
|
|
|
|
* @returns {boolean}
|
|
|
|
|
*/
|
2022-10-20 12:11:27 +03:00
|
|
|
export function areAudioLevelsEnabled(state: IReduxState): boolean {
|
2023-04-18 13:55:31 -04:00
|
|
|
return !state['features/base/config'].disableAudioLevels && JitsiMeetJS.isCollectingLocalStats();
|
2022-01-11 11:08:36 -05:00
|
|
|
}
|
2022-12-20 19:03:57 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets the defaults for deeplinking.
|
|
|
|
|
*
|
|
|
|
|
* @param {IDeeplinkingConfig} deeplinking - The deeplinking config.
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
|
|
|
|
export function _setDeeplinkingDefaults(deeplinking: IDeeplinkingConfig) {
|
2024-01-28 13:26:16 +01:00
|
|
|
deeplinking.desktop = deeplinking.desktop || {} as IDeeplinkingDesktopConfig;
|
|
|
|
|
deeplinking.android = deeplinking.android || {} as IDeeplinkingMobileConfig;
|
|
|
|
|
deeplinking.ios = deeplinking.ios || {} as IDeeplinkingMobileConfig;
|
|
|
|
|
|
|
|
|
|
const { android, desktop, ios } = deeplinking;
|
2022-12-20 19:03:57 +02:00
|
|
|
|
|
|
|
|
desktop.appName = desktop.appName || 'Jitsi Meet';
|
2024-01-21 21:02:16 +01:00
|
|
|
desktop.appScheme = desktop.appScheme || 'jitsi-meet';
|
2024-01-26 22:04:44 +01:00
|
|
|
desktop.download = desktop.download || {};
|
|
|
|
|
desktop.download.windows = desktop.download.windows
|
|
|
|
|
|| 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.exe';
|
|
|
|
|
desktop.download.macos = desktop.download.macos
|
|
|
|
|
|| 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet.dmg';
|
|
|
|
|
desktop.download.linux = desktop.download.linux
|
|
|
|
|
|| 'https://github.com/jitsi/jitsi-meet-electron/releases/latest/download/jitsi-meet-x86_64.AppImage';
|
2022-12-20 19:03:57 +02:00
|
|
|
|
|
|
|
|
ios.appName = ios.appName || 'Jitsi Meet';
|
|
|
|
|
ios.appScheme = ios.appScheme || 'org.jitsi.meet';
|
|
|
|
|
ios.downloadLink = ios.downloadLink
|
|
|
|
|
|| 'https://itunes.apple.com/us/app/jitsi-meet/id1165103905';
|
|
|
|
|
|
|
|
|
|
android.appName = android.appName || 'Jitsi Meet';
|
|
|
|
|
android.appScheme = android.appScheme || 'org.jitsi.meet';
|
|
|
|
|
android.downloadLink = android.downloadLink
|
|
|
|
|
|| 'https://play.google.com/store/apps/details?id=org.jitsi.meet';
|
|
|
|
|
android.appPackage = android.appPackage || 'org.jitsi.meet';
|
2025-01-09 10:18:22 -06:00
|
|
|
android.fDroidUrl = android.fDroidUrl || 'https://f-droid.org/packages/org.jitsi.meet/';
|
2022-12-20 19:03:57 +02:00
|
|
|
}
|