diff --git a/Adspace/ExchangeManager.cs b/Adspace/ExchangeManager.cs index dc82e8b..d7e121f 100644 --- a/Adspace/ExchangeManager.cs +++ b/Adspace/ExchangeManager.cs @@ -455,7 +455,11 @@ private List Request(Url url, Ad wrappedAd) if (string.IsNullOrEmpty(body)) { - throw new Exception("Empty body"); + if (wrappedAd != null && wrappedAd.IsWrapper) + { + ReportError(wrappedAd.ErrorUrls, 303); + } + return buffet; } // If we are a wrapped ad, then we should attempt to resolve that ad. @@ -706,7 +710,7 @@ private List Request(Url url, Ad wrappedAd) XmlNode creativeNode = inlineNode.SelectSingleNode("./Creatives/Creative"); if (creativeNode != null) { - ad.CreativeId = creativeNode.Attributes["id"].Value; + ad.CreativeId = creativeNode.Attributes["id"] != null ? creativeNode.Attributes["id"].Value : ""; // Get the duration. XmlNode creativeDurationNode = creativeNode.SelectSingleNode("./Linear/Duration"); diff --git a/Logic/ApplicationSettings.cs b/Logic/ApplicationSettings.cs index 58815c4..94f912e 100644 --- a/Logic/ApplicationSettings.cs +++ b/Logic/ApplicationSettings.cs @@ -52,9 +52,9 @@ private static readonly Lazy /// private List ExcludedProperties; - public string ClientVersion { get; } = "3 R309.1"; + public string ClientVersion { get; } = "3 R310.1"; public string Version { get; } = "6"; - public int ClientCodeVersion { get; } = 309; + public int ClientCodeVersion { get; } = 310; private ApplicationSettings() { @@ -588,6 +588,7 @@ public bool InDownloadWindow public bool PreventSleep { get; set; } public bool ScreenShotRequested { get; set; } public bool FallbackToInternetExplorer { get; set; } + public bool FallbackToEdge { get; set; } public bool IsRecordGeoLocationOnProofOfPlay { get; set; } public bool IsAdspaceEnabled { get; set; } diff --git a/Logic/ScheduleManager.cs b/Logic/ScheduleManager.cs index 1318ded..b7d6a81 100644 --- a/Logic/ScheduleManager.cs +++ b/Logic/ScheduleManager.cs @@ -779,12 +779,12 @@ private List ResolveNormalAndInterrupts(List schedul LogMessage.Audit("ScheduleManager", "ResolveNormalAndInterrupts", "Reducing AXE SOV by total interrupt SOV: " + totalInterruptSov); axeScheduleItem.ShareOfVoice -= totalInterruptSov; + } - // If we still have some, then add that into our interrupt schedule - if (axeScheduleItem.ShareOfVoice > 0) - { - interrupt.Add(axeScheduleItem); - } + // If we still have some, then add that into our interrupt schedule + if (axeScheduleItem.ShareOfVoice > 0) + { + interrupt.Add(axeScheduleItem); } } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index c654737..8354a33 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -49,6 +49,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.309.1.0")] -[assembly: AssemblyFileVersion("3.309.1.0")] +[assembly: AssemblyVersion("3.310.1.0")] +[assembly: AssemblyFileVersion("3.310.1.0")] [assembly: Guid("3bd467a4-4ef9-466a-b156-a79c13a863f7")] diff --git a/Rendering/Media.xaml.cs b/Rendering/Media.xaml.cs index 8e05605..1366245 100644 --- a/Rendering/Media.xaml.cs +++ b/Rendering/Media.xaml.cs @@ -661,12 +661,12 @@ public static Media Create(MediaOptions options) case "datasetview": case "ticker": case "text": - media = new WebCef(options); + media = WebMedia.GetConfiguredWebMedia(options, true); break; case "webpage": options.IsPinchToZoomEnabled = true; - media = WebMedia.GetConfiguredWebMedia(options); + media = WebMedia.GetConfiguredWebMedia(options, false); break; case "flash": @@ -680,7 +680,7 @@ public static Media Create(MediaOptions options) case "htmlpackage": options.IsPinchToZoomEnabled = true; - media = WebMedia.GetConfiguredWebMedia(options); + media = WebMedia.GetConfiguredWebMedia(options, false); ((WebMedia)media).ConfigureForHtmlPackage(); break; @@ -695,7 +695,7 @@ public static Media Create(MediaOptions options) default: if (options.render == "html") { - media = WebMedia.GetConfiguredWebMedia(options); + media = WebMedia.GetConfiguredWebMedia(options, true); } else { diff --git a/Rendering/WebIe.cs b/Rendering/WebIe.cs index 50c6560..a836c46 100644 --- a/Rendering/WebIe.cs +++ b/Rendering/WebIe.cs @@ -117,8 +117,16 @@ private void _webBrowser_Navigated(object sender, System.Windows.Navigation.Navi activeX.Silent = true; // Initialise Interactive Control - _webBrowser.InvokeScript("xiboIC.config({hostname:\"localhost\", port: " - + ApplicationSettings.Default.EmbeddedServerPort + "})"); + try + { + _webBrowser.InvokeScript("xiboIC.config({hostname:\"localhost\", port: " + + ApplicationSettings.Default.EmbeddedServerPort + "})"); + } + catch + { + // Likely xiboIC doesn't exist. + LogMessage.Audit("WebIe", "_webBrowser_Navigated", "Cannot invoke script"); + } } private void IeWebMedia_HtmlUpdatedEvent(string url) diff --git a/Rendering/WebMedia.cs b/Rendering/WebMedia.cs index 19d521f..6ede42f 100644 --- a/Rendering/WebMedia.cs +++ b/Rendering/WebMedia.cs @@ -469,14 +469,28 @@ public static string ReadBrowserType(string template) /// Get the configured web media engine /// /// + /// Is this for a html widget? /// - public static WebMedia GetConfiguredWebMedia(MediaOptions options) + public static WebMedia GetConfiguredWebMedia(MediaOptions options, bool isHtmlWidget) { + // IE fallback for legacy players where overlapping regions are not supported if (ApplicationSettings.Default.FallbackToInternetExplorer) { return new WebIe(options); } - else if (!string.IsNullOrEmpty(options.uri) && !string.IsNullOrEmpty(ApplicationSettings.Default.EdgeBrowserWhitelist)) + + // If this is a HTML widget, then always return with CEF + if (isHtmlWidget) + { + return new WebCef(options); + } + + // If we have an edge fallback, use it, otherwise see if the URL provided is in the white list. + if (ApplicationSettings.Default.FallbackToEdge) + { + return new WebEdge(options); + } + else if (!string.IsNullOrEmpty(options.uri) && !string.IsNullOrEmpty(ApplicationSettings.Default.EdgeBrowserWhitelist)) { // Decode the URL string url = Uri.UnescapeDataString(options.uri); @@ -518,7 +532,7 @@ public static WebMedia GetConfiguredWebMedia(MediaOptions options, string type) } else { - media = GetConfiguredWebMedia(options); + media = GetConfiguredWebMedia(options, false); } return media; } diff --git a/XiboClient.csproj b/XiboClient.csproj index 196c1de..89bc8cc 100644 --- a/XiboClient.csproj +++ b/XiboClient.csproj @@ -298,7 +298,7 @@ 1.8.9 - 114.2.100 + 114.2.120 1.2.0 @@ -322,7 +322,7 @@ 0.3.6 - 7.0.5 + 7.0.8 14.0.1016.290 diff --git a/default.config.xml b/default.config.xml index 801f3e1..c49d8b6 100644 --- a/default.config.xml +++ b/default.config.xml @@ -53,6 +53,7 @@ 9696 false 0 + false false individual false