diff --git a/config.js b/config.js index b35db8e275c2..6445b4b2a9e2 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 ca91f30324cd..8f8351da4d0b 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 adebd8281c4a..9fc37c2319d3 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 cc442fcbcd29..3c9c5978b890 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 49ad77155bc9..61c4dfdcbcb7 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)); }; }