Browse Source

[RN] Fix setReceivedVideoQuality if we are not yet in a conference

It may happen that such action is fired while joining.
master
Saúl Ibarra Corretgé 7 years ago
parent
commit
c087e90099
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      react/features/base/conference/middleware.js

+ 5
- 3
react/features/base/conference/middleware.js View File

@@ -320,9 +320,11 @@ function _setLastN(store, next, action) {
320 320
 function _setReceiveVideoQuality({ dispatch, getState }, next, action) {
321 321
     const { audioOnly, conference } = getState()['features/base/conference'];
322 322
 
323
-    conference.setReceiverVideoConstraint(action.receiveVideoQuality);
324
-    if (audioOnly) {
325
-        dispatch(toggleAudioOnly());
323
+    if (conference) {
324
+        conference.setReceiverVideoConstraint(action.receiveVideoQuality);
325
+        if (audioOnly) {
326
+            dispatch(toggleAudioOnly());
327
+        }
326 328
     }
327 329
 
328 330
     return next(action);

Loading…
Cancel
Save