feat(toolbox): restore emitting UI events for legacy code
This commit is contained in:
parent
f1123a8cdd
commit
cd57477b68
|
@ -14,6 +14,7 @@ import { MEDIA_TYPE, setAudioMuted } from '../../base/media';
|
||||||
import { AbstractAudioMuteButton } from '../../base/toolbox';
|
import { AbstractAudioMuteButton } from '../../base/toolbox';
|
||||||
import type { AbstractButtonProps } from '../../base/toolbox';
|
import type { AbstractButtonProps } from '../../base/toolbox';
|
||||||
import { isLocalTrackMuted } from '../../base/tracks';
|
import { isLocalTrackMuted } from '../../base/tracks';
|
||||||
|
import UIEvents from '../../../../service/UI/UIEvents';
|
||||||
|
|
||||||
declare var APP: Object;
|
declare var APP: Object;
|
||||||
|
|
||||||
|
@ -121,6 +122,11 @@ class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
|
||||||
_setAudioMuted(audioMuted: boolean) {
|
_setAudioMuted(audioMuted: boolean) {
|
||||||
sendAnalytics(createToolbarEvent(AUDIO_MUTE, { enable: audioMuted }));
|
sendAnalytics(createToolbarEvent(AUDIO_MUTE, { enable: audioMuted }));
|
||||||
this.props.dispatch(setAudioMuted(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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {
|
||||||
import { AbstractVideoMuteButton } from '../../base/toolbox';
|
import { AbstractVideoMuteButton } from '../../base/toolbox';
|
||||||
import type { AbstractButtonProps } from '../../base/toolbox';
|
import type { AbstractButtonProps } from '../../base/toolbox';
|
||||||
import { isLocalTrackMuted } from '../../base/tracks';
|
import { isLocalTrackMuted } from '../../base/tracks';
|
||||||
|
import UIEvents from '../../../../service/UI/UIEvents';
|
||||||
|
|
||||||
declare var APP: Object;
|
declare var APP: Object;
|
||||||
|
|
||||||
|
@ -146,6 +147,11 @@ class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
|
||||||
videoMuted,
|
videoMuted,
|
||||||
VIDEO_MUTISM_AUTHORITY.USER,
|
VIDEO_MUTISM_AUTHORITY.USER,
|
||||||
/* ensureTrack */ true));
|
/* 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue