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!
Hi Emily,
This is so cool! Thank for posting this. I'm am definitely adding this to my library of tricks.
Hi April,
Just FYI, I tested this in IE 11, and it worked fine for me.
Hi Tara,
Yes you can adjust the volume. It just requires some additional code. To make this work I changed the audio statement to include and ID:
<audio id="myAudio" src="bensound-jazzyfrenchy.mp3" preload="auto" autoplay loop></audio>
Next, we need a volume control, so I added a very simple HTML volume control on the next line after the audio tag:
<input id="vol-control" type="range" min="0" max="100" step="1" oninput="SetVolume(this.value)" onchange="SetVolume(this.value)"></input>
And finally, we the the SetVolume function referenced by the volume control that we just added. Place this script in the head section. I placed it right after the default script block.
<script>
function SetVolume(val)
{
var player = document.getElementById('myAudio');
console.log('Before: ' + player.volume);
player.volume = val / 100;
console.log('After: ' + player.volume);
}
</script>
I've included the modified file for you to look at.