소스 검색

ref(video-quality): rename receiveVideoQuality to preferredReceiverVideoQuality

- "preferred" is being appended because in tile view there is a
  concept of what the user prefers to be the maximum video quality
  but there is also a maximum respected internall. For example,
  the user may prefer HD, but in tile view the tiles may be small
  so internall the preferred would be set to LD.
- "receive" is being renamed to "receiver" to be consistent with
  the naming in lib-jitsi-meet.
master
Leonard Kim 6 년 전
부모
커밋
4d3383c620

+ 4
- 3
react/features/base/conference/actionTypes.js 파일 보기

@@ -181,11 +181,12 @@ export const SET_PASSWORD_FAILED = Symbol('SET_PASSWORD_FAILED');
181 181
  * received from remote participants.
182 182
  *
183 183
  * {
184
- *     type: SET_RECEIVE_VIDEO_QUALITY,
185
- *     receiveVideoQuality: number
184
+ *     type: SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
185
+ *     preferredReceiverVideoQuality: number
186 186
  * }
187 187
  */
188
-export const SET_RECEIVE_VIDEO_QUALITY = Symbol('SET_RECEIVE_VIDEO_QUALITY');
188
+export const SET_PREFERRED_RECEIVER_VIDEO_QUALITY
189
+    = Symbol('SET_PREFERRED_RECEIVER_VIDEO_QUALITY');
189 190
 
190 191
 /**
191 192
  * The type of (redux) action which sets the name of the room of the

+ 9
- 7
react/features/base/conference/actions.js 파일 보기

@@ -39,7 +39,7 @@ import {
39 39
     SET_LASTN,
40 40
     SET_PASSWORD,
41 41
     SET_PASSWORD_FAILED,
42
-    SET_RECEIVE_VIDEO_QUALITY,
42
+    SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
43 43
     SET_ROOM,
44 44
     SET_START_MUTED_POLICY
45 45
 } from './actionTypes';
@@ -643,16 +643,18 @@ export function setPassword(
643 643
 /**
644 644
  * Sets the max frame height to receive from remote participant videos.
645 645
  *
646
- * @param {number} receiveVideoQuality - The max video resolution to receive.
646
+ * @param {number} preferredReceiverVideoQuality - The max video resolution to
647
+ * receive.
647 648
  * @returns {{
648
- *     type: SET_RECEIVE_VIDEO_QUALITY,
649
- *     receiveVideoQuality: number
649
+ *     type: SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
650
+ *     preferredReceiverVideoQuality: number
650 651
  * }}
651 652
  */
