瀏覽代碼

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

master
Hristo Terezov 4 年之前
父節點
當前提交
43f36c8cfd
共有 1 個文件被更改,包括 3 次插入8 次删除
  1. 3
    8
      react/features/video-quality/actions.js

+ 3
- 8
react/features/video-quality/actions.js 查看文件

@@ -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…
取消
儲存