|
@@ -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
|
}
|