
Automatic Play like facebook functionality
Hi,
You can set jw player, so put automatic play when users scroll in the area that is the video? As does facebook ?.
tk
Hi,
You can set jw player, so put automatic play when users scroll in the area that is the video? As does facebook ?.
tk
Hello,
The following code may help you out:
<html> <head><script src="http://p.jwpcdn.com/6/12/jwplayer.js"></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>Randy