|
|
@@ -7,8 +7,8 @@ import {
|
|
7
|
7
|
sendAnalytics
|
|
8
|
8
|
} from '../../analytics';
|
|
9
|
9
|
import { SET_ROOM, setAudioOnly } from '../conference';
|
|
10
|
|
-import { parseURLParams } from '../config';
|
|
11
|
10
|
import JitsiMeetJS from '../lib-jitsi-meet';
|
|
|
11
|
+import { getPropertyValue } from '../profile';
|
|
12
|
12
|
import { MiddlewareRegistry } from '../redux';
|
|
13
|
13
|
import { setTrackMuted, TRACK_ADDED } from '../tracks';
|
|
14
|
14
|
|
|
|
@@ -60,34 +60,13 @@ function _setRoom({ dispatch, getState }, next, action) {
|
|
60
|
60
|
// Read the config.
|
|
61
|
61
|
|
|
62
|
62
|
const state = getState();
|
|
63
|
|
- let urlParams;
|
|
64
|
|
- let audioMuted;
|
|
65
|
|
- let videoMuted;
|
|
66
|
63
|
|
|
67
|
|
- if (room) {
|
|
68
|
|
- // The Jitsi Meet client may override the Jitsi Meet deployment in the
|
|
69
|
|
- // (location) URL on the subject of the following:
|
|
70
|
|
- // - startAudioOnly
|
|
71
|
|
- // - startWithAudioMuted
|
|
72
|
|
- // - startWithVideoMuted
|
|
73
|
|
- urlParams
|
|
74
|
|
- = parseURLParams(state['features/base/connection'].locationURL);
|
|
75
|
|
-
|
|
76
|
|
- audioMuted = urlParams['config.startWithAudioMuted'];
|
|
77
|
|
- videoMuted = urlParams['config.startWithVideoMuted'];
|
|
78
|
|
- }
|
|
79
|
|
-
|
|
80
|
|
- // Of course, the Jitsi Meet deployment defines config.js which should be
|
|
81
|
|
- // respected if the client did not override it.
|
|
82
|
|
- const config = state['features/base/config'];
|
|
83
|
|
-
|
|
84
|
|
- typeof audioMuted === 'undefined'
|
|
85
|
|
- && (audioMuted = config.startWithAudioMuted);
|
|
86
|
|
- typeof videoMuted === 'undefined'
|
|
87
|
|
- && (videoMuted = config.startWithVideoMuted);
|
|
88
|
|
-
|
|
89
|
|
- audioMuted = Boolean(audioMuted);
|
|
90
|
|
- videoMuted = Boolean(videoMuted);
|
|
|
64
|
+ const audioMuted = Boolean(getPropertyValue(state, 'startWithAudioMuted', {
|
|
|
65
|
+ ignoreUrlParams: !room
|
|
|
66
|
+ }));
|
|
|
67
|
+ const videoMuted = Boolean(getPropertyValue(state, 'startWithVideoMuted', {
|
|
|
68
|
+ ignoreUrlParams: !room
|
|
|
69
|
+ }));
|
|
91
|
70
|
|
|
92
|
71
|
sendAnalytics(createStartMutedConfigurationEvent(
|
|
93
|
72
|
'local', audioMuted, videoMuted));
|
|
|
@@ -113,10 +92,7 @@ function _setRoom({ dispatch, getState }, next, action) {
|
|
113
|
92
|
let audioOnly;
|
|
114
|
93
|
|
|
115
|
94
|
if (JitsiMeetJS.mediaDevices.supportsVideo()) {
|
|
116
|
|
- audioOnly = urlParams && urlParams['config.startAudioOnly'];
|
|
117
|
|
- typeof audioOnly === 'undefined'
|
|
118
|
|
- && (audioOnly = config.startAudioOnly);
|
|
119
|
|
- audioOnly = Boolean(audioOnly);
|
|
|
95
|
+ audioOnly = Boolean(getPropertyValue(state, 'startAudioOnly'));
|
|
120
|
96
|
} else {
|
|
121
|
97
|
// Always default to being audio only if the current environment
|
|
122
|
98
|
// does not support sending or receiving video.
|