Stop/Mute sound in awesomium with lua?

Is there any way to mute sound that’s being played through awesomium with lua? I’m trying to display a web page but there’s some loud music playing in the background and I want to mute it.

Yes, I’m aware that you can just mute the process but I want to stop it in general.

You can probably run some code that removes/stops the sound with JavaScript http://wiki.garrysmod.com/page/Panel/RunJavascript

Okay so it’s now running through the hl2.exe and I didn’t realize it wasn’t using Awesomium anymore. You can’t mute it with stopsound and I tried this JS code,


DaWindow:RunJavascript([[window.my_mute = false;

$('#my_mute_button').bind('click', function(){

    $('audio,video').each(function(){

        if (!my_mute ) {

            if( !$(this).paused ) {
                $(this).data('muted',true); //Store elements muted by the button.
                $(this).pause(); // or .muted=true to keep playing muted
            }

        } else {

            if( $(this).data('muted') ) {
                $(this).data('muted',false);
                $(this).play(); // or .muted=false
            }

        }
    });

    my_mute = !my_mute;

});]])

EDIT: Now I see that that probably is the wrong thing to use and it seems like it makes a button. I’m searching for a different code now. I didn’t look at that one good enough.
EDIT2: Yeah, I can’t find anything. I’m testing it on a webm and I only want to mute it. I don’t want to stop the playback or anything. If anyone can help me that’d be awesome.

Use javascript to remove the actual element (Or mute it).
Also, Even if its from hl2.exe it still uses the awesominium api since thats what gmod uses for html