|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
If you open a Twitter feed (e.g. https://twitter.com/mashable) that contains videos in the TabbedBrowser sample application, you will see "The media could not be played". This works fine in the last major version of EO. Is there a setting that needs to be enabled for this in the new version or something that needs to be investigated on your end?
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Here's another page where an error occurs in the current version, but not the prior version: https://www.ritualgym.com/en-gb
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Thanks for the quick reply. The strange thing is that we already have that setting implemented, but it still is not working. I will do more testing on our end to see if we can narrow down the problem based on that setting.
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
We already had that line added in our startup code. I did switch from this:
Code: C#
EO.WebEngine.Engine.Default.Options.AllowProprietaryMediaFormats();
...to this:
Code: C#
EO.WebEngine.EngineOptions.Default.AllowProprietaryMediaFormats();
...but it still isn't working. I was able to get the TabbedBrowser working by uncommenting that line, but I'm at a loss as to why our app is not working correctly. Can you let me know if you see anything in my Main() block that could be a problem? Please see below. Thank you.
Code: C#
static void Main()
{
EO.WebBrowser.Runtime.AddLicense(ConfigurationManager.AppSettings["EO.WebBrowser.LicenseKey"]);
if (ConfigurationManager.AppSettings["UseProxy"].ToUpper() == "TRUE")
{
var proxy = new EO.Base.ProxyInfo(
EO.Base.ProxyType.HTTP,
ConfigurationManager.AppSettings["ProxyAddress"],
Convert.ToInt32(ConfigurationManager.AppSettings["ProxyPort"]),
ConfigurationManager.AppSettings["ProxyUsername"],
ConfigurationManager.AppSettings["ProxyPassword"]
);
EO.WebBrowser.Runtime.DefaultEngineOptions.Proxy = proxy;
}
if (ConfigurationManager.AppSettings["UseLocalBrowserCache"].ToUpper() == "TRUE")
{
// Local cache
var appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
var cachePath = appDataPath + "\\PageVaultBrowserCache";
if (!Directory.Exists(cachePath))
{
Directory.CreateDirectory(cachePath);
}
EO.WebBrowser.Runtime.DefaultEngineOptions.CachePath = cachePath;
}
if (ConfigurationManager.AppSettings["UseGPU"].ToUpper() == "TRUE")
{
EO.WebEngine.Engine.Default.Options.DisableGPU = false;
}
else
{
EO.WebEngine.Engine.Default.Options.DisableGPU = true;
}
EO.Base.Runtime.EnableEOWP = true;
EO.Base.Runtime.Exception += Runtime_Exception;
EO.Base.Runtime.InitWorkerProcessExecutable(Path.Combine(Path.GetTempPath(), "eowp.exe"));
EO.WebEngine.BrowserOptions options = new EO.WebEngine.BrowserOptions();
options.AllowZooming = false;
options.EnableXSSAuditor = false;
options.UserStyleSheet = Resources.pvStyles;
options.AllowPlugins = true;
options.EnableWebSecurity = false;
EO.WebEngine.Engine.Default.Options.SetDefaultBrowserOptions(options);
// EO.WebEngine.Engine.Default.Options.AllowProprietaryMediaFormats();
EO.WebEngine.EngineOptions.Default.AllowProprietaryMediaFormats();
EO.WebEngine.Engine.Default.Options.RegisterCustomSchemes("pagevault");
EO.WebEngine.Engine.CleanUpCacheFolders(EO.WebEngine.CacheFolderCleanUpPolicy.OlderVersionOnly);
#if DEBUG
EO.WebBrowser.Runtime.DefaultEngineOptions.RemoteDebugPort = 1234;
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Hi,
You are trying to access default engine options through multiple properties:
EO.WebEngine.Engine.Default.Options EO.WebEngine.EngineOptions.Default EO.WebBrowser.Runtime.DefaultEngineOptions
These are similar properties but have slightly different semantics. To avoid problems, make sure you change your code to use a single property. For example, in TabbedBrowser application, it always use EO.WebEngine.EngineOptions.Default. That's why it works.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
After consolidating the namespaces/properties used to access options, I'm still seeing issues with video. If I downgrade the EO version to the last 2018 release, everything works as expected. Would it be helpful to create a test app for this?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
You can try to compare your code with our TabbedBrowser sample application first. The TabbedBrowser work fine. So something must be different in your application. If everything in your code looks identical and you still can not find the difference, then you can send the test app to us and we will look further. See here for details: https://www.essentialobjects.com/forum/test_project.aspx
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
I was just able to reproduce the issue in the TabbedBrowser. Not sure if it is something in our code or not still though. I will send the test project to you by email.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,258
|
Hi,
We looked into this issue. The root trigger is EnableWebSecurity = false. The video decoder is enabled and was functioning properly. However as soon as EnableWebSecurity is set to false, the page would load additional JavaScript file that would otherwise be blocked. Such additional JavaScript code eventually led to an JavaScript error that interrupted the normal JavaScript code flow that would start the video.
Because usually web page designers only test pages with the "normal" settings, it is possible that the page will break when you enable some additional settings we provide. In that case the only option is to run the page in an environment that it has been tested with, in your case would be skipping EnableWebSecurity setting.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Thanks very much for your help on this. We understand how to address the problem now.
|
|