Adds back talk while muted notification. (#4392)
* Adds back talk while muted notification. * Adds unmute button to the notification.
This commit is contained in:
parent
1baa85b649
commit
681782ed20
|
@ -78,7 +78,10 @@ import {
|
||||||
setVideoAvailable,
|
setVideoAvailable,
|
||||||
setVideoMuted
|
setVideoMuted
|
||||||
} from './react/features/base/media';
|
} from './react/features/base/media';
|
||||||
import { showNotification } from './react/features/notifications';
|
import {
|
||||||
|
hideNotification,
|
||||||
|
showNotification
|
||||||
|
} from './react/features/notifications';
|
||||||
import {
|
import {
|
||||||
dominantSpeakerChanged,
|
dominantSpeakerChanged,
|
||||||
getLocalParticipant,
|
getLocalParticipant,
|
||||||
|
@ -1776,14 +1779,29 @@ export default {
|
||||||
APP.UI.setAudioLevel(id, newLvl);
|
APP.UI.setAudioLevel(id, newLvl);
|
||||||
});
|
});
|
||||||
|
|
||||||
room.on(JitsiConferenceEvents.TRACK_MUTE_CHANGED, (_, participantThatMutedUs) => {
|
// we store the last start muted notification id that we showed,
|
||||||
|
// so we can hide it when unmuted mic is detected
|
||||||
|
let lastNotificationId;
|
||||||
|
|
||||||
|
room.on(JitsiConferenceEvents.TRACK_MUTE_CHANGED, (track, participantThatMutedUs) => {
|
||||||
if (participantThatMutedUs) {
|
if (participantThatMutedUs) {
|
||||||
APP.store.dispatch(participantMutedUs(participantThatMutedUs));
|
APP.store.dispatch(participantMutedUs(participantThatMutedUs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastNotificationId && track.isAudioTrack() && track.isLocal() && !track.isMuted()) {
|
||||||
|
APP.store.dispatch(hideNotification(lastNotificationId));
|
||||||
|
lastNotificationId = undefined;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
room.on(JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
|
room.on(JitsiConferenceEvents.TALK_WHILE_MUTED, () => {
|
||||||
APP.UI.showToolbar(6000);
|
const action = APP.store.dispatch(showNotification({
|
||||||
|
titleKey: 'toolbar.talkWhileMutedPopup',
|
||||||
|
customActionNameKey: 'notify.unmute',
|
||||||
|
customActionHandler: muteLocalAudio.bind(this, false)
|
||||||
|
}));
|
||||||
|
|
||||||
|
lastNotificationId = action.uid;
|
||||||
});
|
});
|
||||||
room.on(JitsiConferenceEvents.SUBJECT_CHANGED,
|
room.on(JitsiConferenceEvents.SUBJECT_CHANGED,
|
||||||
subject => APP.store.dispatch(conferenceSubjectChanged(subject)));
|
subject => APP.store.dispatch(conferenceSubjectChanged(subject)));
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"startSilentDescription": "Rejoin the meeting to enable audio",
|
"startSilentDescription": "Rejoin the meeting to enable audio",
|
||||||
"suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>.",
|
"suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>.",
|
||||||
"suboptimalExperienceTitle": "Browser Warning",
|
"suboptimalExperienceTitle": "Browser Warning",
|
||||||
|
"unmute": "Unmute",
|
||||||
"newDeviceCameraTitle": "New camera detected",
|
"newDeviceCameraTitle": "New camera detected",
|
||||||
"newDeviceAudioTitle": "New audio device detected",
|
"newDeviceAudioTitle": "New audio device detected",
|
||||||
"newDeviceAction": "Use"
|
"newDeviceAction": "Use"
|
||||||
|
|
Loading…
Reference in New Issue