title: Track how long a user has watched a video
body: <p>I teach an online course, and I need to make sure my students actually watch a certain video.  Now, I understand that everything can be defeated, but what I'm looking is the 80/20 rule were I can make a few tweaks to start on the journey of accountability for my students.</p>
  
  <p>Q1: Is there a way via JavaScript to fire an event if the current window loses focus?</p>
  
  <p>Q2: Is there a way to fire an event when the video finishes playing?</p>
  
  <p>Q3: Is there a way to make sure the video was played all the way through instead of the student clicking on the end of the timeline?</p>
  
  <p>I feel compelled to say (again), please don't answer this questions with something like "you're wasting your time, the students will defeat anything that you do".</p>