Compare commits

...

1 Commits

Author SHA1 Message Date
Jaya Allamsetty
5c7392a32f fix(video-layout) Fixes auto-pinning of SS in large calls. (#16992)
* fix(video-layout) Fixes auto-pinning of SS in large calls.
In calls with 50+ participants, isTopPanelEnabled returns true. This causes isStageFilmstripAvailable(state) (called with no minimum participant count from getPinnedParticipant) to return true even when activeParticipants is empty. When getPinnedParticipant takes that stage filmstrip path, it reads from activeParticipants.find(p => p.pinned) — which is always
  empty for an auto-pinned screenshare.
Added an explicit check in shouldDisplayTileView's auto-mode logic: when there are active screenshares AND the top panel is enabled AND auto-pin is active AND Follow Me isn't controlling the layout, exit tile view. The guards on getAutoPinSetting() and !isFollowMeActive(state) mirror the same conditions checked everywhere else before auto-pinning fires, ensuring
  consistent behavior.

* squash: Fixes linter error
2026-02-24 14:17:17 -05:00

View File

@@ -4,7 +4,8 @@ import { getFeatureFlag } from '../base/flags/functions';
import { pinParticipant } from '../base/participants/actions';
import { getParticipantCount, getPinnedParticipant } from '../base/participants/functions';
import { FakeParticipant } from '../base/participants/types';
import { isStageFilmstripAvailable, isTileViewModeDisabled } from '../filmstrip/functions';
import { isStageFilmstripAvailable, isTileViewModeDisabled, isTopPanelEnabled } from '../filmstrip/functions';
import { isFollowMeActive } from '../follow-me/functions';
import { isVideoPlaying } from '../shared-video/functions';
import { VIDEO_QUALITY_LEVELS } from '../video-quality/constants';
import { getReceiverVideoQualityLevel } from '../video-quality/functions';
@@ -105,6 +106,15 @@ export function shouldDisplayTileView(state: IReduxState) {
// We want jibri to use stage view by default
|| iAmRecorder
// In large calls (top panel enabled), a screenshare should exit tile view automatically
// when auto-pin is active and Follow Me is not controlling the layout.
// getPinnedParticipant() uses the stage filmstrip path in large calls and ignores
// features/base/participants.pinnedParticipant, so we need this explicit check.
|| (Boolean(state['features/video-layout'].remoteScreenShares?.length)
&& isTopPanelEnabled(state)
&& getAutoPinSetting()
&& !isFollowMeActive(state))
);
return !shouldDisplayNormalMode;