Bug with autoplaying a video from Youtube. The sound of a second video is overlapping. | XM Community
Skip to main content

Hello everyone
I am currently using video from youtube for a survey and i have an issue with the autoplaying. After 1 or 2 second of watching the video it seems that the autoplay launch a second video and the sound of this video is overlapping with the sound of the first video which make the video unlistenable.
It is as if the autoplay launched the same video twice with one second of delay.
When I deactivate the autoplay I no longer have this problem. But i need the autoplay for my experiment. Does anyone have a solution are explaination for this problem ?
So here are my HTML and JS code, note that im asking the video to be launch fullscreen and that the participant cannot pause or change the sound of the video.
Html:


JS
image.png
I also tried to see what happened when i just copypast the youtube emebed link and add the ?autoplay=1" option without anything else in the code and i have still the same problem...
Here for the exemple my html of this second video.

Thanks a lot !

Does this happen during the survey preview or the actual published survey link? I had this problem with the preview, then realized it was happening because it has both the Desktop and Mobile previews playing at once.


Thanks a lot, indeed i did not tried with the published survey link. It is working perfectly fine.


Since April 2018, Google made some changes to the Autoplay Policy. You not only need to add the autoplay=1 as a query param, but also add allow='autoplay' as an iframe's attribute
So while embed youtube video, you will have to do something like this:




Leave a Reply