Forum Discussion
Hi Ned, thanks so much for taking the time to send this information to me. I've read through Owen's tutorial and the discussion thread in detail but unfortunately, I still can't get this to work for me. Like with others in the discussion thread, I think I'm falling down in the step with the URL to the audio file. (I have zero experience of JavaScript so I'm finding my way through the dark here). I've attached a sample and I'm hoping you could take a look when you have time? This isn't my project, just some templates I found in content library (I can't share my actual project but I figure if I can get it to work here I can replicate it in my actual project). I copied the JS from Owen's sample file and just added the folder and audio file name for my file. In Owen's example the path just starts with story_content/external_files so that's what I did...
- NedWhiteley4 years agoCommunity Member
Hi Mary,
The reason why Owen's example starts with story_content/external_files is because he has placed his audio under the Resources tab (edit the Player options to add Resources) and these are then automatically added to a folder called external_files, which is a sub-folder of the story_content folder. If you don't create any resources, the external_files folder is not created.
I notice from your javascript that you have set up your audio file as:
audio.src="story_content/WebObjects/605VS0Dcn6h/audiofile.mp3"
If, when you publish your file to the web (or LMS), you have a WebObjects/605VS0Dcn6h/ folder in your story_content folder, which contains your audio file named audiofile.mp3, then it should play. If you don't have the folder, you can manually add it once you have published your course and also add the audio file and it should then work.
The advantage of including your audio in Resources is that the folder structure is automatically created for you every time you publish the course. The disadvantage is that it creates a Resources tab and shows your audio in it, which you may not want.
Hope this helps, but if you are still having problems, just get back to me here.
By the way, don't worry about the "black art" of javascript. I hadn't used it before I saw Owen's tutorial either!
- MathNotermans-94 years agoCommunity Member
As a workaround for the resources tab, you can use a custom player. Only show the resources on the slide with the external javascript libraries. And on your main slides ensure it uses a player that doesnot has the resources. Then you wont see it.
- NedWhiteley4 years agoCommunity Member
Hi Math,
Thanks for that useful little tip. I hadn't thought of that option.