mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-10 02:05:08 +00:00
feat(essentials): More updates to add ringtone volume and focus near/far to bridge
This commit is contained in:
@@ -64,6 +64,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public BoolFeedback FarEndIsSharingContentFeedback { get; private set; }
|
||||
|
||||
public IntFeedback RingtoneVolumeFeedback { get; private set; }
|
||||
|
||||
private CodecCommandWithLabel CurrentSelfviewPipPosition;
|
||||
|
||||
private CodecCommandWithLabel CurrentLocalLayout;
|
||||
@@ -324,6 +326,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||
|
||||
RingtoneVolumeFeedback = new IntFeedback(() => CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.Volume);
|
||||
|
||||
Communication = comm;
|
||||
|
||||
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.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate;
|
||||
|
||||
CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.ValueChangedAction = RingtoneVolumeFeedback.FireUpdate;
|
||||
|
||||
try
|
||||
{
|
||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||
@@ -1419,11 +1425,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Sends tones to the last connected call
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public override void SendDtmf(string 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)
|
||||
{
|
||||
PresentationSource = source;
|
||||
@@ -1431,6 +1451,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
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>
|
||||
/// Select source 1 as the presetnation source
|
||||
/// </summary>
|
||||
@@ -1447,6 +1476,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SelectPresentationSource(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Starts presentation sharing
|
||||
/// </summary>
|
||||
@@ -1473,6 +1504,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SendText("xCommand Presentation Stop");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
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.ActivateHalfWakeMode.JoinNumber, () => halfwakeCodec.HalfwakeActivate());
|
||||
}
|
||||
|
||||
// TODO: Add mechanism to select a call instance to be able to direct DTMF tones to...
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -112,16 +112,46 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RingVolume
|
||||
public class RingVolume : ValueProperty
|
||||
{
|
||||
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 RingTone RingTone { get; set; }
|
||||
public RingVolume RingVolume { get; set; }
|
||||
|
||||
public SoundsAndAlerts()
|
||||
{
|
||||
RingVolume = new RingVolume();
|
||||
}
|
||||
}
|
||||
|
||||
public class Audio
|
||||
@@ -131,6 +161,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public Microphones Microphones { get; set; }
|
||||
public Output Output { get; set; }
|
||||
public SoundsAndAlerts SoundsAndAlerts { get; set; }
|
||||
|
||||
|
||||
public Audio()
|
||||
{
|
||||
SoundsAndAlerts = new SoundsAndAlerts();
|
||||
}
|
||||
}
|
||||
|
||||
public class DefaultMode
|
||||
@@ -1797,6 +1833,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public UserInterface UserInterface { get; set; }
|
||||
public UserManagement UserManagement { get; set; }
|
||||
public Video2 Video { get; set; }
|
||||
|
||||
public Configuration()
|
||||
{
|
||||
Audio = new Audio();
|
||||
}
|
||||
}
|
||||
|
||||
public class RootObject
|
||||
|
||||
@@ -12,28 +12,28 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
// Helper Classes for Proerties
|
||||
public abstract class ValueProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggered when Value is set
|
||||
/// </summary>
|
||||
public Action ValueChangedAction { get; set; }
|
||||
|
||||
protected void OnValueChanged()
|
||||
{
|
||||
var a = ValueChangedAction;
|
||||
if (a != null)
|
||||
a();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <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
|
||||
public abstract class ValueProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggered when Value is set
|
||||
/// </summary>
|
||||
public Action ValueChangedAction { get; set; }
|
||||
|
||||
protected void OnValueChanged()
|
||||
{
|
||||
var a = ValueChangedAction;
|
||||
if (a != null)
|
||||
a();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ConnectionStatus
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user