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(stage-filmstrip): Pinning

Hristo Terezovcc3a8b7b8df5
diff --git a/react/features/filmstrip/middleware.web.js b/react/features/filmstrip/middleware.web.js
index fde76b9b45..a7c3ee7072 100644
--- a/react/features/filmstrip/middleware.web.js
+++ b/react/features/filmstrip/middleware.web.js
@@ -46,12 +46,12 @@ import {
} from './constants';
import {
isFilmstripResizable,
- isTopPanelEnabled,
isStageFilmstripAvailable,
updateRemoteParticipants,
updateRemoteParticipantsOnLeave,
getActiveParticipantsIds,
- getPinnedActiveParticipants
+ getPinnedActiveParticipants,
+ isStageFilmstripTopPanel
} from './functions.web';
import './subscriber';
@@ -278,7 +278,7 @@ MiddlewareRegistry.register(store => next => action => {
const pinnedParticipants = getPinnedActiveParticipants(state);
const dominant = getDominantSpeakerParticipant(state);
- if (isTopPanelEnabled(state)) {
+ if (isStageFilmstripTopPanel(state, 2)) {
const screenshares = state['features/video-layout'].remoteScreenShares;
if (screenshares.find(sId => sId === participantId)) {
diff --git a/react/features/large-video/actions.any.js b/react/features/large-video/actions.any.js
index f530269e8e..4724393af4 100644
--- a/react/features/large-video/actions.any.js
+++ b/react/features/large-video/actions.any.js
@@ -107,17 +107,12 @@ function _electLastVisibleRemoteVideo(tracks) {
* @returns {(string|undefined)}
*/
function _electParticipantInLargeVideo(state) {
- const stageFilmstrip = isStageFilmstripAvailable(state);
- let participant;
+ // If a participant is pinned, they will be shown in the LargeVideo (regardless of whether they are local or
+ // remote) when the filmstrip on stage is disabled.
+ let participant = getPinnedParticipant(state);
- if (!stageFilmstrip) {
- // If a participant is pinned, they will be shown in the LargeVideo (regardless of whether they are local or
- // remote) when the filmstrip on stage is disabled.
- participant = getPinnedParticipant(state);
-
- if (participant) {
- return participant.id;
- }
+ if (participant) {
+ return participant.id;
}
// Pick the most recent remote screenshare that was added to the conference.
@@ -127,15 +122,6 @@ function _electParticipantInLargeVideo(state) {
return remoteScreenShares[remoteScreenShares.length - 1];
}
- // Next, pick the pinned participant when filmstrip on stage is enabled.
- if (stageFilmstrip) {
- participant = getPinnedParticipant(state);
-
- if (participant) {
- return participant.id;
- }
- }
-
// Next, pick the dominant speaker (other than self).
participant = getDominantSpeakerParticipant(state);
if (participant && !participant.local) {