Embedded youtube video autoplay

More
3 years 6 months ago #140163 by larschrjensen01
I've run into a quaint problem. I design questionnaires in which people see an embedded youtube video and then answer a few questions related to that video. I randomize who gets to see which video by running the rand function and then setting a selection criteria based on the output of that function. I embed the youtube video in the following way:
<iframe width="560" height="315" src="https://www.youtube.com/embed/0r7x19mw-tU?rel=0&amp;controls=0&amp;showinfo=0;autoplay=1" frameborder="0" allowfullscreen></iframe>
This has worked for years, but now when a video is played the audio of the other videos are also played back at the same time. However, this happens only when autoplay toggle is on as in the above example. Of course it's not a big deal to have users press the play button, I'm just wondering what's causing this behavior. Does anyone have an idea of what's going on?

Please Iniciar sessão or Create an account to join the conversation.

LimeSurvey Partners
More
3 years 6 months ago #140173 by tpartner
To be honest, if you have several videos (some hidden) in the same page, all set to autoplay, I don't know why you didn't get that audio in the past. Hiding the iframe via CSS or JavaScript (as in the case of irrelevant questions) won't prevent the auto-play from kicking in.

Perhaps using something like a fancyBox modal, where the iframe isn't initialized until the modal is displayed would work - fancybox.net/

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Iniciar sessão or Create an account to join the conversation.

Começar agora!

Basta criar a sua conta e comece a usar o LimeSurvey hoje mesmo.

Registar agora
Subscreva o nosso boletim informativo!

Iniciar sessão