Using console in the browser this is really simple:
var vid = document.getElementsByTagName("video"); console.log(vid[0].duration)