Andy
Andy

Reputation: 405

Xilium.CefGlue in Winforms application not working properly with ogg

I'm trying to integrate the Xilium.CefGlue browser into an existing project, but i don't seem to get it working with ogg. I'm using the latest versions of the Xilium.CefGlue(xilium-xilium.cefglue-3caa551bd830) and the Cef binary (cef_binary_3.1384.1045). Everything works great when running the projects in the Xilium.CefGlue solution.

To make sure the problem is not caused by my other project, i started a new Winforms project, added references to Xilium.CefGlue.dll, Xilium.CefGlue.Demo.dll and Xilium.CefGlue.WindowsForms.dll. I use the same code in my Program.cs file as used in CefGlue.Client project in the examples, and in my form i create a new CefBrowser and add it directly to my controls. I also placed the needed ceflib files in the correct location.

Now, when running the application and loading a webpage, everything seems to hang unless i change the SingleProcess to true in the CefSettings in my Program.cs. However, when loading another page which contains html5 video (ogg), the page is not getting rendered. I do notice that the interaction is there, because i can start the video by clicking in the center of the page where a button should be located. I can hear the video playing, but the page simply stays blank.

Loading the same page in the CefGlue.Client does work like it should. Now, when i change the setting SingleProcess to true in the example project CefGlue.client, the same thing occurs, so i guess it must have something to do with this.

Anyone got any ideas on what is going wrong?

Thanks, Andy

Upvotes: 1

Views: 2377

Answers (2)

dimirc
dimirc

Reputation: 6615

Just disable Visual Studio Hosting Process and you wont have problem for debugging http://msdn.microsoft.com/en-us/library/ms185330(v=vs.80).aspx

Upvotes: 1

Andy
Andy

Reputation: 405

Found the answer somewhere else by Sébastien Frippiat:

it seems that using SingleProcess=false doesn't work when debugging with Visual Studio (should be related to Visual Studio using a executable called project_exe.vshost.exe instead of project_exe.exe).

So i changed my CefSettings to this:

var settings = new CefSettings
        {
            BrowserSubprocessPath = @"C:\CefGlueBrowser\CefGlueBrowser\bin\x86\Debug\CefGlueBrowser.exe",
            SingleProcess = false,
            MultiThreadedMessageLoop = true,
            LogSeverity = CefLogSeverity.Default,
            LogFile = "CefGlue.log",
        };

That seems to fix it for debugging.

Upvotes: 1

Related Questions