Restarting audio from the beginning

Feb 19, 2021

Hi

I have some audio that starts when the user presses a 'start audio' button.

I have added a 'pause' button. If the user pauses the audio, and then presses the 'start audio' again, the audio continues from where it was at when it was paused.

I want to add a 'restart audio' button that will start the audio from the beginning but I can't work out how to do it. If I add a trigger to play audio when you press the 'restart audio' button, it just plays where the audio was last up to rather than starting it again from the beginning.

Any ideas would be most welcome

Thanks

Sue

27 Replies
Katherine Burrows

Just in case anyone finds this post via Google as I did:

What worked for me ultimately was to do what Leslie originally suggested with putting a duplicate audio file and buttons in a separate layer, but I had to combine it with what Maria mentioned about using the Stop and Start Audio triggers.

As a note, I'm creating a playlist where the audio is set to automatically play when the slide timeline starts, and the user has a play / pause option as well as a skip option (a forward arrow with a "jump to the next slide" trigger).

When the user clicks the back button on the base layer, it does three things:

  • A Stop Media Audio trigger activates
  • A Jump to Start of Timeline on This Slide trigger activates
    • (this may not actually be contributing to the solution but I've got some other things on the slide I also wanted to restart when the song restarts)
  • A Show Layer 2 trigger activates

Layer 2 has the same exact buttons and content as Base Layer, but the audio file is a duplicate (Audio1). The properties of Layer 2 are set to "Resume initial state upon return." Like the base layer, Layer 2 has an auto-play trigger for Audio1.

When the user clicks the back button on the base layer, it does three things:

  • A Stop Media Audio1 trigger activates
  • A Hide Layer 2 trigger activates
  • A Play Media Audio trigger activates
    • (Audio is the media file on the base slide.)

This returns the user to the base layer, where the timeline has already been reset, and because the media was stopped when Layer 2 opened, it restarts from the beginning with the play trigger.

Because Audio1 is stopped when Layer 2 closes, the button on the base layer that reopens Layer 2 also causes the music to restart on that layer. So it creates an infinite loop of restarting the song when the user clicks the button by taking the user to either the base layer or Layer 2.

Presumably you could also do this with videos or anything else Storyline recognizes as "media," though I haven't tested that yet.

Hope this helps other people! Even with the lovely advice already in this post it took me a solid hour or two to figure it out yesterday.