feat(essentails): #811 Adds IHasMeetingInfo, implements on ZoomRoom and updates UI drivers #812

This commit is contained in:
Neil Dorin
2021-08-27 17:57:21 -06:00
parent e1d9a46284
commit 532f3ba237
11 changed files with 345 additions and 23 deletions

View File

@@ -49,6 +49,15 @@ namespace PepperDash.Essentials
/// 1006 /// 1006
/// </summary> /// </summary>
public const uint CallEndAllConfirmVisible = 1006; public const uint CallEndAllConfirmVisible = 1006;
/// <summary>
/// 1007
/// </summary>
public const uint MeetingPasswordVisible = 1007;
/// <summary>
/// 1008
/// </summary>
public const uint MeetingLeavePress = 1008;
@@ -153,6 +162,11 @@ namespace PepperDash.Essentials
public const uint VCFavoriteVisibleStart = 1221; public const uint VCFavoriteVisibleStart = 1221;
// RANGE IN USE // RANGE IN USE
public const uint VCFavoriteVisibleEnd = 1225; public const uint VCFavoriteVisibleEnd = 1225;
/// <summary>
/// 1230
/// </summary>
public const uint VCStagingMeetNowPress = 1230;
/// <summary> /// <summary>
/// 1231 /// 1231
/// </summary> /// </summary>
@@ -844,6 +858,11 @@ namespace PepperDash.Essentials
/// 15067 /// 15067
/// </summary> /// </summary>
public const uint NotificationRibbonVisible = 15067; public const uint NotificationRibbonVisible = 15067;
/// <summary>
/// 15068
/// </summary>
public const uint HeaderMeetingInfoVisible = 15068;
/// <summary> /// <summary>
/// 15083 - Press for Call help desk on AC/VC /// 15083 - Press for Call help desk on AC/VC
/// </summary> /// </summary>

View File

@@ -27,6 +27,23 @@ namespace PepperDash.Essentials
/// 1004 /// 1004
/// </summary> /// </summary>
public const uint CallSharedSourceNameText = 1004; public const uint CallSharedSourceNameText = 1004;
/// <summary>
/// 1005
/// </summary>
public const uint MeetingIdText = 1005;
/// <summary>
/// 1006
/// </summary>
public const uint MeetingHostText = 1006;
/// <summary>
/// 1007
/// </summary>
public const uint MeetingPasswordText = 1007;
/// <summary>
/// 1008
/// </summary>
public const uint MeetingNameText = 1008;
/// <summary> /// <summary>

View File

@@ -164,7 +164,7 @@ namespace PepperDash.Essentials
CallCaretVisible = tempJoin + 10; CallCaretVisible = tempJoin + 10;
TriList.SetSigFalseAction(tempJoin, () => TriList.SetSigFalseAction(tempJoin, () =>
{ {
avDriver.ShowActiveCallsList(); avDriver.ShowActiveCallsListOrMeetingInfo();
if(avDriver.CurrentRoom.InCallFeedback.BoolValue) if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
CaretInterlock.ShowInterlocked(CallCaretVisible); CaretInterlock.ShowInterlocked(CallCaretVisible);
}); });
@@ -256,7 +256,7 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress, TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
() => () =>
{ {
avDriver.ShowActiveCallsList(); avDriver.ShowActiveCallsListOrMeetingInfo();
if (avDriver.CurrentRoom.InCallFeedback.BoolValue) if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
CaretInterlock.ShowInterlocked(CallCaretVisible); CaretInterlock.ShowInterlocked(CallCaretVisible);
}); });
@@ -354,6 +354,8 @@ namespace PepperDash.Essentials
headerPopupShown = true; headerPopupShown = true;
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible) else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
headerPopupShown = true; headerPopupShown = true;
else if (e.NewJoin == UIBoolJoin.HeaderMeetingInfoVisible)
headerPopupShown = true;
else if (e.NewJoin == UIBoolJoin.HelpPageVisible) else if (e.NewJoin == UIBoolJoin.HelpPageVisible)
headerPopupShown = true; headerPopupShown = true;
else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible) else if (e.NewJoin == UIBoolJoin.MeetingsOrContacMethodsListVisible)

View File

