fix(participants-pane): Get the correct participantCount for multi-stream.
Do not add virtual screenshare participants to participantCount.
This commit is contained in:
parent
5505f01cd9
commit
9b9fbc0bc9
|
@ -244,7 +244,7 @@ export function getParticipantCount(stateful: Object | Function) {
|
|||
sortedRemoteVirtualScreenshareParticipants
|
||||
} = state['features/base/participants'];
|
||||
|
||||
if (getSourceNameSignalingFeatureFlag(state)) {
|
||||
if (getMultipleVideoSupportFeatureFlag(state)) {
|
||||
return remote.size - fakeParticipants.size - sortedRemoteVirtualScreenshareParticipants.size + (local ? 1 : 0);
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ export function getFakeParticipants(stateful: Object | Function) {
|
|||
export function getRemoteParticipantCount(stateful: Object | Function) {
|
||||
const state = toState(stateful)['features/base/participants'];
|
||||
|
||||
if (getSourceNameSignalingFeatureFlag(state)) {
|
||||
if (getMultipleVideoSupportFeatureFlag(state)) {
|
||||
return state.remote.size - state.sortedRemoteVirtualScreenshareParticipants.size;
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ export function getParticipantCountWithFake(stateful: Object | Function) {
|
|||
const state = toState(stateful);
|
||||
const { local, localScreenShare, remote } = state['features/base/participants'];
|
||||
|
||||
if (getSourceNameSignalingFeatureFlag(state)) {
|
||||
if (getMultipleVideoSupportFeatureFlag(state)) {
|
||||
return remote.size + (local ? 1 : 0) + (localScreenShare ? 1 : 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,7 @@ import useContextMenu from '../../../base/components/context-menu/useContextMenu
|
|||
import participantsPaneTheme from '../../../base/components/themes/participantsPaneTheme.json';
|
||||
import { isToolbarButtonEnabled } from '../../../base/config/functions.web';
|
||||
import { MEDIA_TYPE } from '../../../base/media';
|
||||
import {
|
||||
getParticipantById,
|
||||
getParticipantCountWithFake
|
||||
} from '../../../base/participants';
|
||||
import { getParticipantById } from '../../../base/participants';
|
||||
import { connect } from '../../../base/redux';
|
||||
import Input from '../../../base/ui/components/web/Input';
|
||||
import { normalizeAccents } from '../../../base/util/strings';
|
||||
|
@ -170,14 +167,9 @@ function _mapStateToProps(state): Object {
|
|||
return !participant.isVirtualScreenshareParticipant;
|
||||
});
|
||||
|
||||
// This is very important as getRemoteParticipants is not changing its reference object
|
||||
// and we will not re-render on change, but if count changes we will do
|
||||
const participantsCount = getParticipantCountWithFake(state);
|
||||
|
||||
const participantsCount = sortedParticipantIds.length;
|
||||
const showInviteButton = shouldRenderInviteButton(state) && isToolbarButtonEnabled('invite', state);
|
||||
|
||||
const overflowDrawer = showOverflowDrawer(state);
|
||||
|
||||
const currentRoomId = getCurrentRoomId(state);
|
||||
const currentRoom = getBreakoutRooms(state)[currentRoomId];
|
||||
|
||||
|
|
Loading…
Reference in New Issue