121 Replies
Andrew Probert

Yeah, unfortunately its not the greatest solution since it does negate the volume button for the rest of the course.  As I work around I might have a narration sound mute button trigger on each slide.  The volume level slider I don't really miss.  I don't see a situation where the user would need to adjust the volume level(other than mute or unmute) using player controls.  I think most users adjust volume levels using the computer's volume control.  

Kristy Cathro

Hi - I desperately need to add background music to a project, but have no idea about code and I'm struggling with understanding some terminology.

I am sure I can cut & paste the code as directed, but what I don't understand is the instruction  "Where "1.wav" is the name of the audio file you want to use. The file must be in the root
directory with story.html"

How do I ensure that the file is in the root directory? 

I really need "dummies" instructions on the entire process or screenshots PLEASE.


Kevin Thorn

Hi Kristy,

Sorry to geek out on you and others. :)

The root directory is all the files/folders at the topmost level of a directory. 

For example, when you publish a Storyline project and it creates and output folder. That folder is its root. The bg_music.wav file would go in that folder at the topmost level. 

The story.html file is in the root directory. Another way to think of it is to ensure the music file and the story.html file can be seen in the same view.

This image of a typical output directory including HTML5 hopefully will help.


Paul Zamora

Got it working, I modified the code somewhat.
Place the embed code under the <!-- Version comment....
This is just for a straight play, no looping.  Swap out your music file name, and reisze it to 1x1. I have it as 100x100 just so you can see where it goes.  Give it a go!

<!-- version: 2.6.1507.2315 -->

<embed src="yourmusicfile.wav" autostart="true" loop="false" width="100" height="100" > </embed >

Alexandr Profile


I use this solution:
After publication, in the file story.html and story_html5.html before </body> insert this code:

<audio id = "music" preload = "auto" autoplay loop autobuffer>
<source src = "file.mp3" />
</ audio>

After the opening <body> tag embed code:

function change_volume (volume_level) {

var audio = document.getElementById ("music");
audio.volume = volume_level;}

In the project, on a slide (or a masterslide), if I need to change sound level, i use JavaScript trigger:
var volume_level=0;

where volume_level specify the desired sound level: 0 - no sound, 1 - 100% volume, 0.5 - 50% of the volume.

Sorry for my english.

Lee-Ann Williams

Hi, Ashley. It's been so long since this thread was started, I decided I should reach out to you directly. I have music on a base layer, and even though the other layers have "pause timeline on base layer" deselected, clicking on a button to advance to the next layer makes the music on the base layer stop playing. Any idea why this is happening? 

Ashley Terwilliger

Hi Lee-Ann,

Thanks for reaching out with your question. If you've set the slide layers to pause the base layer when advancing to another layer, it would make sense that the audio would stop playing when you do so. If you return to the base layer does it pick up where it left off or are the users not able to hear the audio again at all?