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!
- DaveCoxCommunity Member
Hi Travis,
That's interesting. I haven't seen Storyline include the bootstrap library in anything I've published so far. That doesn't mean that is doesn't though. I also haven't tried this code in the HTML5 files yet, so I'm not sure if it will still work.
One thing that I can suggest is to try this to troubleshoot:
- Launch the course in your browser.
- When the course loads, press F12 on your keyboard.
- In the debug window, locate and display the console.
- Click you browser refresh button to reload the course in the browser.
- Watch the console window to see if if reports any Javascript errors.
I hope that this helps.
- TravisJerovetz-Community Member
That is great info, thank you! I went through the process and I do get a"failed to load resource, error not found
- RyanCarlsonCommunity Member
Great solutions, Dave. I can confirm from my own experience that depending on the browser, you may also have to update the story_html5.html with the same code change that is described from the OP. If you're using Chrome, I believe that's when it will do the "browser sniffing" and decide to flip over to the html5.html file. It's worth editing both of the files to ensure that's not the problem at least.
- GerardoPedrazaCommunity Member
As long as you guys keep coming with “cool tricks”, they will never fix things, and you’ll have to constantly do extra work.
- DaveCoxCommunity Member
Hi Ryan,
Yes, you are correct. You do need to update the story_html5.html file as well. Unfortunately, Storyline now minifies that file, which makes it much harder to read and understand. It is doable though. The best way, is to edit the file to add some of the line feeds back in to make the file more readable. Javascript doesn't care about white-space, so this will not hurt the file. Then you can add the required code.
Hi Travis,
The error you are seeing tells you that either your path or your filename is incorrect. Since you didn't specify a path, make sure that your audio file is in the same directory as the html file. Also, take a look at the capitalization that you used for the filename. Windows doesn't care about case, but Javascript does. Make sure that your Javascript name matches the case of the file name that you see when you display it in the explorer window.
I hope that it is that simple. Good luck.
Dave
- BrettGrover-769Community Member
Dave since you have answered recently would you please take a quick look at my output zip file and see if you can spot my error(s)?
- RyanCarlsonCommunity Member
Ahhh. Gotcha. It's clearly been a few months since I've had to do this, so I didn't notice. haha.
- BrettGrover-769Community Member
So I am reaching out because like a lot of you, I can't get this to work. I got it once but had to make changes and cannot replicate. I have included the zip file for contents review. Any help would be GREATLY appreciated.
- iouliaKornbe475Community Member
Hi Dave,
Same for me. I have tried everything. Would you please take a quick look at my output zip file and see if you can spot my error(s)?
- DKPRE-LEARNPVTLCommunity Member
I tried the same thing but it didnt work. Please let us know if there is a browser or version issue. Of if you can give us working storyline published output. I tried the attachments given in the post. but its not working for me. Please help!!
- OwenHoltSuper Hero
The JavaScript solution still works for me (unless you need this to work on smart phone).
See example file in Rise with StoryLine Block, code and instructions:
https://rise.articulate.com/share/HO9-VvSOZZdjXn5Ga0-a-BFDcYZQYcbr- iouliaKornbe475Community Member
Hey Owen,
Thanks for the instructions (and I love that you created it as a walk-thru using Rise)!
I actually worked with Math Notermans (from Sweden!) to get it working. And using his steps, I created my own "How To" document which I'm attaching here for anyone who needs it. I haven't compared it to your steps yet to see if they're the same, but my course is up and running! :-) WOOT!
Oh - and mine is published to an LMS and it DOES work on a mobile device!
- BrettGrover-769Community Member
Owen,
Thanks for taking a look at this. I GREATLY appreciate it.
- OwenHoltSuper Hero
It plays fine for me in both I.E. and Edge bit not in Chrome. I would need to see your source .story file to trouble shoot this.
- SablayaMayoCommunity Member
Hello
I am developing a course for a client and she asks me to sound a LOOP throughout the course, except for the first slide and it is an intro and has its own sound and the last slide has its own sound ... now, the file. what he gave me is a 7-second mp3 and he wants the whole course to be repeated ... and that within the course there is a button to pause / play music since it is independent from the voice of a narrator that sounds on each slide.
- OwenHoltSuper Hero
Are you trying to replicate this exact sample? There is a LOT of custom work modifying the player. If this is one of the client's samples, the best place to start would be with the .story file and the published output. Chances are, there is a custom CSS document or post publish customizations made to the generated css documents.
- SablayaMayoCommunity Member
Hello
I am developing a course for a client and she asks me to sound a LOOP throughout the course, except for the first slide and it is an intro and has its own sound and the last slide has its own sound ... now, the file. what he gave me is a 7-second mp3 and he wants the whole course to be repeated ... and that within the course there is a button to pause / play music since it is independent from the voice of a narrator that sounds on each slide.