php - Delay in autoplay of vimeo's video -
i using iframe display video on www.ridesharebuddy.com. using autoplay feature in this.
i doing way.
<iframe src="//player.vimeo.com/video/82633004?title=0&byline=0&portrait=0&autoplay=1" width="500" height="320" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
but starts before whole page loaded. can give delay in load video after 5-10 seconds?
you can append video link after page loaded via jquery.
<iframe id="vimeo_frame" src="#" width="500" height="320" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <script> jquery(window).load(function() { var vimeo_frame = jquery('#vimeo_frame'), vimeo_src = 'player.vimeo.com/video/82633004?title=0&byline=0&portrait=0&autoplay=1'; settimeout(function() { vimeo_frame.attr('src', vimeo_src); }, 2000); } </script>
don't forget include jquery ;-)
Comments
Post a Comment