Compare commits

..

23 Commits

Author SHA1 Message Date
Andrew Welker
be5158d29e Merge pull request #947 from PepperDash/feature/pdu-interface-joinmap
Added new Interfaces and JoinMap for PDUs
2022-06-21 15:40:54 -05:00
Andrew Welker
8ce390d650 Merge branch 'development' into feature/pdu-interface-joinmap 2022-06-21 13:42:17 -05:00
Neil Dorin
05066dc1ea Merge pull request #953 from PepperDash/hotfix/c2nio-factory-reference-update
Hotfix/c2nio factory reference update
2022-06-21 12:27:04 -06:00
Andrew Welker
70a78b540d Merge branch 'development' into feature/pdu-interface-joinmap 2022-06-21 13:12:50 -05:00
Andrew Welker
5e22ca9c59 Merge branch 'development' into hotfix/c2nio-factory-reference-update 2022-06-21 13:12:02 -05:00
Andrew Welker
5131e73567 Merge pull request #944 from PepperDash/hotfix/zoom-recording-prompt
Hotfix/zoom recording prompt
2022-06-21 13:11:45 -05:00
Neil Dorin
e02c267988 Merge branch 'development' into hotfix/zoom-recording-prompt 2022-06-21 11:47:33 -06:00
Jason DeVito
59b18d713b fix: corrects issue #951, c2nio incorrect factory reference 2022-06-08 15:12:32 -05:00
Trevor Payne
1cc37b7521 feature:Converted PduOutlets Dictionary to ReadOnlyDictionary
feature:Removed redundant OutletCount property
2022-06-02 11:17:54 -05:00
Trevor Payne
86dfc395ec Rename IHasPowerReboot to IHasPowerCycle
Update naming scheme to Cycle from Reboot
2022-05-31 17:48:18 -05:00
Trevor Payne
05f3a7eb2c UpdateJoinmap Names 2022-05-31 17:46:13 -05:00
Trevor Payne
20beeb076a add new interfaces for implementing PDUs
added basic join map
2022-05-31 17:19:56 -05:00
Neil Dorin
a7db15d9fd Merge pull request #943 from PepperDash/hotfix/zoom-recording-prompt
Hotfix/zoom recording prompt
2022-05-18 17:14:19 -06:00
Neil Dorin
b8442e7048 feat(essentials): Format update for command 2022-05-18 16:33:21 -06:00
Neil Dorin
1e65c961c6 feat(essentials): Adds new interface capabilities
* ability to admit a participant from waiting room
* ability to acknowledge a meeting recording consent prompt
2022-05-17 15:36:00 -06:00
Neil Dorin
bdc4f0ae28 fix(essentials): updates recording property name 2022-05-17 13:20:53 -06:00
Neil Dorin
82ac34d3b6 fix(essentials): Updates Status.Call subscription mechanism to persist properly
Makes sure all subscriptions are un and resubscribed whenever Status.Call is constructed
2022-05-17 11:26:19 -06:00
Neil Dorin
23555e5174 Merge branch 'main' into hotfix/zoom-osd-device 2022-05-16 14:20:38 -06:00
Neil Dorin
7c892b4f71 Merge pull request #936 from PepperDash/hotfix/zoomroom-duplicate-passwordRequired-eventhandlers
fix: removed duplicate PasswordRequired event handler from LinkZoomRo…
2022-04-26 14:50:40 -06:00
Jason DeVito
309605ee38 fix: updated packages.config to reference PepperDash Core 1.1.1, previously referencing RC build 2022-03-29 16:04:14 -05:00
Jason DeVito
e2b8e356ff fix: Updated ZoomRoom constructor to build HdmiOutput1,2,3 2022-03-29 16:03:46 -05:00
Jason DeVito
832102f4bb feat: updated ExecuteSwitch to turn the display power on if _PowerIsOn is false 2022-03-29 16:02:59 -05:00
Neil Dorin
b23b7cb813 fix(essentials): #927 moves SetUpRouting() to constructor 2022-03-29 12:49:49 -06:00
14 changed files with 3466 additions and 3254 deletions

View File

