thrimbletrimmer: Don't listen for loadedmetadata in two places

The first place never fires, the second one replaces it I think.
chrusher/bus_synthesizer
Mike Lang 4 days ago
parent 9d45833ed1
commit 6c97654da3

@ -448,13 +448,6 @@ window.addEventListener("DOMContentLoaded", async (event) => {
}
document.getElementById("video-info-thumbnail-mode").value = videoInfo.thumbnail_mode;
updateThumbnailInputState();
if (videoInfo.thumbnail_time) {
document.getElementById("video").addEventListener("loadedmetadata", (_event) => {
document.getElementById("video-info-thumbnail-time").value = videoHumanTimeFromWubloaderTime(
videoInfo.thumbnail_time,
);
});
}
// Ensure that changing values on load doesn't set keep the page dirty.
globalPageState = PAGE_STATE.CLEAN;
@ -945,6 +938,12 @@ async function initializeVideoInfo() {
firstChapterPlayFromStartTime.classList.add("hidden");
}
if (videoInfo.thumbnail_time) {
document.getElementById("video-info-thumbnail-time").value = videoHumanTimeFromWubloaderTime(
videoInfo.thumbnail_time,
);
}
rangeDataUpdated();
videoElement.removeEventListener("loadedmetadata", handleInitialSetupForDuration);
};

Loading…
Cancel
Save