|
|
@@ -78,7 +78,10 @@ import {
|
|
78
|
78
|
setVideoAvailable,
|
|
79
|
79
|
setVideoMuted
|
|
80
|
80
|
} from './react/features/base/media';
|
|
81
|
|
-import { showNotification } from './react/features/notifications';
|
|
|
81
|
+import {
|
|
|
82
|
+ hideNotification,
|
|
|
83
|
+ showNotification
|
|
|
84
|
+} from './react/features/notifications';
|
|
82
|
85
|
import {
|
|
83
|
86
|
dominantSpeakerChanged,
|
|
84
|
87
|
getLocalParticipant,
|
|
|
@@ -1776,14 +1779,29 @@ export default {
|
|
1776
|
1779
|
APP.UI.setAudioLevel(id, newLvl);
|
|
1777
|
1780
|
});
|
|
1778
|
1781
|
|
|
1779
|
|
- room.on(JitsiConferenceEvents.TRACK_MUTE_CHANGED, (_, participantThatMutedUs) => {
|
|
|
1782
|
+ // we store the last start muted notification id that we showed,
|
|
|
1783
|
+ // so we can hide it when unmuted mic is detected
|
|
|
1784
|
+ let lastNotificationId;
|
|
|
1785
|
+
|
|
|
1786
|
+ room.on(JitsiConferenceEvents.TRACK_MUTE_CHANGED, (track, participantThatMutedUs) => {
|
|
1780
|
1787
|
if (participantThatMutedUs) {
|
|
1781
|
1788
|
APP.store.dispatch(participantMutedUs(participantThatMutedUs));
|
|
1782
|
1789
|
}
|
|
|
1790
|
+
|
|
|
1791
|
+ if (lastNotificationId && track.isAudioTrack() && track.isLocal() && !track.isMuted()) {
|
|
|
1792
|
+ APP.store.dispatch(hideNotification(lastNotificationId));
|
|
|
1793
|
+ lastNotificationId = undefined;
|
|
|
1794
|
+ }
|
|
1783
|
1795
|
});
|
|
1784
|
1796
|
|
|
1785
|
1797
|
room.on(JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
|
|
1786
|
|
- APP.UI.showToolbar(6000);
|
|
|
1798
|
+ const action = APP.store.dispatch(showNotification({
|
|
|
1799
|
+ titleKey: 'toolbar.talkWhileMutedPopup',
|
|
|
1800
|
+ customActionNameKey: 'notify.unmute',
|
|
|
1801
|
+ customActionHandler: muteLocalAudio.bind(this, false)
|
|
|
1802
|
+ }));
|
|
|
1803
|
+
|
|
|
1804
|
+ lastNotificationId = action.uid;
|
|
1787
|
1805
|
});
|
|
1788
|
1806
|
room.on(JitsiConferenceEvents.SUBJECT_CHANGED,
|
|
1789
|
1807
|
subject => APP.store.dispatch(conferenceSubjectChanged(subject)));
|