c# – 如何使用CefSharp启用Adobe Flash?

我正在使用最新版本的CefSharp,我需要显示Flash.使用Chrome时,页面会正确显示.但是,当使用CefSharp时它不会.

到目前为止我试过:

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

当我加载about:plugins时,我得到:

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

如何在CefSharp中启用Flash?

解决方法:

安装Pepper闪存或启用NPAPI,默认情况下在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

上一篇:CefSharp.wpf Web浏览器导航事件(C#.Net)


下一篇:cefsharp插入自定义JS