How to enable Adobe Flash with CefSharp?
Asked Answered
F

2

5

I'm using the latest Version of CefSharp and I need to Display Flash. When using Chrome, the page gets displayed correctly. However when using CefSharp it does not.

So far I tried:

        var browser = new ChromiumWebBrowser(URL)
        {
            BrowserSettings = new BrowserSettings() {
                Java = CefState.Enabled,
                Plugins = CefState.Enabled,
            },
            Dock = DockStyle.Fill
        };

When I load about:plugins I get:

CEF 3.2357.1287.g861c26e

Chromium 43.0.2357.130

OS Windows

WebKit 537.36

JavaScript 4.3.61.30

Flash

User Agent Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

How can I enable Flash in CefSharp?

Fiery answered 6/10, 2015 at 10:51 Comment(1)
a humble thanks to you, tried many things but cefsharp is the one which works perfect for me.. thanks again.. :) and using Nuget is very simple to use.Agon
M
4

Either install Pepper flash or enable NPAPI which is disabled by default in 43.0.0

https://github.com/cefsharp/CefSharp/blob/cefsharp/43/CefSharp.Example/CefExample.cs#L54

https://bitbucket.org/chromiumembedded/cef/issues/1586/add-pepper-flash-plugin-support#comment-16898332

Meistersinger answered 6/10, 2015 at 11:39 Comment(1)
Yes, but FYI only until CefSharp upgrades to a Chromium 45 or later based CEF where NPAPI goes completely away in Chromium ...Neukam
S
3

I resolved this issue with these steps:

1-)I downloaded the pepflashplayer plugin from this URL: https://www.dllfiles.com/pepflashplayer.dll.html

2-) I added these CefCommandLineArgs in the CefSettings: settings.CefCommandLineArgs.Add("enable-npapi", "1");

settings.CefCommandLineArgs.Add("ppapi-flash-path", flashPluginPath);

settings.CefCommandLineArgs.Add("ppapi-flash-version", "20.0.0.306");

flashPluginPath is the path where the pepflashplayer.dll is located and "20.0.0.306 is the version of the plugin. I am using cefsharp version 53

Showiness answered 2/3, 2017 at 17:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.