title: Html 5 video stop event
body: <p>Im green with JS, bit i would like to implement to my website html 5 video.</p>
  
  <p>video code looks like this</p>
  
  <pre><code>&lt;video id="myvideo" style=width:600px; height:550px controls&gt;
      &lt;source src="video.mp4" type="video/mp4"&gt;
      &lt;source src="video.ogg" type="video/ogg"&gt;
      Your browser does not support HTML5 video.
  &lt;/video&gt;
  </code></pre>
  
  <p>I would like to make video pasue on 15 second and trigger an event
  Now my event is on button
   button code</p>
  
  <pre><code>&lt;button onclick="myFunction()"&gt;Watch&lt;/button&gt;
  &lt;script&gt;
      function myFunction() {
          RC_STARTGATE();
      }
  &lt;/script&gt;  
  </code></pre>
  
  <p>Edit: Button is temporary solution.  I would like to remove button and something like this:
  Video starts=> after 15 seconds it pauses=> and triggers same event as button did  RC_STARTGATE().</p>
  
  <p>Edit 2: Great! now i need to get button removed and start timeout when video starts.</p>
  
  <pre><code>var vid = document.getElementById("myVideo");
  
  function myFunction(){
      vid.play();
  
      setTimeout(function(){
          vid.pause();
      }, 15000); //
  
  setTimeout(function(){
          RC_STARTGATE();
      }, 15000); //
  }
  </code></pre>