From afe2046c812f34f92c977a27cd24d95aa3030bc6 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Mon, 7 Jun 2021 14:45:40 -0500 Subject: [PATCH 01/14] Added methods to select Call Layout Size. --- .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 4 + .../VideoCodec/ZoomRoom/ZoomRoom.cs | 39 ++++++- .../VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs | 107 +++++++++++++++++- 3 files changed, 148 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index a8805a21..36499281 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -31,6 +31,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec BoolFeedback LayoutViewIsOnLastPageFeedback { get; } // TODO: #697 [*] Consider modifying to report button visibility in func BoolFeedback CanSwapContentWithThumbnailFeedback { get; } BoolFeedback ContentSwappedWithThumbnailFeedback { get; } + //StringFeedback LayoutSizeFeedback { get; } // TOOD: #714 [ ] Feature Layout Size ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; } ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; } @@ -41,6 +42,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec void LayoutTurnNextPage(); void LayoutTurnPreviousPage(); + + void GetCurrentLayoutSize(); // TOOD: #714 [ ] Feature Layout Size + void SetLayoutSize(ZoomRoom.zConfiguration.eLayoutSize layoutSize); // TOOD: #714 [ ] Feature Layout Size } public class LayoutInfoChangedEventArgs : EventArgs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 2301e544..ceead746 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1795,7 +1795,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } }); - layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); + layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); + + // TOOD: #714 [ ] Feature Layout Size + trilist.SetSigFalseAction(joinMap.SetLayoutSizeOff.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Off)); + trilist.SetSigFalseAction(joinMap.SetLayoutSize1.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size1)); + trilist.SetSigFalseAction(joinMap.SetLayoutSize2.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size2)); + trilist.SetSigFalseAction(joinMap.SetLayoutSize3.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size3)); + trilist.SetSigFalseAction(joinMap.SetLayoutSizeStrip.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Strip)); + // TOOD: #714 [ ] Feature Layout Size + trilist.SetSigFalseAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, layoutsCodec.GetCurrentLayoutSize); + trilist.SetStringSigAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, (s) => + { + try + { + var size = (zConfiguration.eLayoutSize)Enum.Parse(typeof(zConfiguration.eLayoutSize), s, true); + SetLayoutSize(size); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); + } + }); } var pinCodec = this as IHasParticipantPinUnpin; @@ -2306,6 +2327,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom SendText("zCommand Call Layout TurnPage Forward: Off"); } + // TOOD: #714 [ ] Feature Layout Size + public zConfiguration.eLayoutSize LastSelectedLayoutSize { get; private set; } + + // TOOD: #714 [ ] Feature Layout Size + public void GetCurrentLayoutSize() + { + SendText("zConfiguration Call Layout Size"); + } + + // TOOD: #714 [ ] Feature Layout Size + public void SetLayoutSize(zConfiguration.eLayoutSize layoutSize) + { + LastSelectedLayoutSize = layoutSize; + SendText(String.Format("zConfiguration Call Layout Size: {0}", layoutSize.ToString())); + } + #endregion #region IHasCodecLayouts Members diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs index 07265d20..24cf65e8 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs @@ -164,6 +164,96 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.DigitalSerial }); + // TOOD: #714 [ ] Feature Layout Size + //[JoinName("GetCurrentLayoutSize")] + //public JoinDataComplete GetCurrentLayoutSize = new JoinDataComplete( + // new JoinData + // { + // JoinNumber = 230, + // JoinSpan = 1 + // }, + // new JoinMetadata + // { + // Description = "Poll for the current layout size", + // JoinCapabilities = eJoinCapabilities.FromSIMPL, + // JoinType = eJoinType.Digital + // }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("SetLayoutSizeOff")] + public JoinDataComplete SetLayoutSizeOff = new JoinDataComplete( + new JoinData + { + JoinNumber = 231, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout size off", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("SetLayoutSize1")] + public JoinDataComplete SetLayoutSize1 = new JoinDataComplete( + new JoinData + { + JoinNumber = 232, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout size 1", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("SetLayoutSize2")] + public JoinDataComplete SetLayoutSize2 = new JoinDataComplete( + new JoinData + { + JoinNumber = 233, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout size 2", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("SetLayoutSize3")] + public JoinDataComplete SetLayoutSize3 = new JoinDataComplete( + new JoinData + { + JoinNumber = 234, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout size 3", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("SetLayoutSizeStrip")] + public JoinDataComplete SetLayoutSizeStrip = new JoinDataComplete( + new JoinData + { + JoinNumber = 235, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout size strip", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + //[JoinName("ParticipantAudioMuteToggleStart")] //public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( // new JoinData @@ -256,7 +346,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Description = "Sets and reports the current layout. Use the LayoutXXXXIsAvailable signals to determine valid layouts", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Serial - }); + }); + + // TOOD: #714 [ ] Feature Layout Size + [JoinName("GetSetCurrentLayoutSize")] + public JoinDataComplete GetSetCurrentLayoutSize = new JoinDataComplete( + new JoinData + { + JoinNumber = 230, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets and reports the current layout size.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.DigitalSerial + }); #endregion From 492e593263c847bd64ac01447421824456fc4373 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Mon, 7 Jun 2021 22:22:00 -0500 Subject: [PATCH 02/14] Updated IHasCodecLayouts to implement Layout Position selection and feedback, updated bridge map to map Layout Position signals. Updated ZoomRoom to implement Layout Position selection and feedback. --- .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 10 +- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 115 ++++++++++- .../VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs | 180 +++++++++++++++--- 3 files changed, 274 insertions(+), 31 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 36499281..97ac35c5 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -31,7 +31,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec BoolFeedback LayoutViewIsOnLastPageFeedback { get; } // TODO: #697 [*] Consider modifying to report button visibility in func BoolFeedback CanSwapContentWithThumbnailFeedback { get; } BoolFeedback ContentSwappedWithThumbnailFeedback { get; } - //StringFeedback LayoutSizeFeedback { get; } // TOOD: #714 [ ] Feature Layout Size + StringFeedback LayoutSizeFeedback { get; } // TODO: #714 [ ] Feature Layout Size + StringFeedback LayoutPositionFeedback { get; } // TODO: #714 [ ] Feature Layout Size ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; } ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; } @@ -43,8 +44,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec void LayoutTurnNextPage(); void LayoutTurnPreviousPage(); - void GetCurrentLayoutSize(); // TOOD: #714 [ ] Feature Layout Size - void SetLayoutSize(ZoomRoom.zConfiguration.eLayoutSize layoutSize); // TOOD: #714 [ ] Feature Layout Size + void GetCurrentLayoutSize(); // TODO: #714 [ ] Feature Layout Size + void SetLayoutSize(ZoomRoom.zConfiguration.eLayoutSize layoutSize); // TODO: #714 [ ] Feature Layout Size + + void GetCurrentLayoutPosition(); // TODO: #714 [ ] Feature Layout Size + void SetLayoutPosition(ZoomRoom.zConfiguration.eLayoutPosition layoutPosition); // TODO: #714 [ ] Feature Layout Size } public class LayoutInfoChangedEventArgs : EventArgs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index ceead746..85de4dec 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -126,6 +126,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); + // TODO: #714 [ ] Feature Layout Size + LayoutSizeFeedback = new StringFeedback(LayoutSizeFeedbackFunc); + LayoutPositionFeedback = new StringFeedback(LayoutPositionFeedbackFunc); + + LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc); CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc); @@ -1797,13 +1802,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size trilist.SetSigFalseAction(joinMap.SetLayoutSizeOff.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Off)); trilist.SetSigFalseAction(joinMap.SetLayoutSize1.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size1)); trilist.SetSigFalseAction(joinMap.SetLayoutSize2.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size2)); trilist.SetSigFalseAction(joinMap.SetLayoutSize3.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size3)); - trilist.SetSigFalseAction(joinMap.SetLayoutSizeStrip.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Strip)); - // TOOD: #714 [ ] Feature Layout Size + trilist.SetSigFalseAction(joinMap.SetLayoutSizeStrip.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Strip)); trilist.SetSigFalseAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, layoutsCodec.GetCurrentLayoutSize); trilist.SetStringSigAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, (s) => { @@ -1817,6 +1821,41 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); } }); + layoutsCodec.LayoutSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutSize.JoinNumber]); + + // TODO: #714 [ ] Feature Layout Size + trilist.SetSigFalseAction(joinMap.SetLayoutPositionCenter.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Center)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionUp.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Up)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionRight.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Right)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionUpRight.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.UpRight)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionDown.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Down)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionDownRight.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.DownRight)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionLeft.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Left)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionUpLeft.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.UpLeft)); + trilist.SetSigFalseAction(joinMap.SetLayoutPositionDownLeft.JoinNumber, + () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.DownLeft)); + trilist.SetSigFalseAction(joinMap.GetSetCurrentLayoutPosition.JoinNumber, layoutsCodec.GetCurrentLayoutPosition); + trilist.SetStringSigAction(joinMap.GetSetCurrentLayoutPosition.JoinNumber, (s) => + { + try + { + var position = (zConfiguration.eLayoutPosition) Enum.Parse(typeof (zConfiguration.eLayoutPosition), s, true); + SetLayoutPosition(position); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutPosition: {1}", s, e); + } + }); + } var pinCodec = this as IHasParticipantPinUnpin; @@ -2327,22 +2366,86 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom SendText("zCommand Call Layout TurnPage Forward: Off"); } - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size + /// + /// Stores last selected layout size + /// public zConfiguration.eLayoutSize LastSelectedLayoutSize { get; private set; } - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size + /// + /// Queries for current layout size + /// public void GetCurrentLayoutSize() { SendText("zConfiguration Call Layout Size"); } - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size + /// + /// Sets selected layout size + /// + /// zConfiguration.eLayoutSize public void SetLayoutSize(zConfiguration.eLayoutSize layoutSize) { LastSelectedLayoutSize = layoutSize; SendText(String.Format("zConfiguration Call Layout Size: {0}", layoutSize.ToString())); } + // TODO: #714 [ ] Feature Layout Size + private Func LayoutSizeFeedbackFunc + { + get + { + return () => Configuration.Call.Layout.Size.ToString(); + } + } + + /// + /// Layout size feedback + /// + public StringFeedback LayoutSizeFeedback { get; private set; } + + // TODO: #714 [ ] Feature Layout Size + /// + /// Stores last selected layout position + /// + public zConfiguration.eLayoutPosition LastSelectedLayoutPosition { get; private set; } + + // TODO: #714 [ ] Feature Layout Size + /// + /// Queries for current layout position + /// + public void GetCurrentLayoutPosition() + { + SendText("zConfiguration Call Layout Position"); + } + + // TODO: #714 [ ] Feature Layout Size + /// + /// Sets selected layout position + /// + /// + public void SetLayoutPosition(zConfiguration.eLayoutPosition layoutPosition) + { + LastSelectedLayoutPosition = layoutPosition; + SendText(String.Format("zConfiguration Call Layout Position: {0}", layoutPosition.ToString())); + } + + // TODO: #714 [ ] Feature Layout Size + private Func LayoutPositionFeedbackFunc + { + get + { + return () => Configuration.Call.Layout.Position.ToString(); + } + } + + /// + /// Layout position feedback + /// + public StringFeedback LayoutPositionFeedback { get; private set; } + #endregion #region IHasCodecLayouts Members diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs index 24cf65e8..fe9e0691 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs @@ -162,24 +162,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Description = "FB Indicates if layout 'ShareAll' is available", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.DigitalSerial - }); + }); - // TOOD: #714 [ ] Feature Layout Size - //[JoinName("GetCurrentLayoutSize")] - //public JoinDataComplete GetCurrentLayoutSize = new JoinDataComplete( - // new JoinData - // { - // JoinNumber = 230, - // JoinSpan = 1 - // }, - // new JoinMetadata - // { - // Description = "Poll for the current layout size", - // JoinCapabilities = eJoinCapabilities.FromSIMPL, - // JoinType = eJoinType.Digital - // }); - - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("SetLayoutSizeOff")] public JoinDataComplete SetLayoutSizeOff = new JoinDataComplete( new JoinData @@ -194,7 +179,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Digital }); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("SetLayoutSize1")] public JoinDataComplete SetLayoutSize1 = new JoinDataComplete( new JoinData @@ -209,7 +194,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Digital }); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("SetLayoutSize2")] public JoinDataComplete SetLayoutSize2 = new JoinDataComplete( new JoinData @@ -224,7 +209,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Digital }); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("SetLayoutSize3")] public JoinDataComplete SetLayoutSize3 = new JoinDataComplete( new JoinData @@ -239,7 +224,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Digital }); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("SetLayoutSizeStrip")] public JoinDataComplete SetLayoutSizeStrip = new JoinDataComplete( new JoinData @@ -252,6 +237,141 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Description = "Sets layout size strip", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionCenter")] + public JoinDataComplete SetLayoutPositionCenter = new JoinDataComplete( + new JoinData + { + JoinNumber = 241, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to center", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionUp")] + public JoinDataComplete SetLayoutPositionUp = new JoinDataComplete( + new JoinData + { + JoinNumber = 242, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to up", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionRight")] + public JoinDataComplete SetLayoutPositionRight = new JoinDataComplete( + new JoinData + { + JoinNumber = 243, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to right", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionUpRight")] + public JoinDataComplete SetLayoutPositionUpRight = new JoinDataComplete( + new JoinData + { + JoinNumber = 244, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to up right", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionDown")] + public JoinDataComplete SetLayoutPositionDown = new JoinDataComplete( + new JoinData + { + JoinNumber = 245, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to down", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionDownRight")] + public JoinDataComplete SetLayoutPositionDownRight = new JoinDataComplete( + new JoinData + { + JoinNumber = 246, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to down right", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionLeft")] + public JoinDataComplete SetLayoutPositionLeft = new JoinDataComplete( + new JoinData + { + JoinNumber = 247, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position todown left", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionUpLeft")] + public JoinDataComplete SetLayoutPositionUpLeft = new JoinDataComplete( + new JoinData + { + JoinNumber = 248, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to up left", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital + }); + + // TODO: #714 [ ] Feature Layout Size + [JoinName("SetLayoutPositionDownLeft")] + public JoinDataComplete SetLayoutPositionDownLeft = new JoinDataComplete( + new JoinData + { + JoinNumber = 249, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets layout position to down left", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.Digital }); //[JoinName("ParticipantAudioMuteToggleStart")] @@ -348,7 +468,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Serial }); - // TOOD: #714 [ ] Feature Layout Size + // TODO: #714 [ ] Feature Layout Size [JoinName("GetSetCurrentLayoutSize")] public JoinDataComplete GetSetCurrentLayoutSize = new JoinDataComplete( new JoinData @@ -363,6 +483,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.DigitalSerial }); + // TODO: #714 [ ] Feature Layout Size + [JoinName("GetSetCurrentLayoutPosition")] + public JoinDataComplete GetSetCurrentLayoutPosition = new JoinDataComplete( + new JoinData + { + JoinNumber = 240, + JoinSpan = 1 + }, + new JoinMetadata + { + Description = "Sets and reports the current layout position.", + JoinCapabilities = eJoinCapabilities.ToFromSIMPL, + JoinType = eJoinType.DigitalSerial + }); + + #endregion public ZoomRoomJoinMap(uint joinStart) From 655bb954fa7ab51b392c64535de127afff92a2f0 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 8 Jun 2021 14:38:33 -0500 Subject: [PATCH 03/14] Updated IHasCodecLayouts and ZoomRoom to test feedback of Layout Size and Layout Position. --- .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 2 +- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 43 ++++++++++++------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 97ac35c5..209fc3b3 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -32,7 +32,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec BoolFeedback CanSwapContentWithThumbnailFeedback { get; } BoolFeedback ContentSwappedWithThumbnailFeedback { get; } StringFeedback LayoutSizeFeedback { get; } // TODO: #714 [ ] Feature Layout Size - StringFeedback LayoutPositionFeedback { get; } // TODO: #714 [ ] Feature Layout Size + //StringFeedback LayoutPositionFeedback { get; } // TODO: #714 [ ] Feature Layout Size ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; } ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 85de4dec..69fefbf5 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -108,6 +108,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); + // TODO: #714 [ ] Feature Layout Size + // Testing to see if the below is needed or if Selfview PiP Postion handles the feedback + //LayoutPositionFeedback = new StringFeedback(LayoutPositionFeedbackFunc); SetUpFeedbackActions(); @@ -127,8 +130,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); // TODO: #714 [ ] Feature Layout Size - LayoutSizeFeedback = new StringFeedback(LayoutSizeFeedbackFunc); - LayoutPositionFeedback = new StringFeedback(LayoutPositionFeedbackFunc); + LayoutSizeFeedback = new StringFeedback(LayoutSizeFeedbackFunc); LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); @@ -516,6 +518,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom LocalLayoutFeedback.FireUpdate(); break; } + case "Size": + { + + break; + } } }; @@ -1488,7 +1495,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom return; } - Debug.Console(1, this, "****************************Call Participants***************************"); + Debug.Console(1, this, "*************************** Call Participants **************************"); foreach (var participant in Participants.CurrentParticipants) { Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name, @@ -1575,7 +1582,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } } - Debug.Console(1, this, "****************************Active Calls*********************************"); + Debug.Console(1, this, "*************************** Active Calls ********************************"); // Clean up any disconnected calls left in the list for (int i = 0; i < ActiveCalls.Count; i++) @@ -1591,7 +1598,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom if (!call.IsActiveCall) { - Debug.Console(1, this, "******Removing Inactive Call: {0}******", call.Name); + Debug.Console(1, this, "***** Removing Inactive Call: {0} *****", call.Name); ActiveCalls.Remove(call); } } @@ -1855,7 +1862,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutPosition: {1}", s, e); } }); - + //layoutsCodec.LayoutPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutPosition.JoinNumber]); + SelfviewPipPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutPosition.JoinNumber]); } var pinCodec = this as IHasParticipantPinUnpin; @@ -2411,7 +2419,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom /// Stores last selected layout position /// public zConfiguration.eLayoutPosition LastSelectedLayoutPosition { get; private set; } - + // TODO: #714 [ ] Feature Layout Size /// /// Queries for current layout position @@ -2433,18 +2441,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } // TODO: #714 [ ] Feature Layout Size - private Func LayoutPositionFeedbackFunc - { - get - { - return () => Configuration.Call.Layout.Position.ToString(); - } - } + // commented out to test if SelfviewPipPositionFeedback & (Func) would provide feedback + // --> in testing, feedback of the current position is still not updating + //private Func LayoutPositionFeedbackFunc + //{ + // get + // { + // return () => Configuration.Call.Layout.Position.ToString(); + // } + //} /// /// Layout position feedback /// - public StringFeedback LayoutPositionFeedback { get; private set; } + //public StringFeedback LayoutPositionFeedback { get; private set; } + #endregion @@ -2479,7 +2490,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom public void MinMaxLayoutToggle() { throw new NotImplementedException(); - } + } #endregion From ca8207f2bd64496fd17aff74f10fd29bcf0258cf Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 8 Jun 2021 15:20:42 -0500 Subject: [PATCH 04/14] Removed Layout Position properties and methods. Using SelfviewPipPosition properties and methods. --- .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 4 - .../VideoCodec/ZoomRoom/ZoomRoom.cs | 88 +--------- .../VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs | 153 ------------------ 3 files changed, 2 insertions(+), 243 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 209fc3b3..555dfdb6 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -32,7 +32,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec BoolFeedback CanSwapContentWithThumbnailFeedback { get; } BoolFeedback ContentSwappedWithThumbnailFeedback { get; } StringFeedback LayoutSizeFeedback { get; } // TODO: #714 [ ] Feature Layout Size - //StringFeedback LayoutPositionFeedback { get; } // TODO: #714 [ ] Feature Layout Size ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; } ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; } @@ -46,9 +45,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec void GetCurrentLayoutSize(); // TODO: #714 [ ] Feature Layout Size void SetLayoutSize(ZoomRoom.zConfiguration.eLayoutSize layoutSize); // TODO: #714 [ ] Feature Layout Size - - void GetCurrentLayoutPosition(); // TODO: #714 [ ] Feature Layout Size - void SetLayoutPosition(ZoomRoom.zConfiguration.eLayoutPosition layoutPosition); // TODO: #714 [ ] Feature Layout Size } public class LayoutInfoChangedEventArgs : EventArgs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 69fefbf5..5e14c8df 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -108,10 +108,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); - // TODO: #714 [ ] Feature Layout Size - // Testing to see if the below is needed or if Selfview PiP Postion handles the feedback - //LayoutPositionFeedback = new StringFeedback(LayoutPositionFeedbackFunc); - + SetUpFeedbackActions(); Cameras = new List(); @@ -132,7 +129,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom // TODO: #714 [ ] Feature Layout Size LayoutSizeFeedback = new StringFeedback(LayoutSizeFeedbackFunc); - LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc); CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc); @@ -1828,42 +1824,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); } }); - layoutsCodec.LayoutSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutSize.JoinNumber]); - - // TODO: #714 [ ] Feature Layout Size - trilist.SetSigFalseAction(joinMap.SetLayoutPositionCenter.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Center)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionUp.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Up)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionRight.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Right)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionUpRight.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.UpRight)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionDown.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Down)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionDownRight.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.DownRight)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionLeft.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.Left)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionUpLeft.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.UpLeft)); - trilist.SetSigFalseAction(joinMap.SetLayoutPositionDownLeft.JoinNumber, - () => layoutsCodec.SetLayoutPosition(zConfiguration.eLayoutPosition.DownLeft)); - trilist.SetSigFalseAction(joinMap.GetSetCurrentLayoutPosition.JoinNumber, layoutsCodec.GetCurrentLayoutPosition); - trilist.SetStringSigAction(joinMap.GetSetCurrentLayoutPosition.JoinNumber, (s) => - { - try - { - var position = (zConfiguration.eLayoutPosition) Enum.Parse(typeof (zConfiguration.eLayoutPosition), s, true); - SetLayoutPosition(position); - } - catch (Exception e) - { - Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutPosition: {1}", s, e); - } - }); - //layoutsCodec.LayoutPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutPosition.JoinNumber]); - SelfviewPipPositionFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutPosition.JoinNumber]); + layoutsCodec.LayoutSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutSize.JoinNumber]); } var pinCodec = this as IHasParticipantPinUnpin; @@ -2309,8 +2270,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom private void ComputeAvailableLayouts() { zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None; - // TODO: #697 [X] Compute the avaialble layouts and set the value of AvailableLayouts - // Will need to test and confirm that this logic evaluates correctly if (Status.Layout.can_Switch_Wall_View) { availableLayouts |= zConfiguration.eLayoutStyle.Gallery; @@ -2414,49 +2373,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom /// public StringFeedback LayoutSizeFeedback { get; private set; } - // TODO: #714 [ ] Feature Layout Size - /// - /// Stores last selected layout position - /// - public zConfiguration.eLayoutPosition LastSelectedLayoutPosition { get; private set; } - - // TODO: #714 [ ] Feature Layout Size - /// - /// Queries for current layout position - /// - public void GetCurrentLayoutPosition() - { - SendText("zConfiguration Call Layout Position"); - } - - // TODO: #714 [ ] Feature Layout Size - /// - /// Sets selected layout position - /// - /// - public void SetLayoutPosition(zConfiguration.eLayoutPosition layoutPosition) - { - LastSelectedLayoutPosition = layoutPosition; - SendText(String.Format("zConfiguration Call Layout Position: {0}", layoutPosition.ToString())); - } - - // TODO: #714 [ ] Feature Layout Size - // commented out to test if SelfviewPipPositionFeedback & (Func) would provide feedback - // --> in testing, feedback of the current position is still not updating - //private Func LayoutPositionFeedbackFunc - //{ - // get - // { - // return () => Configuration.Call.Layout.Position.ToString(); - // } - //} - - /// - /// Layout position feedback - /// - //public StringFeedback LayoutPositionFeedback { get; private set; } - - #endregion #region IHasCodecLayouts Members diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs index fe9e0691..8c34bdeb 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs @@ -6,8 +6,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { public class ZoomRoomJoinMap : VideoCodecControllerJoinMap { - // TODO: #697 [X] Set join numbers - #region Digital [JoinName("CanSwapContentWithThumbnail")] @@ -237,141 +235,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Description = "Sets layout size strip", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionCenter")] - public JoinDataComplete SetLayoutPositionCenter = new JoinDataComplete( - new JoinData - { - JoinNumber = 241, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to center", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionUp")] - public JoinDataComplete SetLayoutPositionUp = new JoinDataComplete( - new JoinData - { - JoinNumber = 242, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to up", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionRight")] - public JoinDataComplete SetLayoutPositionRight = new JoinDataComplete( - new JoinData - { - JoinNumber = 243, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to right", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionUpRight")] - public JoinDataComplete SetLayoutPositionUpRight = new JoinDataComplete( - new JoinData - { - JoinNumber = 244, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to up right", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionDown")] - public JoinDataComplete SetLayoutPositionDown = new JoinDataComplete( - new JoinData - { - JoinNumber = 245, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to down", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionDownRight")] - public JoinDataComplete SetLayoutPositionDownRight = new JoinDataComplete( - new JoinData - { - JoinNumber = 246, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to down right", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionLeft")] - public JoinDataComplete SetLayoutPositionLeft = new JoinDataComplete( - new JoinData - { - JoinNumber = 247, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position todown left", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionUpLeft")] - public JoinDataComplete SetLayoutPositionUpLeft = new JoinDataComplete( - new JoinData - { - JoinNumber = 248, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to up left", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutPositionDownLeft")] - public JoinDataComplete SetLayoutPositionDownLeft = new JoinDataComplete( - new JoinData - { - JoinNumber = 249, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout position to down left", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital }); //[JoinName("ParticipantAudioMuteToggleStart")] @@ -483,22 +346,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.DigitalSerial }); - // TODO: #714 [ ] Feature Layout Size - [JoinName("GetSetCurrentLayoutPosition")] - public JoinDataComplete GetSetCurrentLayoutPosition = new JoinDataComplete( - new JoinData - { - JoinNumber = 240, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets and reports the current layout position.", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.DigitalSerial - }); - - #endregion public ZoomRoomJoinMap(uint joinStart) From 1805ebaf0fa0b4899725b30f9d479a8cb4b00ace Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Tue, 8 Jun 2021 17:56:00 -0500 Subject: [PATCH 05/14] Converted ZoomRoom Layout Size properties and methods to interface, IHasSelfviewSize, following the patterns implemented for IHasSelfviewPosition and SelfviewPipPosition. --- .../Essentials Devices Common.csproj | 1 + .../VideoCodec/Interfaces/IHasCodecLayouts.cs | 4 - .../VideoCodec/Interfaces/IHasSelfviewSize.cs | 13 ++ .../VideoCodec/ZoomRoom/ZoomRoom.cs | 151 ++++++++++-------- .../VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs | 78 ++------- 5 files changed, 104 insertions(+), 143 deletions(-) create mode 100644 essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj index 3d9e5d30..21821d22 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj @@ -122,6 +122,7 @@ + diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs index 555dfdb6..a8805a21 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs @@ -31,7 +31,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec BoolFeedback LayoutViewIsOnLastPageFeedback { get; } // TODO: #697 [*] Consider modifying to report button visibility in func BoolFeedback CanSwapContentWithThumbnailFeedback { get; } BoolFeedback ContentSwappedWithThumbnailFeedback { get; } - StringFeedback LayoutSizeFeedback { get; } // TODO: #714 [ ] Feature Layout Size ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; } ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; } @@ -42,9 +41,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec void LayoutTurnNextPage(); void LayoutTurnPreviousPage(); - - void GetCurrentLayoutSize(); // TODO: #714 [ ] Feature Layout Size - void SetLayoutSize(ZoomRoom.zConfiguration.eLayoutSize layoutSize); // TODO: #714 [ ] Feature Layout Size } public class LayoutInfoChangedEventArgs : EventArgs diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs new file mode 100644 index 00000000..91ac3ec8 --- /dev/null +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasSelfviewSize.cs @@ -0,0 +1,13 @@ +using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; + +namespace PepperDash.Essentials.Core.DeviceTypeInterfaces +{ + public interface IHasSelfviewSize + { + StringFeedback SelfviewPipSizeFeedback { get; } + + void SelfviewPipSizeSet(CodecCommandWithLabel size); + + void SelfviewPipSizeToggle(); + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 5e14c8df..601d3346 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor, IRouting, IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode, - IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute + IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute, IHasSelfviewSize { private const long MeetingRefreshTimer = 60000; private const uint DefaultMeetingDurationMin = 30; @@ -108,6 +108,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc); SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc); + + // TODO: #714 [ ] SelfviewPipSizeFeedback + SelfviewPipSizeFeedback = new StringFeedback(SelfviewPipSizeFeedbackFunc); SetUpFeedbackActions(); @@ -126,9 +129,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc); - // TODO: #714 [ ] Feature Layout Size - LayoutSizeFeedback = new StringFeedback(LayoutSizeFeedbackFunc); - LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc); LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc); CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc); @@ -231,6 +231,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } } + // TODO: #714 [ ] SelfviewPipSizeFeedbackFunc + protected Func SelfviewPipSizeFeedbackFunc + { + get + { + return + () => + _currentSelfviewPipSize != null + ? _currentSelfviewPipSize.Command ?? "Unknown" + : "Unknown"; + } + } + protected Func LocalLayoutIsProminentFeedbackFunc { get { return () => false; } @@ -498,7 +511,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { case "Position": { - ComputeSelfviewPipStatus(); + ComputeSelfviewPipPositionStatus(); SelfviewPipPositionFeedback.FireUpdate(); @@ -516,7 +529,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } case "Size": { - + // TODO: #714 [ ] SetupFeedbackActions >> Size + ComputeSelfviewPipSizeStatus(); + + SelfviewPipSizeFeedback.FireUpdate(); + break; } @@ -530,7 +547,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { case "Position": { - ComputeSelfviewPipStatus(); + ComputeSelfviewPipPositionStatus(); SelfviewPipPositionFeedback.FireUpdate(); @@ -1803,28 +1820,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } }); - layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); - - // TODO: #714 [ ] Feature Layout Size - trilist.SetSigFalseAction(joinMap.SetLayoutSizeOff.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Off)); - trilist.SetSigFalseAction(joinMap.SetLayoutSize1.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size1)); - trilist.SetSigFalseAction(joinMap.SetLayoutSize2.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size2)); - trilist.SetSigFalseAction(joinMap.SetLayoutSize3.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Size3)); - trilist.SetSigFalseAction(joinMap.SetLayoutSizeStrip.JoinNumber, () => layoutsCodec.SetLayoutSize(zConfiguration.eLayoutSize.Strip)); - trilist.SetSigFalseAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, layoutsCodec.GetCurrentLayoutSize); - trilist.SetStringSigAction(joinMap.GetSetCurrentLayoutSize.JoinNumber, (s) => - { - try - { - var size = (zConfiguration.eLayoutSize)Enum.Parse(typeof(zConfiguration.eLayoutSize), s, true); - SetLayoutSize(size); - } - catch (Exception e) - { - Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); - } - }); - layoutsCodec.LayoutSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayoutSize.JoinNumber]); + layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]); } var pinCodec = this as IHasParticipantPinUnpin; @@ -1835,6 +1831,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom // Set the value of the local property to be used when pinning a participant trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u); } + + // TODO: #714 [ ] LinkZoomRoomToApi >> layoutSizeCoodec + var layoutSizeCodec = this as IHasSelfviewSize; + if (layoutSizeCodec != null) + { + trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle); + + layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]); + } + } public override void ExecuteSwitch(object selector) @@ -2206,13 +2212,58 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom new CodecCommandWithLabel("DownLeft", "Lower Left") }; - private void ComputeSelfviewPipStatus() + private void ComputeSelfviewPipPositionStatus() { _currentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault( p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower())); } + #endregion + + // TODO: #714 [ ] Implementation of IHasSelfviewPipSize + #region Implementation of IHasSelfviewPipSize + + private CodecCommandWithLabel _currentSelfviewPipSize; + + public StringFeedback SelfviewPipSizeFeedback { get; private set; } + + public void SelfviewPipSizeSet(CodecCommandWithLabel size) + { + SendText(String.Format("zConfiguration Call Layout Size: {0}", size.Command)); + } + + public void SelfviewPipSizeToggle() + { + if (_currentSelfviewPipSize != null) + { + var nextPipSizeIndex = SelfviewPipSizes.IndexOf(_currentSelfviewPipSize) + 1; + + if (nextPipSizeIndex >= SelfviewPipSizes.Count) + // Check if we need to loop back to the first item in the list + nextPipSizeIndex = 0; + + SelfviewPipSizeSet(SelfviewPipSizes[nextPipSizeIndex]); + } + } + + public List SelfviewPipSizes = new List() + { + new CodecCommandWithLabel("Off", "Off"), + new CodecCommandWithLabel("Size1", "Size 1"), + new CodecCommandWithLabel("Size2", "Size 2"), + new CodecCommandWithLabel("Size3", "Size 3"), + new CodecCommandWithLabel("Strip", "Strip") + }; + + private void ComputeSelfviewPipSizeStatus() + { + _currentSelfviewPipSize = + SelfviewPipSizes.FirstOrDefault( + p => p.Command.ToLower().Equals(Configuration.Call.Layout.Size.ToString().ToLower())); + } + + #endregion #region Implementation of IHasPhoneDialing @@ -2333,46 +2384,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom SendText("zCommand Call Layout TurnPage Forward: Off"); } - // TODO: #714 [ ] Feature Layout Size - /// - /// Stores last selected layout size - /// - public zConfiguration.eLayoutSize LastSelectedLayoutSize { get; private set; } - - // TODO: #714 [ ] Feature Layout Size - /// - /// Queries for current layout size - /// - public void GetCurrentLayoutSize() - { - SendText("zConfiguration Call Layout Size"); - } - - // TODO: #714 [ ] Feature Layout Size - /// - /// Sets selected layout size - /// - /// zConfiguration.eLayoutSize - public void SetLayoutSize(zConfiguration.eLayoutSize layoutSize) - { - LastSelectedLayoutSize = layoutSize; - SendText(String.Format("zConfiguration Call Layout Size: {0}", layoutSize.ToString())); - } - - // TODO: #714 [ ] Feature Layout Size - private Func LayoutSizeFeedbackFunc - { - get - { - return () => Configuration.Call.Layout.Size.ToString(); - } - } - - /// - /// Layout size feedback - /// - public StringFeedback LayoutSizeFeedback { get; private set; } - #endregion #region IHasCodecLayouts Members diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs index 8c34bdeb..f70c48bf 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs @@ -162,9 +162,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.DigitalSerial }); - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutSizeOff")] - public JoinDataComplete SetLayoutSizeOff = new JoinDataComplete( + // TODO: #714 [ ] JoinMap >> SelfivewPipSizeToggle + [JoinName("SelfviewPipSizeToggle")] + public JoinDataComplete SelfviewPipSizeToggle = new JoinDataComplete( new JoinData { JoinNumber = 231, @@ -172,70 +172,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom }, new JoinMetadata { - Description = "Sets layout size off", + Description = "Toggles the selfview pip size, (aka layout size)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutSize1")] - public JoinDataComplete SetLayoutSize1 = new JoinDataComplete( - new JoinData - { - JoinNumber = 232, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout size 1", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutSize2")] - public JoinDataComplete SetLayoutSize2 = new JoinDataComplete( - new JoinData - { - JoinNumber = 233, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout size 2", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutSize3")] - public JoinDataComplete SetLayoutSize3 = new JoinDataComplete( - new JoinData - { - JoinNumber = 234, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout size 3", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); - - // TODO: #714 [ ] Feature Layout Size - [JoinName("SetLayoutSizeStrip")] - public JoinDataComplete SetLayoutSizeStrip = new JoinDataComplete( - new JoinData - { - JoinNumber = 235, - JoinSpan = 1 - }, - new JoinMetadata - { - Description = "Sets layout size strip", - JoinCapabilities = eJoinCapabilities.ToFromSIMPL, - JoinType = eJoinType.Digital - }); + }); //[JoinName("ParticipantAudioMuteToggleStart")] //public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete( @@ -331,9 +271,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom JoinType = eJoinType.Serial }); - // TODO: #714 [ ] Feature Layout Size - [JoinName("GetSetCurrentLayoutSize")] - public JoinDataComplete GetSetCurrentLayoutSize = new JoinDataComplete( + // TODO: #714 [ ] JoinMap >> GetSetSelfviewPipSize + [JoinName("GetSetSelfviewPipSize")] + public JoinDataComplete GetSetSelfviewPipSize = new JoinDataComplete( new JoinData { JoinNumber = 230, @@ -341,7 +281,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom }, new JoinMetadata { - Description = "Sets and reports the current layout size.", + Description = "Sets and reports the selfview pip size, (aka layout size).", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial }); From f5305197b35d9e0ec8a986367544138c77907f58 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Wed, 9 Jun 2021 13:37:01 -0500 Subject: [PATCH 06/14] Updates to LinkZoomRoomApi method --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 601d3346..8ee5f7e4 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -621,21 +621,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Status.Layout.PropertyChanged += (o, a) => { - switch (a.PropertyName) + Debug.Console(1, this, "Status.Layout.PropertyChanged a.PropertyName: {0}", a.PropertyName); + switch (a.PropertyName.ToLower()) { - case "can_Switch_Speaker_View": - case "can_Switch_Wall_View": - case "can_Switch_Share_On_All_Screens": + case "can_switch_speaker_view": + case "can_switch_wall_view": + case "can_switch_share_on_all_screens": { ComputeAvailableLayouts(); break; } - case "is_In_First_Page": + case "is_in_first_page": { LayoutViewIsOnFirstPageFeedback.FireUpdate(); break; } - case "is_In_Last_Page": + case "is_in_last_page": { LayoutViewIsOnLastPageFeedback.FireUpdate(); break; @@ -1766,7 +1767,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom LinkVideoCodecToApi(this, trilist, joinMap); - LinkZoomRoomToApi(trilist, joinMap); + LinkZoomRoomToApi(trilist, joinMap); } /// @@ -1837,11 +1838,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom if (layoutSizeCodec != null) { trilist.SetSigFalseAction(joinMap.GetSetSelfviewPipSize.JoinNumber, layoutSizeCodec.SelfviewPipSizeToggle); + trilist.SetStringSigAction(joinMap.GetSetSelfviewPipSize.JoinNumber, (s) => + { + try + { + var size = (zConfiguration.eLayoutSize)Enum.Parse(typeof(zConfiguration.eLayoutSize), s, true); + var cmd = SelfviewPipSizes.FirstOrDefault(c => c.Command.Equals(size.ToString())); + SelfviewPipSizeSet(cmd); + } + catch (Exception e) + { + Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutSize: {1}", s, e); + } + }); layoutSizeCodec.SelfviewPipSizeFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetSelfviewPipSize.JoinNumber]); } - } + trilist.OnlineStatusChange += (device, args) => + { + if (!args.DeviceOnLine) return; + + layoutsCodec.LocalLayoutFeedback.FireUpdate(); + pinCodec.NumberOfScreensFeedback.FireUpdate(); + layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate(); + }; + } public override void ExecuteSwitch(object selector) { @@ -2320,6 +2342,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom /// private void ComputeAvailableLayouts() { + Debug.Console(1, this, "Computing available layouts..."); zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None; if (Status.Layout.can_Switch_Wall_View) { @@ -2343,6 +2366,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom availableLayouts |= zConfiguration.eLayoutStyle.Strip; } + Debug.Console(1, this, "Available layouts: {0}", availableLayouts); + var handler = AvailableLayoutsChanged; if (handler != null) { From 1c06e8381b7a3439077026d907406328bdcebab1 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 13:30:36 -0600 Subject: [PATCH 07/14] Fixed inverted video mute FB and adds debug statements to help see participant pin status --- .../VideoCodec/VideoCodecBase.cs | 31 +++++++++++++++++++ .../VideoCodec/ZoomRoom/ResponseObjects.cs | 2 +- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 5 ++- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index dc9228ce..38ae0295 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -613,6 +613,37 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec { if (meetingIndex >= maxParticipants * offset) break; + Debug.Console(2, this, +@"Updating Participant on xsig: +Name: {0} (s{8}) +AudioMute: {1} (d{9}) +VideoMute: {2} (d{10}) +CanMuteVideo: {3} ({d11}) +IsHost: {4} (d{12}) +HandIsRaised: {5} (d{13}) +IsPinned: {6} (d{14}) +ScreenIndexIsPinnedTo: {7} (a{15}) +", + participant.Name, + participant.AudioMuteFb, + participant.VideoMuteFb, + participant.CanMuteVideo, + participant.IsHost, + participant.HandIsRaisedFb, + participant.IsPinnedFb, + participant.ScreenIndexIsPinnedToFb, + stringIndex + 1, + digitalIndex + 1, + digitalIndex + 2, + digitalIndex + 3, + digitalIndex + 4, + digitalIndex + 5, + digitalIndex + 6, + digitalIndex + 7, + analogIndex + 1 + ); + + //digitals tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, participant.AudioMuteFb); tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, participant.VideoMuteFb); diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs index b45810ac..468b611b 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs @@ -1440,7 +1440,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom CanMuteVideo = p.IsVideoCanMuteByHost, CanUnmuteVideo = p.IsVideoCanUnmuteByHost, AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED", - VideoMuteFb = p.VideoStatusIsSending, + VideoMuteFb = !p.VideoStatusIsSending, HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid, }).ToList(); } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 8ee5f7e4..556c9d85 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1345,6 +1345,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { var status = responseObj.ToObject(); + Debug.Console(1, this, "Pin Status notificatino for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); + var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); if (participant != null) @@ -1358,11 +1360,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom if (participant == null) { - Debug.Console(2, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex); + Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex); return; } else { + Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, participant.UserId, status.ScreenIndex); participant.IsPinnedFb = false; participant.ScreenIndexIsPinnedToFb = -1; } From 7ac3f81ea5ecfb3dfa027f21e63c43768c7ace2f Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 16:14:18 -0600 Subject: [PATCH 08/14] Initialize SreenIndexIsPinnedToFb to -1. Adds debugging for xsig tokens --- .../VideoCodec/Interfaces/IHasParticipants.cs | 6 ++ .../VideoCodec/VideoCodecBase.cs | 72 ++++++++++++------- 2 files changed, 54 insertions(+), 24 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs index f03c1984..f6d32149 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs @@ -90,5 +90,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces public bool HandIsRaisedFb { get; set; } public bool IsPinnedFb { get; set; } public int ScreenIndexIsPinnedToFb { get; set; } + + public Participant() + { + // Initialize to -1 (no screen) + ScreenIndexIsPinnedToFb = -1; + } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs index 38ae0295..fc38a647 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs @@ -530,28 +530,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec private void LinkVideoCodecParticipantsToApi(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) { + // make sure to update the values when the EISC comes online + trilist.OnlineStatusChange += (sender, args) => + { + if (sender.IsOnline) + { + UpdateParticipantsXSig(codec, trilist, joinMap); + } + }; + + // set actions and update the values when the list changes codec.Participants.ParticipantsListHasChanged += (sender, args) => { - string participantsXSig; - - if (codec.Participants.CurrentParticipants.Count == 0) - { - participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length); - trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); - trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); - return; - } - SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants); - participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants); - - trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); - - trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); + UpdateParticipantsXSig(codec, trilist, joinMap); }; } + private void UpdateParticipantsXSig(IHasParticipants codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap) + { + string participantsXSig; + + if (codec.Participants.CurrentParticipants.Count == 0) + { + participantsXSig = Encoding.GetEncoding(XSigEncoding).GetString(_clearBytes, 0, _clearBytes.Length); + trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); + trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); + return; + } + + participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants); + + trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig); + + trilist.SetUshort(joinMap.ParticipantCount.JoinNumber, (ushort)codec.Participants.CurrentParticipants.Count); + } + /// /// Sets the actions for each participant in the list /// @@ -615,19 +630,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec Debug.Console(2, this, @"Updating Participant on xsig: -Name: {0} (s{8}) -AudioMute: {1} (d{9}) -VideoMute: {2} (d{10}) -CanMuteVideo: {3} ({d11}) -IsHost: {4} (d{12}) -HandIsRaised: {5} (d{13}) -IsPinned: {6} (d{14}) -ScreenIndexIsPinnedTo: {7} (a{15}) +Name: {0} (s{9}) +AudioMute: {1} (d{10}) +VideoMute: {2} (d{11}) +CanMuteVideo: {3} (d{12}) +CanUMuteVideo: {4} (d{13}) +IsHost: {5} (d{14}) +HandIsRaised: {6} (d{15}) +IsPinned: {7} (d{16}) +ScreenIndexIsPinnedTo: {8} (a{17}) ", participant.Name, participant.AudioMuteFb, participant.VideoMuteFb, participant.CanMuteVideo, + participant.CanUnmuteVideo, participant.IsHost, participant.HandIsRaisedFb, participant.IsPinnedFb, @@ -653,6 +670,8 @@ ScreenIndexIsPinnedTo: {7} (a{15}) tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb); tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb); + Debug.Console(2, this, "Index: {0} byte value: {1}", digitalIndex + 7, ComTextHelper.GetEscapedText(tokenArray[digitalIndex + 6].GetBytes())); + //serials tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name); @@ -688,7 +707,12 @@ ScreenIndexIsPinnedTo: {7} (a{15}) analogIndex += maxAnalogs; } - return GetXSigString(tokenArray); + var returnString = GetXSigString(tokenArray); + + //Debug.Console(2, this, "{0}", ComTextHelper.GetEscapedText(Encoding.GetEncoding(28591).GetBytes(returnString))); + + + return returnString; } private void LinkVideoCodecContentSharingToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap) From 25e7e9634acd620cef3da76192a7dea8b5b6f9de Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 16:56:56 -0600 Subject: [PATCH 09/14] updates PD Core version to include xsig token fixes --- packages.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.config b/packages.config index b60e8578..ee22bc9c 100644 --- a/packages.config +++ b/packages.config @@ -1,3 +1,3 @@ - + \ No newline at end of file From 08f4d8e9a2a285c1d656a9fc6d62a2408a26d859 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 16:57:42 -0600 Subject: [PATCH 10/14] Attempts to unpin participant from same screenIndex if one is already pinned. --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 556c9d85..a6b8c469 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -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)); } From 0c56da112cc47482e5ed534086e4193506627436 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 17:07:25 -0600 Subject: [PATCH 11/14] Changes to respond to new pinned participant message by clearing out already pinned participant fb first. --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index a6b8c469..079762e2 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1345,7 +1345,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { var status = responseObj.ToObject(); - Debug.Console(1, this, "Pin Status notificatino for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); + Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); + + // Check for a participant already pinned to the same screen index. + var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + + // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. + if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) + { + Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.", + alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb); + alreadyPinnedParticipant.IsPinnedFb = false; + alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1; + } var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); @@ -2113,17 +2125,6 @@ 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)); } From b71523bd2dd5ebb4db8ba9e74e558e52dfee7acc Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 17:38:50 -0600 Subject: [PATCH 12/14] Adds condition to not check for already pinned participant if incoming message has user id < 0 --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 079762e2..a1f1dfd7 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1348,15 +1348,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); // Check for a participant already pinned to the same screen index. - var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); - - // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. - if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) + if (status.PinnedUserId > 0) { - Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.", - alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb); - alreadyPinnedParticipant.IsPinnedFb = false; - alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1; + var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + + // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. + if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) + { + Debug.Console(1, this, "Participant: {0} with id: {1} already pinned to screenIndex {2}. Clearing pinned fb.", + alreadyPinnedParticipant.Name, alreadyPinnedParticipant.UserId, alreadyPinnedParticipant.ScreenIndexIsPinnedToFb); + alreadyPinnedParticipant.IsPinnedFb = false; + alreadyPinnedParticipant.ScreenIndexIsPinnedToFb = -1; + } } var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId)); From cb35aa13f5fe0afe025b705f089ec1fcf64d2130 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 9 Jun 2021 17:55:55 -0600 Subject: [PATCH 13/14] lets it fall through conditions to fire the ParticipantsChanged event if an already pinned participant is found --- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index a1f1dfd7..96d5c1c9 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1347,10 +1347,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom Debug.Console(1, this, "Pin Status notification for UserId: {0}, ScreenIndex: {1}", status.PinnedUserId, status.ScreenIndex); + Participant alreadyPinnedParticipant = null; + // Check for a participant already pinned to the same screen index. if (status.PinnedUserId > 0) { - var alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); + alreadyPinnedParticipant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); // Make sure that the already pinned participant isn't the same ID as for this message. If true, clear the pinned fb. if (alreadyPinnedParticipant != null && alreadyPinnedParticipant.UserId != status.PinnedUserId) @@ -1373,12 +1375,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex)); - if (participant == null) + if (participant == null && alreadyPinnedParticipant == null) { Debug.Console(1, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex); return; } - else + else if (participant != null) { Debug.Console(2, this, "Unpinning {0} with id: {1} from screen index: {2}", participant.Name, participant.UserId, status.ScreenIndex); participant.IsPinnedFb = false; From 6beff106ec701c72be6b6de0dc0cd332926ec977 Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Thu, 10 Jun 2021 17:45:23 -0500 Subject: [PATCH 14/14] Updated packages.config to track latest PepperDash Core release. Updated ZoomRoom LinkZoomRoomToApi to update the bridge when it comes online. --- .../VideoCodec/ZoomRoom/ResponseObjects.cs | 20 +++++++++---------- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 12 ++++++++--- packages.config | 2 +- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs index 468b611b..708abe34 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs @@ -1454,16 +1454,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { if (participants == null) { - Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)"); + //Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)"); return null; } // debug testing - foreach (ListParticipant participant in participants) - { - Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}", - participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString()); - } + //foreach (ListParticipant participant in participants) + //{ + // Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}", + // participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString()); + //} List handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList(); @@ -1471,8 +1471,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { IOrderedEnumerable orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp); - foreach (var participant in handRaisedParticipantsList) - Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId); + //foreach (var participant in handRaisedParticipantsList) + // Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId); } List allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList(); @@ -1481,8 +1481,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { allOtherParticipantsList.OrderBy(p => p.UserName); - foreach (var participant in allOtherParticipantsList) - Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId); + //foreach (var participant in allOtherParticipantsList) + // Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId); } // merge the lists diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 96d5c1c9..fc3f14a9 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -1817,9 +1817,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString()); trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString()); }; + + trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail()); layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]); - trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail()); layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]); layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]); @@ -1879,7 +1880,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { if (!args.DeviceOnLine) return; - layoutsCodec.LocalLayoutFeedback.FireUpdate(); + ComputeAvailableLayouts(); + layoutsCodec.LocalLayoutFeedback.FireUpdate(); + layoutsCodec.CanSwapContentWithThumbnailFeedback.FireUpdate(); + layoutsCodec.ContentSwappedWithThumbnailFeedback.FireUpdate(); + layoutsCodec.LayoutViewIsOnFirstPageFeedback.FireUpdate(); + layoutsCodec.LayoutViewIsOnLastPageFeedback.FireUpdate(); pinCodec.NumberOfScreensFeedback.FireUpdate(); layoutSizeCodec.SelfviewPipSizeFeedback.FireUpdate(); }; @@ -2386,7 +2392,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom availableLayouts |= zConfiguration.eLayoutStyle.Strip; } - Debug.Console(1, this, "Available layouts: {0}", availableLayouts); + Debug.Console(1, this, "availablelayouts: {0}", availableLayouts); var handler = AvailableLayoutsChanged; if (handler != null) diff --git a/packages.config b/packages.config index ee22bc9c..3876040a 100644 --- a/packages.config +++ b/packages.config @@ -1,3 +1,3 @@ - + \ No newline at end of file