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&amp;byline=0&amp;portrait=0&amp;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&amp;byline=0&amp;portrait=0&amp;autoplay=1';      settimeout(function()     {         vimeo_frame.attr('src', vimeo_src);     }, 2000); } </script> 

don't forget include jquery ;-)


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -