Hello everyone,
I would like to record timestamps from the moment participants press play on a recording until they answer a selection question.
I have searched for an answer in the forum, and I have found some related topics, but none of them shows exactly what I want to do. I am not sure it is even possible.
Despite not knowing any JS, I have managed to record the timestamp at the moment of pressing the play button. Also, if I add an HTML button, I can calculate the time from pressing play on the recording until pressing the HTML button.
What I can't do is recording the timestamp at the moment participants answer the selection question.
I thought of using a selection sequence question, but I can't since after each selection question I have included a Likert scale.
Here is the code I have. Could someone help, please? Thank you!
var startTime, endTime;
function start() {
startTime = new Date();
};
var audio = document.getElementById("speaker43");
audio.onplay = start();
function end() {
endTime = new Date();
var question = document.getElementById("ID43");
question.onclick = end();
var input = document.getElementById("RT01_01");
input.value = endTime - startTime;
}