Forum Discussion
Audio not playing in Review 360 or S3
- 2 months 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!
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.
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?
- PhilMayor2 months 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.
- TravisMurrayLXD2 months 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.- PhilMayor2 months agoSuper Hero
You have an error somewhere.
If the console doesn't give you a line error, try this, publish to web, open user.js. Paste it into a code checker like JSHint or paste into chatgpt and ask it if it can see an error.
Related Content
- 1 year ago