Background Music keep playing.

Apr 19, 2023

When I pause the player, the music just keeps playing, is there any trick to pause the background music in sync with the course material.

Pinned Reply
Lauren Connelly

Hi everyone!

Good news! I'm happy to share that we just released Storyline 360 (Build 3.81.31200.0), which includes a feature to control the background audio for each slide using triggers to play, pause, or stop the playlist.

This was highly requested, so we hope it serves you in your course creation! If you run into any snags, don't hesitate to contact our team in a support case.

30 Replies
Kai Dean

What I would like to see as part of this this new feature (which is a great addition) is the ability to fade it out at the end of a piece of content too. I want to reach my last slide and it fades to zero, right now, the music continues to play forever. This means I cannot use it at all which is a real shame as I love how it will automatically dip the audio when there is another sound happening on the slide.

Crystal Komarizadeh

Hello. I heard about this workaround but have yet to try it:

A workaround for pausing the background audio for a specific slide when a video ends or is paused is to add another video to the slide. Configure the video as follows:

 

  1. Make sure the video is short and has no audio.
  2. Insert the video into the slide and drag it outside of the slide area so it is not visible to the learner.
  3. Add a trigger to play the new video when your video completes.
  4. Add a trigger to play the new video when the new video completes.

 

This will result in a hidden video playing outside the slide that starts when your original video ends and loops continuously during the slide. While this new video plays, the background audio will be paused if you enable the option under Slide-Related Settings to Pause background audio when video content plays on a slide.

Kerstin Hummler

It would be great if you could include a feature to pause the background audio. Just like Kai, I need the music to fade out and stop at the end of the last slide. If the music continues to play forever I cannot use what I built at all, which is a pity. Otherwise the background audio feature is great since it makes everything sound so professional!

 

Isaac Preston

I came up with a solution to pause the background audio for a single slide, and it could potentially be used to end the background audio at the end of the last slide in a module. Not sure about fade out, but you could stop it.

Accessibility controls need to be enabled in the player for this to work.

If you do not want to actually show the accessibility controls:
On the first slide of the course, execute javascript when timeline starts.
var link = document.getElementById('settings');
link.style.display = 'none';
link.style.visibility = 'hidden';

On the slide that you want to turn the background music off, execute javascript when timeline starts.
var thisVariable = GetPlayer().GetVar("musicOn");
if (thisVariable == 1) {
document.getElementById("backgroundAudio-switch").click();
GetPlayer().SetVar("musicOn",0);
}

On the slide before and after the "turn it off" slide, execute javascript when timeline starts
var thisVariable = GetPlayer().GetVar("musicOn");
if (thisVariable == 0) {
document.getElementById("backgroundAudio-switch").click();
GetPlayer().SetVar("musicOn",1);
}
(this is different than the one above. Copy it very carefully.)

Create a new number variable in the project, name it musicOn. Default value 1.

Lauren Connelly

Hi everyone!

Good news! I'm happy to share that we just released Storyline 360 (Build 3.81.31200.0), which includes a feature to control the background audio for each slide using triggers to play, pause, or stop the playlist.

This was highly requested, so we hope it serves you in your course creation! If you run into any snags, don't hesitate to contact our team in a support case.

Amanda Allen

The problem is the background music doesn't pause when the user clicks pause on the playbar. For example, let's say the learner wants to pause the audio to answer a phone call. When they select Pause on the player the in-slide audio pauses, but the background audio does not. It seems like that scenario would be a more common use case than one in which a developer would want to turn off/pause the background audio for a single slide. 

olivier chemin

Like Amanda, I would also like to pause the background music when the user clicks on the pause button on the player and reactivate it when they click on Play.
Or I'd like to find a way of integrating a toggle background audio button without displaying all the other toggle switches for accessibility controls.