Page 1 of 1

How to use CefAudioHandler

PostPosted: Tue Jun 30, 2020 6:07 am
by longkas
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

Re: How to use CefAudioHandler

PostPosted: Tue Jun 30, 2020 9:25 am
by magreenblatt
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?

Re: How to use CefAudioHandler

PostPosted: Tue Jun 30, 2020 10:37 am
by longkas
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.