|
@@ -1,11 +1,13 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
|
3
|
+import { SET_AUDIO_MUTED, SET_VIDEO_MUTED } from '../base/media';
|
3
|
4
|
import { MiddlewareRegistry } from '../base/redux';
|
4
|
5
|
import { updateSettings } from '../base/settings';
|
5
|
6
|
import { getLocalVideoTrack, replaceLocalTrack } from '../base/tracks';
|
6
|
7
|
|
7
|
8
|
import { PREJOIN_START_CONFERENCE } from './actionTypes';
|
8
|
9
|
import { setPrejoinPageVisibility } from './actions';
|
|
10
|
+import { isPrejoinPageVisible } from './functions';
|
9
|
11
|
|
10
|
12
|
declare var APP: Object;
|
11
|
13
|
|
|
@@ -38,8 +40,26 @@ MiddlewareRegistry.register(store => next => async action => {
|
38
|
40
|
|
39
|
41
|
break;
|
40
|
42
|
}
|
|
43
|
+
|
|
44
|
+ case SET_AUDIO_MUTED: {
|
|
45
|
+ if (isPrejoinPageVisible(store.getState())) {
|
|
46
|
+ store.dispatch(updateSettings({
|
|
47
|
+ startWithAudioMuted: Boolean(action.muted)
|
|
48
|
+ }));
|
|
49
|
+ }
|
|
50
|
+ break;
|
|
51
|
+ }
|
|
52
|
+
|
|
53
|
+ case SET_VIDEO_MUTED: {
|
|
54
|
+ if (isPrejoinPageVisible(store.getState())) {
|
|
55
|
+ store.dispatch(updateSettings({
|
|
56
|
+ startWithVideoMuted: Boolean(action.muted)
|
|
57
|
+ }));
|
|
58
|
+ }
|
|
59
|
+ break;
|
41
|
60
|
}
|
42
|
61
|
|
|
62
|
+ }
|
43
|
63
|
|
44
|
64
|
return next(action);
|
45
|
65
|
});
|