Forum Discussion
Disabling Background Music
I never noticed this specific behavior until looking into this request today. As discussed, everything would be straightforward if stopping and playing background audio via standard triggers worked as expected. However, Storyline has a limitation: stopping the background audio via a trigger does not update the player’s "Background Audio" switch to "Off," leaving the UI out of sync.
While it is easy to turn the switch off visually (with JS), the real challenge is restarting the audio without a significant delay. If the audio is disabled by default before it can buffer, the engine unloads the file, causing a lag when the user eventually toggles it back on.
I won’t go too deep into the technical details of why this happens or how the Storyline engine handles background audio. The idea is to execute a custom script once the timeline reaches 0.75 seconds. This provides just enough time for the audio to fully load and "prime" in the background. Depending on your specific audio track, you might hear a very brief glimpse of sound (less than a second) before the script silences it and resets the UI (attached story file, 177).
So the switch button starts in the "Off" position, but can be turned back on at any time with zero delay. If you find the initial split-second of sound distracting, a simple fix is to insert one second of silence at the very beginning of your background audio file.
If I were building your project, I would create my own background audio on the Slide Master, loop it, and control it through a custom interface that may or may not resemble the one in Storyline. I believe I already have a post about this approach. Alternatively, you could hide the background audio toggle from the Accessibility controls and manage playback using built-in triggers controlled by a switch (button) with "Normal" and "Selected" states (attached story file, 178).
Related Content
- 2 years ago