Skip to content

Commit

Permalink
fix(recordings) increase duration for recording prompt notification (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mihhu authored Feb 19, 2025
1 parent 67d9a98 commit 9186a74
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ var config = {
// short: 2500,
// medium: 5000,
// long: 10000,
// extraLong: 60000,
// },

// // Options for the recording limit notification.
Expand Down
1 change: 1 addition & 0 deletions react/features/base/config/configType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export interface IConfig {
noiseSuppression?: INoiseSuppressionConfig;
noticeMessage?: string;
notificationTimeouts?: {
extraLong?: number;
long?: number;
medium?: number;
short?: number;
Expand Down
9 changes: 4 additions & 5 deletions react/features/notifications/actions.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions react/features/notifications/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ export const NOTIFICATION_TIMEOUT = {
SHORT: 2500,
MEDIUM: 5000,
LONG: 10000,
EXTRA_LONG: 60000,
STICKY: false
};

/**
* Notification timeout type.
*/
export enum NOTIFICATION_TIMEOUT_TYPE {
EXTRA_LONG = 'extra_long',
LONG = 'long',
MEDIUM = 'medium',
SHORT = 'short',
Expand Down
2 changes: 1 addition & 1 deletion react/features/recording/actions.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};
}

0 comments on commit 9186a74

Please sign in to comment.