@@ -0,0 +1,60 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
public class PduJoinMapBase : JoinMapBaseAdvanced
{
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "PDU Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("Online")]
public JoinDataComplete Online = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "PDU Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutletCount")]
public JoinDataComplete OutletCount = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Number of COntrolled Outlets", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
[JoinName("OutletName")]
public JoinDataComplete OutletName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Outlet Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
[JoinName("OutletEnabled")]
public JoinDataComplete OutletEnabled = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Outlet Enabled", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutletPowerCycle")]
public JoinDataComplete OutletPowerCycle = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Outlet Power Cycle", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutletPowerOn")]
public JoinDataComplete OutletPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "Outlet Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
[JoinName("OutletPowerOff")]
public JoinDataComplete OutletPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Outlet Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it
/// </summary>
/// <param name="joinStart">Join this join map will start at</param>
public PduJoinMapBase(uint joinStart)
:base(joinStart, typeof(PduJoinMapBase))
{
}
/// <summary>
/// Constructor to use when extending this Join map
/// </summary>
/// <param name="joinStart">Join this join map will start at</param>
/// <param name="type">Type of the child join map</param>
public PduJoinMapBase(uint joinStart, Type type)
: base(joinStart, type)
{
}
}
}

View File

@@ -66,7 +66,7 @@ namespace PepperDash.Essentials.Core.CrestronIO
#endregion
}
public class C2NIoControllerFactory : EssentialsDeviceFactory<C2nRthsController>
public class C2NIoControllerFactory : EssentialsDeviceFactory<C2NIoController>
{
public C2NIoControllerFactory()
{

View File

@@ -0,0 +1,35 @@
using System.Collections.Generic;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash_Essentials_Core.Devices
{
/// <summary>
/// Interface for any device that is able to control it'spower and has a configurable reboot time
/// </summary>
public interface IHasPowerCycle : IKeyName, IHasPowerControlWithFeedback
{
/// <summary>
/// Delay between power off and power on for reboot
/// </summary>
int PowerCycleTimeMs { get;}
/// <summary>
/// Reboot outlet
/// </summary>
void PowerCycle();
}
/// <summary>
/// Interface for any device that contains a collection of IHasPowerReboot Devices
/// </summary>
public interface IHasControlledPowerOutlets : IKeyName
{
/// <summary>
/// Collection of IPduOutlets
/// </summary>
ReadOnlyDictionary<int, IHasPowerCycle> PduOutlets { get; }
}
}

View File

@@ -111,7 +111,12 @@ namespace PepperDash.Essentials.Core
public override void ExecuteSwitch(object selector)
{
Debug.Console(2, this, "ExecuteSwitch: {0}", selector);
Debug.Console(2, this, "ExecuteSwitch: {0}", selector);
if (!_PowerIsOn)
{
PowerOn();
}
}

View File

@@ -6,8 +6,6 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using PepperDash.Core;
using Crestron.SimplSharpPro.CrestronThread;
using Crestron.SimplSharp.Net.Http;
using Crestron.SimplSharp.CrestronIO;
namespace PepperDash.Essentials.Core
{
@@ -17,19 +15,12 @@ namespace PepperDash.Essentials.Core
static CCriticalSection fileLock = new CCriticalSection();
public delegate void GotFileEventHandler(object sender, FileEventArgs e);
public static event GotFileEventHandler GotFileEvent;
private static Dictionary<string, CTimer> WriteTimers;
public const long WriteTimeout = 5000;
/// <summary>
/// Get the full file info from a path/filename, can include wildcards.
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
///
static FileIO()
{
WriteTimers = new Dictionary<string, CTimer>();
}
public static FileInfo[] GetFiles(string fileName)
{
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
@@ -44,7 +35,7 @@ namespace PepperDash.Essentials.Core
return null;
}
}
public static FileInfo GetFile(string fileName)
{
DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(fileName));
@@ -90,6 +81,7 @@ namespace PepperDash.Essentials.Core
{
if (fileLock.TryEnter())
{
DirectoryInfo dirInfo = new DirectoryInfo(file.Name);
Debug.Console(2, "FileIO Getting Data {0}", file.FullName);
if (File.Exists(file.FullName))
@@ -126,11 +118,11 @@ namespace PepperDash.Essentials.Core
}
public static void ReadDataFromFileASync(string fileName, GotFileEventHandler callback)
public static void ReadDataFromFileASync(string fileName)
{
try
{
ReadDataFromFileASync(GetFile(fileName), callback);
ReadDataFromFileASync(GetFile(fileName));
}
catch (Exception e)
{
@@ -138,13 +130,11 @@ namespace PepperDash.Essentials.Core
}
}
public static void ReadDataFromFileASync(FileInfo file, GotFileEventHandler callback)
public static void ReadDataFromFileASync(FileInfo file)
{
try
{
CrestronInvoke.BeginInvoke((o => _ReadDataFromFileASync(file, callback)));
CrestronInvoke.BeginInvoke(o => _ReadDataFromFileASync(file));
}
catch (Exception e)
{
@@ -152,7 +142,7 @@ namespace PepperDash.Essentials.Core
}
}
private static void _ReadDataFromFileASync(FileInfo file, GotFileEventHandler callback)
private static void _ReadDataFromFileASync(FileInfo file)
{
string data;
try
@@ -175,13 +165,11 @@ namespace PepperDash.Essentials.Core
Debug.Console(2, "File {0} Does not exsist", file.FullName);
data = "";
}
callback.Invoke(null, new FileEventArgs(data));
//callback.Invoke(null, new FileEventArgs(data));
GotFileEvent.Invoke(null, new FileEventArgs(data));
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "FileIO Unable to enter FileLock retrying");
Debug.Console(0, Debug.ErrorLogLevel.Error, "FileIO Unable to enter FileLock");
}
}
@@ -201,41 +189,6 @@ namespace PepperDash.Essentials.Core
}
/// <summary>
/// Resets (or starts) the write timer
/// </summary>
static void ResetTimer(string data, string filePath)
{
try
{
if (WriteTimers.ContainsKey(filePath))
{
WriteTimers[filePath].Stop();
WriteTimers[filePath] = null;
WriteTimers.Remove(filePath);
}
WriteTimers.Add(filePath, new CTimer((o) =>
{
Thread _WriteFileThread;
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, filePath), null, Thread.eThreadStartOptions.CreateSuspended);
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
_WriteFileThread.Start();
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
WriteTimers.Remove(filePath);
}, WriteTimeout));
Debug.Console(0, "FileIO write timer has been reset.");
}
catch (Exception e)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: FileIO ResetTimer failed: \r{0}", e);
data = "";
}
}
/// <summary>
///
/// </summary>
@@ -248,7 +201,11 @@ namespace PepperDash.Essentials.Core
/// <param name="filePath"></param>
public static void WriteDataToFile(string data, string filePath)
{
ResetTimer(data, filePath);
Thread _WriteFileThread;
_WriteFileThread = new Thread((O) => _WriteFileMethod(data, filePath), null, Thread.eThreadStartOptions.CreateSuspended);
_WriteFileThread.Priority = Thread.eThreadPriority.LowestPriority;
_WriteFileThread.Start();
Debug.Console(0, Debug.ErrorLogLevel.Notice, "New WriteFile Thread");
}
@@ -283,7 +240,6 @@ namespace PepperDash.Essentials.Core
fileLock.Leave();
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "File Written to : '{0}'", filePath);
return null;
}
@@ -318,9 +274,5 @@ namespace PepperDash.Essentials.Core
public FileEventArgs(string data) { Data = data; }
public string Data { get; private set; } // readonly
}
public enum ReadFileDispatchError
{
}
}

