I need to embed a youtube video in our survey and I need to know when it finishes, as I want to display a question or next button after the video goes to completion. We can't use a timer as we are allowing people to pause the video (unless I can pause the timer?), but not advance/fast forward the video. I have tried to get the template youtube iframe code (https://developers.google.com/youtube/iframe_api_reference) working within Qualtrics, but that doesn't seem to work as it seems to ignore the javascript, unless I'm missing something basic (which honestly I hope I am). I am putting the javascript in the Qualtrics.SurveyEngine.addOnload function. FWIW, It works just fine as a stand alone page, attached.
I am able to insert the youtube video using just an iframe but again, when I try to use youtube's API function onPlayerStateChange, I can never get that working.
TL;DR. Is there a way that I can detect when a youtube video goes to completion so I can show a question or next button?
I hope this made sense and that someone can point me to what I'm doing wrong, or at least tell me what I'm trying to do isn't possible.
Thanks!
icon
Best answer by mylegshurt 19 April 2018, 21:19
View original