Background Audio Cool Trick

May 23, 2016

Hi All,

Just wanted to share a way to add audio across all slides in Storyline 2 There are a few posts on here about this, and I found this method to be super simple.

**Please note that this is just a cool trick, and not a built in feature of Storyline 2.

Publish your course, open the story.html file with Notepad, scroll to the bottom and add this code

<audio src="YOURAUDIOHERE.mp3" preload="auto" autoplay loop></audio>  with a space before the </body> and place your audio file into the published output folder and there you go. That is it.

Here is an example,  and the output folder is attached.

Have fun!

Pinned Reply
Luciana Piazza

Hello, Everyone! ✨

I'm happy to share that we have released a new update for Storyline 360 (Build 3.79.30834.0).

In this update, we have an enhancement where:

As a first stepI recommend updating Storyline 360 to the latest version. Here's how:

Update Authoring Apps

If you have any questions, please let us know in this thread or privately in a support case.

Have a great day! 

279 Replies
Irina Chekhova

Hi everyone!

I am making an interactive video manual, where speaker says some words, what the learner should do, some special extra things etc., then video pauses and user should do what he/she was told to. I need a background music to work even when the video is stopped. And I can do it, BUT I need the background music to stop somehow when I need it to stop and I have no idea, how to do it.

Here are some of my thoughts:

1.I have created a variable 'VideoFinished' in SL, that changes its value once user completed the necessary task. It's initial value is 'no', once user double clicks the first hotspot it turns to 'yes'

2. Added trigger "Execute Javascript when timeline starts on the slide"

3. JS is supposed to take the variable 'VideoFinished' from the course and use it as a condition whether to play music or not.

If I do not use any conditions on JS, audio is playing fine, it is looped, volume is adjusted.

However once I add a 'while' to JS, no audio is played at all.

Can someone please let me know, what am I doing wrong? Here is JS, var video - is a variable in JS that should be equal to the 'VideoFinished' of SL:

var player=GetPlayer();
var video=player.GetVar('VideoFinished');

while (video=no) {
var audio = new Audio()
audio.src = 'story_content/5kxW8RMEV8D_44100_48_0.mp3' ()
audio.loop = true
audio.volume = 0.5

Boris Kuleba

Hi everyone, I’m new to Articulate Storyline, I can’t believe how easy it is to learn. Yesterday I installed the program and today I have an interactive explainer video! :) I'm an animator by profession, I don't know much about coding, java, html and it's not clear to me why this part of the code doesn't work in Chrome , Edge either. Music is heard in IE and not in others. Thank you all and all the best