diff --git a/modules/API/API.js b/modules/API/API.js index 8fad09830..cc27775c1 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -23,6 +23,7 @@ import { pinParticipant, kickParticipant } from '../../react/features/base/participants'; +import { updateSettings } from '../../react/features/base/settings'; import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks'; import { setPrivateMessageRecipient } from '../../react/features/chat/actions'; import { openChat } from '../../react/features/chat/actions.web'; @@ -177,6 +178,12 @@ function initCommands() { APP.store.dispatch(toggleCamera()); }, + 'toggle-camera-mirror': () => { + const state = APP.store.getState(); + const { localFlipX: currentFlipX } = state['features/base/settings']; + + APP.store.dispatch(updateSettings({ localFlipX: !currentFlipX })); + }, 'toggle-chat': () => { sendAnalytics(createApiEvent('chat.toggled')); APP.UI.toggleChat(); diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js index 37852b20e..244721e71 100644 --- a/modules/API/external/external_api.js +++ b/modules/API/external/external_api.js @@ -52,6 +52,7 @@ const commands = { submitFeedback: 'submit-feedback', toggleAudio: 'toggle-audio', toggleCamera: 'toggle-camera', + toggleCameraMirror: 'toggle-camera-mirror', toggleChat: 'toggle-chat', toggleFilmStrip: 'toggle-film-strip', toggleRaiseHand: 'toggle-raise-hand',