Mute not working, when toggling between tabs

Dec 19, 2020

Hello all

I have a problem with the customized audio mute button in storyline 360.

I have used the below scripts, mute works but below scenario occurs.

Script used:

var appState = require("helpers/appState");
appState.onToggleVolume();//mute

-------

if (document.location.href.indexOf('html5') < 0) {
var player = GetPlayer();
player.SetVar("muteToggle",true);
} else {
var appState = require("helpers/appState");
appState.onToggleVolume();//mute
}

-------

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

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

Screnario :

I mute the audio
Navigate to anyother opened tab
When I come back and try to unmute the audio, it doesn't work.

Anyone in the community, please give your suggestion.

2 Replies