ondurationchange event Event Object Example Execute JavaScript when the duration of the video changes: Try it » The bottom of this article contains more examples. Definition and Usage The ondurationchange event is triggered when the duration of the video/audio (audio/video) changes. Note: After the video/audio (audio/video) has been loaded, the duration of the video/audio (audio/video) is changed from "NaN" to the actual duration. During the loading of video/audio (audio/video), the events are triggered in the following order: onloadstart ondurationchange onloadedmetadata onloadeddata onprogress oncanplay oncanplaythrough Browser support The numbers in the table indicate the version number of the first browser to support the event. Events ondurationchange Yes 9.0 Yes Yes Yes Syntax In HTML: < element ondurationchange=" myScript ">Try it In JavaScript: object .ondurationchange=function(){ myScript }; Try it In JavaScript, use the addEventListener() method: object .addEventListener("durationchange", myScript ); Try it Note: Internet Explorer 8 and earlier IE versions do not support addEventListener() method. Technical Details Does it support bubbling: No Is it cancelable: No Event type: Event Supported HTML tags: , More examples Example Execute JavaScript when the audio starts loading: Try it » Event Object