Forum Discussion

SarahDavis-2db7's avatar
SarahDavis-2db7
Community Member
2 years ago

Playback speed variable

Hi all! I'm very excited that the player now allows for the audience to adjust the playback speed of a course. However, I'd like to enable this same functionality using completely custom navigation. As far as I can find, there are no built-in variables for this or an way to create your own that would enable that functionality. Has anyone else found a way to do that? Thanks!

  • you can set/get the playback speed with a trigger (javascript)

    DS.appState.setPlaybackSpeed( value );
    var value = DS.appState.getPlaybackSpeed();

    for the playbackRate every value between 0.25 and 4 is possible

  • I am looking to do the same thing but I am not familiar with javascript or variables. Can someone please help point me in the right direction or share the steps from the beginning? Thank you so much in advance!

     

    • TanyaThampip494's avatar
      TanyaThampip494
      Community Member

      I found out how to do this eventually. Here are the steps:

      1. Go to the first slide on storyline. 
      2. Go to trigger panel, click "Create a New Trigger." It's the button that looks like a piece of paper
      3. Select "Execute Javascript" under Action.
      4. Click on JavaScript.
      5. Copy and paste the following:
        DS.appState.setPlaybackSpeed( value );
        var value = DS.appState.getPlaybackSpeed();

        I wanted to speed up the whole training by 1.25. Example: 
        DS.appState.setPlaybackSpeed(1.25);
        var value = DS.appState.getPlaybackSpeed();

      6. The rest of the settings I used was "When the timeline starts on this slide."
  • Glad to hear Jürgen could assist you with this, Sarah!

    If you have any other questions, feel free to reach out in the community.

    Have a nice afternoon! ✨