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(filmstrip): show thumbnails in 1-on-1 with a fake participant

Leonard Kim769a2c7c9403
diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.js
index b33880bf58..a02166531d 100644
--- a/react/features/base/participants/functions.js
+++ b/react/features/base/participants/functions.js
@@ -125,6 +125,20 @@ export function getParticipantCount(stateful: Object | Function) {
return getParticipants(stateful).length;
}
+/**
+ * Returns a count of the known participants in the passed in redux state,
+ * including fake participants.
+ *
+ * @param {(Function|Object|Participant[])} stateful - The redux state
+ * features/base/participants, the (whole) redux state, or redux's
+ * {@code getState} function to be used to retrieve the state
+ * features/base/participants.
+ * @returns {number}
+ */
+export function getParticipantCountWithFake(stateful: Object | Function) {
+ return _getAllParticipants(stateful).length;
+}
+
/**
* Returns participant's display name.
*
diff --git a/react/features/filmstrip/functions.web.js b/react/features/filmstrip/functions.web.js
index 7bd4545892..622315bc01 100644
--- a/react/features/filmstrip/functions.web.js
+++ b/react/features/filmstrip/functions.web.js
@@ -1,7 +1,7 @@
// @flow
import {
- getParticipantCount,
+ getParticipantCountWithFake,
getPinnedParticipant
} from '../base/participants';
import { toState } from '../base/redux';
@@ -36,7 +36,10 @@ export function shouldRemoteVideosBeVisible(state: Object) {
return false;
}
- const participantCount = getParticipantCount(state);
+ // Include fake participants to derive how many thumbnails are dispalyed,
+ // as it is assumed all participants, including fake, will be displayed
+ // in the filmstrip.
+ const participantCount = getParticipantCountWithFake(state);
let pinnedParticipant;
return Boolean(