Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(recordings) increase duration for recording prompt notification (#15632)

Mihaela Dumitru9186a74ae3d4
diff --git a/config.js b/config.js
index b35db8e275..6445b4b2a9 100644
--- a/config.js
+++ b/config.js
@@ -600,6 +600,7 @@ var config = {
// short: 2500,
// medium: 5000,
// long: 10000,
+ // extraLong: 60000,
// },
// // Options for the recording limit notification.
diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.ts
index ca91f30324..8f8351da4d 100644
--- a/react/features/base/config/configType.ts
+++ b/react/features/base/config/configType.ts
@@ -480,6 +480,7 @@ export interface IConfig {
noiseSuppression?: INoiseSuppressionConfig;
noticeMessage?: string;
notificationTimeouts?: {
+ extraLong?: number;
long?: number;
medium?: number;
short?: number;
diff --git a/react/features/notifications/actions.ts b/react/features/notifications/actions.ts
index adebd8281c..9fc37c2319 100644
--- a/react/features/notifications/actions.ts
+++ b/react/features/notifications/actions.ts
@@ -1,6 +1,7 @@
import { throttle } from 'lodash-es';
import { IStore } from '../app/types';
+import { IConfig } from '../base/config/configType';
import { NOTIFICATIONS_ENABLED } from '../base/flags/constants';
import { getFeatureFlag } from '../base/flags/functions';
import { getParticipantCount } from '../base/participants/functions';
@@ -28,17 +29,15 @@ import { INotificationProps } from './types';
* @param {Object} notificationTimeouts - Config notification timeouts.
* @returns {number}
*/
-function getNotificationTimeout(type?: string, notificationTimeouts?: {
- long?: number;
- medium?: number;
- short?: number;
-}) {
+function getNotificationTimeout(type?: string, notificationTimeouts?: IConfig['notificationTimeouts']) {
if (type === NOTIFICATION_TIMEOUT_TYPE.SHORT) {
return notificationTimeouts?.short ?? NOTIFICATION_TIMEOUT.SHORT;
} else if (type === NOTIFICATION_TIMEOUT_TYPE.MEDIUM) {
return notificationTimeouts?.medium ?? NOTIFICATION_TIMEOUT.MEDIUM;
} else if (type === NOTIFICATION_TIMEOUT_TYPE.LONG) {
return notificationTimeouts?.long ?? NOTIFICATION_TIMEOUT.LONG;
+ } else if (type === NOTIFICATION_TIMEOUT_TYPE.EXTRA_LONG) {
+ return notificationTimeouts?.extraLong ?? NOTIFICATION_TIMEOUT.EXTRA_LONG;
}
return NOTIFICATION_TIMEOUT.STICKY;
diff --git a/react/features/notifications/constants.ts b/react/features/notifications/constants.ts
index cc442fcbcd..3c9c5978b8 100644
--- a/react/features/notifications/constants.ts
+++ b/react/features/notifications/constants.ts
@@ -5,6 +5,7 @@ export const NOTIFICATION_TIMEOUT = {
SHORT: 2500,
MEDIUM: 5000,
LONG: 10000,
+ EXTRA_LONG: 60000,
STICKY: false
};
@@ -12,6 +13,7 @@ export const NOTIFICATION_TIMEOUT = {
* Notification timeout type.
*/
export enum NOTIFICATION_TIMEOUT_TYPE {
+ EXTRA_LONG = 'extra_long',
LONG = 'long',
MEDIUM = 'medium',
SHORT = 'short',
diff --git a/react/features/recording/actions.any.ts b/react/features/recording/actions.any.ts
index 49ad77155b..61c4dfdcbc 100644
--- a/react/features/recording/actions.any.ts
+++ b/react/features/recording/actions.any.ts
@@ -468,6 +468,6 @@ export function showStartRecordingNotificationWithCallback(openRecordingDialog:
dispatch(hideNotification(START_RECORDING_NOTIFICATION_ID));
} ],
appearance: NOTIFICATION_TYPE.NORMAL
- }, NOTIFICATION_TIMEOUT_TYPE.LONG));
+ }, NOTIFICATION_TIMEOUT_TYPE.EXTRA_LONG));
};
}