Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Bug with autoplaying a video from Youtube. The sound of a second video is overlapping.

Emmmanuel
Emmmanuel MontréalCommunity Member - Trial User Qubie ✭

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:

<div style="height=315px;width=560px;pointer-events:none;"><iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" id="iframe1" scrolling="no" src="https://www.youtube.com/embed/2bk28Y42BlY?autoplay=1" width="560"></iframe></div>

JS


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.

<iframe allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/lZcc1D0YhE0?autoplay=1" width="560"></iframe>

Thanks a lot !

Tagged:

Best Answer

  • audreyc
    audreyc CT, USACommunity Member Qubie ✭
    Accepted Answer

    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.

Answers

  • Emmmanuel
    Emmmanuel MontréalCommunity Member - Trial User Qubie ✭

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

  • kevinkatler
    kevinkatler United Arab EmiratesCommunity Member Qubie ✭

    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:

    <iframe src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1" allow='autoplay'></iframe>