Merge pull request #3630 from virtuacoplenny/lenny/youtube-1-on-1

fix(filmstrip): show thumbnails in 1-on-1 with a fake participant
This commit is contained in:
virtuacoplenny 2018-11-27 14:36:43 -08:00 committed by GitHub
commit 957606b3f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 2 deletions

View File

@ -125,6 +125,20 @@ export function getParticipantCount(stateful: Object | Function) {
return getParticipants(stateful).length; 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. * Returns participant's display name.
* *

View File

@ -1,7 +1,7 @@
// @flow // @flow
import { import {
getParticipantCount, getParticipantCountWithFake,
getPinnedParticipant getPinnedParticipant
} from '../base/participants'; } from '../base/participants';
import { toState } from '../base/redux'; import { toState } from '../base/redux';
@ -36,7 +36,10 @@ export function shouldRemoteVideosBeVisible(state: Object) {
return false; 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; let pinnedParticipant;
return Boolean( return Boolean(