fix(notifications) Add timeout for video/audio lost notifs

update-ljm-1629819799 jitsi-meet_6223
hmuresan 4 years ago committed by Horatiu Muresan
parent 5bc424459f
commit 8b23265a50
  1. 5
      react/features/base/devices/middleware.js
  2. 6
      react/features/notifications/actions.js

@ -50,6 +50,7 @@ const JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP = {
}
};
const WARNING_DISPLAY_TIMER = 4000;
/**
* A listener for device permissions changed reported from lib-jitsi-meet.
@ -133,7 +134,7 @@ MiddlewareRegistry.register(store => next => action => {
description: additionalCameraErrorMsg,
descriptionKey: cameraErrorMsg,
titleKey
}));
}, WARNING_DISPLAY_TIMER));
if (isPrejoinPageVisible(store.getState())) {
store.dispatch(setDeviceStatusWarning(titleKey));
@ -162,7 +163,7 @@ MiddlewareRegistry.register(store => next => action => {
description: additionalMicErrorMsg,
descriptionKey: micErrorMsg,
titleKey
}));
}, WARNING_DISPLAY_TIMER));
if (isPrejoinPageVisible(store.getState())) {
store.dispatch(setDeviceStatusWarning(titleKey));

@ -105,13 +105,15 @@ export function showNotification(props: Object = {}, timeout: ?number) {
* Queues a warning notification for display.
*
* @param {Object} props - The props needed to show the notification component.
* @param {number} timeout - How long the notification should display before
* automatically being hidden.
* @returns {Object}
*/
export function showWarningNotification(props: Object) {
export function showWarningNotification(props: Object, timeout: ?number) {
return showNotification({
...props,
appearance: NOTIFICATION_TYPE.WARNING
});
}, timeout);
}
/**

Loading…
Cancel
Save