Forum Discussion
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!
- TanyaThampip494Community Member
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!
- TanyaThampip494Community Member
I found out how to do this eventually. Here are the steps:
- Go to the first slide on storyline.
- Go to trigger panel, click "Create a New Trigger." It's the button that looks like a piece of paper
- Select "Execute Javascript" under Action.
- Click on JavaScript.
- 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(); - The rest of the settings I used was "When the timeline starts on this slide."
- perrinaCommunity Member
Thanks for sharing this.
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! ✨
- SarahDavis-2db7Community Member
This was very helpful and works perfectly! Thank you so much! :)
- Jürgen_Schoene_Community Member
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