[Xilium.CefGlue] Flash aren't working

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

[Xilium.CefGlue] Flash aren't working

Postby AlexR » Wed Nov 18, 2015 5:57 am

Good day,
I'm using Xilium.CEF v. 2357.1291 and I need to show Flash inside browser control.
I've tried argument --enable-system-flash with installed adobe flash player v.19 for Opera and Chrome (ppapi) but it had no effect.

I'm actually writing plugin for windows forms app, which opens window with browser inside. I'm using my own subprocess executable, so i can regiter my custom JS handlers inside browser process.
Custom subprocess executable have this simple code:
Code: Select all
static class Program
{
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
        WebkitConfigSection webkitConfig = ConfigurationLoader.LoadConfiguration();
        var loggerFactory = new DefaultLoggerFactory();

        CefSettings settings = configuration.GetCefSettingsOrDefault();
        V8Handler[] handlers = configuration.LoadV8Handlers(runInSubProcess, loggerFactory).ToArray();
        CefApp application = new RuntimeApp(handlers);

        var arguments = new CefMainArgs(new string[]
            {
                "--enable-media-stream",
                "--enable-system-flash",
            });

        int code = CefRuntime.ExecuteProcess(arguments, Application, IntPtr.Zero);
    }
}


Am I forgetting something? Could someone please provide an example of working Windows Forms app with working flash inside?
AlexR
Newbie
 
Posts: 3
Joined: Wed Nov 18, 2015 5:37 am

Re: [Xilium.CefGlue] Flash aren't working

Postby AlexR » Thu Nov 19, 2015 8:21 am

Some code research sows, that CEF takes command line arguments directly from application command line (by HINSTANCE value). Arguments array given to CefRuntime.Initialize && CefRuntime.ExecuteProcess inside CefMainArgs instace are seemed to be ignored in windows.
For me this is a very bad situation, because i'm writing plugin to external app and so i can't control command line arguments.
So, does anybody knows the way to programmatically add some command line arguments on windows?
AlexR
Newbie
 
Posts: 3
Joined: Wed Nov 18, 2015 5:37 am

Re: [Xilium.CefGlue] Flash aren't working

Postby Czarek » Fri Nov 20, 2015 8:14 am

See CefApp::OnBeforeCommandLineProcessing.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: [Xilium.CefGlue] Flash aren't working

Postby jack2006 » Mon Jan 25, 2016 2:11 am

Czarek wrote:See CefApp::OnBeforeCommandLineProcessing.


I've appended two switch in this function:
commandLine.AppendSwitch("ppapi-flash-version", "18.0.0.232");
commandLine.AppendSwitch("ppapi-flash-path", "plugins/pepflashplayer.dll");
and encounter a problem that the window flicker when first loaded.

Anybody know how to solve this problem?
jack2006
Newbie
 
Posts: 1
Joined: Mon Jan 25, 2016 2:01 am

Re: [Xilium.CefGlue] Flash aren't working

Postby amaitland » Mon Jan 25, 2016 3:37 pm

Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 21 guests