Forum Discussion
Java script for MUTE/UNMUTE audio in Storyline 3
Hi Akash,
Use below code with condition this will work:
if (document.location.href.indexOf('html5') < 0) {
var player = GetPlayer();
player.SetVar("muteToggle",true);
} else {
var appState = require("helpers/appState");
appState.onToggleVolume();//mute
}
I am using this in my current course and this is working with me.
- NicoleRalph-1176 years agoCommunity Member
Hello Vishal,
Is there a way perhaps to visually show the learner when mute is on or off? Perhaps an icon in a green colour for on and red for off?
Many thanks
Nicole
- vishalagarwal6 years agoCommunity Member
Hi Nicole,
You can create a toggle mute/unmute button and give on that button.
It works.
- ChristianCuneo6 years agoCommunity Member
Can this code be used as is to toggle the audio mute/unmute?
if (document.location.href.indexOf('html5') < 0) {
var player = GetPlayer();
player.SetVar("muteToggle",true);
} else {
var appState = require("helpers/appState");
appState.onToggleVolume();//mute
}