Sounds in JavaScript



I was wondering if there was any way to cause a sound to made from JavaScript.
If this is possible, I was wondering if there was a way to activate sounds either custom sounds or the ones built into ActivePresenter.
Thank you

ActivePresenter version:




You can do as follows:

  1. Insert an audio object into the slide, set it autoplay and initial hidden.
  2. Add an additional timeline, and an appear effect of the audio object to that timeline.
  3. Use prez.startTimeline('timeline name'); to start the timeline. It’ll play the audio.

You can also use only JavaScript as mentioned in this thread:


Thank you for your help.
Is there any way that you could send me an example where this is used to have a sound play at a controlled time? Because, I may have made a mistake, but the timeline only starts when the user clicks something on the slide.

Thank you

Hi John,

You should not use JavaScript or other actions to play a sound at a specific time.
Just insert the sound at that time in the main timeline.


Hey @ToanLS
is there a way to stop the timeline and restart it from the beginning?
I have several obejcts on a timeline but when ‚Äúpause timline‚ÄĚ is triggered and ‚Äústart timeline‚ÄĚ is triggered again (to replay the timeline) the objects that were initally hidden are now shown (because they are shown when the timeline ends) and the timeline starts from the beginning so objects are overlapping.
Is there a function like ‚ÄúStoptimeline‚ÄĚ or ‚Äúrestarttimeline‚ÄĚ?
I think ‚Äúpause timeline‚ÄĚ just jumps to the end of the timeline.

Kind regards

Hi @sariwest,

‚ÄúStart timeline‚ÄĚ action will jumps to the end of the timeline if it isn‚Äôt completed yet before restarting, so you see the initially hidden objects appear.
You can add disappear effects for your objects at the end of your timeline to overcome this issue.
We’ll improve these timeline actions in version 9.


1 Like