Is it possible to turn off sounds only in one browser?

Post Reply
coater
Posts: 81
Joined: Sat Sep 29, 2018 1:51 pm

Is it possible to turn off sounds only in one browser?

Post by coater » Fri Mar 27, 2020 3:42 am

Is it possible to turn off sounds only in one browser ?
not by js(element.volume =0).

User avatar
salvadordf
Posts: 2223
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Is it possible to turn off sounds only in one browser?

Post by salvadordf » Fri Mar 27, 2020 10:38 am

Use TChromium.AudioMuted := True

If I remember correctly, that property can only be read in some CEF threads but you can write it in any thread.
Use the code in the MiniBrowser to see how to implement it.

coater
Posts: 81
Joined: Sat Sep 29, 2018 1:51 pm

Re: Is it possible to turn off sounds only in one browser?

Post by coater » Sat Mar 28, 2020 12:42 am

Thank you very much! I got it.

Code: Select all

browser.Host.IsAudioMuted
 browser.Host.SetAudioMuted(false ) 

Post Reply