diff --git a/src/CiscoCodecConfig.cs b/src/CiscoCodecConfig.cs index 44985ae..ebd86a7 100644 --- a/src/CiscoCodecConfig.cs +++ b/src/CiscoCodecConfig.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json; using Extensions = epi_videoCodec_ciscoExtended.UserInterface.UserInterfaceExtensions.Extensions; +using epi_videoCodec_ciscoExtended.UserInterface.UserInterfaceWebViewDisplay; namespace epi_videoCodec_ciscoExtended { @@ -89,7 +90,10 @@ public class CiscoCodecConfig [JsonProperty("extensions")] public Extensions Extensions { get; set; } - public CiscoCodecConfig() + [JsonProperty("emergency")] + public Emergency Emergency { get; set; } + + public CiscoCodecConfig() { CameraInfo = new List(); PhonebookMode = "corporate"; @@ -141,4 +145,13 @@ public class WidgetConfig [JsonProperty("bridgeIndex")] public uint? BridgeIndex { get; set; } } + + public class Emergency + { + [JsonProperty("mobileControlPath")] + public bool MobileControlPath { get; set; } + + [JsonProperty("uiWebViewDisplay")] + public UiWebViewDisplay UiWebViewDisplay { get; set; } + } } \ No newline at end of file diff --git a/src/CiscoRoomOsCodec.cs b/src/CiscoRoomOsCodec.cs index ac3a5d3..72e31bb 100644 --- a/src/CiscoRoomOsCodec.cs +++ b/src/CiscoRoomOsCodec.cs @@ -25,6 +25,7 @@ using PepperDash.Essentials.Devices.Common.VideoCodec; using Serilog.Events; using Feedback = PepperDash.Essentials.Core.Feedback; +using epi_videoCodec_ciscoExtended.UserInterface.UserInterfaceWebViewDisplay; namespace epi_videoCodec_ciscoExtended @@ -102,7 +103,8 @@ public class CiscoCodec ICiscoCodecUiExtensionsController, ICiscoCodecCameraConfig, ISpeakerTrack, - IPresenterTrack + IPresenterTrack, + IEmergencyOSD { public event EventHandler AvailableLayoutsChanged; public event EventHandler CurrentLayoutChanged; @@ -7555,6 +7557,22 @@ public void SendDtmfToPhone(string digit) } #endregion + + public void ShowEmergencyMessage(string url) + { + string mode = _config.Emergency.UiWebViewDisplay.Mode; + string title = _config.Emergency.UiWebViewDisplay.Title; + string target = _config.Emergency.UiWebViewDisplay.Target; + string urlPath = url + _config.Emergency.MobileControlPath; + UiWebViewDisplay uwvd = new UiWebViewDisplay {Url= urlPath, Mode=mode, Title=title, Target=target }; + //coms.SendText(uwvd.xCommand()); + EnqueueCommand(uwvd.xCommand()); + } + + public void HideEmergencyMessage() + { + EnqueueCommand($"xCommand UserInterface WebView Clear Target:OSD{CiscoCodec.Delimiter}"); + } } #region diff --git a/src/epi-videoCodec-ciscoExtended.4Series.csproj b/src/epi-videoCodec-ciscoExtended.4Series.csproj index 19b73d7..c607916 100644 --- a/src/epi-videoCodec-ciscoExtended.4Series.csproj +++ b/src/epi-videoCodec-ciscoExtended.4Series.csproj @@ -36,7 +36,7 @@ - +