Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

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 :(

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top