Timeline pauses when the course tab in browser loses focus

Feb 15, 2022

Hello.

I noticed that the course timeline gets paused when the user switches to other browser tabs. And the timeline resumes when the user switches to the course tab.

In my course there is a timer made through variables. The success of the course depends on a certain amount of time for which the person completed the course. 

I need the course timeline and timer to continue when the user switches browser tabs. How can I do that? Does anyone know suitable javascript or trigger? 

Or maybe someone knows a timer made through js? (the countdown timer doesn't work for me, the course shouldn't end when the time runs out)

1 Reply
Polina Surkova

Matthew, thanks! This is a great countdown timer. But my client wants something different. Time must not stop at 00:00 after 15 minutes.

So I see two solutions:

  • a countdown timer that goes negative after 10 minutes (I don't know how to do this)
  • a regular linear timer that starts at 00:00 and goes on indefinitely (if the user exceeds 10 minutes, then on the last slide with the results, he will receive error feedback)

Also on the last slide, I should display the value of the timer - how much time the user spent on this course.

I made a linear timer through variables but met the problem of the timeline pause when the tab loses focus.