@@ -14,6 +14,7 @@ using PepperDash.Essentials.Core.PageManagers;
using PepperDash.Essentials.Room.Config; using PepperDash.Essentials.Room.Config;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec; using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
namespace PepperDash.Essentials namespace PepperDash.Essentials
{ {
@@ -99,6 +100,9 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; } public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; }
public uint CallListOrMeetingInfoPopoverVisibilityJoin { get; private set; }
/// <summary> /// <summary>
/// The list of buttons on the header. Managed with visibility only /// The list of buttons on the header. Managed with visibility only
/// </summary> /// </summary>
@@ -351,15 +355,17 @@ namespace PepperDash.Essentials
/// <summary> /// <summary>
/// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call /// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call
/// </summary> /// </summary>
public void ShowActiveCallsList() public void ShowActiveCallsListOrMeetingInfo()
{ {
TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true); TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true);
if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
if(PopupInterlock.CurrentJoin == CallListOrMeetingInfoPopoverVisibilityJoin)
PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin);
else else
{ {
if((CurrentRoom.ScheduleSource as VideoCodecBase).IsInCall) if(CurrentRoom.VideoCodec.IsInCall)
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); PopupInterlock.ShowInterlockedWithToggle(CallListOrMeetingInfoPopoverVisibilityJoin);
} }
} }
@@ -948,6 +954,18 @@ namespace PepperDash.Essentials
_CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange; _CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
_CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange; _CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDownFeedback_OutputChange;
_CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange; _CurrentRoom.InCallFeedback.OutputChange -= CurrentRoom_InCallFeedback_OutputChange;
var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness;
if (scheduleAwareCodec != null)
{
scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged -= CodecSchedule_MeetingsListHasChanged;
}
var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo;
if (meetingInfoCodec != null)
{
meetingInfoCodec.MeetingInfoChanged -= meetingInfoCodec_MeetingInfoChanged;
}
} }
_CurrentRoom = room; _CurrentRoom = room;
@@ -980,9 +998,23 @@ namespace PepperDash.Essentials
_CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange; _CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange;
RefreshSourceInfo(); RefreshSourceInfo();
if (_CurrentRoom.VideoCodec is IHasScheduleAwareness)
var scheduleAwareCodec = _CurrentRoom.VideoCodec as IHasScheduleAwareness;
if (scheduleAwareCodec != null)
{ {
(_CurrentRoom.VideoCodec as IHasScheduleAwareness).CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged; scheduleAwareCodec.CodecSchedule.MeetingsListHasChanged += CodecSchedule_MeetingsListHasChanged;
}
var meetingInfoCodec = _CurrentRoom.VideoCodec as IHasMeetingInfo;
if (meetingInfoCodec != null)
{
meetingInfoCodec.MeetingInfoChanged += new EventHandler<MeetingInfoEventArgs>(meetingInfoCodec_MeetingInfoChanged);
CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderMeetingInfoVisible;
}
else
{
CallListOrMeetingInfoPopoverVisibilityJoin = UIBoolJoin.HeaderActiveCallsListVisible;
} }
CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue); CallSharingInfoVisibleFeedback = new BoolFeedback(() => _CurrentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue);
@@ -994,7 +1026,8 @@ namespace PepperDash.Essentials
if (_CurrentRoom != null) if (_CurrentRoom != null)
_CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange); _CurrentRoom.CurrentSourceChange += new SourceInfoChangeHandler(CurrentRoom_CurrentSingleSourceChange);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey)); // Moved to EssentialsVideoCodecUiDriver
//TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd", _CurrentRoom.SourceListKey));
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom); (Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
} }
@@ -1005,6 +1038,19 @@ namespace PepperDash.Essentials
} }
} }
void meetingInfoCodec_MeetingInfoChanged(object sender, MeetingInfoEventArgs e)
{
TriList.SetString(UIStringJoin.MeetingIdText, e.Info.Id);
TriList.SetString(UIStringJoin.MeetingHostText, e.Info.Host);
TriList.SetString(UIStringJoin.MeetingNameText, e.Info.Name);
TriList.SetString(UIStringJoin.MeetingPasswordText, e.Info.Password);
// Show the password fields if one is present
TriList.SetBool(UIBoolJoin.MeetingPasswordVisible, string.IsNullOrEmpty(e.Info.Password) ? false : true);
TriList.SetString(UIStringJoin.CallSharedSourceNameText, e.Info.ShareStatus);
}
void SetCurrentRoom(IEssentialsHuddleVtc1Room room) void SetCurrentRoom(IEssentialsHuddleVtc1Room room)
{ {
if (_CurrentRoom == room) return; if (_CurrentRoom == room) return;
@@ -1514,6 +1560,8 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void PrepareForCodecIncomingCall(); void PrepareForCodecIncomingCall();
uint CallListOrMeetingInfoPopoverVisibilityJoin { get; }
SubpageReferenceList MeetingOrContactMethodModalSrl { get; } SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
} }
} }

