mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
Fixed connected enum; Call status header button
This commit is contained in:
@@ -162,6 +162,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
tl.BooleanInput[sigNum].BoolValue = value;
|
tl.BooleanInput[sigNum].BoolValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helper method to set the value of a ushort Sig on TriList
|
||||||
|
/// </summary>
|
||||||
|
public static void SetUshort(this BasicTriList tl, uint sigNum, ushort value)
|
||||||
|
{
|
||||||
|
tl.UShortInput[sigNum].UShortValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper method to set the value of a string Sig on TriList
|
/// Helper method to set the value of a string Sig on TriList
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -22,17 +22,16 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
public object CallMetaData { get; set; }
|
public object CallMetaData { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true when this call is NOT status Unkown,
|
/// Returns true when this call is any status other than
|
||||||
/// Disconnected, Disconnecting
|
/// Unknown, Disconnected, Disconnecting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsActiveCall
|
public bool IsActiveCall
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return
|
return !(Status == eCodecCallStatus.Disconnected
|
||||||
!(Status == eCodecCallStatus.Disconnected
|
|
||||||
|| Status == eCodecCallStatus.Disconnecting
|
|| Status == eCodecCallStatus.Disconnecting
|
||||||
|| Status ==eCodecCallStatus.Unknown);
|
|| Status == eCodecCallStatus.Unknown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
{
|
{
|
||||||
public enum eCodecCallStatus
|
public enum eCodecCallStatus
|
||||||
{
|
{
|
||||||
|
Unknown = 0,
|
||||||
Connected,
|
Connected,
|
||||||
Connecting,
|
Connecting,
|
||||||
Dialing,
|
Dialing,
|
||||||
@@ -20,6 +21,5 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
Ringing,
|
Ringing,
|
||||||
Preserved,
|
Preserved,
|
||||||
RemotePreserved,
|
RemotePreserved,
|
||||||
Unknown = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
void RejectCall(CodecActiveCallItem item);
|
void RejectCall(CodecActiveCallItem item);
|
||||||
void SendDtmf(string digit);
|
void SendDtmf(string digit);
|
||||||
|
|
||||||
//IntFeedback ActiveCallCountFeedback { get; }
|
|
||||||
BoolFeedback IncomingCallFeedback { get; }
|
BoolFeedback IncomingCallFeedback { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,7 +256,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Incoming, call);
|
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Incoming, call);
|
||||||
_IncomingCall = true;
|
_IncomingCall = true;
|
||||||
IncomingCallFeedback.FireUpdate();
|
IncomingCallFeedback.FireUpdate();
|
||||||
//ActiveCallCountFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -271,7 +270,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Incoming, call);
|
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Incoming, call);
|
||||||
_IncomingCall = true;
|
_IncomingCall = true;
|
||||||
IncomingCallFeedback.FireUpdate();
|
IncomingCallFeedback.FireUpdate();
|
||||||
//ActiveCallCountFeedback.FireUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -290,7 +288,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
foreach (var c in ActiveCalls)
|
foreach (var c in ActiveCalls)
|
||||||
sb.AppendFormat("{0} {1} -- {2}\r", c.Id, c.Number, c.Name);
|
sb.AppendFormat("{0} {1} -- {2} {3}\r", c.Id, c.Number, c.Name, c.Status);
|
||||||
Debug.Console(1, "{0}", sb.ToString());
|
Debug.Console(1, "{0}", sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
public VideoCodecBase(string key, string name)
|
public VideoCodecBase(string key, string name)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
//ActiveCallCountFeedback = new IntFeedback(ActiveCallCountFeedbackFunc);
|
|
||||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc);
|
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc);
|
||||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||||
@@ -64,26 +63,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||||
|
|
||||||
//ActiveCallCountFeedback.OutputChange += new EventHandler<EventArgs>(ActiveCallCountFeedback_OutputChange);
|
|
||||||
|
|
||||||
ActiveCalls = new List<CodecActiveCallItem>();
|
ActiveCalls = new List<CodecActiveCallItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
//void ActiveCallCountFeedback_OutputChange(object sender, EventArgs e)
|
|
||||||
//{
|
|
||||||
// if (UsageTracker != null)
|
|
||||||
// {
|
|
||||||
// if (IsInCall)
|
|
||||||
// UsageTracker.StartDeviceUsage();
|
|
||||||
// else
|
|
||||||
// UsageTracker.EndDeviceUsage();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
#region IHasDialer Members
|
#region IHasDialer Members
|
||||||
|
|
||||||
public abstract void Dial(string s);
|
public abstract void Dial(string s);
|
||||||
|
|||||||
@@ -40,5 +40,10 @@
|
|||||||
/// 3922
|
/// 3922
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint PresentationListCaretMode = 3922;
|
public const uint PresentationListCaretMode = 3922;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15024 - Modes 0: On hook, 1: Phone, 2: Video
|
||||||
|
/// </summary>
|
||||||
|
public const uint CallHeaderButtonMode = 15024;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,6 +155,12 @@ namespace PepperDash.Essentials
|
|||||||
//PowerOffTimeout = 30000;
|
//PowerOffTimeout = 30000;
|
||||||
|
|
||||||
//TriList.StringInput[UIStringJoin.StartActivityText].StringValue = "Tap an activity below";
|
//TriList.StringInput[UIStringJoin.StartActivityText].StringValue = "Tap an activity below";
|
||||||
|
|
||||||
|
// Reveal proper header buttons with/without lighting
|
||||||
|
if(false) // has lighting
|
||||||
|
TriList.SetBool(UIBoolJoin.CallLeftHeaderButtonVisible, true);
|
||||||
|
else
|
||||||
|
TriList.SetBool(UIBoolJoin.CallRightHeaderButtonVisible, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ using PepperDash.Essentials.Devices.Common.VideoCodec;
|
|||||||
namespace PepperDash.Essentials.UIDrivers.VC
|
namespace PepperDash.Essentials.UIDrivers.VC
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#warning When InCall, keypad text should clear. Keypad becomes DTMF only. Delete is gone and disabled. Send keypresses immediately to SendDTMF. Queue them in disaply string.
|
||||||
|
#warning when Call ends, clear keypad text.
|
||||||
|
#warning FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||||
@@ -149,6 +153,13 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0);
|
||||||
StagingBarInterlock.ShowInterlocked(Codec.IsInCall ?
|
StagingBarInterlock.ShowInterlocked(Codec.IsInCall ?
|
||||||
UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
UIBoolJoin.VCStagingActivePopoverVisible : UIBoolJoin.VCStagingInactivePopoverVisible);
|
||||||
|
// Set mode of header button
|
||||||
|
if (!Codec.IsInCall)
|
||||||
|
TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 0);
|
||||||
|
else if(Codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
||||||
|
TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
||||||
|
else
|
||||||
|
TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||||
|
|
||||||
// Update list of calls
|
// Update list of calls
|
||||||
var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList();
|
var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList();
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user