mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Fixes StartSharing() method in CiscoSparkCodec to only execute if the PresentationSource is > 0
Fixes ecs-612 by adding property to UsageTracking object to determing if the usage tracker is already running.
This commit is contained in:
@@ -27,6 +27,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
public InUseTracking InUseTracker { get; protected set; }
|
public InUseTracking InUseTracker { get; protected set; }
|
||||||
|
|
||||||
public bool UsageIsTracked { get; set; }
|
public bool UsageIsTracked { get; set; }
|
||||||
|
|
||||||
|
public bool UsageTrackingStarted { get; protected set; }
|
||||||
public DateTime UsageStartTime { get; protected set; }
|
public DateTime UsageStartTime { get; protected set; }
|
||||||
public DateTime UsageEndTime { get; protected set; }
|
public DateTime UsageEndTime { get; protected set; }
|
||||||
|
|
||||||
@@ -59,6 +61,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void StartDeviceUsage()
|
public void StartDeviceUsage()
|
||||||
{
|
{
|
||||||
|
UsageTrackingStarted = true;
|
||||||
UsageStartTime = DateTime.Now;
|
UsageStartTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +72,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
UsageTrackingStarted = false;
|
||||||
|
|
||||||
UsageEndTime = DateTime.Now;
|
UsageEndTime = DateTime.Now;
|
||||||
|
|
||||||
if (UsageStartTime != null)
|
if (UsageStartTime != null)
|
||||||
|
|||||||
@@ -1026,6 +1026,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
else
|
else
|
||||||
sendingMode = "LocalOnly";
|
sendingMode = "LocalOnly";
|
||||||
|
|
||||||
|
if(PresentationSource > 0)
|
||||||
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
|
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
|
bool wasIsInCall;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true when any call is not in state Unknown, Disconnecting, Disconnected
|
/// Returns true when any call is not in state Unknown, Disconnecting, Disconnected
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsInCall { get { return ActiveCalls.Any(c => c.IsActiveCall); } }
|
public bool IsInCall
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var value = ActiveCalls.Any(c => c.IsActiveCall);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public BoolFeedback StandbyIsOnFeedback { get; private set; }
|
public BoolFeedback StandbyIsOnFeedback { get; private set; }
|
||||||
|
|
||||||
@@ -131,6 +140,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
if (AutoShareContentWhileInCall)
|
if (AutoShareContentWhileInCall)
|
||||||
StartSharing();
|
StartSharing();
|
||||||
|
|
||||||
|
if(IsInCall && !UsageTracker.UsageTrackingStarted)
|
||||||
|
UsageTracker.StartDeviceUsage();
|
||||||
|
else if(UsageTracker.UsageTrackingStarted && !IsInCall)
|
||||||
|
UsageTracker.EndDeviceUsage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user