mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-30 04:44:49 +00:00
feat(essentials): adds new features for ZoomRoom
Adds IHasMeetingLock and adds new methods to IHasParticipants
This commit is contained in:
@@ -121,6 +121,7 @@
|
||||
<Compile Include="Cameras\CameraControl.cs" />
|
||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasMeetingLock.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||
|
||||
@@ -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 IHasMeetingLock
|
||||
{
|
||||
BoolFeedback MeetingIsLockedFeedback { get; }
|
||||
|
||||
void LockMeeting();
|
||||
void UnLockMeeting();
|
||||
void ToggleMeetingLock();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
public interface IHasParticipants
|
||||
{
|
||||
CodecParticipants Participants { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Removes the participant from the meeting
|
||||
/// </summary>
|
||||
/// <param name="participant"></param>
|
||||
void RemoveParticipant(Participant participant);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the participant as the new host
|
||||
/// </summary>
|
||||
/// <param name="participant"></param>
|
||||
void SetParticipantAsHost(Participant participant);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -29,6 +41,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
|
||||
/// </summary>
|
||||
public interface IHasParticipantAudioMute : IHasParticipantVideoMute
|
||||
{
|
||||
/// <summary>
|
||||
/// Mute audio of all participants
|
||||
/// </summary>
|
||||
void MuteAudioForAllParticipants();
|
||||
|
||||
void MuteAudioForParticipant(int userId);
|
||||
void UnmuteAudioForParticipant(int userId);
|
||||
void ToggleAudioForParticipant(int userId);
|
||||
|
||||
@@ -1123,9 +1123,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
}
|
||||
|
||||
public class Lock
|
||||
public class Lock : NotifiableObject
|
||||
{
|
||||
public bool Enable { get; set; }
|
||||
private bool _enable;
|
||||
|
||||
public bool Enable
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enable;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != _enable)
|
||||
{
|
||||
_enable = value;
|
||||
NotifyPropertyChanged("Enable");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ClosedCaption
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
IRouting,
|
||||
IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
|
||||
IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin,
|
||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting
|
||||
IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo, IHasPresentationOnlyMeeting, IHasMeetingLock
|
||||
{
|
||||
private const long MeetingRefreshTimer = 60000;
|
||||
public uint DefaultMeetingDurationMin { get; private set; }
|
||||
@@ -147,6 +147,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
ContentSwappedWithThumbnailFeedback = new BoolFeedback(ContentSwappedWithThumbnailFeedbackFunc);
|
||||
|
||||
NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc);
|
||||
|
||||
MeetingIsLockedFeedback = new BoolFeedback(() => Configuration.Call.Lock.Enable );
|
||||
}
|
||||
|
||||
public CommunicationGather PortGather { get; private set; }
|
||||
@@ -597,6 +599,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
};
|
||||
|
||||
Configuration.Call.Lock.PropertyChanged += (o, a) =>
|
||||
{
|
||||
if (a.PropertyName == "Enable")
|
||||
{
|
||||
MeetingIsLockedFeedback.FireUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3
|
||||
Configuration.Client.Call.Layout.PropertyChanged += (o, a) =>
|
||||
{
|
||||
@@ -2334,6 +2344,56 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites contacts to a new meeting for a specified duration
|
||||
/// </summary>
|
||||
/// <param name="contacts"></param>
|
||||
/// <param name="duration"></param>
|
||||
public void InviteContactsToNewMeeting(InvitableDirectoryContact[] contacts, uint duration)
|
||||
{
|
||||
if(duration == 0)
|
||||
{
|
||||
duration = DefaultMeetingDurationMin;
|
||||
}
|
||||
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
// Add the prefix
|
||||
message.Append(string.Format("zCommand Invite Duration: {0}", duration));
|
||||
|
||||
// Add each invitee
|
||||
foreach (var contact in contacts)
|
||||
{
|
||||
var invitee = string.Format(" user: {0}", contact.ContactId);
|
||||
|
||||
message.Append(invitee);
|
||||
}
|
||||
|
||||
SendText(message.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invites contacts to an existing meeting
|
||||
/// </summary>
|
||||
/// <param name="contacts"></param>
|
||||
public void InviteContactsToExistingMeeting(InvitableDirectoryContact[] contacts)
|
||||
{
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
// Add the prefix
|
||||
message.Append(string.Format("zCommand Call Invite"));
|
||||
|
||||
// Add each invitee
|
||||
foreach (var contact in contacts)
|
||||
{
|
||||
var invitee = string.Format(" user: {0}", contact.ContactId);
|
||||
|
||||
message.Append(invitee);
|
||||
}
|
||||
|
||||
SendText(message.ToString());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Starts a PMI Meeting for the specified duration (or default meeting duration if 0 is specified)
|
||||
@@ -2469,10 +2529,25 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
|
||||
public CodecParticipants Participants { get; private set; }
|
||||
|
||||
public void RemoveParticipant(Participant participant)
|
||||
{
|
||||
SendText(string.Format("zCommand Call Expel Id: {0}", participant.UserId));
|
||||
}
|
||||
|
||||
public void SetParticipantAsHost(Participant participant)
|
||||
{
|
||||
SendText(string.Format("zCommand Call HostChange Id: {0}", participant.UserId));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IHasParticipantAudioMute Members
|
||||
|
||||
public void MuteAudioForAllParticipants()
|
||||
{
|
||||
SendText(string.Format("zCommand Call MuteAll Mute: on"));
|
||||
}
|
||||
|
||||
public void MuteAudioForParticipant(int userId)
|
||||
{
|
||||
SendText(string.Format("zCommand Call MuteParticipant Mute: on Id: {0}", userId));
|
||||
@@ -3034,7 +3109,35 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region IHasMeetingLock Members
|
||||
|
||||
public BoolFeedback MeetingIsLockedFeedback { get; private set; }
|
||||
|
||||
public void LockMeeting()
|
||||
{
|
||||
SendText(string.Format("zConfiguration Call Lock Enable: on"));
|
||||
}
|
||||
|
||||
public void UnLockMeeting()
|
||||
{
|
||||
SendText(string.Format("zConfiguration Call Lock Enable: off"));
|
||||
}
|
||||
|
||||
public void ToggleMeetingLock()
|
||||
{
|
||||
if (MeetingIsLockedFeedback.BoolValue)
|
||||
{
|
||||
UnLockMeeting();
|
||||
}
|
||||
else
|
||||
{
|
||||
LockMeeting();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Zoom Room specific info object
|
||||
|
||||
Reference in New Issue
Block a user