View File

@@ -123,6 +123,7 @@
<Compile Include="Bridges\IBridge.cs" />
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\PduJoinMapBase.cs" />
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\CenOdtOccupancySensorBaseJoinMap.cs" />
@@ -203,6 +204,7 @@
<Compile Include="Devices\IReconfigurableDevice.cs" />
<Compile Include="Devices\PC\InRoomPc.cs" />
<Compile Include="Devices\PC\Laptop.cs" />
<Compile Include="Devices\PduInterfaces.cs" />
<Compile Include="Devices\ReconfigurableDevice.cs" />
<Compile Include="Devices\VolumeDeviceChangeEventArgs.cs" />
<Compile Include="DeviceTypeInterfaces\IPasswordPrompt.cs" />

View File

@@ -42,9 +42,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
public Boolean WaitingForHost { get; private set; }
[JsonProperty("isLocked", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsLocked { get; private set; }
[JsonProperty("isRecording", NullValueHandling = NullValueHandling.Ignore)]
public Boolean IsRecording { get; private set; }
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked)
public MeetingInfo(string id, string name, string host, string password, string shareStatus, bool isHost, bool isSharingMeeting, bool waitingForHost, bool isLocked, bool isRecording)
{
Id = id;
Name = name;
@@ -55,6 +57,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
IsSharingMeeting = isSharingMeeting;
WaitingForHost = waitingForHost;
IsLocked = isLocked;
IsRecording = isRecording;
}
}

