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
});