0

I have a vimeo video embedded in a hidden div. When I click a link, the video pops up with fancybox, and the autoplay starts.

My problem is in Chrome, the video starts playing directly when I entering the site, and you can here the backgroundmusic of the video.

How would I fix this?

Jarrod Dixon
  • 15,727
  • 9
  • 60
  • 72
Kim Andersson
  • 251
  • 2
  • 4
  • 15

1 Answers1

0

There are two ways you could fix this:

  1. Wait to write the iframe into the lightbox until right when the user clicks to open it.
  2. Remove autoplay from the iframe src and use the play() function to start playback when the lightbox opens.
Brad Dougherty
  • 908
  • 4
  • 14