title: Get duration of local video selected using angular
body: <p>Is it possible to validate the duration of a local video that a user has selected using a file input in angular?</p>
  
  <p>I have the following html which binds the selected video to my model.</p>
  
  <pre><code>&lt;input type="file" ng-model='video.videoToUpload' accept="video/*" required&gt;
  </code></pre>
  
  <p>The properties of the video in the controller include the filesize and filetype but no duration.  I want to avoid the overhead of submitting the video to the web server just to validate the duration.</p>