Forum Discussion
JannisGoossens
2 years agoCommunity Member
Background Music Java Script Controls?
Hi everyone,
the new Background-Music feature really keeps a lot of workarounds off our backs - that's great.
However, as settings are very limited at the moment, I am wondering whether the Back...
Nedim
2 years agoCommunity Member
To do exactly what the "Background audio" switch does (pause and play), you may follow these steps:
1. Create a custom T/F variable and set it to True (eg. bgAudioActive = True)
2. Insert a button with Normal and Selected state
3. Create a trigger Execute JavaScript When the user clicks Buttonconst bgAudioSwitch = document.getElementById("backgroundAudio-switch");
bgAudioSwitch.click();
4. Create a trigger Toggle bgAudioActive When the user clicks Button