From 43f36c8cfdbc3151a90cfd0722b758a54ac62f86 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Tue, 1 Sep 2020 15:48:14 -0500 Subject: [PATCH] fix(ifarme-api): set-video-quality to use redux. --- react/features/video-quality/actions.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/react/features/video-quality/actions.js b/react/features/video-quality/actions.js index 4f4029d7b..7d57b6654 100644 --- a/react/features/video-quality/actions.js +++ b/react/features/video-quality/actions.js @@ -51,18 +51,13 @@ export function setMaxReceiverVideoQuality(maxReceiverVideoQuality: number) { * @returns {void} */ export function setVideoQuality(frameHeight: number) { - return (dispatch: Dispatch, getState: Function) => { - const { conference, maxReceiverVideoQuality } = getState()['features/base/conference']; - + return (dispatch: Dispatch) => { if (frameHeight < VIDEO_QUALITY_LEVELS.LOW) { logger.error(`Invalid frame height for video quality - ${frameHeight}`); return; } - conference.setReceiverVideoConstraint(Math.min(frameHeight, maxReceiverVideoQuality)); - conference.setSenderVideoConstraint(Math.min(frameHeight, VIDEO_QUALITY_LEVELS.HIGH)) - .catch(err => { - logger.error(`Set video quality command failed - ${err}`); - }); + + dispatch(setPreferredVideoQuality(Math.min(frameHeight, VIDEO_QUALITY_LEVELS.HIGH))); }; }