mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-17 07:47:53 +00:00
As part of the work on fixing the problem with the multiplying thumbnails, we've associated remote participant w/ JitsiConference. However, there are periods of time when multiple JitsiConferences are in the redux state (and that period is going to be shorted by StateListenerRegistry). In order to give more control to the feature base/participants, reduce the occurrences of direct access to the features/base/participants redux state and utilize the feature's existing read access functions. Which will allow us in the future to enhance these functions to access participants which are relevant to the current conference of interest to the user only.
39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
// @flow
|
|
|
|
import {
|
|
getParticipantCount,
|
|
getPinnedParticipant
|
|
} from '../base/participants';
|
|
|
|
declare var interfaceConfig: Object;
|
|
|
|
/**
|
|
* Determines whether the remote video thumbnails should be displayed/visible in
|
|
* the filmstrip.
|
|
*
|
|
* @param {Object} state - The full redux state.
|
|
* @returns {boolean} - If remote video thumbnails should be displayed/visible
|
|
* in the filmstrip, then {@code true}; otherwise, {@code false}.
|
|
*/
|
|
export function shouldRemoteVideosBeVisible(state: Object) {
|
|
const participantCount = getParticipantCount(state);
|
|
let pinnedParticipant;
|
|
|
|
return Boolean(
|
|
participantCount > 2
|
|
|
|
// Always show the filmstrip when there is another participant to
|
|
// show and the filmstrip is hovered, or local video is pinned, or
|
|
// the toolbar is displayed.
|
|
|| (participantCount > 1
|
|
&& (state['features/filmstrip'].hovered
|
|
|| state['features/toolbox'].visible
|
|
|| ((pinnedParticipant = getPinnedParticipant(state))
|
|
&& pinnedParticipant.local)))
|
|
|
|
|| (typeof interfaceConfig === 'object'
|
|
&& interfaceConfig.filmStripOnly)
|
|
|
|
|| state['features/base/config'].disable1On1Mode);
|
|
}
|