Procházet zdrojové kódy

fix(video-quality): set lastN to 1 when screenshare is added to call in audio-only mode.

This fixes an issue where lastN is not bumped to 1 on an audio-only client when a screenshare source is added to the call.
master
Jaya Allamsetty před 4 roky
rodič
revize
3657c19e60
1 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. 4
    3
      react/features/base/lastn/middleware.js

+ 4
- 3
react/features/base/lastn/middleware.js Zobrazit soubor

@@ -4,7 +4,6 @@ import { SET_FILMSTRIP_ENABLED } from '../../filmstrip/actionTypes';
4 4
 import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';
5 5
 import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
6 6
 import { SCREEN_SHARE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';
7
-import { shouldDisplayTileView } from '../../video-layout/functions';
8 7
 import { SET_AUDIO_ONLY } from '../audio-only/actionTypes';
9 8
 import { CONFERENCE_JOINED } from '../conference/actionTypes';
10 9
 import {
@@ -81,12 +80,14 @@ function _updateLastN({ getState }) {
81 80
     if (typeof appState !== 'undefined' && appState !== 'active') {
82 81
         lastN = 0;
83 82
     } else if (audioOnly) {
84
-        const { screenShares } = state['features/video-layout'];
85
-        const tileViewEnabled = shouldDisplayTileView(state);
83
+        const { screenShares, tileViewEnabled } = state['features/video-layout'];
86 84
         const largeVideoParticipantId = state['features/large-video'].participantId;
87 85
         const largeVideoParticipant
88 86
             = largeVideoParticipantId ? getParticipantById(state, largeVideoParticipantId) : undefined;
89 87
 
88
+        // Use tileViewEnabled state from redux here instead of determining if client should be in tile
89
+        // view since we make an exception only for screenshare when in audio-only mode. If the user unpins
90
+        // the screenshare, lastN will be set to 0 here. It will be set to 1 if screenshare has been auto pinned.
90 91
         if (!tileViewEnabled && largeVideoParticipant && !largeVideoParticipant.local) {
91 92
             lastN = (screenShares || []).includes(largeVideoParticipantId) ? 1 : 0;
92 93
         } else {

Načítá se…
Zrušit
Uložit