View File

@@ -15,4 +15,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
void StopRecording();
void ToggleRecording();
}
public interface IHasMeetingRecordingWithPrompt : IHasMeetingRecording
{
BoolFeedback RecordConsentPromptIsVisible { get; }
/// <summary>
/// Used to agree or disagree to the meeting being recorded when prompted
/// </summary>
/// <param name="agree"></param>
void RecordingPromptAcknowledgement(bool agree);
}
}

View File

@@ -24,6 +24,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
/// </summary>
/// <param name="participant"></param>
void SetParticipantAsHost(int userId);
/// <summary>
/// Admits a participant from the waiting room
/// </summary>
/// <param name="userId"></param>
void AdmitParticipantFromWaitingRoom(int userId);
}
/// <summary>

View File

@@ -31,10 +31,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
var handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
else
{
Debug.Console(2, "PropertyChanged event is NULL");
}
}
#endregion
@@ -778,13 +783,20 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
set
{
//Debug.Console(2, "************************************setting value of meetingIsBeingRecorded to: {0}", value);
if (value != _meetingIsBeingRecorded)
{
_meetingIsBeingRecorded = value;
//Debug.Console(2, "********************************set value of meetingIsBeingRecorded to: {0}", _meetingIsBeingRecorded);
NotifyPropertyChanged("meetingIsBeingRecorded");
}
}
}
public CallRecordInfo()
{
Debug.Console(2, Debug.ErrorLogLevel.Notice, "********************************************* CallRecordInfo() ******************************************");
}
}
}

View File