652
-export function setReceiveVideoQuality(receiveVideoQuality: number) {
653
+export function setPreferredReceiverVideoQuality(
654
+        preferredReceiverVideoQuality: number) {
653 655
     return {
654
-        type: SET_RECEIVE_VIDEO_QUALITY,
655
-        receiveVideoQuality
656
+        type: SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
657
+        preferredReceiverVideoQuality
656 658
     };
657 659
 }
658 660
 

+ 16
- 9
react/features/base/conference/middleware.js 파일 보기

@@ -34,7 +34,7 @@ import {
34 34
     DATA_CHANNEL_OPENED,
35 35
     SET_AUDIO_ONLY,
36 36
     SET_LASTN,
37
-    SET_RECEIVE_VIDEO_QUALITY,
37
+    SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
38 38
     SET_ROOM
39 39
 } from './actionTypes';
40 40
 import {
@@ -80,8 +80,8 @@ MiddlewareRegistry.register(store => next => action => {
80 80
     case SET_LASTN:
81 81
         return _setLastN(store, next, action);
82 82
 
83
-    case SET_RECEIVE_VIDEO_QUALITY:
84
-        return _setReceiveVideoQuality(store, next, action);
83
+    case SET_PREFERRED_RECEIVER_VIDEO_QUALITY:
84
+        return _setPreferredReceiverVideoQuality(store, next, action);
85 85
 
86 86
     case SET_ROOM:
87 87
         return _setRoom(store, next, action);
@@ -441,16 +441,22 @@ function _setLastN({ getState }, next, action) {
441 441
  * is being dispatched.
442 442
  * @param {Dispatch} next - The redux {@code dispatch} function to dispatch the
443 443
  * specified {@code action} to the specified {@code store}.
444
- * @param {Action} action - The redux action {@code SET_RECEIVE_VIDEO_QUALITY}
445
- * which is being dispatched in the specified {@code store}.
444
+ * @param {Action} action - The redux action
445
+ * {@code SET_PREFERRED_RECEIVER_VIDEO_QUALITY} which is being dispatched in the
446
+ * specified {@code store}.
446 447
  * @private
447 448
  * @returns {Object} The value returned by {@code next(action)}.
448 449
  */
449
-function _setReceiveVideoQuality({ dispatch, getState }, next, action) {
450
-    const { audioOnly, conference } = getState()['features/base/conference'];
450
+function _setPreferredReceiverVideoQuality(
451
+        { dispatch, getState },
452
+        next,
453
+        action) {
454
+    const { audioOnly, conference }
455
+        = getState()['features/base/conference'];
451 456
 
452 457
     if (conference) {
453
-        conference.setReceiverVideoConstraint(action.receiveVideoQuality);
458
+        conference.setReceiverVideoConstraint(
459
+            action.preferredReceiverVideoQuality);
454 460
         audioOnly && dispatch(toggleAudioOnly());
455 461
     }
456 462
 
@@ -546,7 +552,8 @@ function _syncConferenceLocalTracksWithState({ getState }, action) {
546 552
 function _syncReceiveVideoQuality({ getState }, next, action) {
547 553
     const state = getState()['features/base/conference'];
548 554
 
549
-    state.conference.setReceiverVideoConstraint(state.receiveVideoQuality);
555
+    state.conference.setReceiverVideoConstraint(
556
+        state.preferredReceiverVideoQuality);
550 557
 
551 558
     return next(action);
552 559
 }

+ 13
- 10
react/features/base/conference/reducer.js 파일 보기

@@ -18,7 +18,7 @@ import {
18 18
     SET_DESKTOP_SHARING_ENABLED,
19 19
     SET_FOLLOW_ME,
20 20
     SET_PASSWORD,
21
-    SET_RECEIVE_VIDEO_QUALITY,
21
+    SET_PREFERRED_RECEIVER_VIDEO_QUALITY,
22 22
     SET_ROOM,
23 23
     SET_SIP_GATEWAY_ENABLED,
24 24
     SET_START_MUTED_POLICY
@@ -72,8 +72,8 @@ ReducerRegistry.register('features/base/conference', (state = {}, action) => {
72 72
     case SET_PASSWORD:
73 73
         return _setPassword(state, action);
74 74
 
75
-    case SET_RECEIVE_VIDEO_QUALITY:
76
-        return _setReceiveVideoQuality(state, action);
75
+    case SET_PREFERRED_RECEIVER_VIDEO_QUALITY:
76
+        return _setPreferredReceiverVideoQuality(state, action);
77 77
 
78 78
     case SET_ROOM:
79 79
         return _setRoom(state, action);
@@ -211,7 +211,7 @@ function _conferenceJoined(state, { conference }) {
211 211
          *
212 212
          * @type number
213 213
          */
214
-        receiveVideoQuality: VIDEO_QUALITY_LEVELS.HIGH
214
+        preferredReceiverVideoQuality: VIDEO_QUALITY_LEVELS.HIGH
215 215
     });
216 216
 }
217 217
 
@@ -403,18 +403,21 @@ function _setPassword(state, { conference, method, password }) {
403 403
 }
404 404
 
405 405
 /**
406
- * Reduces a specific Redux action SET_RECEIVE_VIDEO_QUALITY of the feature
407
- * base/conference.
406
+ * Reduces a specific Redux action {@code SET_PREFERRED_RECEIVER_VIDEO_QUALITY}
407
+ * of the feature base/conference.
408 408
  *
409 409
  * @param {Object} state - The Redux state of the feature base/conference.
410
- * @param {Action} action - The Redux action SET_RECEIVE_VIDEO_QUALITY to
411
- * reduce.
410
+ * @param {Action} action - The Redux action of type
411
+ * {@code SET_PREFERRED_RECEIVER_VIDEO_QUALITY} to reduce.
412 412
  * @private
413 413
  * @returns {Object} The new state of the feature base/conference after the
414 414
  * reduction of the specified action.
415 415
  */
416
-function _setReceiveVideoQuality(state, action) {
417
-    return set(state, 'receiveVideoQuality', action.receiveVideoQuality);
416
+function _setPreferredReceiverVideoQuality(state, action) {
417
+    return set(
418
+        state,
419
+        'preferredReceiverVideoQuality',
420
+        action.preferredReceiverVideoQuality);
418 421
 }
419 422
 
420 423
 /**

+ 2
- 2
react/features/conference/middleware.js 파일 보기

@@ -6,7 +6,7 @@ import {
6 6
     KICKED_OUT,
7 7
     VIDEO_QUALITY_LEVELS,
8 8
     conferenceFailed,
9
-    setReceiveVideoQuality
9
+    setPreferredReceiverVideoQuality
10 10
 } from '../base/conference';
11 11
 import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
12 12
 import { SET_REDUCED_UI } from '../base/responsive-ui';
@@ -32,7 +32,7 @@ MiddlewareRegistry.register(store => next => action => {
32 32
         // audio-only mode if engaged, that's why we check for it here.
33 33
         audioOnly
34 34
             || dispatch(
35
-                setReceiveVideoQuality(
35
+                setPreferredReceiverVideoQuality(
36 36
                     reducedUI
37 37
                         ? VIDEO_QUALITY_LEVELS.LOW
38 38
                         : VIDEO_QUALITY_LEVELS.HIGH));

+ 7
- 7
react/features/video-quality/components/OverflowMenuVideoQualityItem.web.js 파일 보기

@@ -33,7 +33,7 @@ type Props = {
33 33
      * The currently configured maximum quality resolution to be received from
34 34
      * remote participants.
35 35
      */
36
-    _receiveVideoQuality: number,
36
+    _receiverVideoQuality: number,
37 37
 
38 38
     /**
39 39
      * Callback to invoke when {@link OverflowMenuVideoQualityItem} is clicked.
@@ -61,10 +61,10 @@ class OverflowMenuVideoQualityItem extends Component<Props> {
61 61
      * @returns {ReactElement}
62 62
      */
63 63
     render() {
64
-        const { _audioOnly, _receiveVideoQuality } = this.props;
65
-        const icon = _audioOnly || !_receiveVideoQuality
64
+        const { _audioOnly, _receiverVideoQuality } = this.props;
65
+        const icon = _audioOnly || !_receiverVideoQuality
66 66
             ? 'icon-AUD'
67
-            : VIDEO_QUALITY_TO_ICON[_receiveVideoQuality];
67
+            : VIDEO_QUALITY_TO_ICON[_receiverVideoQuality];
68 68
 
69 69
         return (
70 70
             <li
@@ -91,14 +91,14 @@ class OverflowMenuVideoQualityItem extends Component<Props> {
91 91
  * @private
92 92
  * @returns {{
93 93
  *     _audioOnly: boolean,
94
- *     _receiveVideoQuality: number
94
+ *     _receiverVideoQuality: number
95 95
  * }}
96 96
  */
97 97
 function _mapStateToProps(state) {
98 98
     return {
99 99
         _audioOnly: state['features/base/conference'].audioOnly,
100
-        _receiveVideoQuality:
101
-            state['features/base/conference'].receiveVideoQuality
100
+        _receiverVideoQuality:
101
+            state['features/base/conference'].preferredReceiverVideoQuality
102 102
     };
103 103
 }
104 104
 

+ 12
- 12
react/features/video-quality/components/VideoQualitySlider.web.js 파일 보기

@@ -10,7 +10,7 @@ import {
10 10
 import {
11 11
     VIDEO_QUALITY_LEVELS,
12 12
     setAudioOnly,
13
-    setReceiveVideoQuality
13
+    setPreferredReceiverVideoQuality
14 14
 } from '../../base/conference';
15 15
 import { translate } from '../../base/i18n';
16 16
 import JitsiMeetJS from '../../base/lib-jitsi-meet';
@@ -66,7 +66,7 @@ class VideoQualitySlider extends Component {
66 66
          * The currently configured maximum quality resolution to be received
67 67
          * from remote participants.
68 68
          */
69
-        _receiveVideoQuality: PropTypes.number,
69
+        _receiverVideoQuality: PropTypes.number,
70 70
 
71 71
         /**
72 72
          * Whether or not displaying video is supported in the current
@@ -284,7 +284,7 @@ class VideoQualitySlider extends Component {
284 284
     _enableHighDefinition() {
285 285
         sendAnalytics(createEvent('high'));
286 286
         logger.log('Video quality: high enabled');
287
-        this.props.dispatch(setReceiveVideoQuality(HIGH));
287
+        this.props.dispatch(setPreferredReceiverVideoQuality(HIGH));
288 288
     }
289 289
 
290 290
     /**
@@ -297,7 +297,7 @@ class VideoQualitySlider extends Component {
297 297
     _enableLowDefinition() {
298 298
         sendAnalytics(createEvent('low'));
299 299
         logger.log('Video quality: low enabled');
300
-        this.props.dispatch(setReceiveVideoQuality(LOW));
300
+        this.props.dispatch(setPreferredReceiverVideoQuality(LOW));
301 301
     }
302 302
 
303 303
     /**
@@ -310,7 +310,7 @@ class VideoQualitySlider extends Component {
310 310
     _enableStandardDefinition() {
311 311
         sendAnalytics(createEvent('standard'));
312 312
         logger.log('Video quality: standard enabled');
313
-        this.props.dispatch(setReceiveVideoQuality(STANDARD));
313
+        this.props.dispatch(setPreferredReceiverVideoQuality(STANDARD));
314 314
     }
315 315
 
316 316
     /**
@@ -321,7 +321,7 @@ class VideoQualitySlider extends Component {
321 321
      * @returns {void}
322 322
      */
323 323
     _mapCurrentQualityToSliderValue() {
324
-        const { _audioOnly, _receiveVideoQuality } = this.props;
324
+        const { _audioOnly, _receiverVideoQuality } = this.props;
325 325
         const { _sliderOptions } = this;
326 326
 
327 327
         if (_audioOnly) {
@@ -332,7 +332,7 @@ class VideoQualitySlider extends Component {
332 332
         }
333 333
 
334 334
         const matchingOption = _sliderOptions.find(
335
-            ({ videoQuality }) => videoQuality === _receiveVideoQuality);
335
+            ({ videoQuality }) => videoQuality === _receiverVideoQuality);
336 336
 
337 337
         return _sliderOptions.indexOf(matchingOption);
338 338
     }
@@ -345,7 +345,7 @@ class VideoQualitySlider extends Component {
345 345
      * @returns {void}
346 346
      */
347 347
     _onSliderChange(event) {
348
-        const { _audioOnly, _receiveVideoQuality } = this.props;
348
+        const { _audioOnly, _receiverVideoQuality } = this.props;
349 349
         const {
350 350
             audioOnly,
351 351
             onSelect,
@@ -355,7 +355,7 @@ class VideoQualitySlider extends Component {
355 355
         // Take no action if the newly chosen option does not change audio only
356 356
         // or video quality state.
357 357
         if ((_audioOnly && audioOnly)
358
-            || (!_audioOnly && videoQuality === _receiveVideoQuality)) {
358
+            || (!_audioOnly && videoQuality === _receiverVideoQuality)) {
359 359
             return;
360 360
         }
361 361
 
@@ -372,20 +372,20 @@ class VideoQualitySlider extends Component {
372 372
  * @returns {{
373 373
  *     _audioOnly: boolean,
374 374
  *     _p2p: boolean,
375
- *     _receiveVideoQuality: boolean
375
+ *     _receiverVideoQuality: boolean
376 376
  * }}
377 377
  */
378 378
 function _mapStateToProps(state) {
379 379
     const {
380 380
         audioOnly,
381 381
         p2p,
382
-        receiveVideoQuality
382
+        preferredReceiverVideoQuality
383 383
     } = state['features/base/conference'];
384 384
 
385 385
     return {
386 386
         _audioOnly: audioOnly,
387 387
         _p2p: p2p,
388
-        _receiveVideoQuality: receiveVideoQuality,
388
+        _receiverVideoQuality: preferredReceiverVideoQuality,
389 389
         _videoSupported: JitsiMeetJS.mediaDevices.supportsVideo()
390 390
     };
391 391
 }

Loading…
취소
저장