Delay Between Audio

AmplitudeJS allows the developer to add a time delay between the audio objects defined. By default, this value is 0. When you initialize AmplitudeJS you can provide an integer in MS for how long you want AmplitudeJS to wait before it starts playing the next audio track.

Initialization

You can set this value on initialization:

Amplitude.init({
  songs: ['...'],
  delay: 3000
});

AmplitudeJS will now wait 3 seconds before playing the next track.

Public Function

You can also set this value through a public function like this:

Amplitude.setDelay( 3000 );

If you need to see what the delay is set to, run:

Amplitude.getDelay();