@@ -27,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMuteWithUnmuteReqeust, IHasCameraAutoMode,
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting,
IHasMeetingLock, IHasMeetingRecording
IHasMeetingLock, IHasMeetingRecordingWithPrompt
{
public event EventHandler VideoUnmuteRequested;
@@ -113,14 +113,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
Output1 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
Output1 = new RoutingOutputPort(RoutingPortNames.HdmiOut1,
eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
Output2 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
Output2 = new RoutingOutputPort(RoutingPortNames.HdmiOut2,
eRoutingSignalType.Video,
eRoutingPortConnectionType.DisplayPort, null, this);
Output3 = new RoutingOutputPort(RoutingPortNames.HdmiOut3,
eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, null, this);
SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
@@ -170,6 +174,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable );
MeetingIsRecordingFeedback = new BoolFeedback(() => Status.Call.CallRecordInfo.meetingIsBeingRecorded );
RecordConsentPromptIsVisible = new BoolFeedback(() => _recordConsentPromptIsVisible);
SetUpRouting();
}
public CommunicationGather PortGather { get; private set; }
@@ -299,6 +307,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
public RoutingInputPort CodecOsdIn { get; private set; }
public RoutingOutputPort Output1 { get; private set; }
public RoutingOutputPort Output2 { get; private set; }
public RoutingOutputPort Output3 { get; private set; }
#region ICommunicationMonitor Members
@@ -489,25 +498,63 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private void SyncState_InitialSyncCompleted(object sender, EventArgs e)
{
SetUpRouting();
SetIsReady();
}
/// <summary>
/// Handles subscriptions to Status.Call and sub objects. Needs to be called whenever Status.Call is constructed
/// </summary>
private void SetUpCallFeedbackActions()
{
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
Status.Call.Sharing.PropertyChanged -= HandleSharingStateUpdate;
Status.Call.Sharing.PropertyChanged += HandleSharingStateUpdate;
Status.Call.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "Info")
{
Debug.Console(1, this, "Updating Call Status");
UpdateCallStatus();
}
};
Status.Call.PropertyChanged -= HandleCallStateUpdate;
Status.Call.PropertyChanged += HandleCallStateUpdate;
Status.Call.CallRecordInfo.PropertyChanged -= HandleCallRecordInfoStateUpdate;
Status.Call.CallRecordInfo.PropertyChanged += HandleCallRecordInfoStateUpdate;
}
private void HandleCallRecordInfoStateUpdate(object sender, PropertyChangedEventArgs a)
{
if (a.PropertyName == "meetingIsBeingRecorded")
{
MeetingIsRecordingFeedback.FireUpdate();
var meetingInfo = new MeetingInfo(MeetingInfo.Id,
MeetingInfo.Name,
MeetingInfo.Host,
MeetingInfo.Password,
GetSharingStatus(),
GetIsHostMyself(),
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
}
}
private void HandleCallStateUpdate(object sender, PropertyChangedEventArgs a)
{
switch (a.PropertyName)
{
case "Info":
{
Debug.Console(1, this, "Updating Call Status");
UpdateCallStatus();
break;
}
case "Status":
{
UpdateCallStatus();
break;
}
}
}
private void HandleSharingStateUpdate(object sender, PropertyChangedEventArgs a)
{
if (a.PropertyName != "State")
@@ -525,19 +572,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
var sharingStatus = GetSharingStatus();
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue);
MeetingInfo = new MeetingInfo("", "", "", "", sharingStatus, GetIsHostMyself(), true, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
return;
}
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host != null ? Participants.Host.Name : "None",
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue);
MeetingInfo.Password, GetSharingStatus(), GetIsHostMyself(), MeetingInfo.IsSharingMeeting, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
}
catch (Exception e)
{
Debug.Console(1, this, "Error processing state property update. {0}", e.Message);
Debug.Console(2, this, e.StackTrace);
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue);
MeetingInfo = new MeetingInfo("", "", "", "", "None", false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
}
}
@@ -546,6 +593,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// </summary>
private void SetUpFeedbackActions()
{
// Set these up initially.
SetUpCallFeedbackActions();
Configuration.Audio.Output.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "Volume")
@@ -640,7 +690,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
MeetingInfo.IsHost,
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue
);
}
};
@@ -673,41 +724,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
}
};
Status.Call.Sharing.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "State")
{
SharingContentIsOnFeedback.FireUpdate();
ReceivingContent.FireUpdate();
}
};
Status.Call.PropertyChanged += (o, a) =>
{
switch(a.PropertyName)
{
case "Info":
{
Debug.Console(1, this, "Updating Call Status");
UpdateCallStatus();
break;
}
case "Status":
{
UpdateCallStatus();
break;
}
}
};
Status.Call.CallRecordInfo.PropertyChanged += (o, a) =>
{
if (a.PropertyName == "meetingIsBeingRecorded")
{
MeetingIsRecordingFeedback.FireUpdate();
}
};
Status.Sharing.PropertyChanged += (o, a) =>
{
@@ -739,7 +755,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
GetIsHostMyself(),
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue);
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
break;
}
@@ -1436,7 +1453,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
GetIsHostMyself(),
MeetingInfo.IsSharingMeeting,
MeetingInfo.WaitingForHost,
MeetingIsLockedFeedback.BoolValue);
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue);
MeetingInfo = meetingInfo;
PrintCurrentCallParticipants();
@@ -1651,14 +1669,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue);
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
UpdateCallStatus();
break;
}
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue);
GetSharingStatus(), false, false, true, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
UpdateCallStatus();
@@ -1668,12 +1686,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (MeetingInfo == null)
{
MeetingInfo = new MeetingInfo("Waiting For Host", "Waiting For Host", "Waiting For Host", "",
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue);
GetSharingStatus(), false, false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
MeetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password,
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue);
GetSharingStatus(), GetIsHostMyself(), false, false, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
@@ -1682,12 +1700,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// TODO: notify user that host has disabled unmuting video
break;
}
case "updatedcallrecordinfo":
case "updatecallrecordinfo":
{
JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo);
break;
}
case "recordingconsent":
{
_recordConsentPromptIsVisible = responseObj["isShow"].Value<bool>();
RecordConsentPromptIsVisible.FireUpdate();
break;
}
case "phonecallstatus":
{
JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
@@ -1757,7 +1781,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
if (result.Success)
{
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue);
MeetingInfo = new MeetingInfo("", "", "", "", "", true, true, MeetingInfo.WaitingForHost, MeetingIsLockedFeedback.BoolValue, MeetingIsRecordingFeedback.BoolValue);
break;
}
@@ -1958,12 +1982,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// If not crrently in a meeting, intialize the call object
if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
{
//Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object");
Status.Call = new zStatus.Call {Status = callStatus};
// Resubscribe to all property change events after Status.Call is reconstructed
SetUpCallFeedbackActions();
OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected});
SetUpCallFeedbackActions();
}
if (ActiveCalls.Count == 0)
@@ -2103,7 +2126,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
GetIsHostMyself(),
!String.Equals(Status.Call.Info.meeting_type,"NORMAL"),
false,
MeetingIsLockedFeedback.BoolValue
MeetingIsLockedFeedback.BoolValue,
MeetingIsRecordingFeedback.BoolValue
);
}
// TODO [ ] Issue #868
@@ -2118,6 +2142,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
false,
false,
false,
false,
false
);
}
@@ -2343,6 +2368,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
/// <param name="joinMap"></param>
public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap)
{
var recordingCodec = this as IHasMeetingRecordingWithPrompt;
if (recordingCodec != null)
{
trilist.SetSigFalseAction(joinMap.StartRecording.JoinNumber, () => recordingCodec.StartRecording());
trilist.SetSigFalseAction(joinMap.StopRecording.JoinNumber, () => recordingCodec.StopRecording());
recordingCodec.MeetingIsRecordingFeedback.LinkInputSig(trilist.BooleanInput[joinMap.StartRecording.JoinNumber]);
recordingCodec.MeetingIsRecordingFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.StopRecording.JoinNumber]);
trilist.SetSigFalseAction(joinMap.RecordingPromptAgree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(true));
trilist.SetSigFalseAction(joinMap.RecordingPromptDisagree.JoinNumber, () => recordingCodec.RecordingPromptAcknowledgement(false));
recordingCodec.RecordConsentPromptIsVisible.LinkInputSig(trilist.BooleanInput[joinMap.RecordConsentPromptIsVisible.JoinNumber]);
}
var layoutsCodec = this as IHasZoomRoomLayouts;
if (layoutsCodec != null)
{
@@ -2796,6 +2836,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SendText(string.Format("zCommand Call HostChange Id: {0}", userId));
}
public void AdmitParticipantFromWaitingRoom(int userId)
{
SendText(string.Format("zCommand Call Admit Participant Id: {0}", userId));
}
#endregion
#region IHasParticipantAudioMute Members
@@ -3406,18 +3451,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
#endregion
#region IHasMeetingRecording Members
#region IHasMeetingRecordingWithPrompt Members
public BoolFeedback MeetingIsRecordingFeedback { get; private set; }
bool _recordConsentPromptIsVisible;
public BoolFeedback RecordConsentPromptIsVisible { get; private set; }
public void RecordingPromptAcknowledgement(bool agree)
{
var command = string.Format("zCommand Agree Recording: {0}", agree ? "on" : "off");
//Debug.Console(2, this, "Sending agree: {0} {1}", agree, command);
SendText(command);
}
public void StartRecording()
{
SendText(string.Format("Command Call Record Enable: on"));
SendText(string.Format("zCommand Call Record Enable: on"));
}
public void StopRecording()
{
SendText(string.Format("Command Call Record Enable: off"));
SendText(string.Format("zCommand Call Record Enable: off"));
}
public void ToggleRecording()

