Page 1 of 1

how to make SetAudioMuted(bool mute) work?

PostPosted: Tue Sep 17, 2019 6:50 am
by rjxray
I'm building with "75.1.16+g16a67c4+chromium-75.0.3770.100" with VS2017 and Windows 10

I'm calling
Code: Select all
  CefRefPtr<CefBrowserHost> host = browser->GetHost();
  host->SetAudioMuted(true);

but the audio is not being muted.

It works OK with identical code in the cefclient tests so I thought I might have to override
Code: Select all
 virtual void SetAudioMuted(bool mute) = 0;
from cef-browser.h
But I can't see that being done anywhere in cefclient.

In any case stepping through my code in the debugger I end up in browser_host_ctocpp.cc
Code: Select all
NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SetAudioMuted(bool mute)

and it makes the API call with mute = true.

So is there something else I have to do?

Any help greatly appreciated.

Re: how to make SetAudioMuted(bool mute) work?

PostPosted: Tue Sep 17, 2019 7:09 am
by salvadordf
Are you calling SetAudioMuted in the CEF UI thread ?

Re: how to make SetAudioMuted(bool mute) work?

PostPosted: Tue Sep 17, 2019 7:40 am
by rjxray
Thanks for the hint, I've fixed it now