A
A
Andrew2015-04-13 03:15:33
.NET
Andrew, 2015-04-13 03:15:33

C# mute sound in program?

There is a program, it uses awesomium, when a site is opened, for example youtube.com, the video on youtube automatically starts, and accordingly it makes sounds, how to disable sound in awesomium I did not find a solution, is it possible to completely prohibit the program from making sounds using c #?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Taratin, 2015-04-13
@Taraflex

You can call javascript code

document.getElementsByTagName('video')[0].volume = 0

S
Stanislav Makarov, 2015-04-13
@Nipheris

Try using the WinAPI function waveOutSetVolume . It seems like since Vista, calling a function leads to setting the volume level for a particular application. If you haven't encountered WinAPI calls before, read about P/Invoke .

K
KvanTTT, 2015-04-17
@KvanTTT

This possibility appeared with Windows Vista. Check out the VolumeMixerDemo demo from https://github.com/naudio/NAudio.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question