how to make SetAudioMuted(bool mute) work?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

how to make SetAudioMuted(bool mute) work?

Postby rjxray » Tue Sep 17, 2019 6:50 am

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.
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am

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

Postby salvadordf » Tue Sep 17, 2019 7:09 am

Are you calling SetAudioMuted in the CEF UI thread ?
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 129
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

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

Postby rjxray » Tue Sep 17, 2019 7:40 am

Thanks for the hint, I've fixed it now
rjxray
Expert
 
Posts: 115
Joined: Wed Jun 07, 2017 4:31 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 41 guests