简体   繁体   English

c# CefSharp Flash 问题

[英]c# CefSharp Flash Problems

I'm running a game on chromium in c# and this game is flash supported.我在 c# 上运行一个游戏,这个游戏支持 flash。

So when it first opens it tells me: "Right-click to run Adobe Flash Player" https://i.stack.imgur.com/LsgzN.png所以当它第一次打开它告诉我:“右键单击运行 Adobe Flash 播放器” https://i.stack.imgur.com/LsgzN.png

My question this: How can it run automatically without right clicking and selecting "Run"?我的问题是:如何在不右键单击并选择“运行”的情况下自动运行?

What I've Tried:我试过的:

settings.CefCommandLineArgs.Add("enable-npapi", "1");
settings.CefCommandLineArgs.Add("ppapi-flash-path", @"C:\Windows\SysWOW64\Macromed\Flash\pepflashplayer32_32_0_0_363.dll");
settings.CefCommandLineArgs.Add("ppapi-flash-version", "32.0.0.363");

And

settings.CefCommandLineArgs.Add("enable-system-flash", "1");

But not working.但不工作。 Thank you for your help already.谢谢你的帮助。

I am using CefSharp v 75.1.143 and the solution lies in the following settings我正在使用 CefSharp v 75.1.143,解决方案在于以下设置

if (settings.CefCommandLineArgs.ContainsKey("enable-system-flash"))
    settings.CefCommandLineArgs.Remove("enable-system-flash");

settings.CefCommandLineArgs.Add("enable-system-flash", "1");

settings.CefCommandLineArgs.Add("ppapi-flash-path", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "pepflashplayer32_32_0_0_344.dll"));
settings.CefCommandLineArgs.Add("ppapi-flash-version", "32.0.0.344");
settings.CefCommandLineArgs["plugin-policy"] = "allow";

especially the last one!尤其是最后一个!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM