Forum Discussion
Background Audio Cool Trick
- 2 years ago
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:
- Background audio is now supported in the published video output.
As a first step, I recommend updating Storyline 360 to the latest version. Here's how:
If you have any questions, please let us know in this thread or privately in a support case.
Have a great day!
Wow - thanks for sharing Emily - this is great.
One question...we create modules with content and then at the end add in a fun Module Challenge which is only maybe 10 slides and the client only wants the music on the challenge.
Do you know a way of just having the audio loop on those specific slides?
- DaveCox8 years agoCommunity Member
Hi Wendy,
Add this script to the head section of the story.html file:
<script>
function SetVolume(val)
{
var player = document.getElementById('myAudio');
console.log('Before: ' + player.volume);
player.volume = val / 100;
console.log('After: ' + player.volume);
}
function PauseAudio() {
var player = document.getElementById('myAudio');
player['pause']();
}
function PlayAudio() {
var player = document.getElementById('myAudio');
player['play']();
}
</script>Remove autoplay from the audio tag, so that it looks like this:
<audio id="myAudio" src="bensound-jazzyfrenchy.mp3" preload="auto" loop></audio>
This will cause the audio file to load, but not start. Now all you have to do is call PlayAudio(); from a javascript trigger in your storyline file. You can also call PauseAudio(); to stop the audio.
I Modified emily's file to add a volume control and play and pause buttons.
- WendyFarmer8 years agoSuper Hero
Wow thanks Dave I'll give it a go and let you know how I go ;-)
- BrennaJue8 years agoCommunity Member
Wendy, I'm looking for the same feature. Did you ever find out how to do this?