Refac skip videoProgress update when currentTime equals video duration

This commit is contained in:
MerlinScheurer 2025-02-01 15:05:53 +01:00
parent 4dafa2f427
commit a092744958
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ const handleTimeUpdate =
});
}
if (currentTime < 10) return;
if (currentTime < 10 && currentTime === Number(videoTag.currentTarget.duration)) return;
if (Number((currentTime % 10).toFixed(1)) <= 0.2) {
// Check progress every 10 seconds or else progress is checked a few times a second
const videoProgressResponse = await updateVideoProgressById({