View File

@@ -295,7 +295,77 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Description = "Toggles the selfview pip size, (aka layout size)",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
});
[JoinName("StartRecording")]
public JoinDataComplete StartRecording = new JoinDataComplete(
new JoinData
{
JoinNumber = 241,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to start the Meeting Recording. FB high if meeting is currently recording",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("StopRecording")]
public JoinDataComplete StopRecording = new JoinDataComplete(
new JoinData
{
JoinNumber = 242,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to stop the Meeting Recording. FB high if meeting is currently NOT recording",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("RecordConsentPromptIsVisible")]
public JoinDataComplete RecordConsentPromptIsVisible = new JoinDataComplete(
new JoinData
{
JoinNumber = 243,
JoinSpan = 1
},
new JoinMetadata
{
Description = "When high, indicates that the recording consent prompt is visible on the ZoomRoom UI",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("RecordingPromptAgree")]
public JoinDataComplete RecordingPromptAgree = new JoinDataComplete(
new JoinData
{
JoinNumber = 244,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to agree to consent for meeting recording",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
[JoinName("RecordingPromptDisagree")]
public JoinDataComplete RecordingPromptDisagree = new JoinDataComplete(
new JoinData
{
JoinNumber = 245,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Pulse to disagree to consent for meeting recording",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
//[JoinName("ParticipantAudioMuteToggleStart")]
//public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(

View File

@@ -1,3 +1,3 @@
<packages>
<package id="PepperDashCore" version="1.1.1-rc-247" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
<package id="PepperDashCore" version="1.1.1" targetFramework="net35" allowedVersions="[1.0,2.0)"/>
</packages>