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
settings: fix loading disableCallIntegration
Saúl Ibarra Corretgé3cd7f0b77d61
diff --git a/react/features/base/settings/middleware.js b/react/features/base/settings/middleware.jsindex eef08431a1..dd2637bcb5 100644--- a/react/features/base/settings/middleware.js+++ b/react/features/base/settings/middleware.js@@ -1,5 +1,6 @@// @flow+import { APP_WILL_MOUNT } from '../app';import { setAudioOnly } from '../audio-only';import { getLocalParticipant, participantUpdated } from '../participants';import { MiddlewareRegistry } from '../redux';@@ -19,15 +20,34 @@ MiddlewareRegistry.register(store => next => action => {const result = next(action);switch (action.type) {+ case APP_WILL_MOUNT:+ _initializeCallIntegration(store);+ break;case SETTINGS_UPDATED:_maybeHandleCallIntegrationChange(action);_maybeSetAudioOnly(store, action);_updateLocalParticipant(store, action);+ break;}return result;});+/**+ * Initializes the audio device handler based on the `disableCallIntegration` setting.+ *+ * @param {Store} store - The redux store.+ * @private+ * @returns {void}+ */+function _initializeCallIntegration({ getState }) {+ const { disableCallIntegration } = getState()['features/base/settings'];++ if (typeof disableCallIntegration === 'boolean') {+ handleCallIntegrationChange(disableCallIntegration);+ }+}+/*** Maps the settings field names to participant names where they don't match.* Currently there is only one such field, but may be extended in the future.@@ -46,7 +66,7 @@ function _mapSettingsFieldToParticipant(settingsField) {}/**- * Updates {@code startAudioOnly} flag if it's updated in the settings.+ * Handles a change in the `disableCallIntegration` setting.** @param {Object} action - The redux action.* @private