Replay page

ecunia Community Member Posts: 1
I want to create a button that allows the user to "replay" a page, i.e. the audio is reset and plays again. What attribute to I give to the button? thanks in advance.


  • @DavidS 40414 wrote:
    What I have found works for me is to create a page in a separate chapter. The only thing on this page is an action for On: Show, Go To: Back. Then, whenever this page is accessed, it immediately goes back to the previous page that the learner was viewing.

    To make this work, on your Replay button you would Go To the 'replay' page. The user clicks the button, the 'replay' page is accessed, and the replay page automatically goes back to the previous page which is the one that you wanted to restart from the beginning. This all happens in less than a second depending on the size of your page, network speed, etc..

    Note that if you have any variables or form objects on the page that you want reset as well, then on the page with these elements you will want to have actions to reset these variables/objects when the page is shown.

    This is a very easy solution to reset all of your show/hides, animations, etc., at once.

    If, however, you only want to restart the audio and nothing else, then you could either display the audio controller which has a Play button built in. Or, build your own play button with the action to Play the file. (If necessary, put a Stop action before the Play action as this will in essence rewind the audio to the beginning.)

    I have found that while this works for the preview mode in Lectora, it does not work for IE. I am having this issue as well and have not found a resolution to this issue. I am not strong at coding so I was hoping to find an easier method.
  • benpitman
    benpitman Community Member Posts: 763
    I have not tried this but you should be able to put two actions on the button. Stop and Play. You might have to put a .5 sec delay on the play. Preview in Browser.
  • switalba
    switalba Community Member Posts: 88
    This worked great. A new trick, quick and simple.  Thanks!
  • dpeteranderl9908
    dpeteranderl9908 Community Member Posts: 10
    However, for this solution you have to put one replay button on each page and have to link it the "stop" and "play" actions to the audiofile on each page. Isn't there a way to create a global replay button?
  • jasonadal
    jasonadal Community Member Posts: 441 ♪ Opening Act ♪
    If you're looking for just the audio to replay, here's a way to do it without having to reload the entire page. The buttons can be placed at the title level, chapter level, etc. You will have to remember to add the class to the audio file in the Properties -> Appearance for the file.

    I also added a button that will reload the page instead of a "Go To" for a replay page. This button uses the JavaScript function