Forum Discussion
Background Music Demo
The reason I set up the audio.src="BrightlyFancy.mp3" was because I made this particular project have multiple songs that can be switch between. In my file I put that line into a JavaScript trigger in the .story file and used the "Execute JavaScript" trigger to switch between songs.
If you have just one song you'd like to play, you can just add:
<audio src="BrightlyFancy.mp3" id="bgSong" preload="auto" autoplay loop></audio>
To your story.html file, where "BrightlyFancy.mp3" is the name of the audio file you'd like to play.
Make sure it is located within the <Body> tags and outside of the <script> tags
Don't forget to add your audio file to the root of your output folder or else your course wont be able to find your audio file.
Hope this helps! If you need to add more control over the background music (more than just having it loop through the whole course) let me know and I can help you get it working! :)
- DanielAlbarran9 years agoCommunity Member
Thanks, Jackson. For the background song, is it possible to pause or turn the volume down?
- RajeshRamesh-2b8 years agoCommunity Member
It is working exactly fine for me. But my other user not able to listen while launching the course in google chrome. Please let me know is there any other way to resolve this>
- JenniferDow-98e4 years agoCommunity Member
Can you please tell me how to view this story html file for adding the background audio line of script? I am only able to view the manifest file and I do not see any <body> or <script> tags.