Attempts to unpin participant from same screenIndex if one is already pinned.

This commit is contained in:
Neil Dorin
2021-06-09 16:57:42 -06:00
parent 25e7e9634a
commit 08f4d8e9a2

View File

@@ -2113,6 +2113,17 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public void PinParticipant(int userId, int screenIndex)
{
// Try to see if anyone is already pinned to this screen
var pinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(screenIndex));
if (pinnedParticipant != null)
{
// If we find a participant already pinned, unpin this one and clear the feedback values
UnPinParticipant(pinnedParticipant.UserId);
pinnedParticipant.IsPinnedFb = false;
pinnedParticipant.ScreenIndexIsPinnedToFb = -1;
}
SendText(string.Format("zCommand Call Pin Id: {0} Enable: on Screen: {1}", userId, screenIndex));
}