Background Audio Cool Trick

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!

210 Replies
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.

Nandhakumar S

Hi  All,

I'm adding background music to my course. The BGM should play throughout my course continuously. So, I have used the javascript as provided in this discussion. It works well. But if I move to the next slide by clicking the next button, the BGM is starting over from the beginning. It would not start from the beginning. Need a solution to that. Can anyone help me out of this?

One more thing the next button that I used is a player default.

Lindsay Klotz

Hey so we just need one mp3 to play as background music and loop throughout the course and play automatically when the course starts. Can you help us out? I've tried using the examples before but have not found a way that it can play automatically without user interaction. This is the song we need to play automatically and loop throughout. 

OWEN HOLT

User interaction is a browser requirement. However, the user only has to interact once and then you can use that interaction to start your media.

See it in Action HERE.

My work blocks loading files to the community, however, I included the .story file (SL 360) in the course resources tab. I also included your audio file there as that is where I am playing the file from!

OWEN HOLT

The audio file can be anywhere on the internet or a server. I add mine to the course resources so it gets published with the rest of the project and stay with them. Once I know the published path, I can use that to point to the file, update my code with the path, and republish.

Regarding publishing as a movie, I doubt this would work as JavaScript is a programming language used on the web.  For music to play across a published StoryLine movie, you would need to add the "soundtrack" using any video editing software. 

OWEN HOLT

Following which advice? Editing the html code or integrating JavaScript?
I've never had the JS code ruin a project, however, I totally agree with the "save a back-up".
I always have (at least) 2 versions of a file at any given time. One that is an archive of the last working version (updated as things work) and a working version were I make changes.

Ren Gomez

Hi Alden,

So sorry to hear your file is coming across corruption issues! I've opened a support case on your behalf to connect you with one of our support engineers to see if we help in any way.

To clarify, your .story file and your published output files are two separate items, and although we don't support modifying published output files, it shouldn't have affected your .story file in any way. It's most likely something else that's causing the corruption.

Look out for an email from support@articulate.com shortly!