Junior Miguel Vieira
Junior Miguel Vieira

Reputation: 211

How to mute the sound of a Delphi Chromium Embedded (TChromium) component?

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.

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

Upvotes: 9

Views: 1349

Answers (2)

Junior Miguel Vieira
Junior Miguel Vieira

Reputation: 211

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.

Other parameters: Examples

Upvotes: 1

Filipe YaBa Polido
Filipe YaBa Polido

Reputation: 1674

Windows XP doesn't allow to mute only one application in particular.
Check this discussion here:
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/0b4d2919-1b48-4f55-8120-cedd22bea0c5/how-to-programmatically-mute-volume-of-selected-app-in-volume-mixer-windows-7?forum=windowspro-audiodevelopment
There's this software (didn't try it): http://www.indievolume.com/ to allow that kind of procedure, but this isn't the best choice.
Can't you just process the HTML and ignore the audio tags ?!
I've been looking at the TChromium source and also didn't found anything related to audio :(

Upvotes: 0

Related Questions