dcefbrowser 支撑flash插件 解决办法

来源:互联网 发布:安徽中港金融数据 编辑:程序博客网 时间:2024/05/24 05:03

我的dcefbrowser  版本是:3.2623

1:首选去下载一个flash库文件:http://download.csdn.net/download/caonumber/10155689

2:工程文件中 代码:


procedure OnBeforeCommandLineProcessing(const processType: ustring;
    const commandLine: ICefCommandLine);
begin
  commandLine.AppendSwitch('--disable-web-security');
  commandLine.AppendSwitch('no-proxy-server');
  commandLine.AppendSwitch('--enable-system-flash'); //加载flash插件
end;

begin

  DcefBApp.OnBeforeCommandLineProcessing := OnBeforeCommandLineProcessing;

  DcefBApp.CefCache := 'cache';

  DcefBApp.CefAddWebPluginPath(ExtractFilePath(Paramstr(0)) +
    'pepflashplayer.dll');
  DcefBApp.CefRefreshWebPlugins;


 Application.Initialize;

Application.Run;

end.