1.找到本地flash的dll(pepflashplayer.dll),或者自己去网上搜索
打开Chrome输入chrome://flash,回车(这个方法参考的别人的博客)
2.项目中新建plugins,添加pepflashplayer.dll,右击属性,改为始终复制
3.CEF初始化配置
CefSettings settings = new CefSharp.CefSettings() settings.CefCommandLineArgs["enable-system-flash"] = "1"; settings.CefCommandLineArgs.Add("ppapi-flash-version", "32.0.0.171"); settings.CefCommandLineArgs.Add("ppapi-flash-path", @"plugins\pepflashplayer.dll"); Cef.Initialize(settings);
参考:https://blog.csdn.net/xxhongdev/article/details/77195339