COLINGRANT-a3ad
6 months 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 to obtain the slide duration, although I have seen at least three recommendations that I cannot get to work.
Option 1:
var player = GetPlayer().GetSlide();
//Or var player = GetPlayer();
var duration = player.GetDuration();
Option 2:
var player = GetPlayer();
var timeline = player.GetTimeline();
var duration = timeline.GetDuration();
Option 3:
var slideDuration = GetSlideDuration();
Help! And THANKS!