feat(external_api): Add command for toggling localFlipX
This commit is contained in:
parent
1ad40de487
commit
a78ca5fcad
|
@ -23,6 +23,7 @@ import {
|
||||||
pinParticipant,
|
pinParticipant,
|
||||||
kickParticipant
|
kickParticipant
|
||||||
} from '../../react/features/base/participants';
|
} from '../../react/features/base/participants';
|
||||||
|
import { updateSettings } from '../../react/features/base/settings';
|
||||||
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
|
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
|
||||||
import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
|
import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
|
||||||
import { openChat } from '../../react/features/chat/actions.web';
|
import { openChat } from '../../react/features/chat/actions.web';
|
||||||
|
@ -177,6 +178,12 @@ function initCommands() {
|
||||||
|
|
||||||
APP.store.dispatch(toggleCamera());
|
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': () => {
|
'toggle-chat': () => {
|
||||||
sendAnalytics(createApiEvent('chat.toggled'));
|
sendAnalytics(createApiEvent('chat.toggled'));
|
||||||
APP.UI.toggleChat();
|
APP.UI.toggleChat();
|
||||||
|
|
|
@ -52,6 +52,7 @@ const commands = {
|
||||||
submitFeedback: 'submit-feedback',
|
submitFeedback: 'submit-feedback',
|
||||||
toggleAudio: 'toggle-audio',
|
toggleAudio: 'toggle-audio',
|
||||||
toggleCamera: 'toggle-camera',
|
toggleCamera: 'toggle-camera',
|
||||||
|
toggleCameraMirror: 'toggle-camera-mirror',
|
||||||
toggleChat: 'toggle-chat',
|
toggleChat: 'toggle-chat',
|
||||||
toggleFilmStrip: 'toggle-film-strip',
|
toggleFilmStrip: 'toggle-film-strip',
|
||||||
toggleRaiseHand: 'toggle-raise-hand',
|
toggleRaiseHand: 'toggle-raise-hand',
|
||||||
|
|
Loading…
Reference in New Issue