From 7f6160eb4448cfce65dd4377116001e8f3d48d03 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 12 Aug 2021 12:24:23 -0600 Subject: [PATCH 1/7] fix(essentials): Updates to better set feedback for current mode --- ...entialsHuddleVtc1PanelAvFunctionsDriver.cs | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index a1ceb50b..7e3745a2 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -173,10 +173,28 @@ namespace PepperDash.Essentials /// public PepperDash.Essentials.Core.Touchpanels.Keyboards.HabaneroKeyboardController Keyboard { get; private set; } + + private UiDisplayMode _currentMode; + /// /// The mode showing. Presentation or call. /// - UiDisplayMode CurrentMode = UiDisplayMode.Start; + UiDisplayMode CurrentMode + { + get + { + return _currentMode; + } + set + { + if (value != _currentMode) + { + _currentMode = value; + + SetActivityFooterFeedbacks(); + } + } + } CTimer NextMeetingTimer; @@ -207,6 +225,7 @@ namespace PepperDash.Essentials MeetingOrContactMethodModalSrl = new SubpageReferenceList(TriList, UISmartObjectJoin.MeetingListSRL, 3, 3, 5); + CurrentMode = UiDisplayMode.Start; // buttons are added in SetCurrentRoom //HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]); @@ -630,7 +649,6 @@ namespace PepperDash.Essentials CurrentSourcePageManager.Hide(); PowerOnFromCall(); CurrentMode = UiDisplayMode.Call; - SetActivityFooterFeedbacks(); VCDriver.Show(); } @@ -665,7 +683,6 @@ namespace PepperDash.Essentials } CurrentMode = UiDisplayMode.Presentation; SetupSourceList(); - SetActivityFooterFeedbacks(); } /// @@ -707,6 +724,8 @@ namespace PepperDash.Essentials if (CurrentRoom.CurrentSourceInfo == null) return; + CurrentMode = UiDisplayMode.Presentation; + if (CurrentRoom.CurrentSourceInfo.SourceDevice == null) { TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); @@ -1218,7 +1237,6 @@ namespace PepperDash.Essentials VCDriver.Hide(); SetupActivityFooterWhenRoomOff(); ShowLogo(); - SetActivityFooterFeedbacks(); TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; // Clear this so that the pesky meeting warning can resurface every minute when off From 6e7bf061cfa130834f39e1907603e5ae985a4692 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 12 Aug 2021 13:51:48 -0600 Subject: [PATCH 2/7] fix(essentials): Add null check for CurrentRoom --- .../EssentialsHuddleVtc1PanelAvFunctionsDriver.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 7e3745a2..02f2e8e7 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -626,11 +626,14 @@ namespace PepperDash.Essentials /// void SetActivityFooterFeedbacks() { - CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call - && CurrentRoom.ShutdownType == eShutdownType.None; - ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation - && CurrentRoom.ShutdownType == eShutdownType.None; - EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; + if (CurrentRoom != null) + { + CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call + && CurrentRoom.ShutdownType == eShutdownType.None; + ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation + && CurrentRoom.ShutdownType == eShutdownType.None; + EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; + } } /// From 4b4f1f3c3d9c4ea61c7a1ece4962bd8137e6e23e Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 12 Aug 2021 14:48:19 -0600 Subject: [PATCH 3/7] fix(essentials): Updates to staging subpage join logic --- .../UI/JoinConstants/UIBoolJoin.cs | 8 +++--- ...entialsHuddleVtc1PanelAvFunctionsDriver.cs | 25 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index aaecb81a..81be9002 100644 --- a/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -752,10 +752,10 @@ namespace PepperDash.Essentials /// 15044 Close button for source modal overlay /// public const uint SourceBackgroundOverlayClosePress = 15044; - /// - /// 15045 - Visibility for the bar containing call navigation button list - /// - public const uint CallStagingBarVisible = 15045; + ///// + ///// 15045 - Visibility for the bar containing call navigation button list + ///// + //public const uint CallStagingBarVisible = 15045; /// /// 15046 /// diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 02f2e8e7..e12e94d9 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -626,13 +626,21 @@ namespace PepperDash.Essentials /// void SetActivityFooterFeedbacks() { + var startMode = CurrentMode == UiDisplayMode.Start; + var presentationMode = CurrentMode == UiDisplayMode.Presentation; + var callMode = CurrentMode == UiDisplayMode.Call; + + TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); + TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); + if (CurrentRoom != null) { - CallButtonSig.BoolValue = CurrentMode == UiDisplayMode.Call + CallButtonSig.BoolValue = startMode && CurrentRoom.ShutdownType == eShutdownType.None; - ShareButtonSig.BoolValue = CurrentMode == UiDisplayMode.Presentation + ShareButtonSig.BoolValue = presentationMode && CurrentRoom.ShutdownType == eShutdownType.None; EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; + } } @@ -645,9 +653,9 @@ namespace PepperDash.Essentials return; HideLogo(); HideNextMeetingPopup(); - TriList.SetBool(StartPageVisibleJoin, false); - TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); - TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + //TriList.SetBool(StartPageVisibleJoin, false); + //TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false); + //TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); if (CurrentSourcePageManager != null) CurrentSourcePageManager.Hide(); PowerOnFromCall(); @@ -664,9 +672,6 @@ namespace PepperDash.Essentials if (VCDriver.IsVisible) VCDriver.Hide(); HideNextMeetingPopup(); - TriList.SetBool(StartPageVisibleJoin, false); - TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false); - TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true); // Run default source when room is off and share is pressed if (!CurrentRoom.OnFeedback.BoolValue) { @@ -1240,8 +1245,8 @@ namespace PepperDash.Essentials VCDriver.Hide(); SetupActivityFooterWhenRoomOff(); ShowLogo(); - TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; + //TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false; + //TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false; // Clear this so that the pesky meeting warning can resurface every minute when off LastMeetingDismissedId = null; } From efa801137c00ac7e29b358594dbfe5871a3bd7b7 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 12 Aug 2021 14:53:41 -0600 Subject: [PATCH 4/7] fix(Essentials): moves code inside null check for CurrentRoom --- .../EssentialsHuddleVtc1PanelAvFunctionsDriver.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index e12e94d9..66a544e9 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -626,21 +626,20 @@ namespace PepperDash.Essentials /// void SetActivityFooterFeedbacks() { - var startMode = CurrentMode == UiDisplayMode.Start; - var presentationMode = CurrentMode == UiDisplayMode.Presentation; - var callMode = CurrentMode == UiDisplayMode.Call; - - TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); - TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); - if (CurrentRoom != null) { + var startMode = CurrentMode == UiDisplayMode.Start; + var presentationMode = CurrentMode == UiDisplayMode.Presentation; + var callMode = CurrentMode == UiDisplayMode.Call; + + TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); + TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); + CallButtonSig.BoolValue = startMode && CurrentRoom.ShutdownType == eShutdownType.None; ShareButtonSig.BoolValue = presentationMode && CurrentRoom.ShutdownType == eShutdownType.None; EndMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None; - } } From 2a37e44d7d2508c250ba44463c641955f63551c7 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Thu, 12 Aug 2021 15:33:17 -0600 Subject: [PATCH 5/7] fix(essentials): fixes inverted activity call button state --- .../EssentialsHuddleVtc1PanelAvFunctionsDriver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 66a544e9..55a4a16c 100644 --- a/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -635,7 +635,7 @@ namespace PepperDash.Essentials TriList.SetBool(StartPageVisibleJoin, startMode ? true : false); TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, presentationMode ? true : false); - CallButtonSig.BoolValue = startMode + CallButtonSig.BoolValue = callMode && CurrentRoom.ShutdownType == eShutdownType.None; ShareButtonSig.BoolValue = presentationMode && CurrentRoom.ShutdownType == eShutdownType.None; From 87ab43c7459bfe0b08fdb97a4f1dea5d11c073e2 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 13 Aug 2021 13:45:46 -0600 Subject: [PATCH 6/7] fix(essentials): Updates to resolve oddities with ZoomRoom directory browsing and dialing --- .../VC/EssentialsVideoCodecUiDriver.cs | 25 +++- .../Codec/iHasDirectory.cs | 25 ++++ .../VideoCodec/ZoomRoom/ResponseObjects.cs | 29 +++-- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 110 ++++++++++++------ 4 files changed, 136 insertions(+), 53 deletions(-) diff --git a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 53efb69f..f2bbcead 100644 --- a/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -1080,10 +1080,12 @@ namespace PepperDash.Essentials.UIDrivers.VC { var codec = Codec as IHasDirectory; - SetCurrentDirectoryToRoot(); + if (codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue) + { + SetCurrentDirectoryToRoot(); - RefreshDirectory(); - + RefreshDirectory(); + } } /// @@ -1161,10 +1163,23 @@ namespace PepperDash.Essentials.UIDrivers.VC }); } + else if (dc.ContactMethods.Count == 1) + { + var invitableContact = dc as IInvitableContact; + + if (invitableContact != null) + { + DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(invitableContact); }); + } + else + { + // If only one contact method, just dial that method + DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); }); + } + } else { - // If only one contact method, just dial that method - DirectoryList.SetItemButtonAction(i, b => { if (!b) Codec.Dial(dc.ContactMethods[0].Number); }); + Debug.Console(1, "Unable to dial contact. No availble ContactMethod(s) specified"); } } else // is DirectoryFolder diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs index 3a59b62d..29a46466 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Codec/iHasDirectory.cs @@ -69,6 +69,22 @@ namespace PepperDash.Essentials.Devices.Common.Codec [JsonProperty("directoryResults")] public List CurrentDirectoryResults { get; private set; } + public List Contacts + { + get + { + return CurrentDirectoryResults.OfType().Cast().ToList(); + } + } + + public List Folders + { + get + { + return CurrentDirectoryResults.OfType().Cast().ToList(); + } + } + /// /// Used to store the ID of the current folder for CurrentDirectoryResults /// @@ -104,6 +120,15 @@ namespace PepperDash.Essentials.Devices.Common.Codec SortDirectory(); } + /// + /// Filters the CurrentDirectoryResults by the predicate + /// + /// + public void FilterContacts(Func predicate) + { + CurrentDirectoryResults = CurrentDirectoryResults.Where(predicate).ToList(); + } + /// /// Sorts the DirectoryResults list to display all folders alphabetically, then all contacts alphabetically /// diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs index 708abe34..21d8c3df 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs @@ -276,6 +276,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom if (zoomRooms.Count > 0) { // If so, setup a rooms and contacts folder and add them. + + directory.ResultsFolderId = "root"; + roomFolder.Name = "Rooms"; roomFolder.ParentFolderId = "root"; roomFolder.FolderId = "rooms"; @@ -292,22 +295,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom try { - if (zoomContacts.Count == 0) return directory; + if (zoomContacts.Count == 0) + { + return directory; + } + + foreach (Contact c in zoomContacts) { - foreach (Contact c in zoomContacts) + var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid }; + + contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid }); + + if (folders.Count > 0) { - var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid }; - - if (folders.Count > 0) - { - contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts"; - } - - contacts.Add(contact); + contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts"; } - directory.AddContactsToDirectory(contacts); + contacts.Add(contact); } + + directory.AddContactsToDirectory(contacts); } catch (Exception e) { diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index 57433187..e65a16ae 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -361,6 +361,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom public CodecDirectory CurrentDirectoryResult { get { return _currentDirectoryResult; } + private set + { + _currentDirectoryResult = value; + + Debug.Console(2, this, "CurrentDirectoryResult Updated. ResultsFolderId: {0}", _currentDirectoryResult.ResultsFolderId); + + CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); + + OnDirectoryResultReturned(_currentDirectoryResult); + } } public CodecPhonebookSyncState PhonebookSyncState { get; private set; } @@ -374,9 +384,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1)); DirectoryBrowseHistoryStack.Clear(); - _currentDirectoryResult = directoryResults; + CurrentDirectoryResult = directoryResults; - OnDirectoryResultReturned(directoryResults); } public void GetDirectoryFolderContents(string folderId) @@ -388,19 +397,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom DirectoryBrowseHistoryStack.Push(_currentDirectoryResult); - _currentDirectoryResult = directoryResults; + CurrentDirectoryResult = directoryResults; - OnDirectoryResultReturned(directoryResults); } public void SetCurrentDirectoryToRoot() { DirectoryBrowseHistoryStack.Clear(); - _currentDirectoryResult = DirectoryRoot; - - OnDirectoryResultReturned(DirectoryRoot); - } + CurrentDirectoryResult = DirectoryRoot; + } public void GetDirectoryParentFolderContents() { @@ -411,10 +417,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom var currentDirectory = DirectoryBrowseHistoryStack.Pop(); - _currentDirectoryResult = currentDirectory; - - OnDirectoryResultReturned(currentDirectory); - } + CurrentDirectoryResult = currentDirectory; + } public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; } @@ -680,16 +684,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom private void SetUpDirectory() { - DirectoryRoot = new CodecDirectory(); + DirectoryRoot = new CodecDirectory() { ResultsFolderId = "root" }; - _currentDirectoryResult = DirectoryRoot; + CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => CurrentDirectoryResult.ResultsFolderId != "root"); + + CurrentDirectoryResult = DirectoryRoot; DirectoryBrowseHistory = new List(); DirectoryBrowseHistoryStack = new Stack(); - CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => _currentDirectoryResult != DirectoryRoot); - - CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); } private void SetUpRouting() @@ -1054,24 +1057,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } case "phonebooklistresult": { + // This result will always be the complete contents of the directory and never + // A subset of the results via a search + JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook); + var directoryResults = + zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts); + if (!PhonebookSyncState.InitialSyncComplete) { PhonebookSyncState.InitialPhonebookFoldersReceived(); PhonebookSyncState.PhonebookRootEntriesReceived(); - PhonebookSyncState.SetPhonebookHasFolders(false); + PhonebookSyncState.SetPhonebookHasFolders(true); PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count); } - var directoryResults = - zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts); + if (directoryResults.ResultsFolderId != "root") + { + directoryResults.ResultsFolderId = "root"; + } - DirectoryRoot = directoryResults; + DirectoryRoot = directoryResults; - _currentDirectoryResult = DirectoryRoot; - - OnDirectoryResultReturned(directoryResults); + CurrentDirectoryResult = directoryResults; break; } @@ -1227,7 +1236,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom { Direction = eCodecCallDirection.Incoming, Status = eCodecCallStatus.Ringing, - Type = eCodecCallType.Unknown, + Type = eCodecCallType.Video, Name = incomingCall.callerName, Id = incomingCall.callerJID }; @@ -1580,8 +1589,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom var newCall = new CodecActiveCallItem { Name = Status.Call.Info.meeting_list_item.meetingName, + Number = Status.Call.Info.meeting_id, Id = Status.Call.Info.meeting_id, - Status = newStatus + Status = newStatus, + Type = eCodecCallType.Video, }; ActiveCalls.Add(newCall); @@ -1999,18 +2010,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom /// private void OnDirectoryResultReturned(CodecDirectory result) { - CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate(); + try + { + Debug.Console(2, this, "OnDirectoryResultReturned"); - // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology - var handler = DirectoryResultReturned; - if (handler != null) - { - handler(this, new DirectoryEventArgs - { - Directory = result, - DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue - }); - } + var directoryResult = new CodecDirectory(); + + // If result is Root, create a copy and filter out contacts whose parent folder is not root + if (!CurrentDirectoryResultIsNotDirectoryRoot.BoolValue) + { + Debug.Console(2, this, "Filtering DirectoryRoot to remove contacts for display"); + + directoryResult.ResultsFolderId = result.ResultsFolderId; + directoryResult.AddFoldersToDirectory(result.Folders); + directoryResult.AddContactsToDirectory(result.Contacts.Where((c) => c.ParentFolderId == result.ResultsFolderId).ToList()); + } + else + { + directoryResult = result; + } + + Debug.Console(2, this, "Updating directoryResult. IsOnRoot: {0}", !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue); + + // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology + var handler = DirectoryResultReturned; + if (handler != null) + { + handler(this, new DirectoryEventArgs + { + Directory = directoryResult, + DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue + }); + } + } + catch (Exception e) + { + Debug.Console(2, this, "Error: {0}", e); + } //PrintDirectory(result); } From d193de79dabadef0f91e4c5cbca159eb2160482f Mon Sep 17 00:00:00 2001 From: Jason DeVito Date: Mon, 16 Aug 2021 08:26:27 -0500 Subject: [PATCH 7/7] Added GetSelfViewMode method to ZoomRoom.cs, upated Removed if statement in HideConfSelfVideo property that was blocking feedback updates and setting of the property from boot. Tested with Zoom Rooms system on site and verified working. Closes #781. --- .../VideoCodec/ZoomRoom/ResponseObjects.cs | 6 +++--- .../VideoCodec/ZoomRoom/ZoomRoom.cs | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs index 21d8c3df..c116a4a8 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs @@ -1168,11 +1168,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom } set { - if (value != _hideConfSelfVideo) - { + //if (value != _hideConfSelfVideo) + //{ _hideConfSelfVideo = value; NotifyPropertyChanged("HideConfSelfVideo"); - } + //} } } diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs index e65a16ae..9398f2c9 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs @@ -329,6 +329,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom public BoolFeedback SelfviewIsOnFeedback { get; private set; } + public void GetSelfViewMode() + { + SendText("zConfiguration Video hide_conf_self_video"); + } + public void SelfViewModeOn() { SendText("zConfiguration Video hide_conf_self_video: off");