|
|
|
|
@ -20,6 +20,7 @@ import { MiddlewareRegistry } from '../redux'; |
|
|
|
|
import { getPropertyValue } from '../settings'; |
|
|
|
|
import { |
|
|
|
|
destroyLocalTracks, |
|
|
|
|
isLocalTrackMuted, |
|
|
|
|
isLocalVideoTrackDesktop, |
|
|
|
|
setTrackMuted, |
|
|
|
|
TRACK_ADDED |
|
|
|
|
@ -85,8 +86,11 @@ MiddlewareRegistry.register(store => next => action => { |
|
|
|
|
|
|
|
|
|
case SET_AUDIO_UNMUTE_PERMISSIONS: { |
|
|
|
|
const { blocked } = action; |
|
|
|
|
const state = store.getState(); |
|
|
|
|
const tracks = state['features/base/tracks']; |
|
|
|
|
const isAudioMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO); |
|
|
|
|
|
|
|
|
|
if (blocked) { |
|
|
|
|
if (blocked && isAudioMuted) { |
|
|
|
|
store.dispatch(showWarningNotification({ |
|
|
|
|
descriptionKey: 'notify.audioUnmuteBlockedDescription', |
|
|
|
|
titleKey: 'notify.audioUnmuteBlockedTitle' |
|
|
|
|
@ -107,8 +111,11 @@ MiddlewareRegistry.register(store => next => action => { |
|
|
|
|
|
|
|
|
|
case SET_VIDEO_UNMUTE_PERMISSIONS: { |
|
|
|
|
const { blocked } = action; |
|
|
|
|
const state = store.getState(); |
|
|
|
|
const tracks = state['features/base/tracks']; |
|
|
|
|
const isVideoMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO); |
|
|
|
|
|
|
|
|
|
if (blocked) { |
|
|
|
|
if (blocked && isVideoMuted) { |
|
|
|
|
store.dispatch(showWarningNotification({ |
|
|
|
|
descriptionKey: 'notify.videoUnmuteBlockedDescription', |
|
|
|
|
titleKey: 'notify.videoUnmuteBlockedTitle' |
|
|
|
|
|