Bläddra i källkod

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

master
Hristo Terezov 4 år sedan
förälder
incheckning
43f36c8cfd
1 ändrade filer med 3 tillägg och 8 borttagningar
  1. 3
    8
      react/features/video-quality/actions.js

+ 3
- 8
react/features/video-quality/actions.js Visa fil

51
  * @returns {void}
51
  * @returns {void}
52
  */
52
  */
53
 export function setVideoQuality(frameHeight: number) {
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
         if (frameHeight < VIDEO_QUALITY_LEVELS.LOW) {
55
         if (frameHeight < VIDEO_QUALITY_LEVELS.LOW) {
58
             logger.error(`Invalid frame height for video quality - ${frameHeight}`);
56
             logger.error(`Invalid frame height for video quality - ${frameHeight}`);
59
 
57
 
60
             return;
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
 }

Laddar…
Avbryt
Spara