Forum Discussion
COLINGRANT-a3ad
2 years agoCommunity Member
GetDuration
Hi. I am trying to use JavaScript to get the duration of a given slide and pass it to Storyline. The SetVar part (where one passes a JavaScript variable to Storyline) works fine, but I cannot seem ...
SamHill
2 years agoSuper Hero
Hi Colin, I've never seen these functions before. The API that Storyline provides is very limited. Using the GetPlayer(), you can only use that to GetVar and SetVar.
const player = GetPlayer();
player.SetVar('myvar',true);
player.GetVar('myvar');
In terms of duration, it looks like Storyline provides variables for elapsed time and not duration, for example: Slide.ElapsedTime, Scene.ElapsedTime and Project.ElapsedTime,
Are you able to direct me to where you have scene the examples you provided?