Browse Source

fix(ifarme-api): set-video-quality to use redux.

master
Hristo Terezov 4 years ago
parent
commit
43f36c8cfd
1 changed files with 3 additions and 8 deletions
  1. 3
    8
      react/features/video-quality/actions.js

+ 3
- 8
react/features/video-quality/actions.js View File

@@ -51,18 +51,13 @@ export function setMaxReceiverVideoQuality(maxReceiverVideoQuality: number) {
51 51
  * @returns {void}
52 52
  */
53 53
 export function setVideoQuality(frameHeight: number) {
54
-    return (dispatch: Dispatch<any>, getState: Function) => {
55
-        const { conference, maxReceiverVideoQuality } = getState()['features/base/conference'];
56
-
54
+    return (dispatch: Dispatch<any>) => {
57 55
         if (frameHeight < VIDEO_QUALITY_LEVELS.LOW) {
58 56
             logger.error(`Invalid frame height for video quality - ${frameHeight}`);
59 57
 
60 58
             return;
61 59
         }
62
-        conference.setReceiverVideoConstraint(Math.min(frameHeight, maxReceiverVideoQuality));
63
-        conference.setSenderVideoConstraint(Math.min(frameHeight, VIDEO_QUALITY_LEVELS.HIGH))
64
-            .catch(err => {
65
-                logger.error(`Set video quality command failed - ${err}`);
66
-            });
60
+
61
+        dispatch(setPreferredVideoQuality(Math.min(frameHeight, VIDEO_QUALITY_LEVELS.HIGH)));
67 62
     };
68 63
 }

Loading…
Cancel
Save