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:
commit
957606b3f8
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue