title: Set time to watch the player jwplayer
body: <p>I working on an idea, I want a person only has 10 minutes to watch the player (jwplayer) I made a script that limits the video to catch, but not quite what I want, the system is the same as the old megavideos .</p>
  
  <pre><code>&lt;script&gt;
  function list(){
      a = document.getElementById('container');
      b = document.getElementById('erro_msg');
      $('#video-slider').load('updating.php');
      a.style.display = 'none';
      b.style.display = 'block';
  
  }
  jwplayer("container").setup({
      width:629,
      height:353,
      primary: "flash",
  
      allowscriptaccess: "always",
      allowfullscreen: true,
  
              events:{
              onTime: function(event) {
          if (event.position &gt;= 5600) {
              this.stop();
              list();
      } }
      },
  
  
    playlist: [{
        image: "admin/uploads/snapshots/1563283b5af1a859ddd46c1919368bec.jpg",
      sources: [{
        file: "admin/uploads/I_love_you_beth_cooper.mp4",
        label: "360p"
      },{
        file: "admin/uploads/I_love_you_beth_cooper.flv",
        label: "240p"
      }]
    }],  
          });
  
   &lt;/script&gt; 
  </code></pre>
  
  <p>this script send a message when the time passed, but as you can see, just have a limit in the case should be 10 minutes to the total irrespective of how many videos you watch.</p>