fix(follow-me): SS not visible

The remote screen shares stored in redux were not updated when follow
me is active. Therefore the receiver constraints were not correct.
This commit is contained in:
Hristo Terezov 2022-08-24 16:17:17 -05:00 committed by Дамян Минков
parent 8dd71a921b
commit 594f9dfcdd
1 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import { getAutoPinSetting, updateAutoPinnedParticipant } from './functions';
StateListenerRegistry.register( StateListenerRegistry.register(
/* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants, /* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants,
/* listener */ (sortedRemoteVirtualScreenshareParticipants, store) => { /* listener */ (sortedRemoteVirtualScreenshareParticipants, store) => {
if (!getAutoPinSetting() || isFollowMeActive(store) || !getMultipleVideoSupportFeatureFlag(store.getState())) { if (!getMultipleVideoSupportFeatureFlag(store.getState())) {
return; return;
} }
@ -36,8 +36,10 @@ StateListenerRegistry.register(
if (!equals(oldScreenSharesOrder, newScreenSharesOrder)) { if (!equals(oldScreenSharesOrder, newScreenSharesOrder)) {
store.dispatch(virtualScreenshareParticipantsUpdated(newScreenSharesOrder)); store.dispatch(virtualScreenshareParticipantsUpdated(newScreenSharesOrder));
if (getAutoPinSetting() && !isFollowMeActive(store)) {
updateAutoPinnedParticipant(oldScreenSharesOrder, store); updateAutoPinnedParticipant(oldScreenSharesOrder, store);
} }
}
}); });
@ -53,7 +55,7 @@ StateListenerRegistry.register(
// possible to have screen sharing participant that has already left in the remoteScreenShares array. // possible to have screen sharing participant that has already left in the remoteScreenShares array.
// This can lead to rendering a thumbnails for already left participants since the remoteScreenShares // This can lead to rendering a thumbnails for already left participants since the remoteScreenShares
// array is used for building the ordered list of remote participants. // array is used for building the ordered list of remote participants.
if (!getAutoPinSetting() || isFollowMeActive(store) || getMultipleVideoSupportFeatureFlag(store.getState())) { if (getMultipleVideoSupportFeatureFlag(store.getState())) {
return; return;
} }
@ -88,6 +90,8 @@ StateListenerRegistry.register(
store.dispatch( store.dispatch(
setRemoteParticipantsWithScreenShare(newScreenSharesOrder)); setRemoteParticipantsWithScreenShare(newScreenSharesOrder));
if (getAutoPinSetting() && !isFollowMeActive(store)) {
updateAutoPinnedParticipant(oldScreenSharesOrder, store); updateAutoPinnedParticipant(oldScreenSharesOrder, store);
} }
}
}, 100)); }, 100));