How to randomly insert a video from a Youtube playlist? | XM Community
Question

How to randomly insert a video from a Youtube playlist?

  • 12 September 2020
  • 2 replies
  • 26 views

Hello all,
I'm trying to create an experiment where I need to show bunch of different videos (around 200) to participants to rate them for the same questions.
How can I randomly insert these several videos from a Youtube playlist for each participant. How can I do it without manually inserting HTML? I want these videos to loop over without showing them twice.
Also, I'm planning to create a block where I'll add all my questions so that I don't have to write the same questions all over again for different videos. But how can I insert the the randomized list to display the videos that I mentioned above.
Your help and support is greatly appreciated. Thank you.


2 replies

Userlevel 7
Badge +22

Use loop and merge for this. Insert youtube video urls in the loop and merge fields and pipe it in the video tag src attribute.

Thank you for the reply.
Do you know how can I display series of videos from a Youtube playlist without inserting all of their urls because there are so many of them. I think inserting their urls one by one wouldn't be very efficient for me.

Leave a Reply