Browse Source

fix(video-quality): Add the ability to request Ultra HD resolutions

Change the preferredVideoQuality and maxReceiverVideoQuality values to Ultra HD resolutions. The requested resolution can be as high as 4K to facilitate VPaaS customers to request 4K. The sender video resolution will always max out at the value specified in the video constraints from config.js settings.
master
Jaya Allamsetty 5 years ago
parent
commit
39af6f5943

+ 1
- 0
react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js View File

21
  * @type {Object}
21
  * @type {Object}
22
  */
22
  */
23
 const VIDEO_QUALITY_TO_ICON = {
23
 const VIDEO_QUALITY_TO_ICON = {
24
+    [VIDEO_QUALITY_LEVELS.ULTRA]: IconVideoQualityHD,
24
     [VIDEO_QUALITY_LEVELS.HIGH]: IconVideoQualityHD,
25
     [VIDEO_QUALITY_LEVELS.HIGH]: IconVideoQualityHD,
25
     [VIDEO_QUALITY_LEVELS.STANDARD]: IconVideoQualitySD,
26
     [VIDEO_QUALITY_LEVELS.STANDARD]: IconVideoQualitySD,
26
     [VIDEO_QUALITY_LEVELS.LOW]: IconVideoQualityLD
27
     [VIDEO_QUALITY_LEVELS.LOW]: IconVideoQualityLD

+ 19
- 2
react/features/video-quality/components/VideoQualitySlider.web.js View File

14
 import logger from '../logger';
14
 import logger from '../logger';
15
 
15
 
16
 const {
16
 const {
17
+    ULTRA,
17
     HIGH,
18
     HIGH,
18
     STANDARD,
19
     STANDARD,
19
     LOW
20
     LOW
97
         this._enableLowDefinition = this._enableLowDefinition.bind(this);
98
         this._enableLowDefinition = this._enableLowDefinition.bind(this);
98
         this._enableStandardDefinition
99
         this._enableStandardDefinition
99
             = this._enableStandardDefinition.bind(this);
100
             = this._enableStandardDefinition.bind(this);
101
+        this._enableUltraHighDefinition = this._enableUltraHighDefinition.bind(this);
100
         this._onSliderChange = this._onSliderChange.bind(this);
102
         this._onSliderChange = this._onSliderChange.bind(this);
101
 
103
 
102
         /**
104
         /**
125
                 videoQuality: STANDARD
127
                 videoQuality: STANDARD
126
             },
128
             },
127
             {
129
             {
128
-                onSelect: this._enableHighDefinition,
130
+                onSelect: this._enableUltraHighDefinition,
129
                 textKey: 'videoStatus.highDefinition',
131
                 textKey: 'videoStatus.highDefinition',
130
-                videoQuality: HIGH
132
+                videoQuality: ULTRA
131
             }
133
             }
132
         ];
134
         ];
133
     }
135
     }
298
         this._setPreferredVideoQuality(STANDARD);
300
         this._setPreferredVideoQuality(STANDARD);
299
     }
301
     }
300
 
302
 
303
+    _enableUltraHighDefinition: () => void;
304
+
305
+    /**
306
+     * Dispatches an action to receive ultra HD quality video from remote
307
+     * participants.
308
+     *
309
+     * @private
310
+     * @returns {void}
311
+     */
312
+    _enableUltraHighDefinition() {
313
+        sendAnalytics(createEvent('ultra high'));
314
+        logger.log('Video quality: ultra high enabled');
315
+        this._setPreferredVideoQuality(ULTRA);
316
+    }
317
+
301
     /**
318
     /**
302
      * Matches the current video quality state with corresponding index of the
319
      * Matches the current video quality state with corresponding index of the
303
      * component's slider options.
320
      * component's slider options.

+ 1
- 0
react/features/video-quality/constants.js View File

5
  * @type {object}
5
  * @type {object}
6
  */
6
  */
7
 export const VIDEO_QUALITY_LEVELS = {
7
 export const VIDEO_QUALITY_LEVELS = {
8
+    ULTRA: 2160,
8
     HIGH: 720,
9
     HIGH: 720,
9
     STANDARD: 360,
10
     STANDARD: 360,
10
     LOW: 180
11
     LOW: 180

+ 2
- 2
react/features/video-quality/functions.js View File

2
 
2
 
3
 import { CFG_LVL_TO_APP_QUALITY_LVL, VIDEO_QUALITY_LEVELS } from './constants';
3
 import { CFG_LVL_TO_APP_QUALITY_LVL, VIDEO_QUALITY_LEVELS } from './constants';
4
 
4
 
5
-const { LOW, STANDARD, HIGH } = VIDEO_QUALITY_LEVELS;
6
-const videoQualityLevels = [ LOW, STANDARD, HIGH ];
5
+const { LOW, STANDARD, HIGH, ULTRA } = VIDEO_QUALITY_LEVELS;
6
+const videoQualityLevels = [ LOW, STANDARD, HIGH, ULTRA ];
7
 
7
 
8
 /**
8
 /**
9
  * Finds the nearest video quality level to the passed video quality.
9
  * Finds the nearest video quality level to the passed video quality.

+ 1
- 1
react/features/video-quality/middleware.js View File

81
         const { maxReceiverVideoQuality } = state['features/video-quality'];
81
         const { maxReceiverVideoQuality } = state['features/video-quality'];
82
         const { maxFullResolutionParticipants = 2 } = state['features/base/config'];
82
         const { maxFullResolutionParticipants = 2 } = state['features/base/config'];
83
 
83
 
84
-        let newMaxRecvVideoQuality = VIDEO_QUALITY_LEVELS.HIGH;
84
+        let newMaxRecvVideoQuality = VIDEO_QUALITY_LEVELS.ULTRA;
85
 
85
 
86
         if (reducedUI) {
86
         if (reducedUI) {
87
             newMaxRecvVideoQuality = VIDEO_QUALITY_LEVELS.LOW;
87
             newMaxRecvVideoQuality = VIDEO_QUALITY_LEVELS.LOW;

+ 2
- 2
react/features/video-quality/reducer.js View File

7
 import logger from './logger';
7
 import logger from './logger';
8
 
8
 
9
 const DEFAULT_STATE = {
9
 const DEFAULT_STATE = {
10
-    maxReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH,
10
+    maxReceiverVideoQuality: VIDEO_QUALITY_LEVELS.ULTRA,
11
     minHeightForQualityLvl: new Map(),
11
     minHeightForQualityLvl: new Map(),
12
-    preferredVideoQuality: VIDEO_QUALITY_LEVELS.HIGH
12
+    preferredVideoQuality: VIDEO_QUALITY_LEVELS.ULTRA
13
 };
13
 };
14
 
14
 
15
 DEFAULT_STATE.minHeightForQualityLvl.set(360, VIDEO_QUALITY_LEVELS.STANDARD);
15
 DEFAULT_STATE.minHeightForQualityLvl.set(360, VIDEO_QUALITY_LEVELS.STANDARD);

Loading…
Cancel
Save