Skip to content

Commit

Permalink
feat: adds IEmergencyOSD, ShowEmergencyMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
aknous committed Nov 19, 2024
1 parent b4c5fdc commit 7346618
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
15 changes: 14 additions & 1 deletion src/CiscoCodecConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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<CameraInfo>();
PhonebookMode = "corporate";
Expand Down Expand Up @@ -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; }
}
}
20 changes: 19 additions & 1 deletion src/CiscoRoomOsCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -102,7 +103,8 @@ public class CiscoCodec
ICiscoCodecUiExtensionsController,
ICiscoCodecCameraConfig,
ISpeakerTrack,
IPresenterTrack
IPresenterTrack,
IEmergencyOSD
{
public event EventHandler<AvailableLayoutsChangedEventArgs> AvailableLayoutsChanged;
public event EventHandler<CurrentLayoutChangedEventArgs> CurrentLayoutChanged;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/epi-videoCodec-ciscoExtended.4Series.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<ItemGroup>
<PackageReference Include="PepperDash.Essentials.Plugin.MobileControl.Messengers" Version="4.3.0-feature-add-handler-for-logo-images.1" />
<PackageReference Include="PepperDashEssentials" Version="2.0.0-alpha-2567" />
<PackageReference Include="PepperDashEssentials" Version="2.0.0-alpha-2595" />
<PackageReference Include="WebSocketSharp-netstandard" Version="1.0.1" />
</ItemGroup>

Expand Down

0 comments on commit 7346618

Please sign in to comment.