View File

@@ -15,6 +15,7 @@ using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.Touchpanels.Keyboards; using PepperDash.Essentials.Core.Touchpanels.Keyboards;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec; using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.UIDrivers.VC namespace PepperDash.Essentials.UIDrivers.VC
@@ -422,8 +423,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
ActiveCallsSRL.Count = (ushort)activeList.Count; ActiveCallsSRL.Count = (ushort)activeList.Count;
// If Active Calls list is visible and codec is not in a call, hide the list // If Active Calls list is visible and codec is not in a call, hide the list
if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible) if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == Parent.CallListOrMeetingInfoPopoverVisibilityJoin)
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible); Parent.PopupInterlock.ShowInterlockedWithToggle(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
} }
/// <summary> /// <summary>
@@ -514,15 +515,19 @@ namespace PepperDash.Essentials.UIDrivers.VC
TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents); TriList.SetSigFalseAction(UIBoolJoin.VCStagingRecentsPress, ShowRecents);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingCameraPress, ShowCameraControls); TriList.SetSigFalseAction(UIBoolJoin.VCStagingCameraPress, ShowCameraControls);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress); TriList.SetSigFalseAction(UIBoolJoin.VCStagingConnectPress, ConnectPress);
TriList.SetSigFalseAction(UIBoolJoin.VCStagingMeetNowPress, MeetNowPress);
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, CallStopSharingPress);
TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () => TriList.SetSigFalseAction(UIBoolJoin.CallEndPress, () =>
{ {
if (Codec.ActiveCalls.Count > 1) if (Codec.ActiveCalls.Count > 1)
{ {
Parent.PopupInterlock.ShowInterlocked(UIBoolJoin.HeaderActiveCallsListVisible); Parent.PopupInterlock.ShowInterlocked(Parent.CallListOrMeetingInfoPopoverVisibilityJoin);
} }
else else
Codec.EndAllCalls(); Codec.EndAllCalls();
}); });
TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () => TriList.SetSigFalseAction(UIBoolJoin.CallEndAllConfirmPress, () =>
{ {
Parent.PopupInterlock.HideAndClear(); Parent.PopupInterlock.HideAndClear();
@@ -1566,6 +1571,22 @@ namespace PepperDash.Essentials.UIDrivers.VC
StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingRecentsPress);
} }
/// <summary>
/// Meet Now button
/// </summary>
void MeetNowPress()
{
var startMeetingCodec = Codec as IHasStartMeeting;
if (startMeetingCodec != null)
{
startMeetingCodec.StartMeeting(startMeetingCodec.DefaultMeetingDurationMin);
}
else
{
Debug.Console(2, "Codce does not implment IHasStartMeeting. Cannot meet now");
}
}
/// <summary> /// <summary>
/// Connect call button /// Connect call button
/// </summary> /// </summary>
@@ -1576,6 +1597,16 @@ namespace PepperDash.Essentials.UIDrivers.VC
Codec.Dial(DialStringBuilder.ToString()); Codec.Dial(DialStringBuilder.ToString());
} }
/// <summary>
/// Stop Sharing button
/// </summary>
void CallStopSharingPress()
{
Codec.StopSharing();
Parent.CurrentRoom.RunRouteAction("codecOsd", Parent.CurrentRoom.SourceListKey);
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

View File

@@ -120,6 +120,7 @@
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" /> <Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
<Compile Include="Cameras\CameraControl.cs" /> <Compile Include="Cameras\CameraControl.cs" />
<Compile Include="Display\PanasonicThDisplay.cs" /> <Compile Include="Display\PanasonicThDisplay.cs" />
<Compile Include="VideoCodec\Interfaces\IHasMeetingInfo.cs" />
<Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" /> <Compile Include="VideoCodec\Interfaces\IHasParticipants.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" /> <Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" /> <Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
/// <summary>
/// Describes a device that provides meeting information (like a ZoomRoom)
/// </summary>
public interface IHasMeetingInfo
{
event EventHandler<MeetingInfoEventArgs> MeetingInfoChanged;
MeetingInfo MeetingInfo { get; }
}
/// <summary>
/// Represents the information about a meeting in progress
/// Currently used for Zoom meetings
/// </summary>
public class MeetingInfo
{
public string Id { get; private set; }
public string Name { get; private set; }
public string Host { get; set; }
public string Password { get; private set; }
public string ShareStatus { get; private set; }
public MeetingInfo(string id, string name, string host, string password, string shareStatus)
{
Id = id;
Name = name;
Host = host;
Password = password;
ShareStatus = shareStatus;
}
}
public class MeetingInfoEventArgs : EventArgs
{
public MeetingInfo Info { get; private set; }
public MeetingInfoEventArgs(MeetingInfo info)
{
Info = info;
}
}
}

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
@@ -60,6 +61,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
} }
} }
public Participant Host
{
get
{
return _currentParticipants.FirstOrDefault(p => p.IsHost);
}
}
public event EventHandler<EventArgs> ParticipantsListHasChanged; public event EventHandler<EventArgs> ParticipantsListHasChanged;
public CodecParticipants() public CodecParticipants()

