Преглед на файлове

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 години
родител
ревизия
39af6f5943

+ 1
- 0
react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js Целия файл

@@ -21,6 +21,7 @@ import { findNearestQualityLevel } from '../functions';
21 21
  * @type {Object}
22 22
  */
23 23
 const VIDEO_QUALITY_TO_ICON = {
24
+    [VIDEO_QUALITY_LEVELS.ULTRA]: IconVideoQualityHD,
24 25
     [VIDEO_QUALITY_LEVELS.HIGH]: IconVideoQualityHD,
25 26
     [VIDEO_QUALITY_LEVELS.STANDARD]: IconVideoQualitySD,
26 27
     [VIDEO_QUALITY_LEVELS.LOW]: IconVideoQualityLD

+ 19
- 2
react/features/video-quality/components/VideoQualitySlider.web.js Целия файл

@@ -14,6 +14,7 @@ import { VIDEO_QUALITY_LEVELS } from '../constants';
14 14
 import logger from '../logger';
15 15
 
16 16
 const {
17
+    ULTRA,
17 18
     HIGH,
18 19
     STANDARD,
19 20
     LOW
@@ -97,6 +98,7 @@ class VideoQualitySlider extends Component<Props> {
97 98
         this._enableLowDefinition = this._enableLowDefinition.bind(this);
98 99
         this._enableStandardDefinition
99 100
             = this._enableStandardDefinition.bind(this);
101
+        this._enableUltraHighDefinition = this._enableUltraHighDefinition.bind(this);
100 102
         this._onSliderChange = this._onSliderChange.bind(this);
101 103
 
102 104
         /**
@@ -125,9 +127,9 @@ class VideoQualitySlider extends Component<Props> {
125 127
                 videoQuality: STANDARD
126 128
             },
127 129
             {
128
-                onSelect: this._enableHighDefinition,
130
+                onSelect: this._enableUltraHighDefinition,
129 131
                 textKey: 'videoStatus.highDefinition',
130
-                videoQuality: HIGH
132
+                videoQuality: ULTRA
131 133
             }
132 134
         ];
133 135
     }
@@ -298,6 +300,21 @@ class VideoQualitySlider extends Component<Props> {
298 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 319
      * Matches the current video quality state with corresponding index of the
303 320
      * component's slider options.

+ 1
- 0
react/features/video-quality/constants.js Целия файл

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

+ 2
- 2
react/features/video-quality/functions.js Целия файл

@@ -2,8 +2,8 @@
2 2
 
3 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 9
  * Finds the nearest video quality level to the passed video quality.

+ 1
- 1
react/features/video-quality/middleware.js Целия файл

@@ -81,7 +81,7 @@ StateListenerRegistry.register(
81 81
         const { maxReceiverVideoQuality } = state['features/video-quality'];
82 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 86
         if (reducedUI) {
87 87
             newMaxRecvVideoQuality = VIDEO_QUALITY_LEVELS.LOW;

+ 2
- 2
react/features/video-quality/reducer.js Целия файл

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

Loading…
Отказ
Запис