Javascript for multiple youtube videos not working properly | XM Community

Javascript for multiple youtube videos not working properly

  • 24 July 2019
  • 2 replies
  • 14 views

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.

2 replies

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().
Badge

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

Leave a Reply