delphitchromium

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 ?


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