feat(external_api) allow notifications to be configured

This commit is contained in:
Tudor-Ovidiu Avram
2021-01-11 12:52:52 +02:00
parent 6f5534fcb6
commit d91c546a1e
9 changed files with 111 additions and 48 deletions

View File

@@ -40,20 +40,20 @@ MiddlewareRegistry.register(store => next => action => {
}
});
conference.on(
JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
const notification = showNotification({
JitsiConferenceEvents.TALK_WHILE_MUTED, async () => {
const notification = await dispatch(showNotification({
titleKey: 'toolbar.talkWhileMutedPopup',
customActionNameKey: 'notify.unmute',
customActionHandler: () => dispatch(setAudioMuted(false))
});
dispatch(notification);
}));
dispatch(playSound(TALK_WHILE_MUTED_SOUND_ID));
// we store the last start muted notification id that we showed,
// so we can hide it when unmuted mic is detected
dispatch(setCurrentNotificationUid(notification.uid));
if (notification) {
// we store the last start muted notification id that we showed,
// so we can hide it when unmuted mic is detected
dispatch(setCurrentNotificationUid(notification.uid));
}
});
break;
}