I have encountered a very weird problem with fancybox modal that whenever
my website gets load then the video gets played itself which should played in a modal when
someone clicks on the specific link. Video will get loaded after around 5 mins all by itself.
NOTE:I am using chrome and on it when site opens i dont click anything on the site leave the site as it is and after around five minutes a video gets played all by itself .
kindly let me know how can i fix this issue.
Thanks,
Code part related to video:
<div style="display:none;">
<div id="divVideo" style="background:url(./images/blackbg.png);width:850px;height:480px;">
<p>
<iframe id="iframe-video" style="margin-top:40px;" src="http://player.vimeo.com/video/39892976?api=1&byline=0&portrait=0&color=ff9933&autoplay=1&loop=0&player_id=iframe-video" width="670" height="380" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<div class="fs16" style="margin-top:-15px;color:#5f5f60;">
Having problems watching? Switch to non-HD
</div>
</p>
</div>
</div>
Change
autoplay=1toautoplay=0in your iframe url. As long as you have the iFrame on you page at load (existing in the html rather than added later with javascript), and you haveautoplay=1in the url, Vimeo will start playing instantly.If you are looking for the video to autoplay when the user opens the modal, then you will have a more complex solution, because you will need
autoplay=1in the url, but NOT have it in the html and only in your javascript file.