Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(prejoin) cache media start options when on prejoin screen

Tudor-Ovidiu Avramf3765424417b
diff --git a/react/features/prejoin/middleware.js b/react/features/prejoin/middleware.js
index de3363c40f..611bea577a 100644
--- a/react/features/prejoin/middleware.js
+++ b/react/features/prejoin/middleware.js
@@ -1,11 +1,13 @@
// @flow
+import { SET_AUDIO_MUTED, SET_VIDEO_MUTED } from '../base/media';
import { MiddlewareRegistry } from '../base/redux';
import { updateSettings } from '../base/settings';
import { getLocalVideoTrack, replaceLocalTrack } from '../base/tracks';
import { PREJOIN_START_CONFERENCE } from './actionTypes';
import { setPrejoinPageVisibility } from './actions';
+import { isPrejoinPageVisible } from './functions';
declare var APP: Object;
@@ -38,8 +40,26 @@ MiddlewareRegistry.register(store => next => async action => {
break;
}
+
+ case SET_AUDIO_MUTED: {
+ if (isPrejoinPageVisible(store.getState())) {
+ store.dispatch(updateSettings({
+ startWithAudioMuted: Boolean(action.muted)
+ }));
+ }
+ break;
+ }
+
+ case SET_VIDEO_MUTED: {
+ if (isPrejoinPageVisible(store.getState())) {
+ store.dispatch(updateSettings({
+ startWithVideoMuted: Boolean(action.muted)
+ }));
+ }
+ break;
}
+ }
return next(action);
});