Forum Discussion
AkashJambhorkar
8 years agoCommunity Member
Java script for MUTE/UNMUTE audio in Storyline 3
Hello All,
Is it possible to MUTE/UNMUTE audio in Storyline 3 (HTML5 output)? I'm working on a course with a custom interface with a button that's supposed to mute/unmute - not pause/play or stop/...
vishalagarwal
Community Member
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.
ChristianCuneo
6 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
}