I’m currently planning an eye tracking experiment. According to the note in your documentation, I should set a timit limit. Is there a possibility to implement a global timer that automatically stops the experiment after, e.g., 30min? I only found the implementation of a timeout within an experimental trial but not for the experiment as such.
Also I’m wondering if there is an easy way to access and log the participants’ webcam resolution.
You could use add a Footer to every trial that checks how long it’s been since the experiment started and jumps to a trial that sends the results if it’s been too long:
const start_time = Date.now()
newFunction( ()=>Date.now()-start_time>(20 * 60 * 1000) ) // 20min
.test.is( true )
.success( jump("timeout") )
Sequence("intro", randomize("trials"), SendResults(), "end", "timeout")
newTrial("intro", newButton("Start the experiment").print().wait() )
newTrial("end", newText("This is the end").print(),newButton().wait() )
newText("You have timed out, we are sending your results to the server").print()
newText("Your results have been sent, thank you for your participation").print()