the very simplest solution without any scripting:
create a timeline with an action at the timestamp that you'll define as inactive ... say 60 seconds. this action will rerun your animations.
add an action to every interactive-element your hypedoc covers which will restart the above mentioned timeline