View File

@@ -21,5 +21,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
/// </summary> /// </summary>
/// <param name="duration"></param> /// <param name="duration"></param>
void StartMeeting(uint duration); void StartMeeting(uint duration);
/// <summary>
/// Leaves a meeting without ending it
/// </summary>
void LeaveMeeting();
} }
} }

View File

@@ -431,6 +431,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
private string _dispState; private string _dispState;
private string _password; private string _password;
private bool _isAirHostClientConnected;
private bool _isSharingBlackMagic;
private bool _isDirectPresentationConnected;
public string directPresentationPairingCode { get; set; } public string directPresentationPairingCode { get; set; }
/// <summary> /// <summary>
@@ -452,11 +456,51 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
} }
} }
public bool isAirHostClientConnected { get; set; }
public bool isAirHostClientConnected
{
get { return _isAirHostClientConnected; }
set
{
if (value != _isAirHostClientConnected)
{
_isAirHostClientConnected = value;
NotifyPropertyChanged("isAirHostClientConnected");
}
}
}
public bool isBlackMagicConnected { get; set; } public bool isBlackMagicConnected { get; set; }
public bool isBlackMagicDataAvailable { get; set; } public bool isBlackMagicDataAvailable { get; set; }
public bool isDirectPresentationConnected { get; set; }
public bool isSharingBlackMagic { get; set; } public bool isDirectPresentationConnected
{
get { return _isDirectPresentationConnected; }
set
{
if (value != _isDirectPresentationConnected)
{
_isDirectPresentationConnected = value;
NotifyPropertyChanged("isDirectPresentationConnected");
}
}
}
public bool isSharingBlackMagic
{
get { return _isSharingBlackMagic; }
set
{
if (value != _isSharingBlackMagic)
{
_isSharingBlackMagic = value;
NotifyPropertyChanged("isSharingBlackMagic");
}
}
}
/// <summary> /// <summary>
/// IOS Airplay code /// IOS Airplay code
/// </summary> /// </summary>
@@ -779,7 +823,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
private bool _paused; private bool _paused;
private eSharingState _state; private eSharingState _state;
public bool IsSharing; public bool IsSharing { get; private set; }
[JsonProperty("paused")] [JsonProperty("paused")]
public bool Paused public bool Paused

View File

