The DomContentLoaded event occurs when the HTML tags have all been loaded, and before all of the content such as images or videos have been accessed.
If you want the video duration, you may have to use the document load event instead, when the browser has had time to load the video.
There are also other video-specific events that could be used too so that you can get the information earlier than on load completed.