mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
feat(essentials): More updates to add ringtone volume and focus near/far to bridge
This commit is contained in:
@@ -525,6 +525,48 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
|||||||
JoinType = eJoinType.Digital
|
JoinType = eJoinType.Digital
|
||||||
});
|
});
|
||||||
|
|
||||||
|
[JoinName("CameraFocusNear")]
|
||||||
|
public JoinDataComplete CameraFocusNear = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 117,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Camera Focus Near",
|
||||||
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("CameraFocusFar")]
|
||||||
|
public JoinDataComplete CameraFocusFar = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 118,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Camera Focus Far",
|
||||||
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("CameraFocusAuto")]
|
||||||
|
public JoinDataComplete CameraFocusAuto = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 119,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Camera Auto Focus Trigger",
|
||||||
|
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
[JoinName("CameraPresetSave")]
|
[JoinName("CameraPresetSave")]
|
||||||
public JoinDataComplete CameraPresetSave = new JoinDataComplete(
|
public JoinDataComplete CameraPresetSave = new JoinDataComplete(
|
||||||
new JoinData
|
new JoinData
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
public BoolFeedback FarEndIsSharingContentFeedback { get; private set; }
|
public BoolFeedback FarEndIsSharingContentFeedback { get; private set; }
|
||||||
|
|
||||||
|
public IntFeedback RingtoneVolumeFeedback { get; private set; }
|
||||||
|
|
||||||
private CodecCommandWithLabel CurrentSelfviewPipPosition;
|
private CodecCommandWithLabel CurrentSelfviewPipPosition;
|
||||||
|
|
||||||
private CodecCommandWithLabel CurrentLocalLayout;
|
private CodecCommandWithLabel CurrentLocalLayout;
|
||||||
@@ -324,6 +326,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||||
|
|
||||||
|
RingtoneVolumeFeedback = new IntFeedback(() => CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.Volume);
|
||||||
|
|
||||||
Communication = comm;
|
Communication = comm;
|
||||||
|
|
||||||
if (props.CommunicationMonitorProperties != null)
|
if (props.CommunicationMonitorProperties != null)
|
||||||
@@ -436,6 +440,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Conference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Conference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate;
|
||||||
|
|
||||||
|
CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.ValueChangedAction = RingtoneVolumeFeedback.FireUpdate;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||||
@@ -1419,11 +1425,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sends tones to the last connected call
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="s"></param>
|
||||||
public override void SendDtmf(string s)
|
public override void SendDtmf(string s)
|
||||||
{
|
{
|
||||||
SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s));
|
SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sends tones to a specific call
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="s"></param>
|
||||||
|
/// <param name="activeCall"></param>
|
||||||
|
public void SendDtmf(string s, CodecActiveCallItem activeCall)
|
||||||
|
{
|
||||||
|
SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", activeCall.Id, s));
|
||||||
|
}
|
||||||
|
|
||||||
public void SelectPresentationSource(int source)
|
public void SelectPresentationSource(int source)
|
||||||
{
|
{
|
||||||
PresentationSource = source;
|
PresentationSource = source;
|
||||||
@@ -1431,6 +1451,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
StartSharing();
|
StartSharing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the ringtone volume level
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="volume">level from 0 - 100 in increments of 5</param>
|
||||||
|
public void SetRingtoneVolume(int volume)
|
||||||
|
{
|
||||||
|
SendText(string.Format("xConfiguration Audio SoundsAndAlerts RingVolume: [0]", volume));
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Select source 1 as the presetnation source
|
/// Select source 1 as the presetnation source
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1447,6 +1476,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
SelectPresentationSource(3);
|
SelectPresentationSource(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Starts presentation sharing
|
/// Starts presentation sharing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1473,6 +1504,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
SendText("xCommand Presentation Stop");
|
SendText("xCommand Presentation Stop");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override void PrivacyModeOn()
|
public override void PrivacyModeOn()
|
||||||
{
|
{
|
||||||
SendText("xCommand Audio Microphones Mute");
|
SendText("xCommand Audio Microphones Mute");
|
||||||
@@ -1601,6 +1634,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
||||||
trilist.SetSigFalseAction(joinMap.ActivateHalfWakeMode.JoinNumber, () => halfwakeCodec.HalfwakeActivate());
|
trilist.SetSigFalseAction(joinMap.ActivateHalfWakeMode.JoinNumber, () => halfwakeCodec.HalfwakeActivate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Add mechanism to select a call instance to be able to direct DTMF tones to...
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -112,16 +112,46 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RingVolume
|
public class RingVolume : ValueProperty
|
||||||
{
|
{
|
||||||
public string valueSpaceRef { get; set; }
|
public string valueSpaceRef { get; set; }
|
||||||
public string Value { get; set; }
|
|
||||||
|
string _Value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets Value and triggers the action when set
|
||||||
|
/// </summary>
|
||||||
|
public string Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Value = value;
|
||||||
|
OnValueChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Volume
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Int32.Parse(_Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SoundsAndAlerts
|
public class SoundsAndAlerts
|
||||||
{
|
{
|
||||||
public RingTone RingTone { get; set; }
|
public RingTone RingTone { get; set; }
|
||||||
public RingVolume RingVolume { get; set; }
|
public RingVolume RingVolume { get; set; }
|
||||||
|
|
||||||
|
public SoundsAndAlerts()
|
||||||
|
{
|
||||||
|
RingVolume = new RingVolume();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Audio
|
public class Audio
|
||||||
@@ -131,6 +161,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public Microphones Microphones { get; set; }
|
public Microphones Microphones { get; set; }
|
||||||
public Output Output { get; set; }
|
public Output Output { get; set; }
|
||||||
public SoundsAndAlerts SoundsAndAlerts { get; set; }
|
public SoundsAndAlerts SoundsAndAlerts { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Audio()
|
||||||
|
{
|
||||||
|
SoundsAndAlerts = new SoundsAndAlerts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DefaultMode
|
public class DefaultMode
|
||||||
@@ -1797,6 +1833,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public UserInterface UserInterface { get; set; }
|
public UserInterface UserInterface { get; set; }
|
||||||
public UserManagement UserManagement { get; set; }
|
public UserManagement UserManagement { get; set; }
|
||||||
public Video2 Video { get; set; }
|
public Video2 Video { get; set; }
|
||||||
|
|
||||||
|
public Configuration()
|
||||||
|
{
|
||||||
|
Audio = new Audio();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RootObject
|
public class RootObject
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
|
|
||||||
/// </summary>
|
|
||||||
public class CiscoCodecStatus
|
|
||||||
{
|
|
||||||
// Helper Classes for Proerties
|
// Helper Classes for Proerties
|
||||||
public abstract class ValueProperty
|
public abstract class ValueProperty
|
||||||
{
|
{
|
||||||
@@ -34,6 +29,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
|
||||||
|
/// </summary>
|
||||||
|
public class CiscoCodecStatus
|
||||||
|
{
|
||||||
|
|
||||||
public class ConnectionStatus
|
public class ConnectionStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1201,6 +1201,39 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
|||||||
else camera.ZoomStop();
|
else camera.ZoomStop();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinMap.CameraFocusNear.JoinNumber, (b) =>
|
||||||
|
{
|
||||||
|
if (codec.SelectedCamera == null) return;
|
||||||
|
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||||
|
|
||||||
|
if (camera == null) return;
|
||||||
|
|
||||||
|
if (b) camera.FocusNear();
|
||||||
|
else camera.FocusStop();
|
||||||
|
});
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinMap.CameraFocusFar.JoinNumber, (b) =>
|
||||||
|
{
|
||||||
|
if (codec.SelectedCamera == null) return;
|
||||||
|
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||||
|
|
||||||
|
if (camera == null) return;
|
||||||
|
|
||||||
|
if (b) camera.FocusFar();
|
||||||
|
else camera.FocusStop();
|
||||||
|
});
|
||||||
|
|
||||||
|
trilist.SetSigFalseAction(joinMap.CameraFocusAuto.JoinNumber, () =>
|
||||||
|
{
|
||||||
|
if (codec.SelectedCamera == null) return;
|
||||||
|
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||||
|
|
||||||
|
if (camera == null) return;
|
||||||
|
|
||||||
|
camera.TriggerAutoFocus();
|
||||||
|
});
|
||||||
|
|
||||||
//Camera Select
|
//Camera Select
|
||||||
trilist.SetUShortSigAction(joinMap.CameraNumberSelect.JoinNumber, (i) =>
|
trilist.SetUShortSigAction(joinMap.CameraNumberSelect.JoinNumber, (i) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user