Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Automatic Play like facebook functionality

You can set jw player, so put automatic play when users scroll in the area that is the video? As does facebook ?.


1 Community Answers


JW Player Support Agent  
0 rated :


The following code may help you out:

<html> <head>

<script src=""></script>

</head> <body> <center> <h2>primary: HTML5</h2> <div id="player">Loading Your Player…</div> <script type="text/javascript"> var _bind = function(el, evt, fcn) { el[window.addEventListener ? 'addEventListener' : 'attachEvent']( window.addEventListener ? evt : 'on' + evt, fcn, false); }; jwplayer("player").setup({ file: 'bunny.mp4', image: 'bunny.jpg', width:'100%' }); jwplayer("player").onReady(function() { var container = jwplayer("player").getContainer(); _bind(container, 'mouseenter', function() { jwplayer("player").play(true); }); _bind(container, 'mouseleave', function() { jwplayer("player").pause(true); }); }); </script></center> </body> </html>


This question has received the maximum number of answers.