如何静音Delphi Chromium Embedded(TChromium)组件的声音?

Jun*_*ira 9 delphi tchromium

我需要静音TChromium组件的声音来制作一个静音浏览器.主要问题是在Windows XP上,当我静音浏览器的声音时,它会使整个系统声音静音.

有没有办法如何静音TChromium组件的声音?

Jun*_*ira 1

我已经成功使用以下代码:

procedure CustomCommandLine (const processType: ustring; const commandLine: ICefCommandLine);
begin
    commandLine.AppendSwitch('--mute-audio');
end;    


begin
    CefOnBeforeCommandLineProcessing := CustomCommandLine;

    Application.Initialize;
    Application.CreateForm(TMainForm, MainForm);
    Application.Run;
end.
Run Code Online (Sandbox Code Playgroud)

其他参数: 示例