浏览代码

feat(external_api): Add command for toggling localFlipX

j8
Mihai-Andrei Uscat 4 年前
父节点
当前提交
a78ca5fcad
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 7
    0
      modules/API/API.js
  2. 1
    0
      modules/API/external/external_api.js

+ 7
- 0
modules/API/API.js 查看文件

23
     pinParticipant,
23
     pinParticipant,
24
     kickParticipant
24
     kickParticipant
25
 } from '../../react/features/base/participants';
25
 } from '../../react/features/base/participants';
26
+import { updateSettings } from '../../react/features/base/settings';
26
 import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
27
 import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
27
 import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
28
 import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
28
 import { openChat } from '../../react/features/chat/actions.web';
29
 import { openChat } from '../../react/features/chat/actions.web';
177
 
178
 
178
             APP.store.dispatch(toggleCamera());
179
             APP.store.dispatch(toggleCamera());
179
         },
180
         },
181
+        'toggle-camera-mirror': () => {
182
+            const state = APP.store.getState();
183
+            const { localFlipX: currentFlipX } = state['features/base/settings'];
184
+
185
+            APP.store.dispatch(updateSettings({ localFlipX: !currentFlipX }));
186
+        },
180
         'toggle-chat': () => {
187
         'toggle-chat': () => {
181
             sendAnalytics(createApiEvent('chat.toggled'));
188
             sendAnalytics(createApiEvent('chat.toggled'));
182
             APP.UI.toggleChat();
189
             APP.UI.toggleChat();

+ 1
- 0
modules/API/external/external_api.js 查看文件

52
     submitFeedback: 'submit-feedback',
52
     submitFeedback: 'submit-feedback',
53
     toggleAudio: 'toggle-audio',
53
     toggleAudio: 'toggle-audio',
54
     toggleCamera: 'toggle-camera',
54
     toggleCamera: 'toggle-camera',
55
+    toggleCameraMirror: 'toggle-camera-mirror',
55
     toggleChat: 'toggle-chat',
56
     toggleChat: 'toggle-chat',
56
     toggleFilmStrip: 'toggle-film-strip',
57
     toggleFilmStrip: 'toggle-film-strip',
57
     toggleRaiseHand: 'toggle-raise-hand',
58
     toggleRaiseHand: 'toggle-raise-hand',

正在加载...
取消
保存