Set the handler after the element exists — read video.duration inside the callback.
video.duration
Lines: 0 | Characters: 0