Javascript for multiple youtube videos not working properly | XM Community
Skip to main content
I would like to record pause times for multiple youtube videos.

I was able to get a pause time for a video and have failed to get more pause times for the next videos.

I am attaching the .qsf file here.
With the help of my friend, I was able to solve this issue.

Basically, "onYouTubeIframeAPIReady" function only gets called the first time it initializes and thus for the second video, it wasn't getting called to record the pause time.

So, I manually called it in the function Qualtrics.SurveyEngine.addOnload().

Thank you! This solved a problem I spent hours on :)


Leave a Reply