Explore the community Forums Lectora Lectora Questions & Answers Jump to and play audio issue Reply To: Jump to and play audio issue

#385774 Score: 0
Profile photo of Tim K
Tim K
friend finder
junior moderator
wise owl
curious george
Group Member
354 pts

The custom player is more or less a copy of Lectoras with Lectora controlling (only) the original. The playFromTo function sets the current time to a value and uses an event listener for timeupdate to pause at the end. So it’s the same approach you’ve been using. The function and all event listener refer to the custom player. If you use a Lectora action the original will come up.

I believe using variables should be more effort as you’d have to modify the variables before calling the function instead of directly calling it with the values.

If you wanted to use variables you’d have to make sure the values a are seconds, e.g. 67.4 (I think you can use more digits after the dot). If you’re using Lectora variables you’ll have to turn the values into numbers as Lectora variables are always strings.

You could use variables for the arguments:


Or you could modify the function to get the values and remove the arguments.