Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Embedded youtube video autoplay

  • larschrjensen01
  • larschrjensen01's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 7 months ago #140163 by larschrjensen01
Embedded youtube video autoplay was created 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:
Code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/0r7x19mw-tU?rel=0&amp;amp;controls=0&amp;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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 7 months ago #140173 by tpartner
Replied by tpartner on topic Embedded youtube video autoplay
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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose