Procházet zdrojové kódy

(prejoin): fix mobile

master
Vlad Piersec před 5 roky
rodič
revize
0aa54d8650

+ 5
- 1
react/features/base/devices/functions.js Zobrazit soubor

234
 }
234
 }
235
 
235
 
236
 /**
236
 /**
237
- * Returns true if there are devices of a specific type.
237
+ * Returns true if there are devices of a specific type or on native platform.
238
  *
238
  *
239
  * @param {Object} state - The state of the application.
239
  * @param {Object} state - The state of the application.
240
  * @param {string} type - The type of device: VideoOutput | audioOutput | audioInput.
240
  * @param {string} type - The type of device: VideoOutput | audioOutput | audioInput.
242
  * @returns {boolean}
242
  * @returns {boolean}
243
  */
243
  */
244
 export function hasAvailableDevices(state: Object, type: string) {
244
 export function hasAvailableDevices(state: Object, type: string) {
245
+    if (state['features/base/devices'] === undefined) {
246
+        return true;
247
+    }
248
+
245
     return state['features/base/devices'].availableDevices[type].length > 0;
249
     return state['features/base/devices'].availableDevices[type].length > 0;
246
 }
250
 }
247
 
251
 

+ 1
- 1
react/features/device-selection/middleware.js Zobrazit soubor

18
     if (action.type === UPDATE_DEVICE_LIST) {
18
     if (action.type === UPDATE_DEVICE_LIST) {
19
         const state = store.getState();
19
         const state = store.getState();
20
         const { popupDialogData } = state['features/device-selection'];
20
         const { popupDialogData } = state['features/device-selection'];
21
-        const { availableDevices } = state['features/base/devices'];
21
+        const { availableDevices } = state['features/base/devices'] || {};
22
 
22
 
23
         if (popupDialogData) {
23
         if (popupDialogData) {
24
             popupDialogData.transport.sendEvent({
24
             popupDialogData.transport.sendEvent({

Načítá se…
Zrušit
Uložit