浏览代码

feat(toolbox): restore emitting UI events for legacy code

j8
Saúl Ibarra Corretgé 7 年前
父节点
当前提交
cd57477b68

+ 6
- 0
react/features/toolbox/components/AudioMuteButton.js 查看文件

14
 import { AbstractAudioMuteButton } from '../../base/toolbox';
14
 import { AbstractAudioMuteButton } from '../../base/toolbox';
15
 import type { AbstractButtonProps } from '../../base/toolbox';
15
 import type { AbstractButtonProps } from '../../base/toolbox';
16
 import { isLocalTrackMuted } from '../../base/tracks';
16
 import { isLocalTrackMuted } from '../../base/tracks';
17
+import UIEvents from '../../../../service/UI/UIEvents';
17
 
18
 
18
 declare var APP: Object;
19
 declare var APP: Object;
19
 
20
 
121
     _setAudioMuted(audioMuted: boolean) {
122
     _setAudioMuted(audioMuted: boolean) {
122
         sendAnalytics(createToolbarEvent(AUDIO_MUTE, { enable: audioMuted }));
123
         sendAnalytics(createToolbarEvent(AUDIO_MUTE, { enable: audioMuted }));
123
         this.props.dispatch(setAudioMuted(audioMuted));
124
         this.props.dispatch(setAudioMuted(audioMuted));
125
+
126
+        // FIXME: The old conference logic as well as the shared video feature
127
+        // still rely on this event being emitted.
128
+        typeof APP === 'undefined'
129
+            || APP.UI.emitEvent(UIEvents.AUDIO_MUTED, audioMuted, true);
124
     }
130
     }
125
 }
131
 }
126
 
132
 

+ 6
- 0
react/features/toolbox/components/VideoMuteButton.js 查看文件

18
 import { AbstractVideoMuteButton } from '../../base/toolbox';
18
 import { AbstractVideoMuteButton } from '../../base/toolbox';
19
 import type { AbstractButtonProps } from '../../base/toolbox';
19
 import type { AbstractButtonProps } from '../../base/toolbox';
20
 import { isLocalTrackMuted } from '../../base/tracks';
20
 import { isLocalTrackMuted } from '../../base/tracks';
21
+import UIEvents from '../../../../service/UI/UIEvents';
21
 
22
 
22
 declare var APP: Object;
23
 declare var APP: Object;
23
 
24
 
146
                 videoMuted,
147
                 videoMuted,
147
                 VIDEO_MUTISM_AUTHORITY.USER,
148
                 VIDEO_MUTISM_AUTHORITY.USER,
148
                 /* ensureTrack */ true));
149
                 /* ensureTrack */ true));
150
+
151
+        // FIXME: The old conference logic still relies on this event being
152
+        // emitted.
153
+        typeof APP === 'undefined'
154
+            || APP.UI.emitEvent(UIEvents.VIDEO_MUTED, videoMuted, true);
149
     }
155
     }
150
 }
156
 }
151
 
157
 

正在加载...
取消
保存