const video = document.querySelector("video");
video.addEventListener("durationchange", (event) => {
console.log("Not sure why, but the duration of the video has changed.");
});HTMLMediaElement: durationchange event / notebook
HTMLMediaElement: durationchange event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const video = document.querySelector("video");
video.ondurationchange = (event) => {
console.log("Not sure why, but the duration of the video has changed.");
};