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: Stops auto pinning if shared video is playing.

damencho4ace04e63c6f
diff --git a/react/features/video-layout/subscriber.js b/react/features/video-layout/subscriber.js
index 1b5d28710b..d729648df9 100644
--- a/react/features/video-layout/subscriber.js
+++ b/react/features/video-layout/subscriber.js
@@ -101,6 +101,11 @@ function _updateAutoPinnedParticipant(screenShares, { dispatch, getState }) {
const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
const pinned = getPinnedParticipant(getState);
+ // if the pinned participant is shared video or some other fake participant we want to skip auto-pinning
+ if (pinned?.isFakeParticipant) {
+ return;
+ }
+
// Unpin the screenshare when the screensharing participant leaves. Switch to tile view if no other
// participant was pinned before screenshare was auto-pinned, pin the previously pinned participant otherwise.
if (!remoteScreenShares?.length) {