浏览代码

prejoin: fixup mobile

Avoid importing components, which are not yet implemented on mobile.
master
Saúl Ibarra Corretgé 5 年前
父节点
当前提交
01fc098d4b

+ 12
- 12
react/features/prejoin/functions.js 查看文件

93
  * @returns {Object}
93
  * @returns {Object}
94
  */
94
  */
95
 export function getAudioTrack(state: Object): Object {
95
 export function getAudioTrack(state: Object): Object {
96
-    return state['features/prejoin'].audioTrack;
96
+    return state['features/prejoin']?.audioTrack;
97
 }
97
 }
98
 
98
 
99
 /**
99
 /**
103
  * @returns {Object}
103
  * @returns {Object}
104
  */
104
  */
105
 export function getContentSharingTrack(state: Object): Object {
105
 export function getContentSharingTrack(state: Object): Object {
106
-    return state['features/prejoin'].contentSharingTrack;
106
+    return state['features/prejoin']?.contentSharingTrack;
107
 }
107
 }
108
 
108
 
109
 /**
109
 /**
113
  * @returns {string}
113
  * @returns {string}
114
  */
114
  */
115
 export function getDeviceStatusText(state: Object): string {
115
 export function getDeviceStatusText(state: Object): string {
116
-    return state['features/prejoin'].deviceStatusText;
116
+    return state['features/prejoin']?.deviceStatusText;
117
 }
117
 }
118
 
118
 
119
 /**
119
 /**
123
  * @returns {string}
123
  * @returns {string}
124
  */
124
  */
125
 export function getDeviceStatusType(state: Object): string {
125
 export function getDeviceStatusType(state: Object): string {
126
-    return state['features/prejoin'].deviceStatusType;
126
+    return state['features/prejoin']?.deviceStatusType;
127
 }
127
 }
128
 
128
 
129
 /**
129
 /**
133
  * @returns {Object}
133
  * @returns {Object}
134
  */
134
  */
135
 export function getVideoTrack(state: Object): Object {
135
 export function getVideoTrack(state: Object): Object {
136
-    return state['features/prejoin'].videoTrack;
136
+    return state['features/prejoin']?.videoTrack;
137
 }
137
 }
138
 
138
 
139
 /**
139
 /**
143
  * @returns {boolean}
143
  * @returns {boolean}
144
  */
144
  */
145
 export function isPrejoinAudioMuted(state: Object): boolean {
145
 export function isPrejoinAudioMuted(state: Object): boolean {
146
-    return state['features/prejoin'].audioMuted;
146
+    return state['features/prejoin']?.audioMuted;
147
 }
147
 }
148
 
148
 
149
 /**
149
 /**
153
  * @returns {boolean}
153
  * @returns {boolean}
154
  */
154
  */
155
 export function isPrejoinVideoMuted(state: Object): boolean {
155
 export function isPrejoinVideoMuted(state: Object): boolean {
156
-    return state['features/prejoin'].videoMuted;
156
+    return state['features/prejoin']?.videoMuted;
157
 }
157
 }
158
 
158
 
159
 /**
159
 /**
163
  * @returns {string}
163
  * @returns {string}
164
  */
164
  */
165
 export function getRawError(state: Object): string {
165
 export function getRawError(state: Object): string {
166
-    return state['features/prejoin'].rawError;
166
+    return state['features/prejoin']?.rawError;
167
 }
167
 }
168
 
168
 
169
 /**
169
 /**
173
  * @returns {boolean}
173
  * @returns {boolean}
174
  */
174
  */
175
 export function isAudioDisabled(state: Object): Object {
175
 export function isAudioDisabled(state: Object): Object {
176
-    return state['features/prejoin'].audioDisabled;
176
+    return state['features/prejoin']?.audioDisabled;
177
 }
177
 }
178
 
178
 
179
 /**
179
 /**
183
  * @returns {boolean}
183
  * @returns {boolean}
184
  */
184
  */
185
 export function isPrejoinVideoDisabled(state: Object): Object {
185
 export function isPrejoinVideoDisabled(state: Object): Object {
186
-    return state['features/prejoin'].videoDisabled;
186
+    return state['features/prejoin']?.videoDisabled;
187
 }
187
 }
188
 
188
 
189
 /**
189
 /**
193
  * @returns {boolean}
193
  * @returns {boolean}
194
  */
194
  */
195
 export function isJoinByPhoneDialogVisible(state: Object): boolean {
195
 export function isJoinByPhoneDialogVisible(state: Object): boolean {
196
-    return state['features/prejoin'].showJoinByPhoneDialog;
196
+    return state['features/prejoin']?.showJoinByPhoneDialog;
197
 }
197
 }
198
 
198
 
199
 /**
199
 /**
215
  * @returns {boolean}
215
  * @returns {boolean}
216
  */
216
  */
217
 export function isPrejoinPageVisible(state: Object): boolean {
217
 export function isPrejoinPageVisible(state: Object): boolean {
218
-    return isPrejoinPageEnabled(state) && state['features/prejoin'].showPrejoin;
218
+    return isPrejoinPageEnabled(state) && state['features/prejoin']?.showPrejoin;
219
 }
219
 }

+ 1
- 1
react/features/toolbox/components/AudioMuteButton.js 查看文件

16
     isPrejoinAudioMuted,
16
     isPrejoinAudioMuted,
17
     isAudioDisabled,
17
     isAudioDisabled,
18
     isPrejoinPageVisible
18
     isPrejoinPageVisible
19
-} from '../../prejoin';
19
+} from '../../prejoin/functions';
20
 import { muteLocal } from '../../remote-video-menu/actions';
20
 import { muteLocal } from '../../remote-video-menu/actions';
21
 
21
 
22
 declare var APP: Object;
22
 declare var APP: Object;

+ 1
- 1
react/features/toolbox/components/VideoMuteButton.js 查看文件

21
     isPrejoinPageVisible,
21
     isPrejoinPageVisible,
22
     isPrejoinVideoDisabled,
22
     isPrejoinVideoDisabled,
23
     isPrejoinVideoMuted
23
     isPrejoinVideoMuted
24
-} from '../../prejoin';
24
+} from '../../prejoin/functions';
25
 import UIEvents from '../../../../service/UI/UIEvents';
25
 import UIEvents from '../../../../service/UI/UIEvents';
26
 
26
 
27
 declare var APP: Object;
27
 declare var APP: Object;

正在加载...
取消
保存