Is there a command to disable all sounds of a WebBrowser
in Visual Basic 2008? I would like to mute you so you do not touch the sounds of Youtube videos.
Is there a command to disable all sounds of a WebBrowser
in Visual Basic 2008? I would like to mute you so you do not touch the sounds of Youtube videos.
I do not think it is viable to directly control the YouTube player by its language, because Flash technology runs in an isolated environment within the page. You might even have to do some gambiarra through reverse engineering, but it would certainly be risky and possibly not portable between different versions.
However, there is a way to communicate with the flash through JavaScript and you may be able to use it to achieve this.
If the movie is embedded on the page using the official method using an iframe , you can use the YouTube Player API to control the movie. So just inject a script with the code player.mute()
into your page and you will have the expected result.
However, if the video is added by another method this will not work. An alternative is to lower the entire volume of the PC using the Operating System API.