feat(external_api): Add command for toggling localFlipX
This commit is contained in:
parent
1ad40de487
commit
a78ca5fcad
|
@ -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();
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue