Forum Discussion
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!
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!
281 Replies
- EmilyBurnettCommunity Member
Hi Tiara,
This method should work with LMS in the same way. You should not need to add anything to the index.lms. Just add it to the story.html file. I just ran mine through SCORM Cloud to check, and it worked the same.
- AndreaSquires-aCommunity Member
Hi Emily,
Thank you for the wonderful audio trick, it's works like a charm when I'm publishing to web. But I need to publish to an LMS and mine needs the file to be zipped. I tried publishing as SCORM, adding the code, and then zipping and uploading. LMS wouldn't accept the file. Any ideas what's happening? Thank you.
- WendyFarmerSuper Hero
Hi Emily welcome back - can you check out my post above and is there an answer?
- EmilyBurnettCommunity Member
Hey Wendy,
I am not sure of a way to have this loop only on selected slides. This method will loop it through the entire course. I am only just beginning to dive into learning these kind of tricks, so hopefully someone else in the community may know of a way to do this.
If I do stumble across a way to achieve this, i will share an update here.
- SCOTTSARECommunity Member
Create a Slide Trigger and Execute JS in the slide you want to activate the audio in Storyline. In the slide trigger you can set when the audio file will start, i.e. by user interaction, timeline, cue, etc. The audio will play from that moment fwd regardless the number or types of slides placed afterwards. There may / not be a way to adjust looping or volume control, but I have not looked into it yet. I just tested this and it worked much in the same way as the html audio scr trick mentioned above except you can set when its to begin. You must Publish the module to test this feature - it does not work in Preview.
Add Script:
var audio = new Audio('audio_file.mp3');
audio.play();Add *.mp3 File:
Place the audio file in the same location as the story.html file.Pros: You can control when and how the audio will begin playing in Storyline.
Cons: As is, the volume control switch in Storyline will not control the volume of the audio file (Shazbat!) so it will either need to be adjusted using an unrelated program prior to publish or with additional script - if it exists.
Enjoy and good luck. Ja.
Thanks for popping in to share your solution as well Scott :)
- AmyEspositoCommunity Member
anyone know if there is a way to adjust the volume on background audio
- ANDREWGOLDSBYCommunity Member
I spent a good while trying to do the same thing. This will take you about an hour if you work through it, which is relatively much simpler. Not sure if this is still a problem. I've been searching all day for solutions and thought I'd share the one I finally came up with. Good luck! https://community.articulate.com/discussions/articulate-storyline/background-music-demo?page=7
- rosycolelliCommunity Member
Hi Tiara!
The audio, for all project works (on PC). I used the suggested code (in Htlm and htlm5 files). Unfortunately, it does not work on iPad or iPhone. If I launch the file htlm5 from my PC there is the music; while, on the iPad there isn't. Any suggestions? Thanks!
- rosycolelliCommunity Member
Thank you very much Matthew!
- rosycolelliCommunity Member
Sorry Matthew; I put the button, but does not work ... maybe the code in HTLM5 files I change it? Thanks :)
- MileneBelowCommunity Member
Hi Emily- you're a lifesaver! This worked for me. Thanks so much!
Related Content
- 2 months ago
- 3 months ago
- 7 months ago
- 4 months ago
- 6 months ago