Forum Discussion
Audio not playing in Review 360 or S3
- 3 days ago
Here is where I landed...
After battling with this all day with no fix, I realized I could just use a "Play media" trigger to play the audio in the base layer and then use a JS trigger at the very end, just before the timeline ends, to reset the audio, in the case that the user clicks "replay".
💥 In summary: Storyline takes care of the audio start, JS takes care of the fade and reset. That creates no issues when published to Review 360 or S3.
Thank for you help PhilMayor and I hope this saves someone out there a lot of time in the future!
Thanks for your response PhilMayor!
I did what you suggested and discovered that Storyline isn't compiling the JavaScript triggers when I publish. The code works fine in preview mode, but when I publish to Review 360 or web (Amazon S3), I get 'Script not defined' errors - even for a simple one-line test. This appears to be a file corruption or Storyline software issue, not a problem with the actual JavaScript code.
I closed the project and created a simple slide with a test button with a simple Javascript test and that worked. So it looks the issue is somewhere/somehow within my project itself.
So I'm thinking I need to try to maybe copy everything into a fresh project in SL and redo the Javascript triggers from scratch. Do you think this will solve what appears to be a corrupted project file?
Thank you!
I suspect you have an error in the code in one of your triggers.
the way storyline executes code one error can poison your code so it stops
executing and you can get undefined errors. The simple way to check if your code is being included is to publish and look in the user.js file it should all be there.
you should have an error in the console to give you a line number of where your error is.
- TravisMurrayLXD3 days agoCommunity Member
Thanks for that next step!
However, before I read your reply I had just copied the slide with the audio issue into a fresh project, with the same code and published it. That worked.
So that would mean it's something within the original SL project files since the code is unchanged, right?- PhilMayor3 days agoSuper Hero
You have code elsewhere? All code gets added into one file. An error somewhere else will also break good code.
The fact it works in a new project shows that code is good but something is broken elsewhere in your project.
- TravisMurrayLXD3 days agoCommunity Member
That's interesting insight!
Yes, I have two different "Execute Javascript" triggers: One plays a specific audio from the base layer at a certain point and another one fades it out when the user clicks a button. These same triggers are copied and pasted throughout on various slides, referring to different audio files on those slides.
- TravisMurrayLXD3 days agoCommunity Member
Here is where I landed...
After battling with this all day with no fix, I realized I could just use a "Play media" trigger to play the audio in the base layer and then use a JS trigger at the very end, just before the timeline ends, to reset the audio, in the case that the user clicks "replay".
💥 In summary: Storyline takes care of the audio start, JS takes care of the fade and reset. That creates no issues when published to Review 360 or S3.
Thank for you help PhilMayor and I hope this saves someone out there a lot of time in the future!
Related Content
- 10 months ago