diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs index ac728c13..4d471a54 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs @@ -521,6 +521,18 @@ namespace PepperDash.Essentials /// 15046 /// public const uint MeetingsListVisible = 15046; + /// + /// 15047 The "Join" button on the next meeting ribbon + /// + public const uint NextMeetingRibbonJoinPress = 15047; + /// + /// 15048 Dismisses the ribbon + /// + public const uint NextMeetingRibbonClosePress = 15048; + /// + /// 15049 + /// + public const uint NextMeetingRibbonVisible = 15049; /// /// 15051 /// diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs index d517c6d4..b3a0839e 100644 --- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs +++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs @@ -145,5 +145,26 @@ namespace PepperDash.Essentials /// 3965 Title above display 2 /// public const uint Display2TitleLabel = 3965; + + /// + /// 3966 + /// + public const uint NextMeetingRibbonStartText = 3966; + /// + /// 3967 + /// + public const uint NextMeetingRibbonEndText = 3967; + /// + /// 3968 + /// + public const uint NextMeetingRibbonTitleText = 3968; + /// + /// 3969 + /// + public const uint NextMettingRibbonNameText = 3969; + /// + /// 3970 + /// + public const uint NextMeetingRibbonButtonLabel = 3970; } } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs index 1e8a67be..48ca620d 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHuddlePanelAvFunctionsDriver.cs @@ -222,7 +222,6 @@ namespace PepperDash.Essentials () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible)); TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal()); -#warning This gets overridden by config after NYU demo if(TriList is CrestronApp) TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false; else diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 2dbf89a7..6db8fdf2 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -150,7 +150,7 @@ namespace PepperDash.Essentials get { if (_TechDriver == null) -#warning Make PIN come from config! +#warning HLV-Make PIN come from config! _TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, this, "1234"); return _TechDriver; } @@ -172,6 +172,8 @@ namespace PepperDash.Essentials /// UiDisplayMode CurrentMode = UiDisplayMode.Start; + CTimer NextMeetingTimer; + /// @@ -275,50 +277,8 @@ namespace PepperDash.Essentials // *** Header Buttons *** - // Generic "close" button for these modals + // Generic "close" button for popup modals TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear); - - //// Help button and popup - //if (CurrentRoom.Config.Help != null) - //{ - // TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message); - // TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton); - // TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText); - // if(roomConf.Help.ShowCallButton) - // TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN - // else - // TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); - //} - //else // older config - //{ - // TriList.SetString(UIStringJoin.HelpMessage, CurrentRoom.Config.HelpMessage); - // TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false); - // TriList.SetString(UIStringJoin.HelpPageCallButtonText, null); - // TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress); - //} - //TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () => - //{ - // string message = null; - // var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey) - // as EssentialsHuddleSpaceRoom; - // if (room != null) - // message = room.Config.HelpMessage; - // else - // message = "Sorry, no help message available. No room connected."; - // //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message; - // PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible); - //}); - - //// Lights button - //TriList.SetSigFalseAction(UIBoolJoin.HeaderLightsButtonPress, () => // ******************** FILL IN - // { }); - - //// Setup button - shows volumes with default button OR hold for tech page - //TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000, - // ShowTech, - // () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible)); - //TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () => - // PopupInterlock.HideAndClear()); // Volume related things TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels()); @@ -340,6 +300,8 @@ namespace PepperDash.Essentials (CurrentRoom.DefaultDisplay as IPower).PowerToggle(); }); + SetupNextMeetingTimer(); + base.Show(); } @@ -381,6 +343,9 @@ namespace PepperDash.Essentials TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false; TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; + if (NextMeetingTimer != null) + NextMeetingTimer.Stop(); + HideNextMeetingRibbon(); base.Hide(); } @@ -417,6 +382,52 @@ namespace PepperDash.Essentials } } + void SetupNextMeetingTimer() + { + var ss = CurrentRoom.ScheduleSource; + if (ss != null) + { +#warning HLV-Add some sort of every-minute "cron" thing to run these. + NextMeetingTimer = new CTimer(o => + { + // Every 60 seconds, check meetings list for the closest, joinable meeting + var meeting = ss.CodecSchedule.Meetings + .Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2); + if (meeting != null && meeting.Joinable) + { + TriList.SetString(UIStringJoin.NextMeetingRibbonStartText, meeting.StartTime.ToShortTimeString()); + TriList.SetString(UIStringJoin.NextMeetingRibbonEndText, meeting.EndTime.ToShortTimeString()); + TriList.SetString(UIStringJoin.NextMeetingRibbonTitleText, meeting.Title); + TriList.SetString(UIStringJoin.NextMettingRibbonNameText, meeting.Organizer); + TriList.SetString(UIStringJoin.NextMeetingRibbonButtonLabel, "Join"); + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonJoinPress, () => + { + HideNextMeetingRibbon(); + RoomOnAndDialMeeting(meeting.ConferenceNumberToDial); + }); + ShowNextMeetingRibbon(); + } + }, null, 0, 60000); + } + } + + /// + /// + /// + void ShowNextMeetingRibbon() + { + TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonClosePress, HideNextMeetingRibbon); + TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, true); + } + + /// + /// + /// + void HideNextMeetingRibbon() + { + TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, false); + } + /// /// Calendar should only be visible when it's supposed to /// @@ -426,6 +437,36 @@ namespace PepperDash.Essentials PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsListVisible); } + /// + /// Dials a meeting after turning on room (if necessary) + /// + void RoomOnAndDialMeeting(string number) + { + Action dialAction = () => + { + var d = CurrentRoom.ScheduleSource as VideoCodecBase; + if (d != null) + d.Dial(number); + }; + if (CurrentRoom.OnFeedback.BoolValue) + dialAction(); + else + { + // Rig a one-time handler to catch when the room is warmed and then dial call + EventHandler oneTimeHandler = null; + oneTimeHandler = (o, a) => + { + if (!CurrentRoom.IsWarmingUpFeedback.BoolValue) + { + CurrentRoom.IsWarmingUpFeedback.OutputChange -= oneTimeHandler; + dialAction(); + } + }; + CurrentRoom.IsWarmingUpFeedback.OutputChange += oneTimeHandler; + ActivityCallButtonPressed(); + } + } + /// /// Reveals the tech page and puts away anything that's in the way. /// @@ -914,7 +955,7 @@ namespace PepperDash.Essentials PopupInterlock.Hide(); var d = CurrentRoom.ScheduleSource as VideoCodecBase; if (d != null) - d.Dial(mm.ConferenceNumberToDial); + RoomOnAndDialMeeting(mm.ConferenceNumberToDial); }); } MeetingsSrl.Count = i; diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index 37ca54ac..a8c82005 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -18,7 +18,7 @@ namespace PepperDash.Essentials.UIDrivers.VC { -#warning FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button +#warning HLV - FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button /// /// This fella will likely need to interact with the room's source, although that is routed via the spark... /// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate. diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index b28fd66a..08c91700 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index 938b9a09..c7d8a5dc 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