To make some questions with music video. | XM Community
Skip to main content

I would like to do the following three points regarding the setting of the questionnaire screen. Is there a good way?
・ I want to play music automatically so that the question can be displayed after the time when the music ends (for example, 30 seconds after opening the page) (display the music and the question on the same page). (Assuming that)
・ I want to keep playing music (repeat playback) while the page is open (assuming that I get answers while listening to music)
・ I want to set the above two at the same time.

Thank you!

If you are using YouTube, you can add the following parameters at the end of your URL to make it autoplay ?autoplay=1&controls=0&&showinfo=0&loop=1 so the final URL should look something like this: https://www.youtube.com/embed/HBDa22mdC8M?autoplay=1&controls=0&&showinfo=0&loop=1

 

However, in my experience, the loop feature is very flaky, it works when it wants to. So I would recommend, creating a playlist and having the same video in it like a 100 times.
You can also disable any interaction with the player by adding the following JS code:
document.getElementById(this.questionId).style.pointerEvents = "none";

Furthermore, you can hide the video from the participants by adding
this.getQuestionContainer().hide();
These need to go in addonReady method of your Video question.
Lastly, to display the question after sometime, you can use the following JS code:
Qualtrics.SurveyEngine.addOnload(function()
{
    this.getQuestionContainer().hide(); // Hide the question as soon as the page loads
});

Qualtrics.SurveyEngine.addOnReady(function()
{
    var delayTime = 6000 //This is the time of delay
    var that = this;
    setTimeout(function(){that.getQuestionContainer().show()}, delayTime); // Function to show the question
});
This needs to go into the JS of the question you are asking.




Leave a Reply