Xilium.CefGlue in Winforms application not working properly with ogg - winforms

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

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.

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

Related

WebView2 not working on virtual machine in WinForms

I am working on a Winforms project in .Net-7.0 and using WebView2 to display an HTML page available online.
The app works fine in the local system so I know there is no coding related problem but once installed on a VM, WebView2 does not show the HTML page.
I have opened the HTML page in the VM browser and it opens fine so the site is not blocked either in some way.
Any other things that I should check for?
(Skipping the code because it does not look like a code related problem to me.)

Black screen appears when the CEF Winform Browser loads for the 1st time

I am using CEF Sharp - V86
I am getting this strange issue and our users have starting complaining about it.
When the cefsharp winform browser loads for the first time, it shows the black window for few mili-seconds and then it disappears.
If we reload or refresh the webpage, it does not happens.
We have recently upgraded from V79 to V86 and we did not had any issue in earlier version.
What i have tried so far is, tried setting below command line arguements but it didn't work.
settings.CefCommandLineArgs.Add("disable-gpu");
settings.CefCommandLineArgs.Add("disable-gpu-compositing");
I have also tried setting
Cef.EnableHighDPISupport()
But it didn't work.
Additional Info :
Checked with Latest Version - CefSharp V88
When we load CefSharp winform browser in wpf application using winform host, a black screen appears on load for the first time for few miliseconds and then disappears.
This was not happening in earlier version.(i checked with V79 till V83).
Steps to reproduce.
Create a sample wpf application ,use windowsformhost to load cefsharp winform browser.
In constructor of winform browser, use any url. I tested with www.google.com.
Run the application.
Notice the initial black screen appears for few miliseconds and then disappears.
Please note this happens only for the first time when the chrome winform load.
his seems to have broken from CEFSharp v84.
Any help will be appreciated. :)
I was able to get rid of the black flash. Once I removed it from the VS Form Designer, things got better. Define it as a form level object:
private ChromiumWebBrowser cwbPage;
Then in the form constructor, instantiate it and add it to a panel in the form:
cwbPage= new ChromiumWebBrowser("");
cwbPage.Dock = DockStyle.Fill;
this.pnlPanel.Controls.Add(cwbPage);
cwbPage.BringToFront();
//...add any event handlers
Finally, pass it the string of Html or navigate to the url:
cwbPage.LoadHtml("<html><body>This is a test.</body></html>");
//OR
cwbPage.LoadUrlAsync("https://www.google.com");
Notes:
It still takes about 3 seconds to load the content, but at least there is no black flash.
I experimented and tried going back to using the VS Form Designer, and the black flash came back. I stripped almost all of the properties away from it in the VS Form generated code, but it still flashed blackly. So it does not like using the Form Designer.

Cefsharp Chrominumwebbrowser not working in WPF

Hi I am new to cefsharp and tried using Cefsharp chromium web browser .
when ever i tried to call the webbrowser it throws an exception like below
Could not load file or assembly 'CefSharp.Wpf, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.'
But i have added the reference cefsharp.wpf in project
What do i miss here ?
And if i tried from codebehinf too the same issue occurs.
I just had the below piece of code next to InnitializeComponent.
ChromiumWebBrowser browser = new ChromiumWebBrowser();
Manually i counldn't resolve the issue in my working solution.
As a work around what i did is as #amaitland suggested i cloned a copy of CefSharp Minimal Example from here and used the Minimal Example for WPF solution.
I just copied all the logic from my solution tand pasted it in the minimal expansion and updated it .
Now ChromiumWebBrowser works fine for me ( Only after using that Minimal example provided by cefsharp )..
In Application > Properties > Build
Change Check "Prefer 32-bits"

Deploying AngularJS Seed application in WebStorm

I recently started to learn about AngularJS and came across WebStorm and the AngularJS plugin by John Lindquist. Started by creating a new project using the angular-seed project and imported to WebStorm using File -> Open Directory. My directory structure looks like this
Now when I try to Debug it I get a 404 error. If I move the file app/index.html to the root folder and adjust all URL's to begin with app then it works fine. Is there a way to keep the default folder structure without moving the index.html to the root folder and also make it work with WebStorm?
I am using WebStorm 6.0.2.
I use WebStorm 7, so there might be some discrepancy in comparison with version 6 that you're using, but the over-all functionality is the same.
Quick solution:
Open the file in the editor and right click in the code to access the context menu. Choose the "Debug" option, which should start a debug session pointing to the current page.
Configuration solution:
WebStorm supports configurations for setting up different debugging scenarios. From the "Run" menu, choose the "Configurations" option. Add a JavaScript debug configuration, and add the URL you want in the designated field within the dialog presented.
Then, when you initialize a debugging session (a general one, not one for a specific page), you're presented a small dialog that allows you to choose a debug configuration.
Maybe there are more options or ways to accomplish the same thing as well, but I've never really given it more thought. I hope this is a working solution for you, but if not there's alway the documentation. If you need further clarification with regard to my answer, just give me a comment.

Preview Pane Not Displaying Correct Formatting

I am using C1 3 and am having problems with the preview pane.
The C1 site uses master pages for templates, and works correctly when published. However, it is not displaying correctly in the preview pane. It visually appears to be ignoring CSS settings.
This site was copied from an original install, on another sever, that works correctly.
Any tips and or ideas would be greatly appreciated.
*UPDATE**
In the content view, which is not working, it is using this url
http://www.abc.com/Composite/content/Frontend/Images/logo.gif
All other sites, including the published version of the site above use this url
http://cms.abc.dev/Frontend/Images/logo.gif
I am assuming the same is happening for all images and style sheet references.
However, I cannot find where this is happening. In the master page items are referenced as follows:
href="~/Frontend/Styles/layout.css"
ImageUrl="~/Frontend/Images/logo.gif"
Thats weird... have you somehow accidently configured the /Composite/Content folder as an application? Thats almost the only explanation why asp.net would expand ~ to /Composite/content/ instead of just /.
The preview-tab is handled through a wrapper-page that lives inside /Composite/content, unlike normal viewing of published pages which is handles by the root itself.
I think i found the problem...
I created a new app pool, used it, and now it works.
I guess the app pool somehow got corrupted...

Resources