I uploaded a video from Qulatrics libary.
The subject need to press space when he recognize a dangerous situation (while watching the video).
I want to save the time of all the presses.
The subject can press many times and I need to save each time
how can i do that?
and how can I get access to saved data ?
this is my code:
Qualtrics.SurveyEngine.addOnReady(function()
{
let question = this;
/* hide next button */
question.hideNextButton();
/* when the video end, click on next button */
jQuery($('videoPlayer')).on("ended", function() { setTimeout(function () {jQuery('#NextButton').click();},1000); });
document.onkeydown = function(event) {
if (event.which == 32) {
let pressCuurnetTime = $('videoPlayer').currentTime /* the time when the subject pressed space */
event.preventDefault();
}
}
});
Best answer by TomG
View original