Mute audio in custom GUI or control volume

Apr 16, 2021

Hi everyone,

I need a way to Mute and Unmute audios in my Custom GUI.  I have seen a couple of older threads about a Javascript approach but the sample Story file I downloaded did not work.  There must be a way for us to control this right???  If no Mute can I create a way to adjust the volume within the GUI?  The built in controls allow this option. Our client wants to allow control in the GUI vs having the user turn down the volume on their computer.  

3 Replies
Russ Lickteig

//To mute audio add following Code

var appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume(0); //mute


 //To unmute audio add following Code

var appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume(1); //unmute