|
|
|
|
4
|
import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';
|
4
|
import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';
|
5
|
import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
|
5
|
import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
|
6
|
import { SCREEN_SHARE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';
|
6
|
import { SCREEN_SHARE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';
|
7
|
-import { shouldDisplayTileView } from '../../video-layout/functions';
|
|
|
8
|
import { SET_AUDIO_ONLY } from '../audio-only/actionTypes';
|
7
|
import { SET_AUDIO_ONLY } from '../audio-only/actionTypes';
|
9
|
import { CONFERENCE_JOINED } from '../conference/actionTypes';
|
8
|
import { CONFERENCE_JOINED } from '../conference/actionTypes';
|
10
|
import {
|
9
|
import {
|
|
|
|
|
81
|
if (typeof appState !== 'undefined' && appState !== 'active') {
|
80
|
if (typeof appState !== 'undefined' && appState !== 'active') {
|
82
|
lastN = 0;
|
81
|
lastN = 0;
|
83
|
} else if (audioOnly) {
|
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
|
const largeVideoParticipantId = state['features/large-video'].participantId;
|
84
|
const largeVideoParticipantId = state['features/large-video'].participantId;
|
87
|
const largeVideoParticipant
|
85
|
const largeVideoParticipant
|
88
|
= largeVideoParticipantId ? getParticipantById(state, largeVideoParticipantId) : undefined;
|
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
|
if (!tileViewEnabled && largeVideoParticipant && !largeVideoParticipant.local) {
|
91
|
if (!tileViewEnabled && largeVideoParticipant && !largeVideoParticipant.local) {
|
91
|
lastN = (screenShares || []).includes(largeVideoParticipantId) ? 1 : 0;
|
92
|
lastN = (screenShares || []).includes(largeVideoParticipantId) ? 1 : 0;
|
92
|
} else {
|
93
|
} else {
|