I am trying to find a way to launch a HTML5 video player automatically as its container div (#video_post1) changes position along the y axis.
Basically it is inside a slider which slides the articles along the mentioned y axis.

I had no problem making it autoplay, but it starts playing in the background before it becomes visible, so it has to be triggered when it starts to roll in.

my autoplay code:

      function callback () {

       window.addEventListener("load", callback, false);

  <div id="video_post1">
<video poster preload="true" controls with="500" height="200">
  <source src="http://www.edmondvarga.com/demo/videos/video.mp4" type="video/mp4">

Please help.
Best Regards