Don't require that media progresses further to be saved

This commit is contained in:
Carl Pearson
2024-09-22 15:20:26 -06:00
parent 600a860f94
commit fefe231e0e

View File

@@ -7,10 +7,7 @@ const pageKey = `mediaProgress_${window.location.pathname}`;
// Function to save the current time of the most recently played media
function saveMediaProgress(media) {
const currentProgress = parseFloat(localStorage.getItem(pageKey)) || 0;
if (media.currentTime > currentProgress) {
localStorage.setItem(pageKey, media.currentTime);
}
localStorage.setItem(pageKey, media.currentTime);
}
// Function to load and set the saved time for all media elements