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, http://bit.ly/1sy5dkV  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
ANDREW GOLDSBY

I spent a good while trying to do the same thing. This will take you about an hour if you work through it, which is relatively much simpler. Not sure if this is still a problem. I've been searching all day for solutions and thought I'd share the one I finally came up with. Good luck! https://community.articulate.com/discussions/articulate-storyline/background-music-demo?page=7

Deirdre Sherman

Jill,

Can you explain what "BEFORE <body> and <html>" means? The original post indicated the line of code be added after you "...scroll to the bottom and add this code with a space before the </body>" - I see one "body" reference at the bottom of my file. I take it we mean pasting the code before the reference "body" with a space between </body> and the end of the code.

Is this correct?

Dave Cox

Hi Jill

In HTML, all of the code for the "body" of the page must be placed in between the <body> and </body> html tags. If you are instructed to insert code Before the <body> tag, then you should insert your code before this this tag on the code page. It doesn,t necesarily matter where before, just as long as does come before that tag.

 

Dave

Deirdre Sherman

I was finally able to get it to work by inserting the code below into both the story.html AND the story_html5.html files. The problem now is that the background music is drowning out the VO. I used this code: 

<iframe src="YOURAUDIOHERE.mp3" allow="autoplay" id="audio" style="display:none"></iframe>

Does anyone know of a way to set the volume of the background music? 

Todd Haynes

I don't use this code because I find it to be technically buggy and the process is time consuming (hand edit code each time you publish). Instead, I've build projects with only 1 slide and a LOT of layers. Just put the background audio in your slide or a layer... The viewer has no idea the presentation is composed this way. Yes, managing that many layers has it's own issues - but when you click Publish, it works on ALL browsers and mobile devices and has no issues with LMS & SCORM integration.

Julius David Natividad

Hi Deirdre Sherman,

That was my problem too when I tried this trick.
The easiest way for me to do, that time, is to manually edit the background
music.
I just used free software to do it and it worked fine.
I hope this helps.

Thanks,
David

David Natividad
Instructional Designer
Pearson People Services

Pearson Management Services Philippines, Inc.
7F North Tower, Rockwell Business Center
Sheridan corner United Street, Mandaluyong City, PH 1552
Mobile Number +63 922 8654739

Learn more at pearson.com

[image: Pearson]

Jerry Beaucaire

For me, the need to use layers for a consistent BG music track doesn't actually continue to the quiz, I like for the audio to change when something really different is onscreen.  So the quiz at the end of a layered scene could be on a slide of it's own with its own special "thinking" music background. 

After the quiz/knowledge check is over, we start the next layered scene.

Edward Jassin

Hi All, If I am using the below JavaScript to play an audio file for background music, what would I need to do to make sure it loops continuously?

Using SL360...not working when I edit code  <audio src="YOURAUDIOHERE.mp3" preload="auto" autoplay loop>

var audio = new Audio('jazz1.mp3');
audio.play();