How can I keep playing audio when turning to another page? | XM Community
Skip to main content

Hi there,
I use the code below to autoplay a music clip, and participants will answer questions while listening to music. I would like to keep playing the same music clip without any break on the next page. That is, the music keeps playing, and participants answer questions on two separate pages while listening to the music. Currently, I put this code snippet onto these two pages, but there definitely will be a break. On the second page, the music clip will be replayed from start. What can I do to achieve that purpose? Thank you!


``

What you ask for is not possible for the simple reason that upon clicking the next button, the current page is unloaded and the next one loaded.
What you can do however is to use some JS tricks. See this demo.
Its one page, but all questions are hidden and then shown one at a time.


https://www.qualtrics.com/community/discussion/comment/37834#Comment_37834Thanks so much for this solution. How can I view the JS code? Can I add a "next question" button on the page so that the second page shows up like a page-turn? Thank you!


The code is pretty customized to the questions. If you share the QSF, I may able to tell you how to go about it.


Music_-_Copy_for_QA.qsfThanks again! The QSF has been uploaded. I'd like to have the participants answer the three categories of questions. Hope they can press some button on the page to see the next category/set of questions. I'm just wondering, does the demo you posted work on mobile phones? I tried on my phone but couldn't type anything.
Thanks for your help!


It was intended for desktops where you have a keyboard.
If you attach a keyboard to your phone using USB, then it will work.


Leave a Reply