mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Adds LocalLayoutToggle() implementation and minor updates to UI Driver
This commit is contained in:
@@ -248,6 +248,10 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
public const uint VCCameraSelectBarWithoutModeVisible = 1261;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1262
|
||||||
|
/// </summary>
|
||||||
|
public const uint VCCameraAutoModeIsOnFb = 1262;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 1271
|
/// 1271
|
||||||
|
|||||||
@@ -532,6 +532,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
CameraModeList.SetItemButtonAction(1,(b) => codecAutoCameras.CameraAutoModeOn());
|
||||||
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanInput["Item 1 Visible"].BoolValue = true;
|
||||||
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(CameraModeList.SmartObject.BooleanInput["Item 1 Selected"]);
|
||||||
|
codecAutoCameras.CameraAutoModeIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCCameraAutoModeIsOnFb]);
|
||||||
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
//TriList.SmartObjects[UISmartObjectJoin.VCCameraMode].BooleanOutput["Item 1 Pressed"].SetSigFalseAction(
|
||||||
//() => codecAutoCameras.CameraAutoModeOn());
|
//() => codecAutoCameras.CameraAutoModeOn());
|
||||||
|
|
||||||
@@ -857,19 +858,32 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
// Determines if codec is in manual camera control mode and shows feedback
|
// Determines if codec is in manual camera control mode and shows feedback
|
||||||
void ShowCameraManualMode()
|
void ShowCameraManualMode()
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, "ShowCameraManualMode");
|
||||||
|
|
||||||
var inManualMode = true;
|
var inManualMode = true;
|
||||||
|
|
||||||
var codecOffCameras = Codec as IHasCameraOff;
|
var codecOffCameras = Codec as IHasCameraOff;
|
||||||
|
|
||||||
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
var codecAutoCameras = Codec as IHasCameraAutoMode;
|
||||||
|
|
||||||
|
var supportsAutoCameras = codecAutoCameras != null && Codec.SupportsCameraAutoMode;
|
||||||
|
|
||||||
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
if (codecOffCameras != null && codecOffCameras.CameraIsOffFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
inManualMode = false;
|
inManualMode = false;
|
||||||
|
|
||||||
|
var codecCameraMute = Codec as IHasCameraMute;
|
||||||
|
|
||||||
|
if (codecCameraMute != null)
|
||||||
|
{
|
||||||
|
codecCameraMute.CameraMuteOff();
|
||||||
|
inManualMode = true;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear auto mode
|
// Clear auto mode
|
||||||
if (codecAutoCameras != null )
|
if (supportsAutoCameras)
|
||||||
{
|
{
|
||||||
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
if (codecAutoCameras.CameraAutoModeIsOnFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
@@ -1213,7 +1227,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var lc = Codec as IHasCodecLayouts;
|
var lc = Codec as IHasCodecLayouts;
|
||||||
if (lc != null)
|
if (lc != null)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
|
||||||
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
lc.LocalLayoutFeedback.LinkInputSig(TriList.StringInput[UIStringJoin.VCLayoutModeText]);
|
||||||
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
lc.LocalLayoutFeedback.OutputChange += (o,a) =>
|
||||||
{
|
{
|
||||||
@@ -1226,6 +1240,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
var cisco = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.CiscoSparkCodec;
|
||||||
if (cisco != null)
|
if (cisco != null)
|
||||||
{
|
{
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggleSingleProminent);
|
||||||
// Cisco has min/max buttons that need special sauce
|
// Cisco has min/max buttons that need special sauce
|
||||||
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
cisco.SharingContentIsOnFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
//cisco.PresentationViewMaximizedFeedback.OutputChange += CiscoSharingAndPresentation_OutputChanges;
|
||||||
@@ -1233,7 +1248,16 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
TriList.SetSigFalseAction(UIBoolJoin.VCMinMaxPress, cisco.MinMaxLayoutToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var zoomRoom = Codec as PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom.ZoomRoom;
|
||||||
|
if (zoomRoom != null)
|
||||||
|
{
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VCLayoutToggleEnable].BoolValue = true;
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.VCLayoutTogglePress, lc.LocalLayoutToggle);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
Participants = new CodecParticipants();
|
Participants = new CodecParticipants();
|
||||||
|
|
||||||
SupportsCameraOff = _props.SupportsCameraOff;
|
SupportsCameraOff = true; // Always allow turning off the camera for zoom calls?
|
||||||
SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
|
SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
|
||||||
|
|
||||||
PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc);
|
PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc);
|
||||||
@@ -2446,9 +2446,51 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||||||
|
|
||||||
public void LocalLayoutToggle()
|
public void LocalLayoutToggle()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
var currentLayout = LocalLayoutFeedback.StringValue;
|
||||||
|
|
||||||
|
var eCurrentLayout = (int)Enum.Parse(typeof(zConfiguration.eLayoutStyle), currentLayout, true);
|
||||||
|
|
||||||
|
var nextLayout = GetNextLayout(eCurrentLayout);
|
||||||
|
|
||||||
|
if (nextLayout != zConfiguration.eLayoutStyle.None)
|
||||||
|
{
|
||||||
|
SetLayout(nextLayout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tries to get the next available layout
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="currentLayout"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private zConfiguration.eLayoutStyle GetNextLayout(int currentLayout)
|
||||||
|
{
|
||||||
|
if (AvailableLayouts == zConfiguration.eLayoutStyle.None)
|
||||||
|
{
|
||||||
|
return zConfiguration.eLayoutStyle.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
zConfiguration.eLayoutStyle nextLayout;
|
||||||
|
|
||||||
|
if (((zConfiguration.eLayoutStyle)currentLayout & zConfiguration.eLayoutStyle.ShareAll) == zConfiguration.eLayoutStyle.ShareAll)
|
||||||
|
{
|
||||||
|
nextLayout = zConfiguration.eLayoutStyle.Gallery;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nextLayout = (zConfiguration.eLayoutStyle)(currentLayout << 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((AvailableLayouts & nextLayout) == nextLayout)
|
||||||
|
{
|
||||||
|
return nextLayout;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return GetNextLayout((int)nextLayout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void LocalLayoutToggleSingleProminent()
|
public void LocalLayoutToggleSingleProminent()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
|||||||
Reference in New Issue
Block a user