酷友卡,调查问卷,齐萍萍
方法一:复制chrome浏览器下的pepperflash,通过cef命令行参数设置路径。
public form1() { initializecomponent(); initializechromium(); } private void initializechromium() { chromiumwebbrowser.onbeforecfxinitialize += chromiumwebbrowser_onbeforecfxinitialize; chromiumwebbrowser.onbeforecommandlineprocessing += chromiumwebbrowser_onbeforecommandlineprocessing; chromiumwebbrowser.initialize(); chromiumwebbrowser wb = new chromiumwebbrowser(); wb.dock = dockstyle.fill; wb.parent = this; wb.loadurl("chrome://version"); } void chromiumwebbrowser_onbeforecommandlineprocessing(chromium.event.cfxonbeforecommandlineprocessingeventargs e) { e.commandline.appendswitch("--disable-web-security");//关闭同源策略 e.commandline.appendswitchwithvalue("ppapi-flash-version", "18.0.0.209");//pepperflash\manifest.json中的version e.commandline.appendswitchwithvalue("ppapi-flash-path", "pepperflash\\pepflashplayer.dll"); } void chromiumwebbrowser_onbeforecfxinitialize(chromium.webbrowser.event.onbeforecfxinitializeeventargs e) { e.settings.cachepath = "session"; e.settings.locale = "zh-cn"; }
方法二:通过命令行参数设置cef使用系统安装的flash
void chromiumwebbrowser_onbeforecommandlineprocessing(chromium.event.cfxonbeforecommandlineprocessingeventargs e) { e.commandline.appendswitch("--disable-web-security");//关闭同源策略 e.commandline.appendswitch("--enable-system-flash");//使用系统flash }
chromium has removed support for npapi and consequently cef no longer supports loading of the npapi flash plugin. to support loading of the pepper (ppapi) flash plugin the following implementation must be brought over from chrome:
in the browser process:
in the renderer process:
参考:
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论