Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(participants-pane): Get the correct participantCount for multi-stream. Do not add virtual screenshare participants to participantCount.

Jaya Allamsetty9b9fbc0bc917
diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js
index 79ce9916a2..b056060b38 100644
--- a/react/features/base/participants/functions.js
+++ b/react/features/base/participants/functions.js
@@ -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);
}
diff --git a/react/features/participants-pane/components/web/MeetingParticipants.js b/react/features/participants-pane/components/web/MeetingParticipants.js
index 10b8c8973a..ef879b6876 100644
--- a/react/features/participants-pane/components/web/MeetingParticipants.js
+++ b/react/features/participants-pane/components/web/MeetingParticipants.js
@@ -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];