Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

Twitter video shows "The media could not be played" Options
Peavy
Posted: Wednesday, June 12, 2019 10:14:34 AM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
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?
Peavy
Posted: Wednesday, June 12, 2019 11:31:18 AM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
Here's another page where an error occurs in the current version, but not the prior version: https://www.ritualgym.com/en-gb
eo_support
Posted: Wednesday, June 12, 2019 1:44:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,568
Peavy
Posted: Wednesday, June 12, 2019 1:57:38 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
eo_support wrote:


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.
Peavy
Posted: Wednesday, June 12, 2019 6:25:27 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
eo_support wrote:


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);
        }
eo_support
Posted: Thursday, June 13, 2019 10:54:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,568
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!
Peavy
Posted: Thursday, June 13, 2019 4:03:39 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
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?
eo_support
Posted: Thursday, June 13, 2019 4:38:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,568
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
Peavy
Posted: Thursday, June 13, 2019 5:05:55 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
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.
eo_support
Posted: Friday, June 14, 2019 11:33:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,568
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!
Peavy
Posted: Monday, June 17, 2019 12:56:31 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 94
Thanks very much for your help on this. We understand how to address the problem now.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.