Note: I have absolutely no knowledge of coding or using Qualtrics before, so excuse my terminology. I have 4 different videos and I also have to use randomization feature.
I have reviewed all the questions related to the matter and tried all available solutions on the community pages, but they do not seem to work for me (using mobile for the survey). The delay next-button does not work either.
This is how i embeded and iframed the video (got it from the community pages):
Before proceeding, I would like to ensure that the participants have finished watching the video (38 sec). Please, can you help?
You should use JavaScript to check if the video has ended rather than a timer. See this post:
https://community.qualtrics.com/XMcommunity/discussion/comment/54695#Comment_54695
Thank you TomG:-)
Do you mean adding this to JavaScript:
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('myvideo', {
events: {
'onReady': function(){ alert("here finally"); },
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerStateChange(event)n
if(event data==YT.PlayerState.ENDED{
$('NextButton').click()
}
}
Yes, something like that. I didn't write that code and haven't tried it so I can't say for certain that it works. BTW, that code clicks the next button when the video has ended, which might not be exactly what you want.
Hi,
Thank you. That is precisely what I wanted, but I can not get it to work...
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.