feat(screenshare): allow auto-pin remote only

This commit is contained in:
Leonard Kim 2019-06-21 14:26:03 -07:00 committed by yanas
parent a73a642c64
commit fa818bc386
2 changed files with 18 additions and 8 deletions

View File

@ -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

View File

@ -55,8 +55,14 @@ StateListenerRegistry.register(
= store.getState()['features/video-layout'].screenShares || [];
const knownSharingParticipantIds = tracks.reduce((acc, track) => {
if (track.mediaType === 'video' && track.videoType === 'desktop') {
const skipTrack
= interfaceConfig.AUTO_PIN_LATEST_SCREEN_SHARE === 'remote-only'
&& track.local;
if (!skipTrack) {
acc.push(track.participantId);
}
}
return acc;
}, []);