Przeglądaj źródła

prejoin: fixup mobile

Avoid importing components, which are not yet implemented on mobile.
master
Saúl Ibarra Corretgé 5 lat temu
rodzic
commit
01fc098d4b

+ 12
- 12
react/features/prejoin/functions.js Wyświetl plik

@@ -93,7 +93,7 @@ export async function getAllPrejoinConfiguredTracks(state: Object): Promise<Obje
93 93
  * @returns {Object}
94 94
  */
95 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,7 +103,7 @@ export function getAudioTrack(state: Object): Object {
103 103
  * @returns {Object}
104 104
  */
105 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,7 +113,7 @@ export function getContentSharingTrack(state: Object): Object {
113 113
  * @returns {string}
114 114
  */
115 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,7 +123,7 @@ export function getDeviceStatusText(state: Object): string {
123 123
  * @returns {string}
124 124
  */
125 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,7 +133,7 @@ export function getDeviceStatusType(state: Object): string {
133 133
  * @returns {Object}
134 134
  */
135 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,7 +143,7 @@ export function getVideoTrack(state: Object): Object {
143 143
  * @returns {boolean}
144 144
  */
145 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,7 +153,7 @@ export function isPrejoinAudioMuted(state: Object): boolean {
153 153
  * @returns {boolean}
154 154
  */
155 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,7 +163,7 @@ export function isPrejoinVideoMuted(state: Object): boolean {
163 163
  * @returns {string}
164 164
  */
165 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,7 +173,7 @@ export function getRawError(state: Object): string {
173 173
  * @returns {boolean}
174 174
  */
175 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,7 +183,7 @@ export function isAudioDisabled(state: Object): Object {
183 183
  * @returns {boolean}
184 184
  */
185 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,7 +193,7 @@ export function isPrejoinVideoDisabled(state: Object): Object {
193 193
  * @returns {boolean}
194 194
  */
195 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,5 +215,5 @@ export function isPrejoinPageEnabled(state: Object): boolean {
215 215
  * @returns {boolean}
216 216
  */
217 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 Wyświetl plik

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

+ 1
- 1
react/features/toolbox/components/VideoMuteButton.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz