Forum Discussion
Mute audio in custom GUI or control volume
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.
- RussLickteigCommunity Member
Has anyone done this recently? I found an option from 3 years ago which uses Javascript but it does not appear to be working.
- RussLickteigCommunity Member
Got it working: I found this Post:
The post from Sheetal Deopurkar worked for me. Thanks Sheetal!
- RussLickteigCommunity Member
//To mute audio add following Code
var appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume(0); //mute
//To unmute audio add following Codevar appState = window.DS ? DS.appState : require("helpers/appState");
appState.onToggleVolume(1); //unmute