How to use CefAudioHandler

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 use CefAudioHandler

Postby longkas » Tue Jun 30, 2020 6:07 am

Hello,
I want to redirect CEF audio output but not working
switches
Code: Select all
--no-sandbox --off-screen-rendering-enabled --autoplay-policy=no-user-gesture-required


let the CefClient implements CefAudioHandler,
then mute audio on the OnAfterCreated(CefRefPtr<CefBrowser> browser) callback
Code: Select all
browser.get()->GetHost().get()->SetAudioMuted(TRUE);

load the page but none of the CefAudioHandler methods being called.

while
- If I do not mute it I can hear sound from desktop
- audio unit test shows no error

thank you for your help
longkas
Techie
 
Posts: 11
Joined: Wed Apr 17, 2019 3:02 am

Re: How to use CefAudioHandler

Postby magreenblatt » Tue Jun 30, 2020 9:25 am

What OS and CEF version? What URL are you loading? Did you implement CefClient::GetAudioHandler ? Do you get callbacks if you don't mute the audio?
magreenblatt
Site Admin
 
Posts: 10188
Joined: Fri May 29, 2009 6:57 pm

Re: How to use CefAudioHandler

Postby longkas » Tue Jun 30, 2020 10:37 am

magreenblatt wrote:What OS and CEF version? What URL are you loading? Did you implement CefClient::GetAudioHandler ? Do you get callbacks if you don't mute the audio?

I did not implement CefClient::GetAudioHandler, I can get the callback after I fixed it, thank you for your help.
longkas
Techie
 
Posts: 11
Joined: Wed Apr 17, 2019 3:02 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 29 guests