English  Italiano  Français  Español  Dansk  Deutsch  Deutsch  Português  Suomi 
Video Lightbox

How to play the video using jquery video streaming automatically?

Jul 09, 2013

Q: Can I make the video play without click on it?
I want it to play automatically, after the page loaded.

A: You should set the following function in Video LightBox BODY section:

<script type="text/javascript">
$( function(){$(".videogallery a#mylink").overlay().load()});
</script>



You should also set id="mylink" for video link:

<a class="voverlay" id="mylink" href="http://www.youtube.com/v/31aWy9lcyJk?autoplay=1&rel=0&enablejsapi=1&playerapiid=ytplayer"...



For example:

<!-- Start VideoLightBox.com BODY section -->
	<div class="videogallery">
	<a class="voverlay" id="mylink" href="http://vimeo.com/moogaloop.swf?clip_id=4560219&server=vimeo.com&show_title=1&show_byline=1&autoplay=1" title="Vimeo"><img src="index_videolb/thumbnails/0.png" alt="Vimeo" /><span></span></a><a class="videolb" href="http://videolightbox.com">Embed YouTube Video  by VideoLightBox.com v2.1</a>
	</div>
	
	<script src="index_videolb/jquery.tools.min.js" type="text/javascript"></script>
	<script src="index_videolb/videolightbox.js" type="text/javascript"></script>
	
	
	<script type="text/javascript">
$( function(){$(".videogallery a#mylink").overlay().load()});
</script>

	
	

	<!-- End VideoLightBox.com BODY section -->

Related