Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(screenshare): allow auto-pin remote only

Leonard Kimfa818bc386dc
diff --git a/interface_config.js b/interface_config.js
index 724b646c5f..24efc27ca8 100644
--- a/interface_config.js
+++ b/interface_config.js
@@ -177,7 +177,17 @@ var interfaceConfig = {
// Browsers, in addition to those which do not fully support WebRTC, that
// are not supported and should show the unsupported browser page.
- UNSUPPORTED_BROWSERS: []
+ UNSUPPORTED_BROWSERS: [],
+
+ /**
+ * A UX mode where the last screen share participant is automatically
+ * pinned. Valid values are the string "remote-only" so remote participants
+ * get pinned but not local, otherwise any truthy value for all participants,
+ * and any falsy value to disable the feature.
+ *
+ * Note: this mode is experimental and subject to breakage.
+ */
+ AUTO_PIN_LATEST_SCREEN_SHARE: 'remote-only'
/**
* How many columns the tile view can expand to. The respected range is
@@ -205,12 +215,6 @@ var interfaceConfig = {
*/
// ANDROID_APP_PACKAGE: 'org.jitsi.meet',
- /**
- * A UX mode where the last screen share participant is automatically
- * pinned. Note: this mode is experimental and subject to breakage.
- */
- // AUTO_PIN_LATEST_SCREEN_SHARE: false,
-
/**
* Override the behavior of some notifications to remain displayed until
* explicitly dismissed through a user action. The value is how long, in
diff --git a/react/features/video-layout/subscriber.js b/react/features/video-layout/subscriber.js
index ed0255d013..ffb143a269 100644
--- a/react/features/video-layout/subscriber.js
+++ b/react/features/video-layout/subscriber.js
@@ -55,7 +55,13 @@ StateListenerRegistry.register(
= store.getState()['features/video-layout'].screenShares || [];
const knownSharingParticipantIds = tracks.reduce((acc, track) => {
if (track.mediaType === 'video' && track.videoType === 'desktop') {
- acc.push(track.participantId);
+ const skipTrack
+ = interfaceConfig.AUTO_PIN_LATEST_SCREEN_SHARE === 'remote-only'
+ && track.local;
+
+ if (!skipTrack) {
+ acc.push(track.participantId);
+ }
}
return acc;