如何使Delphi Chromium Embedded(TChromium)组件的声音静音? [英] How to mute the sound of a Delphi Chromium Embedded (TChromium) component?

查看:97
本文介绍了如何使Delphi Chromium Embedded(TChromium)组件的声音静音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I need to mute the sound of a TChromium component to make a silent browser. The main problem is on Windows XP where when I mute the sound of a browser, it mute the overall system sound.

有没有一种方法可以使扬声器的声音静音。 TChromium 组件吗?

Is there a way how to mute the sound of a TChromium component ?

推荐答案

我成功使用了以下代码:

I have succeeded with the following code:

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.

其他参数:
示例

这篇关于如何使Delphi Chromium Embedded(TChromium)组件的声音静音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