@@ -25,7 +25,7 @@ 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 IHasParticipantAudioMute, IHasSelfviewSize, IPasswordPrompt, IHasStartMeeting, IHasMeetingInfo
{ {
private const long MeetingRefreshTimer = 60000; private const long MeetingRefreshTimer = 60000;
public uint DefaultMeetingDurationMin { get; private set; } public uint DefaultMeetingDurationMin { get; private set; }
@@ -470,6 +470,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
SharingContentIsOnFeedback.FireUpdate(); SharingContentIsOnFeedback.FireUpdate();
ReceivingContent.FireUpdate(); ReceivingContent.FireUpdate();
// Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, GetSharingStatus());
MeetingInfo = meetingInfo;
} }
}; };
@@ -618,6 +622,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
break; break;
case "password": case "password":
break; break;
case "isAirHostClientConnected":
case "isDirectPresentationConnected":
case "isSharingBlackMagic":
{
// Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, MeetingInfo.Host, MeetingInfo.Password, GetSharingStatus());
MeetingInfo = meetingInfo;
break;
}
} }
}; };
@@ -957,9 +970,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
_syncState.LoginMessageReceived(); _syncState.LoginMessageReceived();
// Fire up a thread to send the intial commands. // Fire up a thread to send the intial commands.
CrestronInvoke.BeginInvoke(o => CrestronInvoke.BeginInvoke(o =>
{ {
// Currently the feedback exclusions don't work when using the API in JSON response mode
// But leave these here in case the API gets updated in the future
Thread.Sleep(100); Thread.Sleep(100);
// disable echo of commands // disable echo of commands
SendText("echo off"); SendText("echo off");
@@ -1179,6 +1197,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
Status.Call.Participants); Status.Call.Participants);
Participants.CurrentParticipants = participants; Participants.CurrentParticipants = participants;
// Update the share status of the meeting info
var meetingInfo = new MeetingInfo(MeetingInfo.Id, MeetingInfo.Name, Participants.Host.Name, MeetingInfo.Password, MeetingInfo.ShareStatus);
MeetingInfo = meetingInfo;
PrintCurrentCallParticipants(); PrintCurrentCallParticipants();
break; break;
@@ -1642,7 +1665,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
// If not crrently in a meeting, intialize the call object // If not crrently in a meeting, intialize the call object
if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING) if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
{ {
Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object"); //Debug.Console(1, this, "[UpdateCallStatus] Creating new Status.Call object");
Status.Call = new zStatus.Call {Status = callStatus}; Status.Call = new zStatus.Call {Status = callStatus};
OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected}); OnCallStatusChange(new CodecActiveCallItem() {Status = eCodecCallStatus.Disconnected});
@@ -1680,15 +1703,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
ActiveCalls.Add(newCall); ActiveCalls.Add(newCall);
Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}", //Debug.Console(1, this, "[UpdateCallStatus] IF w/ meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); //Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
OnCallStatusChange(newCall); OnCallStatusChange(newCall);
} }
else else
{ {
Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}", //Debug.Console(1, this, "[UpdateCallStatus] IF w/o meeting_id AcitveCalls.Count == {1} - Current Call Status: {0}",
Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count); //Status.Call != null ? Status.Call.Status.ToString() : "no call", ActiveCalls.Count);
} }
} }
} }
@@ -1748,6 +1771,23 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {
base.OnCallStatusChange(item); base.OnCallStatusChange(item);
if (item.Status == eCodecCallStatus.Connected)
{
var host = "";
if (Participants.Host != null)
host = Participants.Host.Name;
MeetingInfo = new MeetingInfo(
Status.Call.Info.meeting_id,
Status.Call.Info.meeting_list_item.meetingName,
host,
Status.Call.Info.meeting_password,
GetSharingStatus()
);
}
Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}", Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
Status.Call != null ? Status.Call.Status.ToString() : "no call"); Status.Call != null ? Status.Call.Status.ToString() : "no call");
@@ -1757,6 +1797,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
} }
private string GetSharingStatus()
{
string sharingState = "None";
if (Status.Call.Sharing.State == zEvent.eSharingState.Receiving)
{
sharingState = "Receiving Content";
}
if (Status.Sharing.isAirHostClientConnected)
{
sharingState = "Sharing AirPlay";
}
if (Status.Sharing.isDirectPresentationConnected)
{
sharingState = "Sharing Laptop";
}
if (Status.Sharing.isSharingBlackMagic)
{
sharingState = "Sharing HDMI Source";
}
return sharingState;
}
public override void StartSharing() public override void StartSharing()
{ {
SendText("zCommand Call Sharing HDMI Start"); SendText("zCommand Call Sharing HDMI Start");
@@ -2113,6 +2177,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
SendText(string.Format("zCommand Dial StartPmi Duration: {0}", dur)); SendText(string.Format("zCommand Dial StartPmi Duration: {0}", dur));
} }
public void LeaveMeeting()
{
SendText("zCommand Call Leave");
}
public override void EndCall(CodecActiveCallItem call) public override void EndCall(CodecActiveCallItem call)
{ {
SendText("zCommand Call Disconnect"); SendText("zCommand Call Disconnect");
@@ -2737,6 +2806,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
} }
#endregion #endregion
#region IHasMeetingInfo Members
public event EventHandler<MeetingInfoEventArgs> MeetingInfoChanged;
private MeetingInfo _meetingInfo;
public MeetingInfo MeetingInfo
{
get { return _meetingInfo; }
private set
{
if (value != _meetingInfo)
{
_meetingInfo = value;
var handler = MeetingInfoChanged;
if (handler != null)
{
handler(this, new MeetingInfoEventArgs(_meetingInfo));
}
}
}
}
#endregion
} }
/// <summary> /// <summary>