feat(essentials): adds IHasMeetingRecording and implements on ZoomRoom

This commit is contained in:
Neil Dorin
2021-11-04 17:08:51 -06:00
parent 11ffc5130f
commit 31f976d719
4 changed files with 78 additions and 3 deletions

View File

@@ -122,6 +122,7 @@
<Compile Include="Display\PanasonicThDisplay.cs" /> <Compile Include="Display\PanasonicThDisplay.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" /> <Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" /> <Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingRecording.cs" />
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" /> <Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" /> <Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" /> <Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
public interface IHasMeetingRecording
{
BoolFeedback MeetingIsRecordingFeedback { get; }
void StartRecording();
void StopRecording();
void ToggleRecording();
}
}

View File

@@ -744,12 +744,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
} }
public class CallRecordInfo public class CallRecordInfo : NotifiableObject
{ {
private bool _meetingIsBeingRecorded;
public bool canRecord { get; set; } public bool canRecord { get; set; }
public bool emailRequired { get; set; } public bool emailRequired { get; set; }
public bool amIRecording { get; set; } public bool amIRecording { get; set; }
public bool meetingIsBeingRecorded { get; set; }
public bool meetingIsBeingRecorded
{
get
{
return _meetingIsBeingRecorded;
}
set
{
if (value != _meetingIsBeingRecorded)
{
_meetingIsBeingRecorded = value;
NotifyPropertyChanged("meetingIsBeingRecorded");
}
}
}
} }
} }

View File

@@ -26,7 +26,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
IRouting, IRouting,
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode, IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting, IHasMeetingLock IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting,
IHasMeetingLock, IHasMeetingRecording
{ {
private const long MeetingRefreshTimer = 60000; private const long MeetingRefreshTimer = 60000;
public uint DefaultMeetingDurationMin { get; private set; } public uint DefaultMeetingDurationMin { get; private set; }
@@ -149,6 +150,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc); NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc);
MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable ); MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable );
MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded );
} }
public CommunicationGather PortGather { get; private set; } public CommunicationGather PortGather { get; private set; }
@@ -651,6 +654,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
}; };
Status.Call.CallRecordInfo.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "meetingIsBeingRecorded")
{
MeetingIsRecordingFeedback.FireUpdate();
}
};
Status.Sharing.PropertyChanged += (o, a) => Status.Sharing.PropertyChanged += (o, a) =>
{ {
switch (a.PropertyName) switch (a.PropertyName)
@@ -3137,6 +3148,34 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
#endregion #endregion
#region IHasMeetingRecording Members
public BoolFeedback MeetingIsRecordingFeedback { get; private set; }
public void StartRecording()
{
SendText(string.Format("Command Call Record Enable: on"));
}
public void StopRecording()
{
SendText(string.Format("Command Call Record Enable: off"));
}
public void ToggleRecording()
{
if (MeetingIsRecordingFeedback.BoolValue)
{
StopRecording();
}
else
{
StartRecording();
}
}
#endregion
} }
/// <summary> /// <summary>