Howto: Synchronize timelines across layouts

A simple way:

In your Head HTML add a global variable for your audio source: (this saves adding it to all layouts in a scene load function)

<script>
window.audio = new Audio ("${resourcesFolderName}/NAME_OF_YOUR_AUDIO_FILE";
</script>

Then on Layout Unload you can update the currentTime property by using this function:

window.currentTime = audio.currentTime;

Note You have to Play and Stop the audio using Javacsript functions with this (not by dragging the resource in or using “Play Sound” and “Stop Sound”)

You can do this by creating functions with the following and calling them on mouse click

for play:

audio.play();

stop:

audio.pause();
3 Likes