Elapsed Time when the user is active on the page - help with Javascript code
Hello appreciate your help on this matter~
While storyline has built in variables to document project time & slide time, to my knowledge if you want to collect the elapsed active time, as not on another browser tab or another window, you need to use Javascript.
I have attempted this with no results in two ways (see attached storyline files)
Attempt #1: Visibility
Use document.hidden to detect when the user is inactive (e.g., switches to a different tab).
Attempt #2: Set Interval Method
Use "start," "stop," and "reset" function when the page is active. Adjust from this source.
Note: on the file below I just created it for the first slide but I would replicate it for the rest.
Instead of pasting all the code I have it in the files below. Any suggestions on how to accomplish this goal of recording the total course time and the time on each of the slides (but pausing the timer when they aren't on the actual page)?