Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(config): Add config option to allow unsetting local video flip
Vlad Piersec7fce18108042
diff --git a/config.js b/config.jsindex eb0deb832c..280d7f5028 100644--- a/config.js+++ b/config.js@@ -618,6 +618,10 @@ var config = {// the menu has option to flip the locally seen video for local presentations// disableLocalVideoFlip: false,+ // A property used to unset the default flip state of the local video.+ // When it is set to 'true', the local(self) video will not be mirrored anymore.+ // doNotFlipLocalVideo: false,+// Mainly privacy related settings// Disables all invite functions from the app (share, invite, dial out...etc)diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.jsindex 5be339ca8e..1eae5fee8e 100644--- a/react/features/base/config/configWhitelist.js+++ b/react/features/base/config/configWhitelist.js@@ -97,6 +97,7 @@ export default ['disableTileView','displayJids','doNotStoreRoom',+ 'doNotFlipLocalVideo','dropbox','e2eping','enableDisplayNameInStats',diff --git a/react/features/base/config/middleware.js b/react/features/base/config/middleware.jsindex 96357dfaa4..a512def0c7 100644--- a/react/features/base/config/middleware.js+++ b/react/features/base/config/middleware.js@@ -6,9 +6,10 @@ import { APP_WILL_MOUNT } from '../app';import { getFeatureFlag } from '../flags/functions';import { addKnownDomains } from '../known-domains';import { MiddlewareRegistry } from '../redux';+import { updateSettings } from '../settings';import { parseURIString } from '../util';-import { SET_CONFIG } from './actionTypes';+import { SET_CONFIG, OVERWRITE_CONFIG } from './actionTypes';import { updateConfig } from './actions';import { _CONFIG_STORE_PREFIX } from './constants';@@ -26,6 +27,9 @@ MiddlewareRegistry.register(store => next => action => {case SET_CONFIG:return _setConfig(store, next, action);++ case OVERWRITE_CONFIG:+ return _updateSettings(store, next, action);}return next(action);@@ -115,6 +119,12 @@ function _setConfig({ dispatch, getState }, next, action) {config.resolution = resolutionFlag;}+ if (action.config.doNotFlipLocalVideo === true) {+ dispatch(updateSettings({+ localFlipX: false+ }));+ }+dispatch(updateConfig(config));// FIXME On Web we rely on the global 'config' variable which gets altered@@ -128,3 +138,27 @@ function _setConfig({ dispatch, getState }, next, action) {return result;}++/**+ * Updates settings based on some config values.+ *+ * @param {Store} store - The redux store in which the specified {@code action}+ * is being dispatched.+ * @param {Dispatch} next - The redux {@code dispatch} function to dispatch the+ * specified {@code action} in the specified {@code store}.+ * @param {Action} action - The redux action which is being {@code dispatch}ed+ * in the specified {@code store}.+ * @private+ * @returns {*} The return value of {@code next(action)}.+ */+function _updateSettings({ dispatch }, next, action) {+ const { config: { doNotFlipLocalVideo } } = action;++ if (doNotFlipLocalVideo === true) {+ dispatch(updateSettings({+ localFlipX: false+ }));+ }++ return next(action);+}