diff --git a/react/features/toolbox/components/AudioMuteButton.js b/react/features/toolbox/components/AudioMuteButton.js index 9d4b1ad76..a1b8c6fd3 100644 --- a/react/features/toolbox/components/AudioMuteButton.js +++ b/react/features/toolbox/components/AudioMuteButton.js @@ -14,6 +14,7 @@ import { MEDIA_TYPE, setAudioMuted } from '../../base/media'; import { AbstractAudioMuteButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; import { isLocalTrackMuted } from '../../base/tracks'; +import UIEvents from '../../../../service/UI/UIEvents'; declare var APP: Object; @@ -121,6 +122,11 @@ class AudioMuteButton extends AbstractAudioMuteButton { _setAudioMuted(audioMuted: boolean) { sendAnalytics(createToolbarEvent(AUDIO_MUTE, { enable: audioMuted })); this.props.dispatch(setAudioMuted(audioMuted)); + + // FIXME: The old conference logic as well as the shared video feature + // still rely on this event being emitted. + typeof APP === 'undefined' + || APP.UI.emitEvent(UIEvents.AUDIO_MUTED, audioMuted, true); } } diff --git a/react/features/toolbox/components/VideoMuteButton.js b/react/features/toolbox/components/VideoMuteButton.js index 92f27c34a..e15370253 100644 --- a/react/features/toolbox/components/VideoMuteButton.js +++ b/react/features/toolbox/components/VideoMuteButton.js @@ -18,6 +18,7 @@ import { import { AbstractVideoMuteButton } from '../../base/toolbox'; import type { AbstractButtonProps } from '../../base/toolbox'; import { isLocalTrackMuted } from '../../base/tracks'; +import UIEvents from '../../../../service/UI/UIEvents'; declare var APP: Object; @@ -146,6 +147,11 @@ class VideoMuteButton extends AbstractVideoMuteButton { videoMuted, VIDEO_MUTISM_AUTHORITY.USER, /* ensureTrack */ true)); + + // FIXME: The old conference logic still relies on this event being + // emitted. + typeof APP === 'undefined' + || APP.UI.emitEvent(UIEvents.VIDEO_MUTED, videoMuted, true); } }